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. release_0_8_9_final-


From: Gabriele Giacone
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1748-g95c3775
Date: Sun, 18 Aug 2013 15:41:24 +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  95c3775434762cc05df0a62426310d56a2efba92 (commit)
       via  ce9f6f8ed8187d9dca15508f34219979494c6778 (commit)
      from  54ebb05d3bce38ea90a0eb9633e62efc2a21048f (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=95c3775434762cc05df0a62426310d56a2efba92


commit 95c3775434762cc05df0a62426310d56a2efba92
Author: Gabriele Giacone <address@hidden>
Date:   Sun Aug 18 17:40:47 2013 +0200

    Replace deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE.

diff --git a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp 
b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
index 0d7c730..f45a42d 100644
--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
@@ -36,6 +36,8 @@
 #define AVCODEC_DECODE_AUDIO avcodec_decode_audio2
 #endif
 
+#define MAX_AUDIO_FRAME_SIZE 192000
+
 namespace gnash {
 namespace media {
 namespace ffmpeg {
@@ -347,7 +349,7 @@ AudioDecoderFfmpeg::decode(const boost::uint8_t* input,
 {
     //GNASH_REPORT_FUNCTION;
 
-    size_t retCapacity = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+    size_t retCapacity = MAX_AUDIO_FRAME_SIZE;
     boost::uint8_t* retBuf = new boost::uint8_t[retCapacity];
     int retBufSize = 0;
 
@@ -501,7 +503,7 @@ AudioDecoderFfmpeg::decodeFrame(const boost::uint8_t* input,
 
     assert(inputSize);
 
-    const size_t bufsize = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+    const size_t bufsize = MAX_AUDIO_FRAME_SIZE;
 
     // TODO: make this a private member, to reuse (see NetStreamFfmpeg in 
0.8.3)
     boost::uint8_t* output;
@@ -666,7 +668,8 @@ AudioDecoderFfmpeg::parseInput(const boost::uint8_t* input,
         // democratic value for a chunk to decode...
         // @todo this might be constrained by codec id, check that !
 
-        // NOTE: AVCODEC_MAX_AUDIO_FRAME_SIZE resulted bigger
+        // NOTE: AVCODEC_MAX_AUDIO_FRAME_SIZE (192000, deprecated replaced with
+        //       MAX_AUDIO_FRAME_SIZE) resulted bigger
         //       than avcodec_decode_audio could handle, resulting
         //       in eventSoundTest1.swf regression.
         //static const unsigned int maxFrameSize = 
AVCODEC_MAX_AUDIO_FRAME_SIZE;

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


commit ce9f6f8ed8187d9dca15508f34219979494c6778
Author: Gabriele Giacone <address@hidden>
Date:   Sun Aug 18 17:39:34 2013 +0200

    AVCodecID instead of CodecID if ffmpeg >= 2.0.

diff --git a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp 
b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
index 50947fb..0d7c730 100644
--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
@@ -90,7 +90,7 @@ void AudioDecoderFfmpeg::setup(SoundInfo& info)
 #endif
     avcodec_register_all();// change this to only register need codec?
 
-    enum CodecID codec_id;
+    enum CODECID codec_id;
 
     switch(info.getFormat()) {
         case AUDIO_CODEC_RAW:
@@ -189,11 +189,11 @@ void AudioDecoderFfmpeg::setup(const AudioInfo& info)
 #endif
     avcodec_register_all();// change this to only register need codec?
 
-    enum CodecID codec_id = CODEC_ID_NONE;
+    enum CODECID codec_id = CODEC_ID_NONE;
 
     if (info.type == CODEC_TYPE_CUSTOM)
     {
-        codec_id = static_cast<CodecID>(info.codec);
+        codec_id = static_cast<CODECID>(info.codec);
     }
     else if (info.type == CODEC_TYPE_FLASH)
     {
diff --git a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp 
b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
index e5263c6..2f0ded3 100644
--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.cpp
@@ -117,7 +117,7 @@ VideoDecoderFfmpeg::VideoDecoderFfmpeg(videoCodecType 
format, int width, int hei
     _videoCodec(NULL)
 {
 
-    CodecID codec_id = flashToFfmpegCodec(format);
+    CODECID codec_id = flashToFfmpegCodec(format);
     init(codec_id, width, height);
 
 }
@@ -127,13 +127,13 @@ VideoDecoderFfmpeg::VideoDecoderFfmpeg(const VideoInfo& 
info)
     _videoCodec(NULL)
 {
 
-    CodecID codec_id = CODEC_ID_NONE;
+    CODECID codec_id = CODEC_ID_NONE;
 
     if ( info.type == CODEC_TYPE_FLASH )
     {
         codec_id = flashToFfmpegCodec(static_cast<videoCodecType>(info.codec));
     }
-    else codec_id = static_cast<CodecID>(info.codec);
+    else codec_id = static_cast<CODECID>(info.codec);
 
     // This would cause nasty segfaults.
     if (codec_id == CODEC_ID_NONE)
@@ -167,7 +167,7 @@ VideoDecoderFfmpeg::VideoDecoderFfmpeg(const VideoInfo& 
info)
 }
 
 void
-VideoDecoderFfmpeg::init(enum CodecID codecId, int /*width*/, int /*height*/,
+VideoDecoderFfmpeg::init(enum CODECID codecId, int /*width*/, int /*height*/,
         boost::uint8_t* extradata, int extradataSize)
 {
     // Init the avdecoder-decoder
@@ -422,7 +422,7 @@ VideoDecoderFfmpeg::peek()
 }
 
 /* public static */
-enum CodecID
+enum CODECID
 VideoDecoderFfmpeg::flashToFfmpegCodec(videoCodecType format)
 {
         // Find the decoder and init the parser
diff --git a/libmedia/ffmpeg/VideoDecoderFfmpeg.h 
b/libmedia/ffmpeg/VideoDecoderFfmpeg.h
index 2df7754..32e53d5 100644
--- a/libmedia/ffmpeg/VideoDecoderFfmpeg.h
+++ b/libmedia/ffmpeg/VideoDecoderFfmpeg.h
@@ -70,7 +70,7 @@ private:
     //
     /// @return CODEC_ID_NONE for unsupported flash codecs
     ///
-    static CodecID flashToFfmpegCodec(videoCodecType format);
+    static CODECID flashToFfmpegCodec(videoCodecType format);
 
     /// \brief converts an video frame from (almost) any type to RGB24.
     ///
@@ -84,7 +84,7 @@ private:
     std::auto_ptr<image::GnashImage> frameToImage(AVCodecContext* srcCtx,
             const AVFrame& srcFrame);
 
-    void init(enum CodecID format, int width, int height,
+    void init(enum CODECID format, int width, int height,
             boost::uint8_t* extradata=0, int extradataSize=0);
 
     std::auto_ptr<image::GnashImage> decode(const boost::uint8_t* input,
diff --git a/libmedia/ffmpeg/VideoDecoderFfmpegVaapi.cpp 
b/libmedia/ffmpeg/VideoDecoderFfmpegVaapi.cpp
index ba2f777..aac3626 100644
--- a/libmedia/ffmpeg/VideoDecoderFfmpegVaapi.cpp
+++ b/libmedia/ffmpeg/VideoDecoderFfmpegVaapi.cpp
@@ -31,7 +31,7 @@ namespace media {
 namespace ffmpeg {
 
 /// Translates FFmpeg Codec ID to VAProfile
-static VAProfile get_profile(enum CodecID codec_id)
+static VAProfile get_profile(enum CODECID codec_id)
 {
     static const int mpeg2_profiles[] =
         { VAProfileMPEG2Main, VAProfileMPEG2Simple, -1 };
@@ -94,7 +94,7 @@ void vaapi_set_surface(AVFrame *pic, VaapiSurfaceFfmpeg 
*surface)
     }
 }
 
-VaapiContextFfmpeg::VaapiContextFfmpeg(enum CodecID codec_id)
+VaapiContextFfmpeg::VaapiContextFfmpeg(enum CODECID codec_id)
     : _context(new VaapiContext(get_profile(codec_id), VAEntrypointVLD))
 {
     // FFmpeg's vaapi_context must be zero-initialized
@@ -115,7 +115,7 @@ bool VaapiContextFfmpeg::initDecoder(unsigned int width, 
unsigned int height)
     return true;
 }
 
-VaapiContextFfmpeg *VaapiContextFfmpeg::create(enum CodecID codec_id)
+VaapiContextFfmpeg *VaapiContextFfmpeg::create(enum CODECID codec_id)
 {
     if (!vaapi_is_enabled())
         return NULL;
diff --git a/libmedia/ffmpeg/VideoDecoderFfmpegVaapi.h 
b/libmedia/ffmpeg/VideoDecoderFfmpegVaapi.h
index c365171..d9d1ee3 100644
--- a/libmedia/ffmpeg/VideoDecoderFfmpegVaapi.h
+++ b/libmedia/ffmpeg/VideoDecoderFfmpegVaapi.h
@@ -62,14 +62,14 @@ class VaapiContextFfmpeg : public vaapi_context {
     boost::shared_ptr<VaapiContext> _context;
 
 public:
-    VaapiContextFfmpeg(enum CodecID codec_id);
+    VaapiContextFfmpeg(enum CODECID codec_id);
 
     bool initDecoder(unsigned int width, unsigned int height);
 
     VaapiSurfaceFfmpeg *getSurface()
         { return new VaapiSurfaceFfmpeg(_context->acquireSurface(), _context); 
}
 
-    static VaapiContextFfmpeg *create(enum CodecID codec_id);
+    static VaapiContextFfmpeg *create(enum CODECID codec_id);
 };
     
 } // gnash.media.ffmpeg namespace 
diff --git a/libmedia/ffmpeg/ffmpegHeaders.h b/libmedia/ffmpeg/ffmpegHeaders.h
index 7710121..a05cee7 100644
--- a/libmedia/ffmpeg/ffmpegHeaders.h
+++ b/libmedia/ffmpeg/ffmpegHeaders.h
@@ -94,4 +94,10 @@ extern "C" {
 #define AVSampleFormat SampleFormat
 #endif
 
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,18,102)
+#define CODECID AVCodecID
+#else
+#define CODECID CodecID
+#endif
+
 #endif // GNASH_MEDIA_FFMPEG_HEADERS_H

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

Summary of changes:
 libmedia/ffmpeg/AudioDecoderFfmpeg.cpp      |   15 +++++++++------
 libmedia/ffmpeg/VideoDecoderFfmpeg.cpp      |   10 +++++-----
 libmedia/ffmpeg/VideoDecoderFfmpeg.h        |    4 ++--
 libmedia/ffmpeg/VideoDecoderFfmpegVaapi.cpp |    6 +++---
 libmedia/ffmpeg/VideoDecoderFfmpegVaapi.h   |    4 ++--
 libmedia/ffmpeg/ffmpegHeaders.h             |    6 ++++++
 6 files changed, 27 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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