Problem ending filesink

yoyosuper8 yoyosuper8 at yahoo.com
Sat Nov 16 22:25:09 PST 2013


So, I decided to add a delay after I send the EOS event thru the pipeline by
adding the line sleep(10) which is 10 seconds and then continue with the
clearing of the pipeline and elements and it seems to work now. So I guess I
was right about not waiting enough before performing the clearing of
pipeline and elements.

Instead of adding a delay, is there a way to get some feedback from the
pipeline once the EOS event is sent thru the pipeline and then move onto
clearing the pipeline and other elements? I'm thinking of something like
this, but I just don't know what kind of feedback to get:

    static void finalize_recording() {
        gst_element_send_event(rec->pipeline, gst_event_new_eos());

        // Loop which waits for hear back from pipeline that everything is
complete and ready for clearing
        // the pipeline.
        while (boolean_switch) {
             get_feed_back = from_pipeline;

             if ( get_feed_back == yep_im_done ) {
                  boolean_switch = false;
             }
        }

        // quitting main loop
        g_main_loop_quit (rec->main_loop);
        pthread_join (gst_record_thread, NULL);

        g_free (rec);
    } 

Any thoughts?




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Problem-ending-filesink-tp4663362p4663375.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list