1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 06:23:53 +00:00

Fix compilation of the FFmpeg decoder

This commit is contained in:
Chris Robinson 2012-03-20 14:13:58 -07:00
parent e48745b68e
commit 9a48002025
2 changed files with 15 additions and 6 deletions

View file

@ -126,19 +126,22 @@ set(OPENMW_LIBS ${MANGLE_ALL} ${OENGINE_ALL})
set(OPENMW_LIBS_HEADER) set(OPENMW_LIBS_HEADER)
# Sound setup # Sound setup
set(SOUND_INPUT_INCLUDES "")
set(SOUND_INPUT_LIBRARY "")
set(SOUND_DEFINE "")
if (USE_FFMPEG) if (USE_FFMPEG)
find_package(FFMPEG REQUIRED) find_package(FFMPEG REQUIRED)
set(SOUND_INPUT_INCLUDES ${FFMPEG_INCLUDE_DIR}) set(SOUND_INPUT_INCLUDES ${SOUND_INPUT_INCLUDES} ${FFMPEG_INCLUDE_DIR})
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES}) set(SOUND_INPUT_LIBRARY ${SOUND_INPUT_LIBRARY} ${FFMPEG_LIBRARIES})
set(SOUND_DEFINE -DOPENMW_USE_FFMPEG) set(SOUND_DEFINE ${SOUND_DEFINE} -DOPENMW_USE_FFMPEG)
endif (USE_FFMPEG) endif (USE_FFMPEG)
if (USE_MPG123) if (USE_MPG123)
find_package(MPG123 REQUIRED) find_package(MPG123 REQUIRED)
find_package(SNDFILE REQUIRED) find_package(SNDFILE REQUIRED)
set(SOUND_INPUT_INCLUDES ${MPG123_INCLUDE_DIR} ${SNDFILE_INCLUDE_DIR}) set(SOUND_INPUT_INCLUDES ${SOUND_INPUT_INCLUDES} ${MPG123_INCLUDE_DIR} ${SNDFILE_INCLUDE_DIR})
set(SOUND_INPUT_LIBRARY ${MPG123_LIBRARY} ${SNDFILE_LIBRARY}) set(SOUND_INPUT_LIBRARY ${SOUND_INPUT_LIBRARY} ${MPG123_LIBRARY} ${SNDFILE_LIBRARY})
set(SOUND_DEFINE -DOPENMW_USE_MPG123) set(SOUND_DEFINE ${SOUND_DEFINE} -DOPENMW_USE_MPG123)
endif (USE_MPG123) endif (USE_MPG123)
# Platform specific # Platform specific

View file

@ -3,6 +3,11 @@
#include <string> #include <string>
// FIXME: This can't be right? The headers refuse to build without UINT64_C,
// which only gets defined in stdint.h in either C99 mode or with this macro
// defined...
#define __STDC_CONSTANT_MACROS
#include <stdint.h>
extern "C" extern "C"
{ {
#include <avcodec.h> #include <avcodec.h>
@ -25,6 +30,7 @@ namespace MWSound
virtual void rewind(); virtual void rewind();
FFmpeg_Decoder(); FFmpeg_Decoder();
public:
virtual ~FFmpeg_Decoder(); virtual ~FFmpeg_Decoder();
friend class SoundManager; friend class SoundManager;