This HT is needed when updating UDPTL/T.38 handlers, on both sides of
the call. Make sure the HT exists.
Change-Id: Ic85684bbd2a746ff490d06008eadfae664e9f8a9
When we're duplicating the packet contents, we must also update the RTP
header pointer accordingly.
Fixup for fa819e3a73
Change-Id: I66117b2ad15a9adfaabaa1dbc67179bb1817f5e9
Transcoding is flow-specific, so it doesn't make sense to have a flag
for it in a call_media section. Instead we use the transcoding flag set
on the call_subscription objects (on subscribers), and set/unset a flag
on the monologue struct, depending on whether any media flows (going to
subscribers) have transcoding enabled.
Change-Id: Id671d56e56a22eaa8e56f6d449770b0c7b086cea
Pass the subscription object to codec_handlers_update to eliminate the
need for a return type and the subsequent if/else.
Change-Id: I311b3e8ca14ee5090cf329163975354385cee800
Simply stripping a supplemental codec doesn't actually affect the
remaining real codecs. Add a special-cased version of codec_touched() to
ignore such a manipulation.
Add a matching test case.
Change-Id: I4a91292dd38e1114837c2dc841afe07d87cff6cb
Don't try to interpret or schedule DTMF packets if we're just doing RTP
passthrough.
Without tracking the seqencing and timestamping of the primary media
stream, we cannot actually schedule DTMF packets properly. Use the
presence of a defined output sequence number to make this determination.
The other case that uses a predefined output sequence number is when
media is coming from a pre-coded media player stream. The same thing
applies: These packets are already scheduled, so we can skip trying to
schedule them again.
closes#1638
Change-Id: I2d2c20e731f20a3136ca3eee37f0b521062cdb11
This replicates the code to replace audio packets with injected DTMF
events. Unfortunately the code paths between forwarding audio and
processing/forwarding DTMF events is quite different, so some slight
duplication is needed.
Additionally the case of blocked DTMF + injected DTMF must be handled.
Change-Id: Ieb576b4b6644c9b154ba4c6ebd48fe12ff08e1de
Add special return value to indicate that an event was a duplicate and
should be discarded.
Functional no-op.
Change-Id: I5d40bcc4a0bc45ba7875f4132873e7b8d747e132
Add a flag to inhibit kernel mode while DTMF injection is active. Tie in
DTMF playback trigger function: Remove stream from kernel, set inhibit
flag, play DTMF, then unset inhibit flag when all events have been
injected.
Change-Id: I533ec95a676bc7edf4dd973217f8d9499f1e22b6
Support using the SSRC TS derived from received RTP packets as "encoder"
TS (the "next" expected TS) for passthrough RTP in addition to the FIFO
TS of an actual encoder.
Change-Id: I7c49c27651eb89c5349bbf290b1c0ad160f77e3b
Make the decision whether or not to use SSRC passthrough handlers in the
upper level calling function, instead of implicitly in
__make_passthrough_gsl()
Change-Id: Ied88120ea4f12d50e3c5afb96023bdd86c42c6e1
__make_passthrough_ssrc() is only used after a passthrough handler has
already been created via __make_passthrough(), and the two functions do
exactly the same thing other than using a different handler functions.
So we can skip completely shutting down the handler and creating a new
one, and only update the handler function instead.
Change-Id: I5acdb5f5508b385320dda6b8bbb18cccd315f99d
Instead of just setting the "force transcoding" flag when DTMF injection
is required, check it on a per-codec basis, so we can be more granular
with this decision.
Functional no-op.
Change-Id: I496f3d1fba5840e7870c373f94190243392db438
Using a pointer array instead of a linked lists allows us to directly
reference a media section by index number, without having to spool into
the linked list.
No functional changes.
Change-Id: I8b0e93f0c2e9addbcb4c938894118ed4a6aec768
Track audio writes in the mix buffer to set the `active` flag to true
whenever a write occurs, which makes it possible to create the buffer in
an inactivate state and implicitly set it active on demand.
Handle the mix buffer not returning any data in the RTP sending logic
(which is what happens for an inactive buffer) by simply not sending any
packets.
Change-Id: Iaeb0f6deadb3d90020c8c62872735cc94db80504
Similar to the existing media_player, but instead of simply producing
its own standalone output media stream, the audio_player takes over the
entire media stream flowing to the receiver, including media forwarded
from the opposite side of the call, as well as media produced by the
media_player.
Change-Id: Ic34ecf08fc73b04210cfffb1a7d795b462ece5ea
Extend __make_transcoder_full with a custom callback function to create
the SSRC handlers.
Functional no-op.
Change-Id: I79cfabf6e9758b105a89908f9023bd773b838d9e
Support creating transcoders with different "packet decoded" callback
functions.
Functional no-op.
Change-Id: I49ba720841161999dc0ae166ea0841dc094e8bc7
Split out the parts of __ssrc_handler_transcode_new that are related to
the decoder only, leaving the encoder-related code in a separate
function. Allow re-use of the decoder setup code.
Functional no-op.
Change-Id: Ifb91c388a872a4ca14c0cc4571f4d0578271407f
Only parse out a codec type if the codec is given with any parameters
set (and not just by name). Parsing out a codec type when just its name
is given leads to a codec type with default parameters set (such as the
number of channels) which can lead to a stricter matching than desired.
When a codec is given just by name we want to match all codecs of that
type, not just the ones with the same parameters as the default ones.
Change-Id: I583bf4045dbd55291d8dc596310730024853d386