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
Doing a simple prefix string match is not enough as there may be
keywords that are equal to a prefix of another keyword. Make sure the
keyword is followed by a space or newline or end of line. This also
removes the burden of having to skip over leading spaces in the CLI
handlers.
Change-Id: I118a08e1b33d9bf592d3d80101e4f0634401adbd
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
This causes a termination with extreme prejudice. Useful for debugging
memory leak issues as it bypasses shutdown cleanup.
Change-Id: Ic39c5ad4aa5a4f9dc28274732bb736956a47e5bc
This allows us to deallocate all held strings in one go without having
to iterate much.
Requires adjusting tests, Makefiles and dependencies.
Change-Id: Ic214f9dd2cd9609cb472301f52bb10d1918d859e
Change old code to directly return `str` objects instead of pointers to
allocated ones. Largely a no-op change but makes some code easier and
eliminates some old kludges.
Change-Id: I2be19dd24bb7ff046d86cc32a3af235283e65dd0
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
Introduce global generic memory arena variable, instead of having just
a call-specific memory arena. This makes it possible to use memory arena
outside of call contexts. Define previous call-specific functions in
terms of the generic ones.
Change-Id: Icde4f63f02dacbf8abfbaf107ea8b5bbe18d5eb8
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