I’m trying to override the authentication method by subclassing GstRtspServer.RTSPAuth, and then writing a do_authenticate to suit.
Once I’ve verified the user’s credentials, I can’t set the token as I get the following error:
Traceback (most recent call last):
File "test.py", line 60, in do_authenticate
context.token = token
RuntimeError: unable to set value for field
Auth class:
class Auth(GstRtspServer.RTSPAuth):
def __init__(self):
GstRtspServer.RTSPAuth.__init__(self)
self.set_supported_methods(GstRtsp.RTSPAuthMethod.BASIC)
anonymous = GstRtspServer.RTSPToken()
anonymous.set_string(GstRtspServer.RTSP_TOKEN_MEDIA_FACTORY_ROLE, "anonymous")
self.set_default_token(anonymous)
def do_authenticate(self, context):
# Verify credentials, then when OK, try to set the token:
token = GstRtspServer.RTSPToken.new()
context.token = token
Is there another way I can set the token in the RTSP Context struct or have I hit a bug with the bindings? Happy to try and fix this myself and submit a MR but not sure where to look.
Thanks
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel