Marek
You should still be able to use the depreciated code from 1.18.0 if you are upgrading. The capability handling etc has not significantly changed. Simply move the applicable LID classes from 1.18.0 into you project and compile against H323plus.
Simon
-----Original Message----- From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of Marek Wlizlo Sent: Sunday, 11 October 2009 11:32 AM To: h323plus@lists.packetizer.com Subject: [h323plus] How to add for H323EndPoint capability for codec G.729 into h323plus library?
Hello!
On the last Friday I decided to upgrade my project's libraries: pwlib 1.10.0 -> 1.12.0 and openh323 1.18.0 -> h323plus 1.19.7. The project's application is a media-signaling gateway from DSS1 to H.323 protocol using my hardware with DSP for media converting.
With previous openh323 library I don't have any problems with adding codecs supported by my DSP to capabilities table - I just simply create object 'mydevice' of class MyOpalDevice : public OpalLineInterfaceDevice and inside of it just add table 'CodecInfo':
-static struct { const char * mediaFormat; } CodecInfo[] = -{ - { OPAL_G729A }, - { OPAL_G711_ALAW_64K }, - { OPAL_G711_ULAW_64K }, - { OPAL_G729 } -}; - -//------------------------------------------------------------------------- ------------------------
- -static PINDEX FindCodec(const OpalMediaFormat & mediaFormat) -{ - LOGDBG(_("%s"), __PRETTY_FUNCTION__); - - for (PINDEX i = 0; i < PARRAYSIZE(CodecInfo); i++) - { - if (mediaFormat == CodecInfo[i].mediaFormat) - return i; - } - return P_MAX_INDEX; -} - -//------------------------------------------------------------------------- ------------------------
- -OpalMediaFormat::List MyOpalDevice::GetMediaFormats() const -{ - LOGDBG(_("%s"), __PRETTY_FUNCTION__); - - OpalMediaFormat::List formats; - - for (PINDEX i = 0; i < PARRAYSIZE(CodecInfo); i++) - { - formats.Append(new OpalMediaFormat(CodecInfo[i].mediaFormat)); - } - return formats; -}
After this it was enough to use static method: H323_LIDCapability::AddAllCapabilities(&mydevice, capabilities, 0, 0);
during initialization of my endpoint in method: GatewayEndpoint::Init(bool initial) (where class GatewayEndpoint : public H323EndPoint).
In h323plus there is not defined class OpalLineInterfaceDevice and for two days I can't find the way how to use codec's capabilities different than G.711-ALaw-64k{sw} or G.711-uLaw-64k{sw}. I need to add G.729 and G.729A. I must mention that I have read documentation from http://www.voxgratia.org/docs/faq.html#5_1 and there is explained how to use external plugins with software codecs. In my case I need to put into my GatewayEndpoint capabilities table information that my DSP just supports (G.729 and some others).
Please help.
Thanks in advance, Marek
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4496 (20091010) __________
The message was checked by ESET NOD32 Antivirus.