tests: add example of reusable pipelines
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 22 Apr 2013 15:33:30 +0000 (17:33 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 22 Apr 2013 15:33:30 +0000 (17:33 +0200)
examples/test-sdp.c

index f3d9e57..98efe9e 100644 (file)
@@ -34,6 +34,12 @@ timeout (GstRTSPServer * server, gboolean ignored)
   return TRUE;
 }
 
+static void
+media_configure (GstRTSPMediaFactory * factory, GstRTSPMedia * media)
+{
+  gst_rtsp_media_set_reusable (media, TRUE);
+}
+
 int
 main (int argc, char *argv[])
 {
@@ -70,6 +76,8 @@ main (int argc, char *argv[])
       argv[1]);
   gst_rtsp_media_factory_set_launch (factory, str);
   gst_rtsp_media_factory_set_shared (factory, TRUE);
+  g_signal_connect (factory, "media-configure", (GCallback) media_configure,
+      NULL);
   g_free (str);
 
   /* attach the test factory to the /test url */