Thanks Simon for your prompt response.<br><br>Having tested the code as suggested, it seems that the bit rate still remains at 327kbps for the h.263 codec after i attempted to set it to 128kbps.<br><br>Is it possible that because this version of ptlib (2.8.5) does not support flow control, changing the bit rate will not take affect?<br>
<br>I traced the SetMaxBitRate function, and it was called by the descendant class in plugin, which is correct, which in turn looks as follows;<br><br>PBoolean H323PluginVideoCodec::SetMaxBitRate(unsigned bitRate)  <br>{ <br>
    if (SetFlowControl(codec,context,mediaFormat,bitRate/100)) {<br>         frameWidth = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameWidthOption); <br>         frameHeight =  mediaFormat.GetOptionInteger(OpalVideoFormat::FrameHeightOption);<br>
         targetFrameTimeMs = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameTimeOption);<br>         mediaFormat.SetBandwidth(bitRate);<br>         return true;<br>    }<br>    return false;<br>}<br><br>the SetFlowControl always returns false with the following message;<br>
<br> - > "No Flow Control supported in codec"<br><br>Any ideas or other suggestions you may provide will be greatly appreciated.<br><br>Thanks<br><br>Josh <br><br><br><div class="gmail_quote">On Thu, Nov 24, 2011 at 2:29 PM, Simon Horne <span dir="ltr"><<a href="mailto:s.horne@packetizer.com">s.horne@packetizer.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Josh<br>
<br>
Unfortunately the OpenVideoChannel is called after the H.245 TCS stage so<br>
you cannot use it to negotiate a bandwidth limit for a call.<br>
<br>
To set the Initial Bandwidth limit in the TCS there is a callback which is<br>
called when building.<br>
H323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec);<br>
<br>
So you could do something like this in your code<br>
<br>
void MyH323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec)<br>
{<br>
        unsigned bitrate = <your rate in kbps> * 1000;<br>
        if ((bitrate != 0) && (codec->GetMediaFormat().GetBandwidth() ><br>
bitrate)) {<br>
                PTRACE(4,"My\tAdjusting maximum video bitrate to " <<<br>
bitrate);<br>
                codec->SetMaxBitRate(bitrate);<br>
        }<br>
}<br>
<br>
During a call the bitrate may change via FlowControl requests but will not<br>
exceed the value you set in this callback.<br>
<br>
Simon<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:h323plus-bounces@lists.packetizer.com">h323plus-bounces@lists.packetizer.com</a><br>
[mailto:<a href="mailto:h323plus-bounces@lists.packetizer.com">h323plus-bounces@lists.packetizer.com</a>] On Behalf Of J C Mercier<br>
Sent: 25 November 2011 05:08<br>
To: <a href="mailto:h323plus@lists.packetizer.com">h323plus@lists.packetizer.com</a><br>
Subject: [h323plus] Changing video codec transmit bit rate<br>
<div><div></div><div class="h5"><br>
Hi all,<br>
<br>
How would one go about adjusting the video codec max transmission bit rate?<br>
<br>
I understand thus can be done in OpenVideoChannel by calling<br>
codec.SetMaxBitRate but I I get  no flow control supported when I attempted<br>
to do so.<br>
<br>
I am using v 1.23 for H323plus downloaded from <a href="http://h323plus.org" target="_blank">h323plus.org</a> and pitlib v<br>
2.8.5. I noticed that flow control is not supported in ptlib less than 2.9<br>
but would there be another way of changing the bit rate?<br>
<br>
Thanks!<br>
<br>
Josh C.<br>
<br>
</div></div></blockquote></div><br><div style="visibility: hidden; left: -5000px;" id="avg_ls_inline_popup"></div>