From Magnus Kessler, "FFmpeg headers need __STDC_CONSTANT_MACROS defined before stdint.h is loaded.

The file FFmpegHeaders.hpp sets this definition. However, if stdint.h is
already included through other files, it won't take any effect.

Include FFmpeg headers as early as possible in order to avoid stdint.h being
included on other paths.
"
This commit is contained in:
Robert Osfield 2010-06-23 14:38:49 +00:00
parent 5092c08dab
commit 0816d4f9cd
3 changed files with 7 additions and 7 deletions

View File

@ -2,8 +2,8 @@
#ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_AUDIO_STREAM_H #ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_AUDIO_STREAM_H
#define HEADER_GUARD_OSGFFMPEG_FFMPEG_AUDIO_STREAM_H #define HEADER_GUARD_OSGFFMPEG_FFMPEG_AUDIO_STREAM_H
#include <osg/AudioStream>
#include "FFmpegDecoder.hpp" #include "FFmpegDecoder.hpp"
#include <osg/AudioStream>
namespace osgFFmpeg namespace osgFFmpeg
{ {

View File

@ -2,14 +2,14 @@
#ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_IMAGE_STREAM_H #ifndef HEADER_GUARD_OSGFFMPEG_FFMPEG_IMAGE_STREAM_H
#define HEADER_GUARD_OSGFFMPEG_FFMPEG_IMAGE_STREAM_H #define HEADER_GUARD_OSGFFMPEG_FFMPEG_IMAGE_STREAM_H
#include "FFmpegDecoder.hpp"
#include "MessageQueue.hpp"
#include <osg/ImageStream> #include <osg/ImageStream>
#include <OpenThreads/Condition> #include <OpenThreads/Condition>
#include <OpenThreads/Thread> #include <OpenThreads/Thread>
#include "FFmpegDecoder.hpp"
#include "MessageQueue.hpp"
namespace osgFFmpeg namespace osgFFmpeg
{ {

View File

@ -11,13 +11,13 @@
* OpenSceneGraph Public License for more details. * OpenSceneGraph Public License for more details.
*/ */
#include "FFmpegHeaders.hpp"
#include "FFmpegImageStream.hpp"
#include <osgDB/Registry> #include <osgDB/Registry>
#include <osgDB/FileNameUtils> #include <osgDB/FileNameUtils>
#include <osgDB/FileUtils> #include <osgDB/FileUtils>
#include "FFmpegHeaders.hpp"
#include "FFmpegImageStream.hpp"
/** Implementation heavily inspired by http://www.dranger.com/ffmpeg/ */ /** Implementation heavily inspired by http://www.dranger.com/ffmpeg/ */