linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] oRTP receive, timestamp handling for video


From: Stefan Stürke
Subject: [Linphone-developers] oRTP receive, timestamp handling for video
Date: Thu, 26 Jul 2012 08:38:10 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120713 Thunderbird/14.0

Hi all,

we are developing a software to send and receive H.264 encoded video
over RTP and we would like to use oRTP as a part of this software.

I have got a question regarding the function
rtp_session_recvm_with_ts().

I think for H.264, the same timestamp needs to be passed into the
function several times to receive the RTP FUs (fragmentation units)
making up a NAL unit (see more detailed explanation below). However, in
the code of rtp_session_recvm_with_ts, it looks like
rtp_session_rtp_recv()
is not called if the same timestamp is passed several times in a row
here.

Now, couldn't it happen that:
1) rtp_session_recv_with_ts is called with ts = a
2) rtp_session_rtp_recv is called in this function and some of the
fragmentation units for a NAL unit are received, but some more are
still underway.
3) session_recv_with_ts is called again with ts = a because the caller
hasn't seen the last fragment of the current NAL unit yet.
=> problem, because rtp_session_rtp_recv is not called anymore, since
rcv_last_app_ts = a from the last call.

Do I miss anything? What is the intended usage of
rtp_session_recvm_with_ts() in this case?



As for the fragmentation of NAL units:

RFC 3984, which defines  RTP Payload Format for H.264 Video, states
       The RTP timestamp is set to the sampling timestamp of the
       content.
       A 90 kHz clock rate MUST be used.

This means, when a NAL unit is sent using fragmentation units defined
in the RFC (e.g. FU-A), there will be several packets in a row with the
same timestamp. Similar things happen for NAL units like SPS and PPS,
for which the RFC states:
       If the NAL unit has no timing properties of its own (e.g.,
       parameter set and SEI NAL units), the RTP timestamp is set to the
       RTP timestamp of the primary coded picture of the access unit in
       which the NAL unit is included, according to section 7.4.1.2 of
       [1].


Many thanks for your help
Stefan Stürke





reply via email to

[Prev in Thread] Current Thread [Next in Thread]