mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 16:18:16 +00:00
Add method for handling server requests
Add a receive_request so that extensions can react to server requests.
This commit is contained in:
parent
f14015567b
commit
6e560ae5d8
2 changed files with 19 additions and 1 deletions
|
@ -195,6 +195,20 @@ gst_rtsp_extension_stream_select (GstRTSPExtension * ext, GstRTSPUrl * url)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GstRTSPResult
|
||||||
|
gst_rtsp_extension_receive_request (GstRTSPExtension * ext,
|
||||||
|
GstRTSPMessage * msg)
|
||||||
|
{
|
||||||
|
GstRTSPExtensionInterface *iface;
|
||||||
|
GstRTSPResult res = GST_RTSP_ENOTIMPL;
|
||||||
|
|
||||||
|
iface = GST_RTSP_EXTENSION_GET_IFACE (ext);
|
||||||
|
if (iface->receive_request)
|
||||||
|
res = iface->receive_request (ext, msg);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
GstRTSPResult
|
GstRTSPResult
|
||||||
gst_rtsp_extension_send (GstRTSPExtension * ext, GstRTSPMessage * req,
|
gst_rtsp_extension_send (GstRTSPExtension * ext, GstRTSPMessage * req,
|
||||||
GstRTSPMessage * resp)
|
GstRTSPMessage * resp)
|
||||||
|
|
|
@ -64,8 +64,11 @@ struct _GstRTSPExtensionInterface {
|
||||||
/* signals */
|
/* signals */
|
||||||
GstRTSPResult (*send) (GstRTSPExtension *ext, GstRTSPMessage *req, GstRTSPMessage *resp);
|
GstRTSPResult (*send) (GstRTSPExtension *ext, GstRTSPMessage *req, GstRTSPMessage *resp);
|
||||||
|
|
||||||
|
/* ABI: more vfunctions added later */
|
||||||
|
GstRTSPResult (*receive_request) (GstRTSPExtension *ext, GstRTSPMessage *req);
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING - 1];
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_rtsp_extension_get_type (void);
|
GType gst_rtsp_extension_get_type (void);
|
||||||
|
@ -83,6 +86,7 @@ gboolean gst_rtsp_extension_configure_stream (GstRTSPExtension *ext, Gst
|
||||||
GstRTSPResult gst_rtsp_extension_get_transports (GstRTSPExtension *ext, GstRTSPLowerTrans protocols,
|
GstRTSPResult gst_rtsp_extension_get_transports (GstRTSPExtension *ext, GstRTSPLowerTrans protocols,
|
||||||
gchar **transport);
|
gchar **transport);
|
||||||
GstRTSPResult gst_rtsp_extension_stream_select (GstRTSPExtension *ext, GstRTSPUrl *url);
|
GstRTSPResult gst_rtsp_extension_stream_select (GstRTSPExtension *ext, GstRTSPUrl *url);
|
||||||
|
GstRTSPResult gst_rtsp_extension_receive_request (GstRTSPExtension *ext, GstRTSPMessage *req);
|
||||||
|
|
||||||
/* signal emision */
|
/* signal emision */
|
||||||
GstRTSPResult gst_rtsp_extension_send (GstRTSPExtension *ext, GstRTSPMessage *req,
|
GstRTSPResult gst_rtsp_extension_send (GstRTSPExtension *ext, GstRTSPMessage *req,
|
||||||
|
|
Loading…
Reference in a new issue