<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello All,</div><div><br></div><div>I want to assign the SSRC of RTP Packets dynamically.</div><div><br></div><div>The scenario is as below:</div><div>I have funneled multiple streams into one. At runtime I check if the frame is 1st input source, I assign SSRC as 1, if the frame is from 2nd input source, I assign SSRC as 2 and so on..</div><div><br></div><div>To assign the SSRC, I use probe on "src" pad of "rtph264pay" element.<br></div><div>The code snippet for the probe is shown below:</div><div><br></div><div>static GstPadProbeReturn setssrc(GstPad *pad, GstPadProbeInfo *info, gpointer user_data)<br>{<br> GstBuffer *buffer = NULL;<br> buffer = GST_PAD_PROBE_INFO_BUFFER(info);</div><div> GstRTPBuffer rtpBuffer;<br> memset(&rtpBuffer, 0, sizeof(GstRTPBuffer));</div><div> if (buffer != NULL)<br> {<br>  if (gst_rtp_buffer_map(buffer, (GstMapFlags)GST_MAP_READWRITE, &rtpBuffer))<br>  {<br>   g_print("buffer mapped\n");<br>   gst_rtp_buffer_set_ssrc(&rtpBuffer, 222);<br>   gst_rtp_buffer_unmap(&rtpBuffer);<br>  }<br>  else<br>   g_print("buffer not mapped\n");<br> }<br> return GST_PAD_PROBE_OK;<br>}</div><div><br></div><div>This code sets SSRC only for some of the packets and the output at the receiver side (by using gst_rtp_buffer_get_ssrc)) is as below:</div><div>-145555887</div><div>222</div><div>222</div><div>222</div><div>222</div><div><div style="background:none;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent 0px;border:0px rgb(34,34,34);width:1170px;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;overflow:visible;text-decoration:none;word-spacing:0px;white-space:normal;font-size-adjust:none;font-stretch:100%">-145555887</div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><div style="background:none;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent 0px;border:0px rgb(34,34,34);width:1170px;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;overflow:visible;text-decoration:none;word-spacing:0px;white-space:normal;font-size-adjust:none;font-stretch:100%">-145555887</div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><div style="background:none;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent 0px;border:0px rgb(34,34,34);width:1170px;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;overflow:visible;text-decoration:none;word-spacing:0px;white-space:normal;font-size-adjust:none;font-stretch:100%">-145555887<br></div></div><div><div style="background:none;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent 0px;border:0px rgb(34,34,34);width:1170px;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;overflow:visible;text-decoration:none;word-spacing:0px;white-space:normal;font-size-adjust:none;font-stretch:100%">-145555887</div><div style="background:none;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent 0px;border:0px rgb(34,34,34);width:1170px;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;overflow:visible;text-decoration:none;word-spacing:0px;white-space:normal;font-size-adjust:none;font-stretch:100%"><br></div><div style="background:none;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent 0px;border:0px rgb(34,34,34);width:1170px;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;overflow:visible;text-decoration:none;word-spacing:0px;white-space:normal;font-size-adjust:none;font-stretch:100%">Can anyone please tell me where is the problem and how to resolve it?</div><div style="background:none;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent 0px;border:0px rgb(34,34,34);width:1170px;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;overflow:visible;text-decoration:none;word-spacing:0px;white-space:normal;font-size-adjust:none;font-stretch:100%"><br></div></div><div>Thanks,</div><div>Priyanka</div></div></div></div></div></div></div>