[PATCH] [RFC] Add function pjmedia_rtp_decode_rtp2()

BC
b17 c0de
Fri, Oct 7, 2016 9:25 AM

Hi,
I am parsing the RTP Extension Header from a custom transport adapter.
To do this, I have implemented a new function
pjmedia_rtp_decode_rtp2() which is similar to pjmedia_rtp_decode_rtp()
but adds additional out parameters to return the RTP extension in the
packet if any. Can this patch be applied to the pjmedia library? I
think it could be useful to other people who need to parse the RTP-HE.

Regards,
Kal

Hi, I am parsing the RTP Extension Header from a custom transport adapter. To do this, I have implemented a new function pjmedia_rtp_decode_rtp2() which is similar to pjmedia_rtp_decode_rtp() but adds additional out parameters to return the RTP extension in the packet if any. Can this patch be applied to the pjmedia library? I think it could be useful to other people who need to parse the RTP-HE. Regards, Kal
NI
Nanang Izzuddin
Fri, Oct 21, 2016 7:48 AM

Hi Kal,

This should have been checked in to SVN trunk at
https://trac.pjsip.org/repos/ticket/1970.

Sorry for the late update and thank you for the patch!

BR,
nanang

On Fri, Oct 7, 2016 at 4:25 PM, b17 c0de b17c0de@gmail.com wrote:

Hi,
I am parsing the RTP Extension Header from a custom transport adapter.
To do this, I have implemented a new function
pjmedia_rtp_decode_rtp2() which is similar to pjmedia_rtp_decode_rtp()
but adds additional out parameters to return the RTP extension in the
packet if any. Can this patch be applied to the pjmedia library? I
think it could be useful to other people who need to parse the RTP-HE.

Regards,
Kal


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Kal, This should have been checked in to SVN trunk at https://trac.pjsip.org/repos/ticket/1970. Sorry for the late update and thank you for the patch! BR, nanang On Fri, Oct 7, 2016 at 4:25 PM, b17 c0de <b17c0de@gmail.com> wrote: > Hi, > I am parsing the RTP Extension Header from a custom transport adapter. > To do this, I have implemented a new function > pjmedia_rtp_decode_rtp2() which is similar to pjmedia_rtp_decode_rtp() > but adds additional out parameters to return the RTP extension in the > packet if any. Can this patch be applied to the pjmedia library? I > think it could be useful to other people who need to parse the RTP-HE. > > Regards, > Kal > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >
BC
b17 c0de
Thu, Oct 27, 2016 10:48 PM

Hi nanang,
Thanks for committing this. Just curios why did you guys make a
separate struct for this called pjmedia_rtp_dec_hdr.? Why "decode"
header? Are there plans to add other fields to this struct later?

Kal

On Fri, Oct 21, 2016 at 9:48 AM, Nanang Izzuddin nanang@pjsip.org wrote:

Hi Kal,

This should have been checked in to SVN trunk at
https://trac.pjsip.org/repos/ticket/1970.

Sorry for the late update and thank you for the patch!

BR,
nanang

On Fri, Oct 7, 2016 at 4:25 PM, b17 c0de b17c0de@gmail.com wrote:

Hi,
I am parsing the RTP Extension Header from a custom transport adapter.
To do this, I have implemented a new function
pjmedia_rtp_decode_rtp2() which is similar to pjmedia_rtp_decode_rtp()
but adds additional out parameters to return the RTP extension in the
packet if any. Can this patch be applied to the pjmedia library? I
think it could be useful to other people who need to parse the RTP-HE.

Regards,
Kal


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi nanang, Thanks for committing this. Just curios why did you guys make a separate struct for this called pjmedia_rtp_dec_hdr.? Why "decode" header? Are there plans to add other fields to this struct later? Kal On Fri, Oct 21, 2016 at 9:48 AM, Nanang Izzuddin <nanang@pjsip.org> wrote: > Hi Kal, > > This should have been checked in to SVN trunk at > https://trac.pjsip.org/repos/ticket/1970. > > Sorry for the late update and thank you for the patch! > > BR, > nanang > > > On Fri, Oct 7, 2016 at 4:25 PM, b17 c0de <b17c0de@gmail.com> wrote: >> >> Hi, >> I am parsing the RTP Extension Header from a custom transport adapter. >> To do this, I have implemented a new function >> pjmedia_rtp_decode_rtp2() which is similar to pjmedia_rtp_decode_rtp() >> but adds additional out parameters to return the RTP extension in the >> packet if any. Can this patch be applied to the pjmedia library? I >> think it could be useful to other people who need to parse the RTP-HE. >> >> Regards, >> Kal >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
BC
b17 c0de
Thu, Oct 27, 2016 10:50 PM

Also if its a separate struct. Could it make sense to just include all
the fields such as hdr, payload, payloadlen... etc in the struct?

Kal

On Fri, Oct 28, 2016 at 12:48 AM, b17 c0de b17c0de@gmail.com wrote:

Hi nanang,
Thanks for committing this. Just curios why did you guys make a
separate struct for this called pjmedia_rtp_dec_hdr.? Why "decode"
header? Are there plans to add other fields to this struct later?

Kal

On Fri, Oct 21, 2016 at 9:48 AM, Nanang Izzuddin nanang@pjsip.org wrote:

Hi Kal,

This should have been checked in to SVN trunk at
https://trac.pjsip.org/repos/ticket/1970.

Sorry for the late update and thank you for the patch!

BR,
nanang

On Fri, Oct 7, 2016 at 4:25 PM, b17 c0de b17c0de@gmail.com wrote:

