gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. 87fb7a38dd63cfac4daa


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 87fb7a38dd63cfac4daa930335e3bf6c709c62ab
Date: Thu, 16 Sep 2010 13:58:08 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  87fb7a38dd63cfac4daa930335e3bf6c709c62ab (commit)
       via  58954df5dd9545f48ece15abba5cbd9e09f8abe9 (commit)
      from  444ed1f8354d78679e9e0d6546f6e4871db3d3d2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=87fb7a38dd63cfac4daa930335e3bf6c709c62ab


commit 87fb7a38dd63cfac4daa930335e3bf6c709c62ab
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Sep 16 15:42:08 2010 +0200

    Use preferred style for FFmpeg.

diff --git a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp 
b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
index 596d025..cead0c7 100644
--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
@@ -1,4 +1,4 @@
-// AudioDecoderFfmpeg.cpp: Audio decoding using the FFMPEG library.
+// AudioDecoderFfmpeg.cpp: Audio decoding using the FFmpeg library.
 // 
 //   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 //
@@ -53,10 +53,10 @@ AudioDecoderFfmpeg::AudioDecoderFfmpeg(const AudioInfo& 
info)
     setup(info);
 
     if (info.type == CODEC_TYPE_CUSTOM) {
-        log_debug(_("AudioDecoderFfmpeg: initialized FFMPEG codec %d (%s)"),
+        log_debug(_("AudioDecoderFfmpeg: initialized FFmpeg codec %d (%s)"),
             _audioCodec->id, _audioCodec->name);
     } else {
-        log_debug(_("AudioDecoderFfmpeg: initialized FFMPEG codec %d (%s) "
+        log_debug(_("AudioDecoderFfmpeg: initialized FFmpeg codec %d (%s) "
                     "for flash codec %d (%s)"),
             _audioCodec->id, _audioCodec->name,
             info.codec, (audioCodecType)info.codec);
@@ -71,7 +71,7 @@ AudioDecoderFfmpeg::AudioDecoderFfmpeg(SoundInfo& info)
 {
     setup(info);
 
-       log_debug(_("AudioDecoderFfmpeg: initialized FFMPEG codec %s (%d)"),
+       log_debug(_("AudioDecoderFfmpeg: initialized FFmpeg codec %s (%d)"),
                _audioCodec->name, _audioCodec->id);
 }
 
@@ -145,7 +145,7 @@ void AudioDecoderFfmpeg::setup(SoundInfo& info)
                _audioCodecCtx=0;
         boost::format err = boost::format(
             _("AudioDecoderFfmpeg: avcodec_open failed to initialize "
-            "FFMPEG codec %s (%d)")) % _audioCodec->name % (int)codec_id;
+            "FFmpeg codec %s (%d)")) % _audioCodec->name % (int)codec_id;
        throw MediaException(err.str());
        }
 
@@ -334,7 +334,7 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
 
                boost::format err = boost::format(
                        _("AudioDecoderFfmpeg: avcodec_open failed to 
initialize "
-                       "FFMPEG codec %s (%d)")) % _audioCodec->name % 
(int)codec_id;
+                       "FFmpeg codec %s (%d)")) % _audioCodec->name % 
(int)codec_id;
                throw MediaException(err.str());
        }
 

http://git.savannah.gnu.org/cgit//commit/?id=58954df5dd9545f48ece15abba5cbd9e09f8abe9


commit 58954df5dd9545f48ece15abba5cbd9e09f8abe9
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Sep 16 15:33:43 2010 +0200

    Rename enumerators, split long lines.

diff --git a/libcore/swf/DefineVideoStreamTag.cpp 
b/libcore/swf/DefineVideoStreamTag.cpp
index 0e4d948..1611155 100644
--- a/libcore/swf/DefineVideoStreamTag.cpp
+++ b/libcore/swf/DefineVideoStreamTag.cpp
@@ -123,7 +123,8 @@ DefineVideoStreamTag::read(SWFStream& in)
        }
 
        _videoInfo.reset(new media::VideoInfo(m_codec_id, _width, _height,
-                0 /*framerate*/, 0 /*duration*/, media::FLASH /*typei*/));
+                0 /*framerate*/, 0 /*duration*/,
+                media::CODEC_TYPE_FLASH));
 }
 
 void
