mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-13 03:46:34 +00:00
Added a WITH_BUG2 define to show the livelock we're trying to fix.
Original commit message from CVS: Added a WITH_BUG2 define to show the livelock we're trying to fix.
This commit is contained in:
parent
aec5a57022
commit
16638cdf31
2 changed files with 28 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
//#define WITH_BUG
|
||||
//#define WITH_BUG2
|
||||
//#define DEBUG
|
||||
//#define AUTOPLUG /* define if you want autoplugging of input channels */
|
||||
/* function prototypes */
|
||||
|
@ -296,6 +297,19 @@ create_input_channel (int id, char* location)
|
|||
#ifdef WITH_BUG
|
||||
srccaps = gst_play_typefind (GST_BIN (channel->pipe), channel->disksrc);
|
||||
#endif
|
||||
#ifdef WITH_BUG2
|
||||
{
|
||||
GstElement *pipeline;
|
||||
|
||||
pipeline = gst_pipeline_new ("autoplug_pipeline");
|
||||
|
||||
gst_bin_add (GST_BIN (pipeline), channel->pipe);
|
||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||
gst_bin_remove (GST_BIN (pipeline), channel->pipe);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef AUTOPLUG
|
||||
if (!srccaps) {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
//#define WITH_BUG
|
||||
//#define WITH_BUG2
|
||||
//#define DEBUG
|
||||
//#define AUTOPLUG /* define if you want autoplugging of input channels */
|
||||
/* function prototypes */
|
||||
|
@ -296,6 +297,19 @@ create_input_channel (int id, char* location)
|
|||
#ifdef WITH_BUG
|
||||
srccaps = gst_play_typefind (GST_BIN (channel->pipe), channel->disksrc);
|
||||
#endif
|
||||
#ifdef WITH_BUG2
|
||||
{
|
||||
GstElement *pipeline;
|
||||
|
||||
pipeline = gst_pipeline_new ("autoplug_pipeline");
|
||||
|
||||
gst_bin_add (GST_BIN (pipeline), channel->pipe);
|
||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||
gst_bin_remove (GST_BIN (pipeline), channel->pipe);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef AUTOPLUG
|
||||
if (!srccaps) {
|
||||
|
|
Loading…
Reference in a new issue