mirror of https://github.com/sipwise/rtpengine.git
For the case when the media playback is only meant to fill a gap between the start of playing media with the `play_media()` and the time a real remote end-point starts sending rtp stream. For example, the ringbacktone is emulated towards the caller (triggered by previously seen 183 with SDP), while the callee not actually sending anything (no media coming). In case such a peer stays silent, keep playing the file, blob or db-id given file until the peer actually sends at least one rtp packet from the previously advertised source. (The same way for the `stop media`, media forwarding resumes). Important, the flag implies `block-egress`, so the other parties media stays blocked while the playback is ongoing. The check runs in the packet path (with the call locked on R), so it only marks the player and schedules its timer object immediately. The stop itself then runs from the media player thread (but this time with the call locked on W). Unfortunately, those blocked destinations are excluded from kernel forwarding, because we need to let the daemon see the packets coming. But that's not a big issue, because as soon as the real end-point exchange comes (final 200OK with SDP), kernel space processing will be used again. As the NG caller still sends its own `stop media` afterwards, a second shutdown of the player becomes common. Don't flush the send queue then, because without a coder handler, the flush would match and drop packets that don't belong to the player. Change-Id: I41c02c1278f380ccd46dd1254f140e306afd4c67pull/2221/head
parent
5cb0130636
commit
897cf7420c
Loading…
Reference in new issue