diff options
author | Aleix Conchillo Flaque <aleix@oblong.com> | 2013-10-15 16:37:34 -0700 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2013-10-30 19:12:10 +0100 |
commit | fcad523dd7c4115668de6993e139e7da852364e7 (patch) | |
tree | 3b6076cf464621ab0bc3f2982635d0d35095d9b3 /examples | |
parent | c96f1aaff7bc7e286275e35f526c6921881c6858 (diff) |
examples: fix compilation when WITH_AUTH is defined
https://bugzilla.gnome.org/show_bug.cgi?id=710228
Diffstat (limited to 'examples')
-rw-r--r-- | examples/.gitignore | 1 | ||||
-rw-r--r-- | examples/test-video.c | 17 |
2 files changed, 9 insertions, 9 deletions
diff --git a/examples/.gitignore b/examples/.gitignore index 6912d88..82e4c5e 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -1,3 +1,4 @@ +test-appsrc test-launch test-mp4 test-ogg diff --git a/examples/test-video.c b/examples/test-video.c index 4a8e205..9bfb9d6 100644 --- a/examples/test-video.c +++ b/examples/test-video.c @@ -25,7 +25,8 @@ * user/password as the password */ #undef WITH_AUTH -/* define this if you want the server to use TLS */ +/* define this if you want the server to use TLS (it will also need WITH_AUTH + * to be defined) */ #undef WITH_TLS /* this timeout is periodically run to clean up the expired sessions from the @@ -53,7 +54,6 @@ main (int argc, char *argv[]) #ifdef WITH_AUTH GstRTSPAuth *auth; GstRTSPToken *token; - GstStructure *s; gchar *basic; GstRTSPPermissions *permissions; #endif @@ -101,9 +101,9 @@ main (int argc, char *argv[]) #endif /* make user token */ - token = gst_rtsp_token_new (); - s = gst_rtsp_token_writable_structure (token); - gst_structure_set (s, "media.factory.role", G_TYPE_STRING, "user", NULL); + token = + gst_rtsp_token_new (GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE, G_TYPE_STRING, + "user", NULL); basic = gst_rtsp_auth_make_basic ("user", "password"); gst_rtsp_auth_add_basic (auth, basic, token); g_free (basic); @@ -118,7 +118,7 @@ main (int argc, char *argv[]) mounts = gst_rtsp_server_get_mount_points (server); /* make a media factory for a test stream. The default media factory can use - * gst-launch syntax to create pipelines. + * gst-launch syntax to create pipelines. * any launch line works as long as it contains elements named pay%d. Each * element with pay%d names will be a stream */ factory = gst_rtsp_media_factory_new (); @@ -131,9 +131,8 @@ main (int argc, char *argv[]) /* add permissions for the user media role */ permissions = gst_rtsp_permissions_new (); gst_rtsp_permissions_add_role (permissions, "user", - gst_structure_new ("user", - "media.factory.access", G_TYPE_BOOLEAN, TRUE, - "media.factory.construct", G_TYPE_BOOLEAN, TRUE, NULL)); + GST_RTSP_PERM_MEDIA_FACTORY_ACCESS, G_TYPE_BOOLEAN, TRUE, + GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT, G_TYPE_BOOLEAN, TRUE, NULL); gst_rtsp_media_factory_set_permissions (factory, permissions); gst_rtsp_permissions_unref (permissions); #endif |