mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
rtsp-server: context: Add method to set the RTSPToken on some RTSPContext
Fixes #1399. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2979>
This commit is contained in:
parent
e64a5b9a85
commit
5666debd5f
2 changed files with 25 additions and 0 deletions
|
@ -93,3 +93,26 @@ gst_rtsp_context_pop_current (GstRTSPContext * ctx)
|
|||
l = g_slist_delete_link (l, l);
|
||||
g_private_set (¤t_context, l);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_rtsp_context_set_token:
|
||||
* @ctx: a #GstRTSPContext
|
||||
* @token: a #GstRTSPToken
|
||||
*
|
||||
* Set the token for @ctx.
|
||||
*
|
||||
* Since: 1.22
|
||||
**/
|
||||
void
|
||||
gst_rtsp_context_set_token (GstRTSPContext * ctx, GstRTSPToken * token)
|
||||
{
|
||||
g_return_if_fail (ctx != NULL);
|
||||
g_return_if_fail (ctx == gst_rtsp_context_get_current ());
|
||||
g_return_if_fail (GST_IS_RTSP_TOKEN (token));
|
||||
|
||||
if (ctx->token != NULL)
|
||||
gst_rtsp_token_unref (ctx->token);
|
||||
|
||||
gst_rtsp_token_ref (token);
|
||||
ctx->token = token;
|
||||
}
|
||||
|
|
|
@ -91,6 +91,8 @@ void gst_rtsp_context_push_current (GstRTSPContext * ctx);
|
|||
GST_RTSP_SERVER_API
|
||||
void gst_rtsp_context_pop_current (GstRTSPContext * ctx);
|
||||
|
||||
GST_RTSP_SERVER_API
|
||||
void gst_rtsp_context_set_token (GstRTSPContext * ctx, GstRTSPToken * token);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue