examples/gstplay/player.c: using g_print instead of g_message.
authorJulien Moutte <julien@moutte.net>
Sun, 21 Dec 2003 22:11:46 +0000 (22:11 +0000)
committerJulien Moutte <julien@moutte.net>
Sun, 21 Dec 2003 22:11:46 +0000 (22:11 +0000)
Original commit message from CVS:
* examples/gstplay/player.c: (got_time_tick), (got_stream_length),
(got_video_size), (main): using g_print instead of g_message.
* gst-libs/gst/play/gstplay.c: (gst_play_pipeline_setup): Fixing EOS
signal which was not emitted because of "switch" element added to the
bin but not connected. (Removing from the bin temporarily)

ChangeLog
examples/gstplay/player.c
gst-libs/gst/play/gstplay.c
gst-libs/gst/play/play.c
tests/old/examples/gstplay/player.c

index 5e6b59e..d3874b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2003-12-21  Julien MOUTTE  <julien@moutte.net>
 
+       * examples/gstplay/player.c: (got_time_tick), (got_stream_length),
+       (got_video_size), (main): using g_print instead of g_message.
+       * gst-libs/gst/play/gstplay.c: (gst_play_pipeline_setup): Fixing EOS 
+       signal which was not emitted because of "switch" element added to the
+       bin but not connected. (Removing from the bin temporarily)
+
+2003-12-21  Julien MOUTTE  <julien@moutte.net>
+
        * configure.ac: X_DISPLAY_MISSING is set to 1 if AC_PATH_XTRA fails to
        find X development files. I don't understand the previous tests and
        they fail on my debian/ppc unstable. This one works.
index ef58e32..76a735f 100644 (file)
@@ -58,20 +58,20 @@ got_found_tag (GstPlay *play,GstElement *source, GstTagList *tag_list)
 static void
 got_time_tick (GstPlay *play, gint64 time_nanos)
 {
-  g_message ("time tick %llu", time_nanos);
+  g_print ("time tick %llu", time_nanos);
 }
 
 static void
 got_stream_length (GstPlay *play, gint64 length_nanos)
 {
-  g_message ("got length %llu", length_nanos);
+  g_print ("got length %llu", length_nanos);
   length = length_nanos;
 }
 
 static void
 got_video_size (GstPlay *play, gint width, gint height)
 {
-  g_message ("got video size %d, %d", width, height);
+  g_print ("got video size %d, %d", width, height);
 }
 
 static void
@@ -128,6 +128,7 @@ main (int argc, char *argv[])
   /* Setting location we want to play */
   gst_play_set_location (play, argv[1]);
 
+  /* Uncomment that line to get an XML dump of the pipeline */
   /* gst_xml_write_file (GST_ELEMENT (play), stdout); */
 
   g_signal_connect (G_OBJECT (play), "time_tick",
index eb4d161..8e0c975 100644 (file)
@@ -108,11 +108,14 @@ gst_play_pipeline_setup (GstPlay *play)
   g_hash_table_insert (play->priv->elements, "video_queue", video_queue);
   
   /* Colorspace conversion */
-  /* FIXME: Use ffcolorspace and fallback to Hermes on failure ?*/
-  video_colorspace = gst_element_factory_make ("colorspace",
+  video_colorspace = gst_element_factory_make ("ffcolorspace",
                                                "video_colorspace");
-  if (!GST_IS_ELEMENT (video_colorspace))
-    return FALSE;
+  if (!GST_IS_ELEMENT (video_colorspace)) {
+    video_colorspace = gst_element_factory_make ("colorspace",
+                                                 "video_colorspace");
+    if (!GST_IS_ELEMENT (video_colorspace))
+      return FALSE;
+  }
   
   g_hash_table_insert (play->priv->elements, "video_colorspace",
                        video_colorspace);
@@ -147,7 +150,7 @@ gst_play_pipeline_setup (GstPlay *play)
   
   g_hash_table_insert (play->priv->elements, "video_switch", video_switch);
   
-  gst_bin_add (GST_BIN (work_thread), video_switch);
+  /*gst_bin_add (GST_BIN (work_thread), video_switch);*/
   
   /* Connecting autoplugger to video switch and video switch to video output 
   gst_element_link (autoplugger, video_switch);
index eb4d161..8e0c975 100644 (file)
@@ -108,11 +108,14 @@ gst_play_pipeline_setup (GstPlay *play)
   g_hash_table_insert (play->priv->elements, "video_queue", video_queue);
   
   /* Colorspace conversion */
-  /* FIXME: Use ffcolorspace and fallback to Hermes on failure ?*/
-  video_colorspace = gst_element_factory_make ("colorspace",
+  video_colorspace = gst_element_factory_make ("ffcolorspace",
                                                "video_colorspace");
-  if (!GST_IS_ELEMENT (video_colorspace))
-    return FALSE;
+  if (!GST_IS_ELEMENT (video_colorspace)) {
+    video_colorspace = gst_element_factory_make ("colorspace",
+                                                 "video_colorspace");
+    if (!GST_IS_ELEMENT (video_colorspace))
+      return FALSE;
+  }
   
   g_hash_table_insert (play->priv->elements, "video_colorspace",
                        video_colorspace);
@@ -147,7 +150,7 @@ gst_play_pipeline_setup (GstPlay *play)
   
   g_hash_table_insert (play->priv->elements, "video_switch", video_switch);
   
-  gst_bin_add (GST_BIN (work_thread), video_switch);
+  /*gst_bin_add (GST_BIN (work_thread), video_switch);*/
   
   /* Connecting autoplugger to video switch and video switch to video output 
   gst_element_link (autoplugger, video_switch);
index ef58e32..76a735f 100644 (file)
@@ -58,20 +58,20 @@ got_found_tag (GstPlay *play,GstElement *source, GstTagList *tag_list)
 static void
 got_time_tick (GstPlay *play, gint64 time_nanos)
 {
-  g_message ("time tick %llu", time_nanos);
+  g_print ("time tick %llu", time_nanos);
 }
 
 static void
 got_stream_length (GstPlay *play, gint64 length_nanos)
 {
-  g_message ("got length %llu", length_nanos);
+  g_print ("got length %llu", length_nanos);
   length = length_nanos;
 }
 
 static void
 got_video_size (GstPlay *play, gint width, gint height)
 {
-  g_message ("got video size %d, %d", width, height);
+  g_print ("got video size %d, %d", width, height);
 }
 
 static void
@@ -128,6 +128,7 @@ main (int argc, char *argv[])
   /* Setting location we want to play */
   gst_play_set_location (play, argv[1]);
 
+  /* Uncomment that line to get an XML dump of the pipeline */
   /* gst_xml_write_file (GST_ELEMENT (play), stdout); */
 
   g_signal_connect (G_OBJECT (play), "time_tick",