diff --git a/src/api/sipe-core.h b/src/api/sipe-core.h index cde0a9cd5..47b6b7083 100644 --- a/src/api/sipe-core.h +++ b/src/api/sipe-core.h @@ -683,9 +683,11 @@ void sipe_core_status_set(struct sipe_core_public *sipe_public, * of @c buffer MUST be at least @c SIPE_MSRTP_VSR_HEADER_LEN + * @c SIPE_MSRTP_VSR_ENTRY_LEN. * @param payload_type (in) payload ID of the codec negotiated with the peer. + * @param media_source_id (in) ID of the video stream to request. */ void sipe_core_msrtp_write_video_source_request(guint8 *buffer, - guint8 payload_type); + guint8 payload_type, + guint32 media_source_id); /** * Fills @buffer with customized Payload Content Scalability Information packet diff --git a/src/core/sipe-msrtp.c b/src/core/sipe-msrtp.c index d342f23d4..06945c21e 100644 --- a/src/core/sipe-msrtp.c +++ b/src/core/sipe-msrtp.c @@ -104,7 +104,8 @@ enum void sipe_core_msrtp_write_video_source_request(guint8 *buffer, - guint8 payload_type) + guint8 payload_type, + guint32 media_source_id) { static guint8 bit_rate_histogram[] = { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -123,7 +124,7 @@ sipe_core_msrtp_write_video_source_request(guint8 *buffer, SIPE_WRITE_UINT16_BE(buffer, SIPE_MSRTP_VSR_HEADER_LEN + SIPE_MSRTP_VSR_ENTRY_LEN); // Requested Media Source ID - SIPE_WRITE_UINT32_BE(buffer, SIPE_MSRTP_VSR_SOURCE_ANY); + SIPE_WRITE_UINT32_BE(buffer, media_source_id); SIPE_WRITE_UINT16_BE(buffer, 1); // Request Id SIPE_WRITE_UINT16_BE(buffer, 0); // Reserve1 SIPE_WRITE_UINT8(buffer, 0); // Version diff --git a/src/purple/purple-media.c b/src/purple/purple-media.c index 52af4483d..4e4d53607 100644 --- a/src/purple/purple-media.c +++ b/src/purple/purple-media.c @@ -547,7 +547,7 @@ stream_writable_cb(SIPE_UNUSED_PARAMETER PurpleMediaManager *manager, static gboolean write_ms_h264_video_source_request(GstRTCPBuffer *buffer, guint32 ssrc, - guint8 payload_type) + guint8 payload_type, guint32 media_source_id) { GstRTCPPacket packet; guint8 *fci_data; @@ -558,7 +558,7 @@ write_ms_h264_video_source_request(GstRTCPBuffer *buffer, guint32 ssrc, gst_rtcp_packet_fb_set_type(&packet, GST_RTCP_PSFB_TYPE_AFB); gst_rtcp_packet_fb_set_sender_ssrc(&packet, ssrc); - gst_rtcp_packet_fb_set_media_ssrc(&packet, SIPE_MSRTP_VSR_SOURCE_ANY); + gst_rtcp_packet_fb_set_media_ssrc(&packet, media_source_id); if (!gst_rtcp_packet_fb_set_fci_length(&packet, SIPE_MSRTP_VSR_FCI_WORDLEN)) { @@ -568,7 +568,8 @@ write_ms_h264_video_source_request(GstRTCPBuffer *buffer, guint32 ssrc, fci_data = gst_rtcp_packet_fb_get_fci(&packet); - sipe_core_msrtp_write_video_source_request(fci_data, payload_type); + sipe_core_msrtp_write_video_source_request(fci_data, payload_type, + media_source_id); return TRUE; } @@ -595,7 +596,7 @@ on_sending_rtcp_cb(SIPE_UNUSED_PARAMETER GObject *rtpsession, gst_rtcp_buffer_map(buffer, GST_MAP_READWRITE, &rtcp_buffer); was_changed = write_ms_h264_video_source_request(&rtcp_buffer, - ssrc, send_codec->id); + ssrc, send_codec->id, SIPE_MSRTP_VSR_SOURCE_ANY); gst_rtcp_buffer_unmap(&rtcp_buffer); }