added ability to write out xml copy of pipeline
authorErik Walthinsen <omega@temple-baptist.org>
Tue, 15 May 2001 09:04:41 +0000 (09:04 +0000)
committerErik Walthinsen <omega@temple-baptist.org>
Tue, 15 May 2001 09:04:41 +0000 (09:04 +0000)
Original commit message from CVS:
added ability to write out xml copy of pipeline

gstplay/gstplay.c
gstplay/main.c

index e8898ef..1c88aef 100644 (file)
@@ -619,6 +619,18 @@ gst_play_media_seek (GstPlay *play,
   gtk_object_set (GTK_OBJECT (priv->src), "offset", offset, NULL);
 }
 
+GstElement*
+gst_play_get_pipeline(GstPlay *play)
+{
+  GstPlayPrivate *priv;
+
+  g_return_val_if_fail (play != NULL, NULL);
+  g_return_val_if_fail (GST_IS_PLAY (play), NULL);
+
+  priv = (GstPlayPrivate *)play->priv;
+
+  return GST_ELEMENT (priv->bin);
+}
 
 static void
 gst_play_set_arg (GtkObject *object,
index cf9864d..ac36cd2 100644 (file)
@@ -24,6 +24,8 @@ main (int argc, char *argv[])
     gst_media_play_start_uri (play, argv[1]);
   }
 
+  xmlSaveFile("gstmediaplay.gst", gst_xml_write(gst_play_get_pipeline(play->play)));
+
   gdk_threads_enter ();
   gst_main ();
   gdk_threads_leave ();