[Freeswitch-dev] Pointer to memory pool not always passed when calling switch_core_speech_open()
Hi, list! I am currently studying the internals of TTS features in Freeswitch. There is an unclear moment: switch_core_speech_open() is called from several locations, but pointer to session's memory pool is not always passed during the function call, namely: mod_rss.c -- passed conference_member.c -- passed mod_conference.c -- not passed mod_ssml.c -- not passed switch_ivr_play_say.c -- not passed Is there some rule or reason, that defines in which case pointer should be passed and in which not? Passing pointer to the memory pool may be convenient way to provide speech handle with information about the session, that uses this handle. This may be useful when emitting log messages or events, that should be fired in context of some active session. PS Also, this pointer is always passed to switch_core_asr_open() call. -- Denis Fokin
On Tue, Mar 17, 2020 at 1:47 AM SanveanRu . <fokin.denis@gmail.com> wrote:
Hi, list!
I am currently studying the internals of TTS features in Freeswitch. There is an unclear moment: switch_core_speech_open() is called from several locations, but pointer to session's memory pool is not always passed during the function call, namely: mod_rss.c -- passed conference_member.c -- passed mod_conference.c -- not passed mod_ssml.c -- not passed switch_ivr_play_say.c -- not passed
Is there some rule or reason, that defines in which case pointer should be passed and in which not?
If you have a pool already you can pass it and it will be used but now that pool has to outlast the object. If you pass NULL, it creates its own pool internally.
Passing pointer to the memory pool may be convenient way to provide speech handle with information about the session, that uses this handle. This may be useful when emitting log messages or events, that should be fired in context of some active session.
There is nothing in the pool but managed memory, you cannot access it or anything like that, it has nothing to do with session data.
PS Also, this pointer is always passed to switch_core_asr_open() call. -- Denis Fokin _________________________________________________________________________
The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services. Build your next product on our scalable cloud platform.
Join our online community to chat in real time https://signalwire.community
Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev https://freeswitch.com
-- Anthony Minessale II Founder, FreeSWITCH. http://freeswitch.com https://youtu.be/l_hOxzCt6X4 https://www.youtube.com/watch?v=oAxXgyx5jUw https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA
participants (2)
-
Anthony Minessale
-
SanveanRu .