diff --git a/libmedia/AudioDecoderSimple.cpp b/libmedia/AudioDecoderSimple.cpp
index 04b7c4c..b88d9d7 100644
--- a/libmedia/AudioDecoderSimple.cpp
+++ b/libmedia/AudioDecoderSimple.cpp
@@ -290,7 +290,7 @@ AudioDecoderSimple::AudioDecoderSimple(const AudioInfo& 
info)
 {
     setup(info);
 
-       log_debug(_("AudioDecoderSimple: initialized FLASH codec %s (%d)"),
+       log_debug(_("AudioDecoderSimple: initialized flash codec %s (%d)"),
                (int)_codec, _codec);
 }
 
@@ -303,7 +303,7 @@ AudioDecoderSimple::AudioDecoderSimple(const SoundInfo& 
info)
 {
     setup(info);
 
-       log_debug(_("AudioDecoderSimple: initialized FLASH codec %s (%d)"),
+       log_debug(_("AudioDecoderSimple: initialized flash codec %s (%d)"),
                (int)_codec, _codec);
 }
 
@@ -338,8 +338,7 @@ AudioDecoderSimple::setup(const SoundInfo& info)
 void
 AudioDecoderSimple::setup(const AudioInfo& info)
 {
-       if (info.type != FLASH)
-    {
+    if (info.type != CODEC_TYPE_FLASH) {
         boost::format err = boost::format(
             _("AudioDecoderSimple: unable to intepret custom audio codec id 
%s"))
             % info.codec;
diff --git a/libmedia/FLVParser.cpp b/libmedia/FLVParser.cpp
index 1c57f60..d76b290 100644
--- a/libmedia/FLVParser.cpp
+++ b/libmedia/FLVParser.cpp
@@ -188,10 +188,10 @@ FLVParser::parseAudioTag(const FLVTag& flvtag, const 
FLVAudioTag& audiotag, boos
 
        // If this is the first audioframe no info about the
        // audio format has been noted, so we do that now
-       if ( !_audioInfo.get() )
-       {
+       if (!_audioInfo.get()) {
                _audioInfo.reset(new AudioInfo(audiotag.codec, 
audiotag.samplerate,
-                    audiotag.samplesize, audiotag.stereo, 0, FLASH) );
+                    audiotag.samplesize, audiotag.stereo, 0,
+                    CODEC_TYPE_FLASH));
 
         if (header) {
 
@@ -266,7 +266,8 @@ FLVParser::parseVideoTag(const FLVTag& flvtag, const 
FLVVideoTag& videotag, boos
        // If this is the first videoframe no info about the
        // video format has been noted, so we do that now
        if ( ! _videoInfo.get() ) {
-               _videoInfo.reset(new VideoInfo(videotag.codec, 0, 0, 0, 0, 
FLASH));
+               _videoInfo.reset(new VideoInfo(videotag.codec, 0, 0, 0, 0,
+                    CODEC_TYPE_FLASH));
 
                if (header) {
             // The frame is 0-padded up to the end. It may be larger than
diff --git a/libmedia/MediaHandler.cpp b/libmedia/MediaHandler.cpp
index 7d1c497..5d3688a 100644
--- a/libmedia/MediaHandler.cpp
+++ b/libmedia/MediaHandler.cpp
@@ -80,7 +80,7 @@ MediaHandler::createMediaParser(std::auto_ptr<IOChannel> 
stream)
 std::auto_ptr<AudioDecoder>
 MediaHandler::createFlashAudioDecoder(const AudioInfo& info)
 {
-    assert ( info.type == FLASH );
+    assert (info.type == CODEC_TYPE_FLASH );
 
     audioCodecType codec = static_cast<audioCodecType>(info.codec);
     switch (codec)
@@ -104,7 +104,7 @@ MediaHandler::createFlashAudioDecoder(const AudioInfo& info)
         {
             boost::format err = boost::format(
                 _("MediaHandler::createFlashAudioDecoder:"
-                  " no available FLASH decoders for codec %d (%s)")) %
+                  " no available flash decoders for codec %d (%s)")) %
                 (int)codec % codec;
             throw MediaException(err.str());
         }
diff --git a/libmedia/MediaHandler.h b/libmedia/MediaHandler.h
index 66d714a..eae25d7 100644
--- a/libmedia/MediaHandler.h
+++ b/libmedia/MediaHandler.h
@@ -146,17 +146,17 @@ protected:
     /// This is an abstract base class, so not instantiable anyway.
     MediaHandler() {}
 
-    /// Create an AudioDecoder for FLASH codecs 
+    /// Create an AudioDecoder for CODEC_TYPE_FLASH codecs 
     //
     /// This method is attempted as a fallback in case
     /// a mediahandler-specific audio decoder couldn't be created
-    /// for a FLASH codec.
+    /// for a CODEC_TYPE_FLASH codec.
     /// 
     /// @throws a MediaException if it can't create a decoder
     ///
     /// @param info
     ///     Informations about the audio. It is *required*
-    ///     for info.type to be media::FLASH (caller should check
+    ///     for info.type to be media::CODEC_TYPE_FLASH (caller should check
     ///     that before calling this).
     ///
     std::auto_ptr<AudioDecoder> createFlashAudioDecoder(const AudioInfo& info);
diff --git a/libmedia/MediaParser.h b/libmedia/MediaParser.h
index b91727c..267d702 100644
--- a/libmedia/MediaParser.h
+++ b/libmedia/MediaParser.h
@@ -61,10 +61,10 @@ enum videoFrameType
 enum codecType
 {
        /// The internal flash codec ids
-       FLASH,
+       CODEC_TYPE_FLASH,
 
        /// Custom codecs ids
-       CUSTOM
+       CODEC_TYPE_CUSTOM
 };
 
 /// Video codec ids as defined in flash
@@ -202,7 +202,7 @@ public:
     /// @param codeci
     ///     Audio codec id.
     ///     To be interpreted as a media::audioCodecType if the typei
-    ///     parameter is FLASH; otherwise it's an opaque number to use
+    ///     parameter is CODEC_TYPE_FLASH; otherwise it's an opaque number to 
use
     ///     for codec information transfer between a MediaParser and a
     ///     AudioDecoder from the same %media handler module.
     ///
@@ -238,7 +238,7 @@ public:
 
        /// Codec identifier
        //
-       /// This has to be interpreted as audioCodecType if codecType type is 
FLASH
+       /// This has to be interpreted as audioCodecType if codecType type is 
CODEC_TYPE_FLASH
        /// or interpretation is opaque and we rely on the assumption that the 
AudioInfo
        /// creator and the AudioInfo user have a way to get a shared 
interpretation
        ///
@@ -287,7 +287,7 @@ public:
     /// @param codeci
     ///     Video codec id.
     ///     To be interpreted as a media::videoCodecType if the typei
-    ///     parameter is FLASH; otherwise it's an opaque number to use
+    ///     parameter is CODEC_TYPE_FLASH; otherwise it's an opaque number to 
use
     ///     for codec information transfer between a MediaParser and a
     ///     VideoDecoder from the same %media handler module.
     ///
diff --git a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp 
b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
index e84be80..596d025 100644
--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
@@ -52,12 +52,12 @@ AudioDecoderFfmpeg::AudioDecoderFfmpeg(const AudioInfo& 
info)
 {
     setup(info);
 
-    if ( info.type == CUSTOM ) {
+    if (info.type == CODEC_TYPE_CUSTOM) {
         log_debug(_("AudioDecoderFfmpeg: initialized FFMPEG codec %d (%s)"),
             _audioCodec->id, _audioCodec->name);
     } else {
         log_debug(_("AudioDecoderFfmpeg: initialized FFMPEG codec %d (%s) "
-                    "for FLASH codec %d (%s)"),
+                    "for flash codec %d (%s)"),
             _audioCodec->id, _audioCodec->name,
             info.codec, (audioCodecType)info.codec);
     }
@@ -178,12 +178,12 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
 
        enum CodecID codec_id = CODEC_ID_NONE;
 
-       if (info.type == CUSTOM)
+       if (info.type == CODEC_TYPE_CUSTOM)
        {
                codec_id = static_cast<CodecID>(info.codec);
         _needsParsing=true; // @todo check this !
        }
-       else if (info.type == FLASH)
+       else if (info.type == CODEC_TYPE_FLASH)
        {
 
                switch(info.codec)
@@ -218,7 +218,7 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
 
                        default:
                            boost::format err = boost::format(
-                               _("AudioDecoderFfmpeg: unsupported FLASH audio "
+                               _("AudioDecoderFfmpeg: unsupported flash audio "
                         "codec %d (%s)")) %
                         info.codec % (audioCodecType)info.codec;
                            throw MediaException(err.str());
@@ -235,7 +235,7 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
        _audioCodec = avcodec_find_decoder(codec_id);
        if (!_audioCodec)
        {
-               if (info.type == FLASH) {
+               if (info.type == CODEC_TYPE_FLASH) {
                        boost::format err = boost::format(
                                _("AudioDecoderFfmpeg: libavcodec could not 
find a decoder "
                     "for codec %d (%s)")) %
@@ -258,8 +258,7 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
         _parser = av_parser_init(codec_id);
         if (!_parser) {
             boost::format err;
-            if ( info.type == FLASH )
-            {
+            if (info.type == CODEC_TYPE_FLASH) {
                 err = boost::format(
                     _("AudioDecoderFfmpeg: could not initialize a parser for "
                         "flash codec id %d (%s)")) %
diff --git a/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp 
b/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
index fd42d5b..035d55b 100644
--- a/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
+++ b/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
@@ -111,7 +111,7 @@ MediaHandlerFfmpeg::createAudioDecoder(const AudioInfo& 
info)
     }
     catch (const MediaException& ex) {
 
-        if (info.type != FLASH) throw;
+        if (info.type != CODEC_TYPE_FLASH) throw;
 
         try {
             ret = createFlashAudioDecoder(info);
diff --git a/libmedia/ffmpeg/MediaParserFfmpeg.cpp 
b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
index 34538e8..87e5c56 100644
--- a/libmedia/ffmpeg/MediaParserFfmpeg.cpp
+++ b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
@@ -433,58 +433,59 @@ MediaParserFfmpeg::initializeParser()
     
     // Create VideoInfo
     if ( _videoStream) {
-       int codec = static_cast<int>(_videoStream->codec->codec_id); // 
originally an enum CodecID 
-       boost::uint16_t width = _videoStream->codec->width;
-       boost::uint16_t height = _videoStream->codec->height;
-       boost::uint16_t frameRate = 
static_cast<boost::uint16_t>(as_double(_videoStream->r_frame_rate));
+        const int codec = static_cast<int>(_videoStream->codec->codec_id); 
+        boost::uint16_t width = _videoStream->codec->width;
+        boost::uint16_t height = _videoStream->codec->height;
+        boost::uint16_t frameRate = 
static_cast<boost::uint16_t>(as_double(_videoStream->r_frame_rate));
 #if !defined(HAVE_LIBAVFORMAT_AVFORMAT_H) && !defined(HAVE_FFMPEG_AVCODEC_H)
-       boost::uint64_t duration = _videoStream->codec_info_duration;
+        boost::uint64_t duration = _videoStream->codec_info_duration;
 #else
-       boost::uint64_t duration = _videoStream->duration;
+        boost::uint64_t duration = _videoStream->duration;
 #endif
-        if ( duration == AV_NOPTS_VALUE ) {
-           log_error("Duration of video stream unknown");
-           duration=0; // TODO: guess!
+        if (duration == AV_NOPTS_VALUE) {
+            log_error("Duration of video stream unknown");
+            duration=0; // TODO: guess!
         } else {
-           duration = duration / as_double(_videoStream->time_base); // TODO: 
check this
+            duration = duration / as_double(_videoStream->time_base); // TODO: 
check this
         }
        
-       _videoInfo.reset( new VideoInfo(codec, width, height, frameRate, 
duration, CUSTOM /*codec type*/) );
+        _videoInfo.reset(new VideoInfo(codec, width, height, frameRate,
+                    duration, CODEC_TYPE_CUSTOM /*codec type*/));
        
-       _videoInfo->extra.reset(new ExtraVideoInfoFfmpeg(
-                                                        // NOTE: 
AVCodecContext.extradata : void* for 51.11.0, uint8_t* for 51.38.0
-                                                        
(uint8_t*)_videoStream->codec->extradata,
-                                                        
_videoStream->codec->extradata_size));
+        // NOTE: AVCodecContext.extradata : void* for 51.11.0, uint8_t* for 
51.38.0
+        _videoInfo->extra.reset(new ExtraVideoInfoFfmpeg(
+                     (uint8_t*)_videoStream->codec->extradata,
+                     _videoStream->codec->extradata_size));
        
-       //log_debug("EXTRA: %d bytes of video extra data", 
_videoStream->codec->extradata_size);
     }
     
     // Create AudioInfo
     if ( _audioStream) {
-       int codec = static_cast<int>(_audioStream->codec->codec_id); // 
originally an enum CodecID 
-       boost::uint16_t sampleRate = _audioStream->codec->sample_rate;
-       boost::uint16_t sampleSize = 
SampleFormatToSampleSize(_audioStream->codec->sample_fmt);
-       bool stereo = (_audioStream->codec->channels == 2);
+        const int codec = static_cast<int>(_audioStream->codec->codec_id); 
+        boost::uint16_t sampleRate = _audioStream->codec->sample_rate;
+        boost::uint16_t sampleSize = 
SampleFormatToSampleSize(_audioStream->codec->sample_fmt);
+        bool stereo = (_audioStream->codec->channels == 2);
 #if !defined(HAVE_LIBAVFORMAT_AVFORMAT_H) && !defined(HAVE_FFMPEG_AVCODEC_H)
-       boost::uint64_t duration = _audioStream->codec_info_duration;
+        boost::uint64_t duration = _audioStream->codec_info_duration;
 #else
-       boost::uint64_t duration = _audioStream->duration;
+        boost::uint64_t duration = _audioStream->duration;
 #endif
-        if ( duration == AV_NOPTS_VALUE ) {
-           log_error("Duration of audio stream unknown to ffmpeg");
-           duration=0; // TODO: guess!
-       } else {
-           duration = duration / as_double(_audioStream->time_base); // TODO: 
check this
-       }
-       
-       _audioInfo.reset( new AudioInfo(codec, sampleRate, sampleSize, stereo, 
duration, CUSTOM /*codec type*/) );
+        if (duration == AV_NOPTS_VALUE) {
+            log_error("Duration of audio stream unknown to ffmpeg");
+            duration=0; // TODO: guess!
+        } 
+        else {
+            duration = duration / as_double(_audioStream->time_base); // TODO: 
check this
+        }
        
-       _audioInfo->extra.reset(new ExtraAudioInfoFfmpeg(
-                                                        // NOTE: 
AVCodecContext.extradata : void* for 51.11.0, uint8_t* for 51.38.0
-                                                        
(uint8_t*)_audioStream->codec->extradata,
-                                                        
_audioStream->codec->extradata_size));
+        _audioInfo.reset(new AudioInfo(codec, sampleRate, sampleSize, stereo,
+                    duration, CODEC_TYPE_CUSTOM /*codec type*/));
+        
+        // NOTE: AVCodecContext.extradata : void* for 51.11.0, uint8_t* for 
51.38.0
+        _audioInfo->extra.reset(new ExtraAudioInfoFfmpeg(
+                     (uint8_t*)_audioStream->codec->extradata,
+                     _audioStream->codec->extradata_size));
        
-       //log_debug("EXTRA: %d bytes of audio extra data", 
_videoStream->codec->extradata_size);
     }
     
     
diff --git a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp 
b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
index 0552883..3349f75 100644
--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
@@ -129,7 +129,7 @@ VideoDecoderFfmpeg::VideoDecoderFfmpeg(const VideoInfo& 
info)
 
     CodecID codec_id = CODEC_ID_NONE;
 
-    if ( info.type == FLASH )
+    if ( info.type == CODEC_TYPE_FLASH )
     {
         codec_id = flashToFfmpegCodec(static_cast<videoCodecType>(info.codec));
     }
diff --git a/libmedia/ffmpeg/VideoDecoderFfmpeg.h 
b/libmedia/ffmpeg/VideoDecoderFfmpeg.h
index 1a4eaf0..1a3790d 100644
--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.h
+++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.h
@@ -65,7 +65,7 @@ public:
     
 private:
     
-    /// Convert FLASH codec id to FFMPEG codec id
+    /// Convert CODEC_TYPE_FLASH codec id to FFMPEG codec id
     //
     /// @return CODEC_ID_NONE for unsupported flash codecs
     ///
diff --git a/libmedia/gst/AudioDecoderGst.cpp b/libmedia/gst/AudioDecoderGst.cpp
index e70ff61..ecfc4d3 100644
--- a/libmedia/gst/AudioDecoderGst.cpp
+++ b/libmedia/gst/AudioDecoderGst.cpp
@@ -52,7 +52,7 @@ AudioDecoderGst::AudioDecoderGst(const AudioInfo& info)
 
     GstCaps* srccaps=0;
 
-    if (info.type == FLASH && info.codec == AUDIO_CODEC_MP3)
+    if (info.type == CODEC_TYPE_FLASH && info.codec == AUDIO_CODEC_MP3)
     {
         srccaps = gst_caps_new_simple ("audio/mpeg",
                "mpegversion", G_TYPE_INT, 1,
@@ -63,7 +63,7 @@ AudioDecoderGst::AudioDecoderGst(const AudioInfo& info)
         return;
     }
     
-    if (info.type == FLASH && info.codec == AUDIO_CODEC_NELLYMOSER)
+    if (info.type == CODEC_TYPE_FLASH && info.codec == AUDIO_CODEC_NELLYMOSER)
     {
         srccaps = gst_caps_new_simple ("audio/x-nellymoser",
                "rate", G_TYPE_INT, info.sampleRate,
@@ -72,7 +72,7 @@ AudioDecoderGst::AudioDecoderGst(const AudioInfo& info)
         return;
     }
 
-    if (info.type == FLASH && info.codec == AUDIO_CODEC_AAC)
+    if (info.type == CODEC_TYPE_FLASH && info.codec == AUDIO_CODEC_AAC)
     {
         srccaps = gst_caps_new_simple ("audio/mpeg",
             "mpegversion", G_TYPE_INT, 4,
@@ -95,7 +95,7 @@ AudioDecoderGst::AudioDecoderGst(const AudioInfo& info)
     }
 
 
-    if (info.type == FLASH) {
+    if (info.type == CODEC_TYPE_FLASH) {
                boost::format err = boost::format(
                 _("AudioDecoderGst: cannot handle codec %d (%s)")) %
                 info.codec %
diff --git a/libmedia/gst/MediaHandlerGst.cpp b/libmedia/gst/MediaHandlerGst.cpp
index eff720d..199cf58 100644
--- a/libmedia/gst/MediaHandlerGst.cpp
+++ b/libmedia/gst/MediaHandlerGst.cpp
@@ -81,7 +81,7 @@ MediaHandlerGst::createMediaParser(std::auto_ptr<IOChannel> 
stream)
 std::auto_ptr<VideoDecoder>
 MediaHandlerGst::createVideoDecoder(const VideoInfo& info)
 {
-    if (info.type != FLASH) {
+    if (info.type != CODEC_TYPE_FLASH) {
 
         ExtraInfoGst* extrainfo = 
dynamic_cast<ExtraInfoGst*>(info.extra.get());
 
@@ -116,7 +116,7 @@ MediaHandlerGst::createAudioDecoder(const AudioInfo& info)
 
 #ifdef DECODING_SPEEX
     if (info.codec == AUDIO_CODEC_SPEEX) {
-        assert(info.type == FLASH);
+        assert(info.type == CODEC_TYPE_FLASH);
         ret.reset(new AudioDecoderSpeex);
     } else
 #endif
@@ -126,7 +126,7 @@ MediaHandlerGst::createAudioDecoder(const AudioInfo& info)
         }
         catch (const MediaException& ex) {
 
-            if (info.type != FLASH) throw;
+            if (info.type != CODEC_TYPE_FLASH) throw;
 
             try {
                 ret = createFlashAudioDecoder(info);
diff --git a/libmedia/gst/MediaParserGst.cpp b/libmedia/gst/MediaParserGst.cpp
index c3e51c1..81528d0 100644
--- a/libmedia/gst/MediaParserGst.cpp
+++ b/libmedia/gst/MediaParserGst.cpp
@@ -464,14 +464,18 @@ void MediaParserGst::cb_pad_added(GstElement* /* element 
*/, GstPad* new_pad,
             return;        
         }
 
-        gst_pad_set_chain_function (parser->_audiosink, 
MediaParserGst::cb_chain_func_audio);
+        gst_pad_set_chain_function(parser->_audiosink,
+                MediaParserGst::cb_chain_func_audio);
         
-        g_object_set_data (G_OBJECT (parser->_audiosink), "mediaparser-obj", 
parser);
+        g_object_set_data(G_OBJECT (parser->_audiosink), "mediaparser-obj",
+                parser);
         
         LOG_ONCE(
-        log_unimpl("MediaParserGst won't set codec, sampleRate, sampleSize, 
stereo and duration in AudioInfo"); 
+            log_unimpl("MediaParserGst won't set codec, sampleRate, "
+                "sampleSize, stereo and duration in AudioInfo"); 
         );
-        AudioInfo* audioinfo = new AudioInfo(0, 0, 0, false, 0, CUSTOM);
+        AudioInfo* audioinfo = new AudioInfo(0, 0, 0, false, 0,
+                CODEC_TYPE_CUSTOM);
         audioinfo->extra.reset(new ExtraInfoGst(caps));
 
         parser->_audioInfo.reset(audioinfo);
@@ -484,11 +488,14 @@ void MediaParserGst::cb_pad_added(GstElement* /* element 
*/, GstPad* new_pad,
             return;        
         }        
         
-        gst_pad_set_chain_function (parser->_videosink, 
MediaParserGst::cb_chain_func_video);
+        gst_pad_set_chain_function(parser->_videosink,
+                MediaParserGst::cb_chain_func_video);
         
-        g_object_set_data (G_OBJECT (parser->_videosink), "mediaparser-obj", 
parser);
+        g_object_set_data(G_OBJECT(parser->_videosink), "mediaparser-obj",
+                parser);
 
-        VideoInfo* videoinfo = new VideoInfo(0, 0, 0, false, 0, CUSTOM);
+        VideoInfo* videoinfo = new VideoInfo(0, 0, 0, false, 0,
+                CODEC_TYPE_CUSTOM);
         videoinfo->extra.reset(new ExtraInfoGst(caps));
 
         parser->_videoInfo.reset(videoinfo);
diff --git a/libmedia/haiku/MediaHandlerHaiku.cpp 
b/libmedia/haiku/MediaHandlerHaiku.cpp
index fcad347..0dc96f2 100644
--- a/libmedia/haiku/MediaHandlerHaiku.cpp
+++ b/libmedia/haiku/MediaHandlerHaiku.cpp
@@ -102,7 +102,7 @@ MediaHandlerHaiku::createAudioDecoder(const AudioInfo& info)
     }
     catch (MediaException& ex)
     {
-        if ( info.type != FLASH ) throw ex;
+        if ( info.type != CODEC_TYPE_FLASH ) throw ex;
 
         try
         {
diff --git a/libsound/EmbedSoundInst.cpp b/libsound/EmbedSoundInst.cpp
index c21167c..7cfaa45 100644
--- a/libsound/EmbedSoundInst.cpp
+++ b/libsound/EmbedSoundInst.cpp
@@ -95,7 +95,7 @@ EmbedSoundInst::createDecoder(media::MediaHandler& 
mediaHandler)
         si.is16bit() ? 2 : 1, // sampleSizei
         si.isStereo(), // stereoi
         0, // duration unknown, does it matter ?
-        media::FLASH);
+        media::CODEC_TYPE_FLASH);
 
     try {
         _decoder = mediaHandler.createAudioDecoder(info);

-----------------------------------------------------------------------

Summary of changes:
 libcore/swf/DefineVideoStreamTag.cpp   |    3 +-
 libmedia/AudioDecoderSimple.cpp        |    7 +--
 libmedia/FLVParser.cpp                 |    9 ++--
 libmedia/MediaHandler.cpp              |    4 +-
 libmedia/MediaHandler.h                |    6 +-
 libmedia/MediaParser.h                 |   10 ++--
 libmedia/ffmpeg/AudioDecoderFfmpeg.cpp |   27 ++++++------
 libmedia/ffmpeg/MediaHandlerFfmpeg.cpp |    2 +-
 libmedia/ffmpeg/MediaParserFfmpeg.cpp  |   71 ++++++++++++++++----------------
 libmedia/ffmpeg/VideoDecoderFfmpeg.cpp |    2 +-
 libmedia/ffmpeg/VideoDecoderFfmpeg.h   |    2 +-
 libmedia/gst/AudioDecoderGst.cpp       |    8 ++--
 libmedia/gst/MediaHandlerGst.cpp       |    6 +-
 libmedia/gst/MediaParserGst.cpp        |   21 ++++++---
 libmedia/haiku/MediaHandlerHaiku.cpp   |    2 +-
 libsound/EmbedSoundInst.cpp            |    2 +-
 16 files changed, 95 insertions(+), 87 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]