Re: [Opalvoip-devel] Dynamic G.711 Codecs for OPAL?
Brought to you by:
csoutheren,
rjongbloed
From: Craig S. <cr...@po...> - 2009-02-24 00:06:10
|
Rainer Poisel wrote: > Hej, > > I am currently working on a project which has to do with steganography. In my > new codec, which is based on G.711, I want to hide data in the least > significant bits (LSBs) of A- and u-Law encoded samples. > > According to the "How to use plugin audio codecs in OpenH323 and OPAL" guide, > the G.711 codecs are statically linked into the library. But what is the > reason for that? Is there a chance to compile the G.711 codecs as shared > objects? > > I want to offer LSB-mechanisms additionally. Shared objects could enable me to > just have to compile these instead of the whole OPAL library. On the other > hand it should be easier, because the shared-objects plugins have well > defined interfaces which are explained in the document mentioned above. The G.711 codecs are compiled into Opal because this provides at least one codec that will work even when no plugins are available. They are installed during Opal initialisation using the OPAL_REGISTER_G711 macro in g711codec.h. It is possible to remove the internal definitions of the G.711 transcoders from the appropriate object factory. This is done by executing OpalTranscoderFactory::Unregister with arguments such as: OpalTranscoderFactory::Unregister( MakeOpalTranscoderKey(OpalG711_ULAW_64K, OpalPCM16) ) OpalTranscoderFactory::Unregister( MakeOpalTranscoderKey(OpalPCM16, OpalG711_ULAW_64K) ) OpalTranscoderFactory::Unregister( MakeOpalTranscoderKey(OpalG711_ALAW_64K, OpalPCM16) ) OpalTranscoderFactory::Unregister( MakeOpalTranscoderKey(OpalPCM16, OpalG711_ALAW_64K) ) You can then declare your own variants of the Opal_G711_uLaw_PCM, Opal_PCM_G711_uLaw, Opal_G711_ALaw_PCM and Opal_PCM_G711_ALaw classes and register them in the same way as the OPAL_REGISTER_G711 macro Please let us know how you go, and good luck! Craig -- ----------------------------------------------------------------------- Craig Southeren Post Increment – VoIP Consulting and Software cr...@po... www.postincrement.com.au Phone: +61 243654666 ICQ: #86852844 Fax: +61 243656905 MSN: cra...@ho... Mobile: +61 417231046 Jabber: cr...@ja... "Science is the poetry of reality." Richard Dawkins |