From b61431962240feee8e7cf908be9175763b0c6328 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 22 Apr 2013 17:33:30 +0200 Subject: [PATCH] tests: add example of reusable pipelines --- examples/test-sdp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/test-sdp.c b/examples/test-sdp.c index f3d9e57..98efe9e 100644 --- a/examples/test-sdp.c +++ b/examples/test-sdp.c @@ -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 */ -- 2.7.4