Commit graph

796 commits

Author SHA1 Message Date
Wim Taymans
4de919a17a jitterbuffer: use separate thread for timeouts
Use a separate thread for scheduling the timeouts instead of using the
downstream streaming thread that might block at any time.
2013-09-16 15:55:55 +02:00
Olivier Crête
b9ceafe5af rtpsession: Demux RTCP buffers from the RTP stream
If there are RTCP buffers in the RTP stream, process them as
RTCP. This way, we want receive streams following RFC 5761

https://bugzilla.gnome.org/show_bug.cgi?id=687657
2013-09-13 16:25:49 +02:00
Wim Taymans
28e5f90988 rtpbin: use PacketInfo for the sender
Avoid mapping the packet multiple times when sending RTP.
2013-09-13 14:34:28 +02:00
Wim Taymans
a02c9473d8 rtpbin: store more in the PacketInfo
Store all info in the PacketInfo so that we can avoid mapping the packet
multiple times.
2013-09-13 14:34:28 +02:00
Wim Taymans
e5c789abd6 session: store more in the PacketInfo structure 2013-09-13 14:34:28 +02:00
Wim Taymans
47662f9ca4 rtpbin: RTPArrivalStats -> RTPPacketInfo
Rename a structure because we are also going to use this for the sender
bits.
2013-09-13 14:34:28 +02:00
Wim Taymans
c795b72988 source: small cleanups 2013-09-13 14:34:27 +02:00
Wim Taymans
9f9ba21404 jitterbuffer: handle segments with non-0 start
We keep the DTS and PTS in running-time inside the jitterbuffer. Make sure to
transform it back to a buffer timestamp before pushing out the buffer.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=707931
2013-09-12 15:04:30 +02:00
Wim Taymans
f1106cde66 session: only update next check time when reconsidering
Don't update the next RTCP check time in all cases but only when we
reconsidered. This avoids delaying sending a full RTCP packet when we
are doing early feedback.
2013-08-27 09:55:52 +02:00
Wim Taymans
47065db0b6 session: add more debug 2013-08-27 09:55:52 +02:00
Wim Taymans
454d75951e jitterbuffer: fix types of the retransmission event 2013-08-27 09:55:52 +02:00
Wim Taymans
dd4af0d11c jitterbuffer: only timeout EXPECTED timers on gap
Only timeout the EXPECTED timers when we detect a large seqnum gap.
2013-08-27 09:44:18 +02:00
Wim Taymans
4b7bcc2ec1 rtsession: fix locking
We need to take the session lock when getting and manipulating the
source.
2013-08-26 11:50:27 +02:00
Wim Taymans
3f46527f75 rtpsession: add some more debug 2013-08-26 11:50:13 +02:00
Wim Taymans
54e7e7547a rtxqueue: add property to configure queue size 2013-08-23 15:47:25 +02:00
Wim Taymans
84833bed11 rtpbin: proxy jitterbuffer do-retransmission property 2013-08-23 12:10:19 +02:00
Wim Taymans
89b9019e3e rtx: various improvements
Use locking
Don't push from the event handler, collected packets in a queue and push from
the chain function.
Clear queues on shutdown.
2013-08-21 17:02:27 +02:00
Wim Taymans
ee15bc9284 session: generate events correctly
Do correct shifting of the bitmask for lost packets.
2013-08-21 17:02:27 +02:00
Wim Taymans
67523d3ecb rtp: register rtx element better 2013-08-21 17:02:26 +02:00
Wim Taymans
587dc055e9 jitterbuffer: handle EOS
When the queue is empty, and we received EOS, pause and push an EOS
event downstream.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=706387
2013-08-20 14:36:59 +02:00
Wim Taymans
533f26fc99 jitterbuffer: update docs 2013-08-20 10:26:15 +02:00
Wim Taymans
c7f9ef8012 jitterbuffer: update all timers
Keep looping over all registered timers so that we can mark them lost instead of
stopping as soon as we find the timer for the current seqnum.
2013-08-20 10:25:17 +02:00
Wim Taymans
5debda9ca1 jitterbuffer: remove unused variables 2013-08-20 08:55:50 +02:00
Wim Taymans
a88db5fa2c jitterbuffer: reorganize timer handling
Restructure handling of incomming packet and the gap with the expected seqnum
and register all timers from the _chain function.
Convert a timer to a LOST packet timer when the max amount of retransmission
requests has been reached.
2013-08-19 22:04:51 +02:00
Wim Taymans
d9d6eac4bb jitterbuffer: refactor packet spacing calculation 2013-08-19 22:04:50 +02:00
Wim Taymans
c4dc159656 jitterbuffer: keep track of last seqnum and dts 2013-08-19 22:04:50 +02:00
Wim Taymans
652ce95ca6 jitterbuffer: small cleanups 2013-08-19 22:04:50 +02:00
Wim Taymans
b4a35bbe82 jitterbuffer: reset retransmission timers in add/reschedule
Reset the retransmission timers when adding and rescheduling a timer.
2013-08-19 22:04:50 +02:00
Wim Taymans
cf8a0652f3 jitterbuffer: rename variables for packet spacing 2013-08-19 22:04:50 +02:00
Wim Taymans
ec82e4ab7c jitterbuffer: remove lost timer when we get the packet
When we receive a packet, also remove the LOST timer for it.
2013-08-19 22:04:50 +02:00
Wim Taymans
2f03b43b21 jitterbuffer: expected seqnum must increase
Only update the expected seqnum when it is bigger than the previous expected
seqnum.
2013-08-19 22:04:50 +02:00
Wim Taymans
c5bf376bb5 jitterbuffer: add more debug 2013-08-19 22:04:50 +02:00
Wim Taymans
ff825a2919 rtxqueue: add retransmission queue element 2013-08-19 22:04:50 +02:00
Wim Taymans
5fe18ee432 session: add some docs 2013-08-19 22:04:49 +02:00
Wim Taymans
482dacfb54 session: handle NACK feedback and generate events
Handle and parse the feedback NACK packets and generate a Retransmission
event for each NACKed packet
2013-08-19 22:04:49 +02:00
Wim Taymans
f11c2c9b3b jitterbuffer: forward flush before stopping dataflow
First forward the flush event and then stop our loop function.
2013-08-14 16:19:32 +02:00
Wim Taymans
48174164eb session: add NACK feedback in RTCP 2013-08-06 15:50:19 +02:00
Wim Taymans
4379ed1dee source: add methods to register NACK
Add a method to register a missing packet for an ssrc along with
methods to get the missing packets and clear them.
2013-08-06 15:50:19 +02:00
Wim Taymans
50638b8106 session: handle Retransmission event and schedule NACK
Handle the retransmission event from downstream and use it to schedule a NACK
request.
2013-08-06 15:50:19 +02:00
Wim Taymans
0bddbd682d session: pass data to remove func
Pass the data to the remove function because we are going to deref it when there
is pli or fir.
2013-08-06 15:50:19 +02:00
Wim Taymans
3c82de59f9 session: use common send_rtcp method
Reuse the send_rtcp method that already asks for the current time when
requesting a keyframe.
2013-08-05 15:02:59 +02:00
Wim Taymans
3c14c6021c session: Don't use ClockTimeDiff for unsigned delays 2013-08-05 15:02:59 +02:00
Tim-Philipp Müller
7469cd3a4c rtpmanager: use generic marshaller 2013-08-04 11:03:07 +01:00
Wim Taymans
7584f91f31 jitterbuffer: send event in right direction 2013-08-04 00:24:36 +02:00
Wim Taymans
9613e481ad session: add FIR and PLI like other RTCP packets
Add the FIR and PLI packets like the other RTCP packet instead of from the
on-sending-rtcp default signal handler.
2013-08-03 00:33:24 +02:00
Wim Taymans
743e1b1191 jitterbuffer: fix property ranges 2013-08-02 17:22:55 +02:00
Wim Taymans
cd0164f4cc jitterbuffer: push retransmission events 2013-08-02 16:43:59 +02:00
Wim Taymans
9a13267e85 jitterbuffer: add support for retransmission retry
When we didn't receive a packet after requesting retransmission, retry
asking for retransmission for a certain period.
2013-08-02 14:54:56 +02:00
Wim Taymans
e9ad5126db jitterbuffer: add properties
Add properties to control retransmission parameters
2013-08-02 14:47:56 +02:00
Wim Taymans
a8c7ff7489 jitterbuffer: use corrected timeout when rescheduling
When we recalculate the timeout, use the corrected timeout value depending on
the timer type.
2013-08-02 12:44:58 +02:00