mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
webrtcdatachannel: Notify buffered-amount property updates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1484>
This commit is contained in:
parent
6dd15acf2d
commit
f0e6959bba
1 changed files with 4 additions and 0 deletions
|
@ -705,6 +705,7 @@ webrtc_data_channel_start_negotiation (WebRTCDataChannel * channel)
|
||||||
GST_WEBRTC_DATA_CHANNEL_LOCK (channel);
|
GST_WEBRTC_DATA_CHANNEL_LOCK (channel);
|
||||||
channel->parent.buffered_amount += gst_buffer_get_size (buffer);
|
channel->parent.buffered_amount += gst_buffer_get_size (buffer);
|
||||||
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
|
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
|
||||||
|
g_object_notify (G_OBJECT (&channel->parent), "buffered-amount");
|
||||||
|
|
||||||
if (gst_app_src_push_buffer (GST_APP_SRC (channel->appsrc),
|
if (gst_app_src_push_buffer (GST_APP_SRC (channel->appsrc),
|
||||||
buffer) == GST_FLOW_OK) {
|
buffer) == GST_FLOW_OK) {
|
||||||
|
@ -788,6 +789,7 @@ webrtc_data_channel_send_data (GstWebRTCDataChannel * base_channel,
|
||||||
GST_WEBRTC_DATA_CHANNEL_LOCK (channel);
|
GST_WEBRTC_DATA_CHANNEL_LOCK (channel);
|
||||||
channel->parent.buffered_amount += gst_buffer_get_size (buffer);
|
channel->parent.buffered_amount += gst_buffer_get_size (buffer);
|
||||||
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
|
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
|
||||||
|
g_object_notify (G_OBJECT (&channel->parent), "buffered-amount");
|
||||||
|
|
||||||
ret = gst_app_src_push_buffer (GST_APP_SRC (channel->appsrc), buffer);
|
ret = gst_app_src_push_buffer (GST_APP_SRC (channel->appsrc), buffer);
|
||||||
|
|
||||||
|
@ -849,6 +851,7 @@ webrtc_data_channel_send_string (GstWebRTCDataChannel * base_channel,
|
||||||
GST_WEBRTC_DATA_CHANNEL_LOCK (channel);
|
GST_WEBRTC_DATA_CHANNEL_LOCK (channel);
|
||||||
channel->parent.buffered_amount += gst_buffer_get_size (buffer);
|
channel->parent.buffered_amount += gst_buffer_get_size (buffer);
|
||||||
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
|
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
|
||||||
|
g_object_notify (G_OBJECT (&channel->parent), "buffered-amount");
|
||||||
|
|
||||||
ret = gst_app_src_push_buffer (GST_APP_SRC (channel->appsrc), buffer);
|
ret = gst_app_src_push_buffer (GST_APP_SRC (channel->appsrc), buffer);
|
||||||
|
|
||||||
|
@ -927,6 +930,7 @@ on_appsrc_data (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
|
GST_WEBRTC_DATA_CHANNEL_UNLOCK (channel);
|
||||||
|
g_object_notify (G_OBJECT (&channel->parent), "buffered-amount");
|
||||||
}
|
}
|
||||||
|
|
||||||
return GST_PAD_PROBE_OK;
|
return GST_PAD_PROBE_OK;
|
||||||
|
|
Loading…
Reference in a new issue