Correct Error handling with filesrc "Resource not found" and demux

hobbesc7 hobbesc7 at gmail.com
Wed Aug 13 10:35:48 PDT 2014


Tim Müller wrote
> When you receive the error message in your application's bus watch
> message handler you could just do:
> 
>   gst_element_set_state (pipeline, GST_STATE_NULL);
>   g_main_loop_quit (loop);
>   return FALSE;
> 
> This should close the file, and shut down the pipeline. You can then
> free the pipeline with gst_object_unref(pipeline), unless you want to
> try with another file.

What to do if the filesrc never emits the resource error?  This is my
experience: even if the filesrc location (i.e. /dev/video0) disappears, the
filesrc never emits an error.  I can detect the disappearance of the filesrc
with my own polling thread (or with libudev, i.e. look for a usb "remove"
action), and then try and do what you suggest above, but it hangs at
gst_element_set_state.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Correct-Error-handling-with-filesrc-Resource-not-found-and-demux-tp4663414p4668294.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list