Hi,
I am parsing the RTP Extension Header from a custom transport adapter.
To do this, I have implemented a new function
pjmedia_rtp_decode_rtp2() which is similar to pjmedia_rtp_decode_rtp()
but adds additional out parameters to return the RTP extension in the
packet if any. Can this patch be applied to the pjmedia library? I
think it could be useful to other people who need to parse the RTP-HE.

Regards,
Kal


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Also if its a separate struct. Could it make sense to just include all the fields such as hdr, payload, payloadlen... etc in the struct? Kal On Fri, Oct 28, 2016 at 12:48 AM, b17 c0de <b17c0de@gmail.com> wrote: > Hi nanang, > Thanks for committing this. Just curios why did you guys make a > separate struct for this called pjmedia_rtp_dec_hdr.? Why "decode" > header? Are there plans to add other fields to this struct later? > > Kal > > On Fri, Oct 21, 2016 at 9:48 AM, Nanang Izzuddin <nanang@pjsip.org> wrote: >> Hi Kal, >> >> This should have been checked in to SVN trunk at >> https://trac.pjsip.org/repos/ticket/1970. >> >> Sorry for the late update and thank you for the patch! >> >> BR, >> nanang >> >> >> On Fri, Oct 7, 2016 at 4:25 PM, b17 c0de <b17c0de@gmail.com> wrote: >>> >>> Hi, >>> I am parsing the RTP Extension Header from a custom transport adapter. >>> To do this, I have implemented a new function >>> pjmedia_rtp_decode_rtp2() which is similar to pjmedia_rtp_decode_rtp() >>> but adds additional out parameters to return the RTP extension in the >>> packet if any. Can this patch be applied to the pjmedia library? I >>> think it could be useful to other people who need to parse the RTP-HE. >>> >>> Regards, >>> Kal >>> >>> _______________________________________________ >>> Visit our blog: http://blog.pjsip.org >>> >>> pjsip mailing list >>> pjsip@lists.pjsip.org >>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>> >> >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>
M
Ming
Fri, Oct 28, 2016 7:41 AM

Hi Kal,

For extensibility, to prevent the addition of decode_rtp3() and so on
in the future.
Yes, it could, but usually (though not always) we try to keep the
signature of function() and function2() similar.

Regards,
Ming

On Fri, Oct 28, 2016 at 6:50 AM, b17 c0de b17c0de@gmail.com wrote:

Also if its a separate struct. Could it make sense to just include all
the fields such as hdr, payload, payloadlen... etc in the struct?

Kal

On Fri, Oct 28, 2016 at 12:48 AM, b17 c0de b17c0de@gmail.com wrote:

Hi nanang,
Thanks for committing this. Just curios why did you guys make a
separate struct for this called pjmedia_rtp_dec_hdr.? Why "decode"
header? Are there plans to add other fields to this struct later?

Kal

On Fri, Oct 21, 2016 at 9:48 AM, Nanang Izzuddin nanang@pjsip.org wrote:

Hi Kal,

This should have been checked in to SVN trunk at
https://trac.pjsip.org/repos/ticket/1970.

Sorry for the late update and thank you for the patch!

BR,
nanang

On Fri, Oct 7, 2016 at 4:25 PM, b17 c0de b17c0de@gmail.com wrote:

Hi,
I am parsing the RTP Extension Header from a custom transport adapter.
To do this, I have implemented a new function
pjmedia_rtp_decode_rtp2() which is similar to pjmedia_rtp_decode_rtp()
but adds additional out parameters to return the RTP extension in the
packet if any. Can this patch be applied to the pjmedia library? I
think it could be useful to other people who need to parse the RTP-HE.

Regards,
Kal


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Kal, For extensibility, to prevent the addition of decode_rtp3() and so on in the future. Yes, it could, but usually (though not always) we try to keep the signature of function() and function2() similar. Regards, Ming On Fri, Oct 28, 2016 at 6:50 AM, b17 c0de <b17c0de@gmail.com> wrote: > Also if its a separate struct. Could it make sense to just include all > the fields such as hdr, payload, payloadlen... etc in the struct? > > Kal > > On Fri, Oct 28, 2016 at 12:48 AM, b17 c0de <b17c0de@gmail.com> wrote: >> Hi nanang, >> Thanks for committing this. Just curios why did you guys make a >> separate struct for this called pjmedia_rtp_dec_hdr.? Why "decode" >> header? Are there plans to add other fields to this struct later? >> >> Kal >> >> On Fri, Oct 21, 2016 at 9:48 AM, Nanang Izzuddin <nanang@pjsip.org> wrote: >>> Hi Kal, >>> >>> This should have been checked in to SVN trunk at >>> https://trac.pjsip.org/repos/ticket/1970. >>> >>> Sorry for the late update and thank you for the patch! >>> >>> BR, >>> nanang >>> >>> >>> On Fri, Oct 7, 2016 at 4:25 PM, b17 c0de <b17c0de@gmail.com> wrote: >>>> >>>> Hi, >>>> I am parsing the RTP Extension Header from a custom transport adapter. >>>> To do this, I have implemented a new function >>>> pjmedia_rtp_decode_rtp2() which is similar to pjmedia_rtp_decode_rtp() >>>> but adds additional out parameters to return the RTP extension in the >>>> packet if any. Can this patch be applied to the pjmedia library? I >>>> think it could be useful to other people who need to parse the RTP-HE. >>>> >>>> Regards, >>>> Kal >>>> >>>> _______________________________________________ >>>> Visit our blog: http://blog.pjsip.org >>>> >>>> pjsip mailing list >>>> pjsip@lists.pjsip.org >>>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>>> >>> >>> >>> _______________________________________________ >>> Visit our blog: http://blog.pjsip.org >>> >>> pjsip mailing list >>> pjsip@lists.pjsip.org >>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >>> > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org