maxBitrate in External RTP
Hi,
I have a doubt, How do you get Max-Bitrate supported by a Capability in H323_ExternalRTPChannel.
Help appreciated.
In H323_ExternalRTPChannel call
codec->GetMediaFormat().GetBandwidth()
I hope that helps
Simon
From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of Ankur Deep Jaiswal Sent: Monday, August 25, 2014 8:26 PM To: h323plus@lists.packetizer.com Subject: [h323plus] maxBitrate in External RTP
Hi,
I have a doubt, How do you get Max-Bitrate supported by a Capability in H323_ExternalRTPChannel.
Help appreciated.
Thanks simon,
but "codec->GetMediaFormat().GetBandwidth()" does not give the bandwidth as specified in TCS from remote end. it gives the bandwidth specified in plugin. for example i initialized my max bandwidth to 512kbps but remote only supports 256kbps. then "codec->GetMediaFormat().GetBandwidth()" gives me 512kbps and not 256kbps. i did play with code and "codec->GetMediaFormat().GetOptionInteger(OpalVideoFormat::MaxBitRateOption,0)" did give me the desired result for video codecs.
regards,
On Tue, Aug 26, 2014 at 6:25 PM, Simon Horne s.horne@spranto.com wrote:
In H323_ExternalRTPChannel call
codec->GetMediaFormat().GetBandwidth()
I hope that helps
Simon
*From:* h323plus-bounces@lists.packetizer.com [mailto: h323plus-bounces@lists.packetizer.com] *On Behalf Of *Ankur Deep Jaiswal *Sent:* Monday, August 25, 2014 8:26 PM *To:* h323plus@lists.packetizer.com *Subject:* [h323plus] maxBitrate in External RTP
Hi,
I have a doubt, How do you get Max-Bitrate supported by a Capability in H323_ExternalRTPChannel.
Help appreciated.
-- Ankur Deep Jaiswal
I have just checked in a new function OpalMediaFormat::GetInitialBandwidth() function to the CVS to do the same function as GetOptionInteger(OpalVideoFormat::MaxBitRateOption) however will support all media formats.
Simon
From: Ankur Deep Jaiswal [mailto:ankur@techgentsia.com] Sent: Tuesday, August 26, 2014 11:44 PM To: Simon Horne Cc: h323plus@lists.packetizer.com Subject: Re: [h323plus] maxBitrate in External RTP
Thanks simon,
but "codec->GetMediaFormat().GetBandwidth()" does not give the bandwidth as specified in TCS from remote end.
it gives the bandwidth specified in plugin. for example i initialized my max bandwidth to 512kbps but remote only supports 256kbps.
then "codec->GetMediaFormat().GetBandwidth()" gives me 512kbps and not 256kbps.
i did play with code and "codec->GetMediaFormat().GetOptionInteger(OpalVideoFormat::MaxBitRateOption,0)" did give me the desired result for video codecs.
regards,
On Tue, Aug 26, 2014 at 6:25 PM, Simon Horne <s.horne@spranto.com mailto:s.horne@spranto.com > wrote:
In H323_ExternalRTPChannel call
codec->GetMediaFormat().GetBandwidth()
I hope that helps
Simon
From: h323plus-bounces@lists.packetizer.com mailto:h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com mailto:h323plus-bounces@lists.packetizer.com ] On Behalf Of Ankur Deep Jaiswal Sent: Monday, August 25, 2014 8:26 PM To: h323plus@lists.packetizer.com mailto:h323plus@lists.packetizer.com Subject: [h323plus] maxBitrate in External RTP
Hi,
I have a doubt, How do you get Max-Bitrate supported by a Capability in H323_ExternalRTPChannel.
Help appreciated.
Hi simon, i tried the new code. in H323_ExternalRTPChannel::start(),
but codec->GetMediaFormat().GetInitialBandwidth(); returns the same value as codec->GetMediaFormat().GetBandwidth();
which is not same as codec->GetMediaFormat().GetOptionInteger(OpalVideoFormat::MaxBitRateOption,0);
regards
On Wed, Aug 27, 2014 at 7:52 AM, Simon Horne s.horne@spranto.com wrote:
I have just checked in a new function OpalMediaFormat::GetInitialBandwidth() function to the CVS to do the same function as GetOptionInteger(OpalVideoFormat::MaxBitRateOption) however will support all media formats.
Simon
*From:* Ankur Deep Jaiswal [mailto:ankur@techgentsia.com] *Sent:* Tuesday, August 26, 2014 11:44 PM *To:* Simon Horne *Cc:* h323plus@lists.packetizer.com *Subject:* Re: [h323plus] maxBitrate in External RTP
Thanks simon,
but "codec->GetMediaFormat().GetBandwidth()" does not give the bandwidth as specified in TCS from remote end.
it gives the bandwidth specified in plugin. for example i initialized my max bandwidth to 512kbps but remote only supports 256kbps.
then "codec->GetMediaFormat().GetBandwidth()" gives me 512kbps and not 256kbps.
i did play with code and "codec->GetMediaFormat().GetOptionInteger(OpalVideoFormat::MaxBitRateOption,0)" did give me the desired result for video codecs.
regards,
On Tue, Aug 26, 2014 at 6:25 PM, Simon Horne s.horne@spranto.com wrote:
In H323_ExternalRTPChannel call
codec->GetMediaFormat().GetBandwidth()
I hope that helps
Simon
*From:* h323plus-bounces@lists.packetizer.com [mailto: h323plus-bounces@lists.packetizer.com] *On Behalf Of *Ankur Deep Jaiswal *Sent:* Monday, August 25, 2014 8:26 PM *To:* h323plus@lists.packetizer.com *Subject:* [h323plus] maxBitrate in External RTP
Hi,
I have a doubt, How do you get Max-Bitrate supported by a Capability in H323_ExternalRTPChannel.
Help appreciated.
-- Ankur Deep Jaiswal
-- Ankur Deep Jaiswal
Looks like a casting issue
The base class OpalMediaFormat will return the same as GetBandwidth however the video codecs use the derived OpalVideoFormat which should return the correct value.
I will need to check over the code to determine why the correct virtual function is not being called.
Simon
From: Ankur Deep Jaiswal [mailto:ankur@techgentsia.com] Sent: Wednesday, August 27, 2014 7:22 PM To: Simon Horne Cc: h323plus@lists.packetizer.com Subject: Re: [h323plus] maxBitrate in External RTP
Hi simon,
i tried the new code.
in H323_ExternalRTPChannel::start(),
but codec->GetMediaFormat().GetInitialBandwidth();
returns the same value as codec->GetMediaFormat().GetBandwidth();
which is not same as codec->GetMediaFormat().GetOptionInteger(OpalVideoFormat::MaxBitRateOption,0);
regards
On Wed, Aug 27, 2014 at 7:52 AM, Simon Horne <s.horne@spranto.com mailto:s.horne@spranto.com > wrote:
I have just checked in a new function OpalMediaFormat::GetInitialBandwidth() function to the CVS to do the same function as GetOptionInteger(OpalVideoFormat::MaxBitRateOption) however will support all media formats.
Simon
From: Ankur Deep Jaiswal [mailto:ankur@techgentsia.com mailto:ankur@techgentsia.com ] Sent: Tuesday, August 26, 2014 11:44 PM To: Simon Horne Cc: h323plus@lists.packetizer.com mailto:h323plus@lists.packetizer.com Subject: Re: [h323plus] maxBitrate in External RTP
Thanks simon,
but "codec->GetMediaFormat().GetBandwidth()" does not give the bandwidth as specified in TCS from remote end.
it gives the bandwidth specified in plugin. for example i initialized my max bandwidth to 512kbps but remote only supports 256kbps.
then "codec->GetMediaFormat().GetBandwidth()" gives me 512kbps and not 256kbps.
i did play with code and "codec->GetMediaFormat().GetOptionInteger(OpalVideoFormat::MaxBitRateOption,0)" did give me the desired result for video codecs.
regards,
On Tue, Aug 26, 2014 at 6:25 PM, Simon Horne <s.horne@spranto.com mailto:s.horne@spranto.com > wrote:
In H323_ExternalRTPChannel call
codec->GetMediaFormat().GetBandwidth()
I hope that helps
Simon
From: h323plus-bounces@lists.packetizer.com mailto:h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com mailto:h323plus-bounces@lists.packetizer.com ] On Behalf Of Ankur Deep Jaiswal Sent: Monday, August 25, 2014 8:26 PM To: h323plus@lists.packetizer.com mailto:h323plus@lists.packetizer.com Subject: [h323plus] maxBitrate in External RTP
Hi,
I have a doubt, How do you get Max-Bitrate supported by a Capability in H323_ExternalRTPChannel.
Help appreciated.
I don’t know if this is the only way or the best way to do it but you can override the method OnReceivedPDU in your child class of H323_ExternalRTPChannel. Would be something like this for video OLC:
PBoolean MyExternalRTPChannel::OnReceivedPDU(const H245_DataType & dataType, const H245_H2250LogicalChannelParameters & param, unsigned & errorCode) { if (!H323_ExternalRTPChannel::OnReceivedPDU(param, errorCode)) return FALSE;
if (mediaType == H323Capability::e_Video) { const H245_VideoCapability & videoData = (const H245_VideoCapability &) dataType; if (videoData.GetTag() == H245_VideoCapability::e_genericVideoCapability) { const H245_GenericCapability & genericVideoCapability = (const H245_GenericCapability &) videoData; if (genericVideoCapability.HasOptionalField(H245_GenericCapability::e_maxBitRate)) { maxBitrate = genericVideoCapability.m_maxBitRate.GetValue(); } } }
return TRUE; }
It is kind complex because you have to go deep in the message structure until you find the field you want. Again, I don’t know of a simpler way. I hope it helps. Regards,
Diego Carvalho Domingos
From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of Ankur Deep Jaiswal Sent: Monday, August 25, 2014 7:26 AM To: h323plus@lists.packetizer.com Subject: [h323plus] maxBitrate in External RTP
Hi,
I have a doubt, How do you get Max-Bitrate supported by a Capability in H323_ExternalRTPChannel.
Help appreciated.
-- Ankur Deep Jaiswal
participants (3)
-
Ankur Deep Jaiswal
-
Diego Carvalho Domingos
-
Simon Horne