[Freeswitch-dev] Need hints on following identifier definitions in FS source code
anthony.minessale at gmail.com
Tue Oct 13 08:19:32 PDT 2009
read_codec and write_codec are the current effective codecs.
real_read_codec and real_write_codec are the codecs set by the endpoint.
so when the endpoint sets the codec both read_codec and real_read_codec are
but if someone temporarily adds another codec like L16 to transcode to raw
then the L16 codec object goes into read codec and the original codec
remains at real_read_codec.
the raw and enc frames are internally used by the transcoding process to
hold the encoded or decoded version of the current audio packet depending on
media_bug is an object that can be attached to the session to install
callbacks in the transcoding path so your code gets called one time per
audio frame giving you a chance to inspect or alter the contents. (see my
cluecon 09 presentation video for detailed explanation)
The things in #4 are mostly related to controlling the session per second
the mutexs you asked about are for specific things in the core
global_var_mutex protects global variables
global_mutex protects a whole bunch of infrequent operations that cannot
occur at the same time.
throttle_mutex controls the access to the soft limit counter
sps is current sessions per second permitted
dummy_cng_frame is a global frame with the cng flag set which can be
returned by the core read routine whenever it wants to send a cng frame.
I think the biggest focus should be on the switch_ivr family of files and
any funcs used therein since that is the part of the api that most module
programmers will need to use. I guard the core with an evil 3 headed dog.
On Tue, Oct 13, 2009 at 2:26 AM, Muhammad Shahzad <shahzad at vopium.com>wrote:
> As i discussed in last week's conference call, i have some identifers in
> source code for which i couldn't guess their purpose and / or use. So, i am
> going to list such identifiers here (one file at a time) and request you to
> give me hints on these, so i can complete the doxygen documentation for
> FILE: <FS-Trunk>/src/include/private/switch_core_pvt.h
> 1. In struct *switch_core_session*, what is the difference between *
> read_codec* and *real_read_codec*, similarly *write_codec* and *
> 2. In struct *switch_core_session*, what is the difference between *
> raw_read_frame* and *enc_read_frame*, similarly *raw_write_frame* and *
> 3. What is struct *switch_media_bug*? I have some confusion ideas on it
> but better to know it from you.
> 4. In struct *switch_runtime*, variables *offset*, *throttle_mutex*, *
> global_mutex* (how it is different then *global_var_mutex*?), *sps* and *
> Thank you.
> | FATAL ERROR ---
> O X |
> | You have moved the mouse.
> | Windows must be restarted for the changes to take effect. |
> | <OK>
> Muhammad Shahzad
> CISCO Rich Media Communication Specialist (CRMCS)
> CISCO Certified Network Associate (CCNA)
> Cell: +92 334 422 40 88
> MSN: shari_786pk at hotmail.com
> Email: shaheryarkh at googlemail.com
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
Anthony Minessale II
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FreeSWITCH-dev