[Ekiga-devel-list] Help about audio plugin system OPAL for Ekiga



Hi all!

I write this post because I need help about audio plugin system for OPAL. I want to add my own codec like a plugin for later use it in Ekiga building my_own_codec_audio_pwplugin.so file.

I've been researching the source code of opal-3.6.8 and reading the document: http://www.voxgratia.org/docs/codec_plugins.html. I searched info in forums and mailing list too.

I undestood how the audio codec “my_own_codec.c” are built (create codec, destroyCodec, Code-Decode functions... PluginCodec_information and PluginCodec_Definition structs) but I don't undestand how to create instances of an H323Capability.

I refere to this lines:

A H.323 endpoint advertises the codecs it supports by providing a table of capabilities. Each capability specifies a media format, plus other codec-specific parameters such as frames per packet. In OpenH323, a capability is represented by the H323Capability class, and instances of the H323Capability class can are collected into a list represented by a class named H323Capabilities. 

An endpoint uses a H323Capabilities to perform the capability negotiation during call setup, and an application can manipulate endpoint's H323CapabilityList using various member functions on the H323Endpoint.

There are three ways to create instances of an H323Capability. Firstly, the capability class can be instantiated directly, as follows:

H323Capability * cap = new H323_GSM0610Capability;

Secondly, the static function H323Capability::Create can be used to create a H.323 capability that explicitly matches the string:

H323Capability * newCap = H323Capability::Create("G.711-uLaw-64k")

Note that the string must explicitly match the string specified. The return value is NULL if there is no match.

Thirdly, all capabilities that match a wildcard string can be added to a H323CapabilityList using the following function:

H323Capabilities caps;
caps.AddAllCapabilities(0, 0, "711");

For historical reasons, the names used by capabilities are the same as the corresponding codec (or media format) name, but may have a suffix of "{sw}" or "{hw}" added to indicate whether it is purely a software or hardware codec. By default, AddAllCapabilities will include any "{sw}" codecs that match the string provided, but will not match any "{hw}" codecs unless that is included in the original codec specification.

A user program must populate an endpoint's capability table with the list of capabilities that match the abilities of the program and endpoint software. This is normally done as follows:

ep.AddAllCapabilities(0, 0, "*");
ep.AddAllUserInputCapabilities(0, P_MAX_INDEX);”
Some questions...
  • Where and how i have to do it? In my_own_codec.c or in other file?

  • I supose my codec would be a PluginCodec_H323NonStandardCodecData? Am I right? What defines if a plugin codec is or not a non standar codec data?

  • And the last question, why Ekiga doesn't recognized ima_adpcm_audio_pwplugin.so? This file is included in opal plugins directory. I fixed it in /usr/local/lib/opal with the other binary files, but it does't appear on Ekiga. It's important because my own codec is a modification of this codec.


My C++ knowledge is poor so please keep it in mind for your reply, thank you very much.

Best regards,

Ignacio Palacios



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]