The media blob is owned by the call, so we need to hold a reference to
the call until decoding is finished.
Change-Id: I6ed0d35edb485aad2811b287706ef101c4aa2c3f
Create separate function which only does the reading from DB and returns
the blob. Refactor __media_player_add_db to use this new function.
This slightly changes string allocation semantics: Instead of leaving
the string in the DB buffer and then letting
__media_player_add_blob_id() do the allocation and duplication, we now
immediately duplicate the string into the call's memory arena and
immediately free the DB buffers. __media_player_add_blob_id's
duplication then turns into a no-op thanks to call_ref().
Change-Id: I4360c7b0e8ec3c9b68cfc5b34b48115d8f4f89b0
Use the call's memory arena to store strings (in particular the media
blob), and use intrusive allocation storage for the blob str itself.
Change-Id: I3a3d480869d61a2e66a24e88ad135bacca947072
Use single shared function to set `opts`. Set the "block egress" flag in
that same function. This fixes "block egress" not being set when media
is played from the player cache.
Change-Id: I3266b76974b61b4034f55f335151506039530283
The cache index object contains an embedded RTP payload type, which uses
arena-allocated strings. Switch memory arena prior to calling
codec_init_payload_type(), and then switch back to call context when
done.
Change-Id: Ic2758ae9b8a8f8e721be54e6323302b1a73204f6
If a decoder thread took over the player's coder, make sure we re-create
the AVPacket in the player's coder if needed.
Change-Id: I3fda8768766480cfb1d6d67dbb565501a294a779
Mark those SDPs which trigger processing
of music-on-hold.
Is defined by the config option:
`moh-attr-name`. If not defined then
is not used.
Will be useful for cases when it's important
for remote components to detect ongoing hold.
Change-Id: I0f2a284955dbc045b51920174f1f4fbefcb93907
Support inactive hold, because some
client implementations (such as Zoiper5)
are using `a=inactive` for their holds.
For us this means, either of this
puts the other side on hold:
- `sendonly: !MEDIA_ISSET(media, SEND) && MEDIA_ISSET(media, RECV)`
- `inactive: !MEDIA_ISSET(media, SEND) && !MEDIA_ISSET(media, RECV)`
Change-Id: I75562eee60220885e233fa965bf22da92850a8f4
Make the macro return the appropriate pointer type, and make sure the
free function takes an argument of the same type. This also eliminates
some boilerplate type-casting code.
Change-Id: I3094271fa2c53ec93b9ff9f837d461cf422e0f12
If with the sendonly SDP offer capable of MoH,
there is a flag `repeat-duration` coming at the
same time, then warn a user of rtpengine
that the configuration option is used with MoH
and it's not possible to take the flag's value.
Change-Id: Iacf3ddd85749da3ad98758e386952ab7cec5ca8d
Introduce `moh-max-repeats` configuration option,
which controls the `rtpe_config.moh_max_repeats`
used when initializing media player options
for the music-on-hold functionality.
By default is always set to 999,
if not defined otherwise.
Change-Id: I247dc532a6871934e44f9c4002313363356937fb