mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
client: allow for sending any message, not only requests
Change the _send_request() method to _send_message() so that we can both send requests and replies.
This commit is contained in:
parent
9a09d98e6d
commit
7532de687a
2 changed files with 13 additions and 13 deletions
|
@ -2521,24 +2521,24 @@ gst_rtsp_client_handle_message (GstRTSPClient * client,
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_rtsp_client_send_request:
|
||||
* gst_rtsp_client_send_message:
|
||||
* @client: a #GstRTSPClient
|
||||
* @session: a #GstRTSPSession to send the request to or %NULL
|
||||
* @request: The request #GstRTSPMessage to send
|
||||
* @session: a #GstRTSPSession to send the message to or %NULL
|
||||
* @message: The #GstRTSPMessage to send
|
||||
*
|
||||
* Send a request message to the remote end. @request must be a
|
||||
* #GST_RTSP_MESSAGE_REQUEST.
|
||||
* Send a message message to the remote end. @message must be a
|
||||
* #GST_RTSP_MESSAGE_REQUEST or a #GST_RTSP_MESSAGE_RESPONSE.
|
||||
*/
|
||||
GstRTSPResult
|
||||
gst_rtsp_client_send_request (GstRTSPClient * client, GstRTSPSession * session,
|
||||
GstRTSPMessage * request)
|
||||
gst_rtsp_client_send_message (GstRTSPClient * client, GstRTSPSession * session,
|
||||
GstRTSPMessage * message)
|
||||
{
|
||||
g_return_val_if_fail (GST_IS_RTSP_CLIENT (client), GST_RTSP_EINVAL);
|
||||
g_return_val_if_fail (request != NULL, GST_RTSP_EINVAL);
|
||||
g_return_val_if_fail (request->type == GST_RTSP_MESSAGE_REQUEST,
|
||||
GST_RTSP_EINVAL);
|
||||
g_return_val_if_fail (message != NULL, GST_RTSP_EINVAL);
|
||||
g_return_val_if_fail (message->type == GST_RTSP_MESSAGE_REQUEST ||
|
||||
message->type == GST_RTSP_MESSAGE_RESPONSE, GST_RTSP_EINVAL);
|
||||
|
||||
send_message (client, session, request, FALSE);
|
||||
send_message (client, session, message, FALSE);
|
||||
|
||||
return GST_RTSP_OK;
|
||||
}
|
||||
|
|
|
@ -188,9 +188,9 @@ void gst_rtsp_client_set_send_func (GstRTSPClient *client,
|
|||
|
||||
GstRTSPResult gst_rtsp_client_handle_message (GstRTSPClient *client,
|
||||
GstRTSPMessage *message);
|
||||
GstRTSPResult gst_rtsp_client_send_request (GstRTSPClient * client,
|
||||
GstRTSPResult gst_rtsp_client_send_message (GstRTSPClient * client,
|
||||
GstRTSPSession *session,
|
||||
GstRTSPMessage *request);
|
||||
GstRTSPMessage *message);
|
||||
/**
|
||||
* GstRTSPClientSessionFilterFunc:
|
||||
* @client: a #GstRTSPClient object
|
||||
|
|
Loading…
Reference in a new issue