Closed Bug 892395 Opened 11 years ago Closed 11 years ago

Rtsp: calibrate rtp timestamp in the beginning of media streaming.

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.3+, firefox28 fixed)

RESOLVED FIXED
blocking-b2g 1.3+
Tracking Status
firefox28 --- fixed

People

(Reporter: vchang, Assigned: bechen)

References

Details

(Whiteboard: [FT:RIL])

Attachments

(2 files, 2 obsolete files)

There are two cases observed so far, 
1. The "200 ok" PLAY response is handled slower than first RTP packet.
We use the rtptime of RTP-Info in "200 OK" as the base timestamp. The timestamp of following RTP packets should refer to it. Otherwise, the timestamp will be incorrect and decoder may not play the streaming properly.      

2. The npt header in "200 ok" PLAY response may have the format "npt:now-", in this case, the rtp packets will be dropped.
Attached file wireshark dump
The attachment is a captured file using wireshark when I streaming the url by vlc.
rtsp://v6.cache6.c.youtube.com/CjYLENy73wIaLQlcR8cV2UMCLxMYESARFEIJbXYtZ29vZ2xlSARSBXdhdGNoYJP5sJqzyKf0TQw=/0/0/0/video.3gp

Please set the filter "rtp" "rtsp" "rtcp" in wireshark.
And focus on the packet No. 82 83 87.

No. 82: 
It's a RTCP packet and it's RTP Timestamp is 609073040

No. 83:
It's a RTSP packet and it carries the RTP Timestamp for both track.
964595889 and 609072026

No. 87: 
It's a RTP packet and it is the first RTP packet for one track. It's RTP timestamp is 609072026. 

In current codebase, |ARTPConnection::parseRTCP| parse the No. 82 packet as the base timestamp. So obviously the No.87 packet will be dropped since its timestamp is negative calculated by No. 82.

We should parse the RTP-Info in No. 83 instead No. 82.

Some reference:
http://www.ietf.org/rfc/rfc2326.txt 
12.33 RTP-Info
Blocks: b2g-RTSP-1.3
Assignee: nobody → bechen
Attached patch bug-892395.v01.patch (obsolete) — Splinter Review
blocking-b2g: --- → 1.3+
Whiteboard: [FT:RIL]
Attached patch bug-892395.v01.patch (obsolete) — Splinter Review
Hi sworkman:
Could you please review this patch?

Without this patch, the addMediaTimestamp() will drop the first rtp packet and also shift the timestamp of following rtp packets.
Attachment #779093 - Attachment is obsolete: true
Attachment #822207 - Flags: review?(sworkman)
Attachment #822207 - Flags: review?(sworkman) → review+
r=sworkman
Attachment #822207 - Attachment is obsolete: true
Attachment #829976 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/535c1520bc3e
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: