diff options
author | Mathieu Duponchelle <mathieu@centricular.com> | 2020-09-04 21:14:35 +0200 |
---|---|---|
committer | Mathieu Duponchelle <mathieu@centricular.com> | 2020-10-10 02:06:18 +0200 |
commit | 1730940abd0f6dbdb69b4ab554403b70ac4fe810 (patch) | |
tree | c7bcd01f616b57a9baac7b74664732b3384757ae /examples | |
parent | 5029335dcb088b44f6f2dd090994888beeb9b37b (diff) |
rtsp-media-factory: expose API to disable RTCP
This is supported by the RFC, and can be useful on systems where
allocating two consecutive ports is problematic, and RTCP is not
necessary.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/159>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/test-launch.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/test-launch.c b/examples/test-launch.c index 1675591..b21df8e 100644 --- a/examples/test-launch.c +++ b/examples/test-launch.c @@ -22,12 +22,16 @@ #include <gst/rtsp-server/rtsp-server.h> #define DEFAULT_RTSP_PORT "8554" +#define DEFAULT_DISABLE_RTCP FALSE static char *port = (char *) DEFAULT_RTSP_PORT; +static gboolean disable_rtcp = DEFAULT_DISABLE_RTCP; static GOptionEntry entries[] = { {"port", 'p', 0, G_OPTION_ARG_STRING, &port, "Port to listen on (default: " DEFAULT_RTSP_PORT ")", "PORT"}, + {"disable-rtcp", '\0', 0, G_OPTION_ARG_NONE, &disable_rtcp, + "Whether RTCP should be disabled (default false)", NULL}, {NULL} }; @@ -70,6 +74,7 @@ main (int argc, char *argv[]) factory = gst_rtsp_media_factory_new (); gst_rtsp_media_factory_set_launch (factory, argv[1]); gst_rtsp_media_factory_set_shared (factory, TRUE); + gst_rtsp_media_factory_set_enable_rtcp (factory, !disable_rtcp); /* attach the test factory to the /test url */ gst_rtsp_mount_points_add_factory (mounts, "/test", factory); |