lost rtp packets and using jitter for video session
Hi,
On connection speed greater than 384 kbps I have many lost rtp packets. If I switch off decoding of incoming video packets, than number of lost packets decreases. That is why I would like to try use jitter on video stream. I changed call of OpalMediaFormat() constructor inside OpalVideoFormat constructor in such way that needsjitter member become TRUE. But It is not working, not decoding any data.
How can I use Jitter for my purpose and in general - can I do it?
Igor Pavlov
Igor
The main issue is not the packets are being lost but the rendering being too slow and blocking the receive thread which would drop packets.
The quick solution was to throw the actual rending within your VideoOutputDevice onto another thread and use a std::queue (with mutex) to load the frames coming out of the codec and grab the frames to send to the renderer. This will then not block the receiving thread.
You can be cleaver and build a 1-3 frame buffer in your outputdevice to simulate a jitter buffer.
See
MyVideoOutputDevice::SetFrameData(..,const void * mark);
The mark is a H323_RTPInformation pointer which contains a pointer to the last raw received RTP packet of the completed frame. You can get timestamp information from this and pace the output to the render, so if a frame is dropped then you can conceal it.
Simon
From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of Igor Pavlov Sent: 08 February 2011 22:27 To: h323plus@lists.packetizer.com Subject: [h323plus] lost rtp packets and using jitter for video session
Hi,
On connection speed greater than 384 kbps I have many lost rtp packets. If I switch off decoding of incoming video packets, than number of lost packets decreases. That is why I would like to try use jitter on video stream. I changed call of OpalMediaFormat() constructor inside OpalVideoFormat constructor in such way that needsjitter member become TRUE. But It is not working, not decoding any data.
How can I use Jitter for my purpose and in general - can I do it?
Igor Pavlov
participants (2)
-
Igor Pavlov
-
Simon Horne