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_start-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-265-g3d3ddc7
Date: Sun, 13 Mar 2011 02:02:44 +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  3d3ddc7b400d1714200fbfeb66c2700b4c27724f (commit)
       via  ae867e6191a6014cb1f2a4739f275ef847eea787 (commit)
      from  83fa051086fdc88feec7e69d42ef6cb803abf591 (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=3d3ddc7b400d1714200fbfeb66c2700b4c27724f


commit 3d3ddc7b400d1714200fbfeb66c2700b4c27724f
Author: Bastiaan Jacques <address@hidden>
Date:   Sun Mar 13 02:59:58 2011 +0100

    Set _parsingComplete only after all the encoded frames have been emitted.
    See bug #32760.

diff --git a/libmedia/gst/MediaParserGst.cpp b/libmedia/gst/MediaParserGst.cpp
index 8dfab55..f20c5d1 100644
--- a/libmedia/gst/MediaParserGst.cpp
+++ b/libmedia/gst/MediaParserGst.cpp
@@ -136,8 +136,10 @@ bool
 MediaParserGst::parseNextChunk()
 {
     boost::mutex::scoped_lock streamLock(_streamMutex);
-    
-    emitEncodedFrames();
+
+    if (emitEncodedFrames()) {
+        return true;
+    }
 
     // FIXME: our caller check for _parsingComplete prior
     //        to call parseNextChunk
@@ -178,8 +180,6 @@ MediaParserGst::pushGstBuffer()
         if (!_stream->eof() && !_stream->bad()) {
             log_error(_("MediaParserGst failed to read the stream, but it did"
                       " not reach EOF or enter a bad state."));
-        } else {
-            _parsingComplete = true;
         }
 
         if (!ret) {
@@ -201,9 +201,13 @@ MediaParserGst::pushGstBuffer()
     return true;
 }
 
-void
+bool
 MediaParserGst::emitEncodedFrames()
 {
+    if (_enc_audio_frames.empty() && _enc_video_frames.empty()) {
+        return false;
+    }
+
     while (!_enc_audio_frames.empty()) {
         EncodedAudioFrame* frame = _enc_audio_frames.front();
         pushEncodedAudioFrame(std::auto_ptr<EncodedAudioFrame>(frame));
@@ -215,6 +219,8 @@ MediaParserGst::emitEncodedFrames()
         pushEncodedVideoFrame(std::auto_ptr<EncodedVideoFrame>(frame));
        _enc_video_frames.pop_front();
     }
+
+    return true;
 }
 
 void
diff --git a/libmedia/gst/MediaParserGst.h b/libmedia/gst/MediaParserGst.h
index 86057f8..faa5a28 100644
--- a/libmedia/gst/MediaParserGst.h
+++ b/libmedia/gst/MediaParserGst.h
@@ -142,7 +142,7 @@ private:
     static GstFlowReturn cb_chain_func_video (GstPad *pad, GstBuffer *buffer);
 
     bool pushGstBuffer();
-    void emitEncodedFrames();
+    bool emitEncodedFrames();
 
 
     GstElement* _bin;

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


commit ae867e6191a6014cb1f2a4739f275ef847eea787
Author: Bastiaan Jacques <address@hidden>
Date:   Sun Mar 13 02:40:10 2011 +0100

    Let the sink caps be less specific so small caps changes are possible.
    Fixes bug #32760.

diff --git a/libmedia/gst/MediaParserGst.cpp b/libmedia/gst/MediaParserGst.cpp
index 57f73ff..8dfab55 100644
--- a/libmedia/gst/MediaParserGst.cpp
+++ b/libmedia/gst/MediaParserGst.cpp
@@ -477,11 +477,20 @@ void MediaParserGst::cb_pad_added(GstElement* /* element 
*/, GstPad* new_pad,
         log_debug(_("MediaParserGst: Linked audio source (type: %s)"), 
caps_name); 
 
     } else {
-        parser->_videosink = swfdec_gst_connect_sinkpad_by_pad (final_pad, 
caps);
+        // A parser element may still change the caps in a way that is
+        // incompatible with the caps provided by the demuxer. The only parser
+        // I am aware of that does this is h264parse. Setting the caps to the
+        // very simple form "video/codec" does not appear to be problematic for
+        // other codecs either.
+        GstCaps* sinkcaps = gst_caps_from_string(caps_name);
+
+        parser->_videosink = swfdec_gst_connect_sinkpad_by_pad (final_pad, 
sinkcaps);
+        gst_caps_unref(sinkcaps);
+
         if (!parser->_videosink) {
             log_error(_("MediaParserGst: couldn't link \"fake\" sink."));
             return;        
-        }        
+        }
         
         gst_pad_set_chain_function(parser->_videosink,
                 MediaParserGst::cb_chain_func_video);

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

Summary of changes:
 libmedia/gst/MediaParserGst.cpp |   29 ++++++++++++++++++++++-------
 libmedia/gst/MediaParserGst.h   |    2 +-
 2 files changed, 23 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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