[gst-devel] Still can't get an EOS through

Wes Miller wmiller at sdr.com
Mon May 3 23:13:06 CEST 2010


In the gst_parse_launch()ed pipeline below, I want the real frames to flow
into the videosink and the buffer info to be processed in the appsink loop. 
I need to add other info at the appsink for some of the frames.

I am not getting any EOS to flow into the appsink tee.  The program seems to
stall in the loop that watches for the EOS in the appsink.


NOTE:  If the tee is after the matroskamux, the pipeline won't play, state
change rc = 2.


  
I attach to the bus to check for EOS and call a callback that should
shutdown the pipeline.  With no tee this callback works great.

i poll the output of appsink looking for EOS.

Neither poll nor callback gets an EOS.





          /*--- build the pipeline ---*/
            this->pipeline = gst_parse_launch(
                  "souphttpsrc name=my_src "
                "! multipartdemux name=my_demux "
                "! image/jpeg,width=640,height=480 "
                "! tee name=t t. "
                "! queue name=my_queue1 "
                "! matroskamux name=my_mux "
                "! filesink name=my_sink t. "
                "! queue name=my_queue2 "
                "! appsink name=my_appsink ",
                &error );

            /* ... */

            appsink = gst_bin_get_by_name (GST_BIN( this->pipeline),
"my_appsink" );

            /*--- setup bus and message handling ---*/
            bus = gst_pipeline_get_bus( GST_PIPELINE( this->pipeline ));
            gst_bus_add_signal_watch_full( bus, G_PRIORITY_HIGH );
            g_signal_connect(
                bus,
                "message::eos",
                (GCallback)eos_message_received,
                this );

            gst_object_unref( GST_OBJECT(bus) );

            /* start playback */
            gst_element_set_state( this->pipeline, GST_STATE_PLAYING );

            while ( !gst_app_sink_is_eos( GST_APP_SINK( appsink )))
            {
              GstBuffer *buf (0);

              buf = gst_app_sink_pull_buffer( GST_APP_SINK( appsink ));
             /* write various data to file(s) */

              gst_buffer_unref( buf );
            }

            g_main_loop_run( this->loop );

          /* ... */


After a few seconds, an EOS is injected by an external (thread) timer that
uses:

          gst_element_send_event( this->pipeline, gst_event_new_eos() );



NEXT QUESTION WILL BE:  can I know the appsink and filesink are synched?


Thanks for any help.

Wes 
-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Still-can-t-get-an-EOS-through-tp2124641p2124641.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list