From 2f37d31108f5190ee5312d724431b20b8fabe879 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 14 Dec 2012 04:12:34 -0800 Subject: [PATCH] Move some definitions into the source file they're used in --- apps/openmw/mwrender/videoplayer.cpp | 18 +++++++++++++++++- apps/openmw/mwrender/videoplayer.hpp | 13 ------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/apps/openmw/mwrender/videoplayer.cpp b/apps/openmw/mwrender/videoplayer.cpp index b9ff81de01..9cbac16884 100644 --- a/apps/openmw/mwrender/videoplayer.cpp +++ b/apps/openmw/mwrender/videoplayer.cpp @@ -8,9 +8,25 @@ #include "../mwsound/sound.hpp" +#define MAX_AUDIOQ_SIZE (5 * 16 * 1024) +#define MAX_VIDEOQ_SIZE (5 * 256 * 1024) +#define AV_SYNC_THRESHOLD 0.01 +#define AV_NOSYNC_THRESHOLD 10.0 +#define SAMPLE_CORRECTION_PERCENT_MAX 10 +#define AUDIO_DIFF_AVG_NB 20 + + namespace MWRender { +enum { + AV_SYNC_AUDIO_MASTER, + AV_SYNC_VIDEO_MASTER, + AV_SYNC_EXTERNAL_MASTER, + + AV_SYNC_DEFAULT = AV_SYNC_EXTERNAL_MASTER +}; + void PacketQueue::put(AVPacket *pkt) { AVPacketList *pkt1; @@ -773,7 +789,7 @@ void VideoState::init(const std::string& resourceName) int audio_index = -1; unsigned int i; - this->av_sync_type = DEFAULT_AV_SYNC_TYPE; + this->av_sync_type = AV_SYNC_DEFAULT; this->videoStream = -1; this->audioStream = -1; this->refresh = false; diff --git a/apps/openmw/mwrender/videoplayer.hpp b/apps/openmw/mwrender/videoplayer.hpp index 4bbd81a6e7..428907c4ad 100644 --- a/apps/openmw/mwrender/videoplayer.hpp +++ b/apps/openmw/mwrender/videoplayer.hpp @@ -21,15 +21,7 @@ extern "C" #include "../mwbase/soundmanager.hpp" -#define MAX_AUDIOQ_SIZE (5 * 16 * 1024) -#define MAX_VIDEOQ_SIZE (5 * 256 * 1024) -#define AV_SYNC_THRESHOLD 0.01 -#define AV_NOSYNC_THRESHOLD 10.0 -#define SAMPLE_CORRECTION_PERCENT_MAX 10 -#define AUDIO_DIFF_AVG_NB 20 #define VIDEO_PICTURE_QUEUE_SIZE 1 -#define DEFAULT_AV_SYNC_TYPE AV_SYNC_EXTERNAL_MASTER - namespace MWRender { @@ -147,11 +139,6 @@ namespace MWRender int display_ready; }; - enum { - AV_SYNC_AUDIO_MASTER, - AV_SYNC_VIDEO_MASTER, - AV_SYNC_EXTERNAL_MASTER - }; class VideoPlayer