197
199
GstRTCPPacket packet;
198
200
gboolean modified = FALSE;
200
gst_rtcp_buffer_get_first_packet (buf, &packet);
202
if (gst_rtcp_buffer_get_first_packet (buf, &packet))
204
if (gst_rtcp_packet_get_type (&packet) == GST_RTCP_TYPE_SR)
206
if (!gst_rtcp_packet_remove (&packet))
212
if (!gst_rtcp_packet_move_to_next (&packet))
206
if (gst_rtcp_packet_get_type (&packet) == GST_RTCP_TYPE_SR)
208
GstRTCPPacket nextpacket = packet;
211
gst_rtcp_packet_move_to_next (&nextpacket);
212
if (gst_rtcp_packet_get_type (&nextpacket) == GST_RTCP_TYPE_RR)
214
if (!gst_rtcp_packet_remove (&packet))
219
guchar *data = GST_BUFFER_DATA (buf) + packet.offset;
221
/* If there is no RR, lets add an empty one */
222
data[0] = (GST_RTCP_VERSION << 6);
223
data[1] = GST_RTCP_TYPE_RR;
226
memmove (GST_BUFFER_DATA (buf) + packet.offset + 8,
227
GST_BUFFER_DATA (buf) + nextpacket.offset,
228
GST_BUFFER_SIZE (buf) - nextpacket.offset);
229
gst_rtcp_buffer_get_first_packet (buf, &packet);
235
if (!gst_rtcp_packet_move_to_next (&packet))