In case stray audio is receveived before the DTMF event is fully
finished, retain the internal state from the beginning of the event to
make sure that the output is consistent. This fixes both DTMF timestamps
jumping during the end event, and audio timestamps being off after the
end event.
Closes#1929
Change-Id: I4e675b15153e35a8d1546b947e4b82879c1577b4
Keep outgoing RTP timestamps consistent between different instances of
the DTX buffer. Update affected tests.
Change-Id: I6cf03ab32f5c510bd781063a9e7241d1187c202b
If the last used PT was a different one, check if it was an unknown PT.
If it was, then DTX can remain active, as the packet would have been
blocked.
Change-Id: Icc8bf195c30a2252b392bbccfeef34b91078ddd6
The stub is used for unknown payload types. Specialise the handler
function for it with an extra check for DTX usage. This effectively
blocks RTP packets with unknown payload types if DTX has been
configured. Forwarding RTP packets with unknown payload types can
interfere with a clean output stream generated by the DTX buffer.
Change-Id: I6f0aa9654946d2877b963cd13cec7c3f5c8b1c54
Shutting down a DTX buffer means that it may restart at an unknown later
time. Reset TS tracking when shutting it down so that if it does
restart, it receives a fresh TS state, instead of continuing on the
previous timestamps, which may then be wrong.
Change-Id: I9c7978e2f335eab32982c4739917ca5ce0c27eb6
Extend PT tracker to not just track the most used PT, but also which PT
has been used last. Use a simple circular array.
Use this new tracking to determine whether a DTX buffer should remain
active. The "most used PT" approach isn't reliable for this, as it leads
to a DTX buffer restarting only after the PT has become the "most used,"
so only after about 10 packets. Meanwhile a newly appearing SSRC would
have a new DTX buffer active immediately. Being strict about which PT
was used last resolves this inconsistency.
Change-Id: If912e4d10e6737a82f6adc0b19d502075aa18a93
If a packet is received for a codec that should have an active DTX but
doesn't, drop the packet instead of forwarding it without being
processed. In this case we expect that some other codec has an active
DTX buffer, and forwarding the packet would interfere with a clean
output stream.
Change-Id: I162ba6f314b804123a6a3957feb7435a319ad2b9
The GLib slice allocator has been obsoleted. Having a mixture of two
allocators can lead to hidden issues on systems that use different
implementations. Take the leap and replace everything with g_new/g_free.
Change-Id: I025c8383ef47b2c2472573360407fd6a6ca339b3
Decoding and encoding may have taken some time. Grab an updated "now"
before scheduling a packet to send.
Change-Id: I9380cb01d77519cf082d87f3a6c6cfc18b8213f8
With reuse-codecs, we still need to place the codec from the SDP into
our prefs list, even if it's already present, as the format options may
have changed. Update one affected test case.
Closes#1921
Change-Id: I688c57a8c45ec4c3bf159fe2193a0e00bbceeda2
Adds a new config section that allows adjusting behaviour for certain
transcoding scenarios. This only adds the initial support for the config
option.
Change-Id: Ia3d43061adc540fab054e5c99ab804dc1ff53b84
Special codec handler to support not forwarding (nor any processing
whatsoever) of particular payload types at all. Support this in the
kernel module as well.
Change-Id: If10227affa54307e1e9b448eadd0bf2bfc5774ba
Obsolete the two flavours of packet_encoded_tx and instead distinguish
the two flavour of sequence number handling (passthrough and
self-generated) through a function pointer in the codec SSRC handler,
directly pointing to one of the two existing codec_output_rtp wrappers.
Change-Id: Ib1141413859dab37048be9b04af7a5d235b46d0a