[Bug 787073] rtsp-server permissions: need add_role() function that's bindings friendly and can be used in python

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Jan 18 11:36:46 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=787073

--- Comment #8 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
With the above patches, this works for me now:

import gi
from gi.repository import Gst
from gi.repository import GstRtspServer
Gst.init()
print(Gst.version_string())
server = GstRtspServer.RTSPServer()
auth = GstRtspServer.RTSPAuth()
#token = GstRtspServer.RTSPToken.new_empty()
#token = GstRtspServer.RTSPToken.new()
token = GstRtspServer.RTSPToken()
print(token)
token.set_string('role','user')
print(token.get_string('role'))
print(token.is_allowed('perm'))
token.set_bool('perm',True)
print(token.is_allowed('perm'))
basic = auth.make_basic("user", "password")
auth.add_basic(basic, token)
server.set_auth(auth)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list