<div dir="ltr"><div><br></div><div><br></div><div>By doing this, you are breaking the RFC, IIRC, the SSRC should be random.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 5 Jun 2019 at 06:11, priyanka kataria <<a href="mailto:priyanka.kataria86@gmail.com">priyanka.kataria86@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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:rgba(0,0,0,0) none repeat scroll 0% 0%;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent none 0px;border:0px none 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">-145555887</div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><div style="background:rgba(0,0,0,0) none repeat scroll 0% 0%;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent none 0px;border:0px none 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">-145555887</div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><div style="background:rgba(0,0,0,0) none repeat scroll 0% 0%;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent none 0px;border:0px none 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">-145555887<br></div></div><div><div style="background:rgba(0,0,0,0) none repeat scroll 0% 0%;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent none 0px;border:0px none 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">-145555887</div><div style="background:rgba(0,0,0,0) none repeat scroll 0% 0%;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent none 0px;border:0px none 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"><br></div><div style="background:rgba(0,0,0,0) none repeat scroll 0% 0%;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent none 0px;border:0px none 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">Can anyone please tell me where is the problem and how to resolve it?</div><div style="background:rgba(0,0,0,0) none repeat scroll 0% 0%;font:400 13.33px/19.99px Arial,Helvetica,sans-serif;outline:transparent none 0px;border:0px none 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"><br></div></div><div>Thanks,</div><div>Priyanka</div></div></div></div></div></div></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">g. Marc</div>