From f7bb2cdeb7a7eff3994187efc4c9f293660165f6 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Fri, 14 Feb 2020 12:34:19 +0100 Subject: [PATCH] rtmp2: Add gst_rtmp_connection_set_chunk_size --- gst/rtmp2/rtmp/rtmpconnection.c | 15 +++++++++++++++ gst/rtmp2/rtmp/rtmpconnection.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/gst/rtmp2/rtmp/rtmpconnection.c b/gst/rtmp2/rtmp/rtmpconnection.c index 02d3e80..ec41ea1 100644 --- a/gst/rtmp2/rtmp/rtmpconnection.c +++ b/gst/rtmp2/rtmp/rtmpconnection.c @@ -1065,6 +1065,21 @@ gst_rtmp_connection_send_ping_response (GstRtmpConnection * connection, } void +gst_rtmp_connection_set_chunk_size (GstRtmpConnection * connection, + guint32 chunk_size) +{ + GstRtmpProtocolControl pc = { + .type = GST_RTMP_MESSAGE_TYPE_SET_CHUNK_SIZE, + .param = chunk_size, + }; + + g_return_if_fail (GST_IS_RTMP_CONNECTION (connection)); + + gst_rtmp_connection_queue_message (connection, + gst_rtmp_message_new_protocol_control (&pc)); +} + +void gst_rtmp_connection_request_window_size (GstRtmpConnection * connection, guint32 window_ack_size) { diff --git a/gst/rtmp2/rtmp/rtmpconnection.h b/gst/rtmp2/rtmp/rtmpconnection.h index f4c4b96..f7e78ce 100644 --- a/gst/rtmp2/rtmp/rtmpconnection.h +++ b/gst/rtmp2/rtmp/rtmpconnection.h @@ -81,6 +81,8 @@ void gst_rtmp_connection_expect_command (GstRtmpConnection * connection, GstRtmpCommandCallback response_command, gpointer user_data, guint32 stream_id, const gchar * command_name); +void gst_rtmp_connection_set_chunk_size (GstRtmpConnection * connection, + guint32 chunk_size); void gst_rtmp_connection_request_window_size (GstRtmpConnection * connection, guint32 window_ack_size); -- 2.7.4