mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
rtpsession: Also report internal sources in on-new-ssrc and on-ssrc-active
Without this it seems impossible for an application to easily get notified about the internal ssrcs that are created, e.g. sender sources, and also to know when they are active and produce RTCP packets. https://bugzilla.gnome.org/show_bug.cgi?id=746747
This commit is contained in:
parent
1421fc558e
commit
d22ec49632
1 changed files with 13 additions and 0 deletions
|
@ -2699,6 +2699,9 @@ rtp_session_update_send_caps (RTPSession * sess, GstCaps * caps)
|
||||||
if (source) {
|
if (source) {
|
||||||
rtp_source_update_caps (source, caps);
|
rtp_source_update_caps (source, caps);
|
||||||
g_object_unref (source);
|
g_object_unref (source);
|
||||||
|
|
||||||
|
if (created)
|
||||||
|
on_new_ssrc (sess, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gst_structure_get_uint (s, "rtx-ssrc", &ssrc)) {
|
if (gst_structure_get_uint (s, "rtx-ssrc", &ssrc)) {
|
||||||
|
@ -2749,6 +2752,9 @@ rtp_session_send_rtp (RTPSession * sess, gpointer data, gboolean is_list,
|
||||||
|
|
||||||
source = obtain_internal_source (sess, pinfo.ssrc, &created, current_time);
|
source = obtain_internal_source (sess, pinfo.ssrc, &created, current_time);
|
||||||
|
|
||||||
|
if (created)
|
||||||
|
on_new_ssrc (sess, source);
|
||||||
|
|
||||||
prevsender = RTP_SOURCE_IS_SENDER (source);
|
prevsender = RTP_SOURCE_IS_SENDER (source);
|
||||||
oldrate = source->bitrate;
|
oldrate = source->bitrate;
|
||||||
|
|
||||||
|
@ -3739,6 +3745,9 @@ rtp_session_on_timeout (RTPSession * sess, GstClockTime current_time,
|
||||||
|
|
||||||
source = obtain_internal_source (sess, sess->suggested_ssrc, &created,
|
source = obtain_internal_source (sess, sess->suggested_ssrc, &created,
|
||||||
current_time);
|
current_time);
|
||||||
|
|
||||||
|
if (created)
|
||||||
|
on_new_ssrc (sess, source);
|
||||||
g_object_unref (source);
|
g_object_unref (source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3817,6 +3826,10 @@ done:
|
||||||
sess->callbacks.send_rtcp (sess, source, buffer, output->is_bye,
|
sess->callbacks.send_rtcp (sess, source, buffer, output->is_bye,
|
||||||
sess->send_rtcp_user_data);
|
sess->send_rtcp_user_data);
|
||||||
sess->stats.nacks_sent += data.nacked_seqnums;
|
sess->stats.nacks_sent += data.nacked_seqnums;
|
||||||
|
|
||||||
|
RTP_SESSION_LOCK (sess);
|
||||||
|
on_ssrc_active (sess, source);
|
||||||
|
RTP_SESSION_UNLOCK (sess);
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG ("freeing packet callback: %p"
|
GST_DEBUG ("freeing packet callback: %p"
|
||||||
" do_not_suppress: %d may_suppress: %d",
|
" do_not_suppress: %d may_suppress: %d",
|
||||||
|
|
Loading…
Reference in a new issue