mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtspconnection: GstRTSPWatch func for tunnel GET response
Add a callback in GstRTSPWatch where the response to HTTP GET for tunneled connections can be modified. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725878
This commit is contained in:
parent
4898c30537
commit
6cd0d10d30
2 changed files with 11 additions and 1 deletions
|
@ -3138,6 +3138,9 @@ gst_rtsp_source_dispatch_read (GPollableInputStream * stream,
|
|||
|
||||
/* queue the response */
|
||||
response = gen_tunnel_reply (conn, code, &watch->message);
|
||||
if (watch->funcs.tunnel_http_response)
|
||||
watch->funcs.tunnel_http_response (watch, &watch->message, response,
|
||||
watch->user_data);
|
||||
gst_rtsp_watch_send_message (watch, response, NULL);
|
||||
gst_rtsp_message_free (response);
|
||||
goto read_done;
|
||||
|
|
|
@ -164,6 +164,9 @@ typedef struct _GstRTSPWatch GstRTSPWatch;
|
|||
* @error_full: callback when an error occured with more information than
|
||||
* the @error callback.
|
||||
* @tunnel_lost: callback when the post connection of a tunnel is closed.
|
||||
* @tunnel_http_response: callback when an HTTP response to the GET request
|
||||
* is about to be sent for a tunneled connection. The response can be
|
||||
* modified in the callback. Since 1.4.
|
||||
*
|
||||
* Callback functions from a #GstRTSPWatch.
|
||||
*/
|
||||
|
@ -181,9 +184,13 @@ typedef struct {
|
|||
GstRTSPMessage *message, guint id,
|
||||
gpointer user_data);
|
||||
GstRTSPResult (*tunnel_lost) (GstRTSPWatch *watch, gpointer user_data);
|
||||
GstRTSPResult (*tunnel_http_response) (GstRTSPWatch *watch,
|
||||
GstRTSPMessage *request,
|
||||
GstRTSPMessage *response,
|
||||
gpointer user_data);
|
||||
|
||||
/*< private >*/
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
gpointer _gst_reserved[GST_PADDING-1];
|
||||
} GstRTSPWatchFuncs;
|
||||
|
||||
GstRTSPWatch * gst_rtsp_watch_new (GstRTSPConnection *conn,
|
||||
|
|
Loading…
Reference in a new issue