Make the autoplugging example work again with an ugly hack until we have autoplug2...
authorWim Taymans <wim.taymans@gmail.com>
Fri, 2 Mar 2001 17:56:02 +0000 (17:56 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Fri, 2 Mar 2001 17:56:02 +0000 (17:56 +0000)
Original commit message from CVS:
Make the autoplugging example work again with an ugly hack until we
have autoplug2 merged...

examples/helloworld2/helloworld2.c
tests/old/examples/helloworld2/helloworld2.c

index 64eed11..90de513 100644 (file)
@@ -28,7 +28,6 @@ int main(int argc,char *argv[])
   pipeline = gst_pipeline_new("pipeline");
   g_assert(pipeline != NULL);
 
-  gst_bin_add(GST_BIN(thread), pipeline);
 
   /* create a disk reader */
   disksrc = gst_elementfactory_make("disksrc", "disk_source");
@@ -50,8 +49,11 @@ int main(int argc,char *argv[])
     exit(-1);
   }
 
-  /* make it ready */
-  gst_element_set_state(GST_ELEMENT(thread), GST_STATE_READY);
+  // hmmmm hack? FIXME
+  GST_FLAG_UNSET (pipeline, GST_BIN_FLAG_MANAGER);
+  gst_bin_add(GST_BIN(thread), pipeline);
+
   /* start playing */
   gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PLAYING);
 
index 64eed11..90de513 100644 (file)
@@ -28,7 +28,6 @@ int main(int argc,char *argv[])
   pipeline = gst_pipeline_new("pipeline");
   g_assert(pipeline != NULL);
 
-  gst_bin_add(GST_BIN(thread), pipeline);
 
   /* create a disk reader */
   disksrc = gst_elementfactory_make("disksrc", "disk_source");
@@ -50,8 +49,11 @@ int main(int argc,char *argv[])
     exit(-1);
   }
 
-  /* make it ready */
-  gst_element_set_state(GST_ELEMENT(thread), GST_STATE_READY);
+  // hmmmm hack? FIXME
+  GST_FLAG_UNSET (pipeline, GST_BIN_FLAG_MANAGER);
+  gst_bin_add(GST_BIN(thread), pipeline);
+
   /* start playing */
   gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PLAYING);