[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] mp4/payload/pub h264packetizer.h,1.5,1.5.8.1
From:       ckarusala () helixcommunity ! org
Date:       2012-01-26 4:02:12
[Download RAW message or body]

Update of /cvsroot/datatype/mp4/payload/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv25405/pub

Modified Files:
      Tag: SERVER_14_2_GLOBECOMM_LR
	h264packetizer.h 
Log Message:

Synopsis
========
This CR fixes PR 270121: Missing audio for RTSP repacketized MPEG2-TS Ingress stream.

Branch : SERVER_14_2_GLOBECOMM_LR, SERVER_14_3_RN, HEAD Suggested Reviewer : Jamie, \
Sujeet

Description
============
Long duration tests of MPEG2TS ingress live feeds playback over RTSP results in \
missing audio or video during the playback on various players. This seems to be \
happening after the video timestamp rollover.

Packet captures showed that the RTP times we send in RTP-Info of the PLAY response \
are incorrect and do not correspond to the first audio/video packet's RTP times. 

There are 2 problems here.

1. RTP packetizers (H264 & LATM) do not set the MediaTimeInMS (RTP time in \
milli-second units) on the outgoing packets from the incoming packets, leaving these \
at 0. And this is causing problems in the RTP-Info calculation logic in PPM as \
mentioned in 2 below.

Fixed this by storing the MediaTime from the incoming packets are setting it in the \
outgoing packets in the packetizers. These changes have been added under \
HELIX_FEATUER_SERVER define.

2. In PPM::Session::PrepareRTPInfo(), if the packet is RTP packet and if the \
MediaTime is not set on it, we try to convert the packet's RTPtime into MediaTime \
which is wrong after rollover since this results in a very small timestamp in \
milli-second as the RTP time is just rolled over. And we try to use this stream as \
the sync stream (since it has lowest media time across streams) and use this smaller \
MediaTime to calculate the RTPTime for the other stream which will be wrong. 

Fixed this by taking the packet time (DeliveryTime in milli-seconds) as the MediaTime \
when MediaTime is missing in the incoming packets. Also, corrected this for MDP case.

Either one of these fixes would fix the current problem with MPEG2-TS ingress, but \
adding both to cover other cases as well.

Same problem should be happening with RTMP live ingress playback over RTSP after the \
rollover. QA is running tests to find out. If it repros, I will checkin the fix to \
SERVER_14_3_RN branch as well.

Files Modified
===============
datatype/mp4/payload/h264packetizer.cpp
datatype/mp4/payload/pub/h264packetizer.h
datatype/mp4/payload/latmpacketizer.cpp

server/engine/dataflow/basicpcktflow.cpp
server/engine/dataflow/ppm.cpp

Testing Performed
=================
Unit Tests:
- Verified the fix by manually starting the timestamps at 13 hours. Ensured that \
                playback with audio/video is good for 1 hour after that.
- Running an overnight test with the fix. Will check the results in the morning \
before checkin.

Integration Tests:
- None.

Leak Tests:
- None.

Performance Tests:
- None

Platforms Tested:win-x86_64-vc10
Build Verified: win-x86_64-vc10

Thanks,
Chytanya



Index: h264packetizer.h
===================================================================
RCS file: /cvsroot/datatype/mp4/payload/pub/h264packetizer.h,v
retrieving revision 1.5
retrieving revision 1.5.8.1
diff -u -d -r1.5 -r1.5.8.1
--- h264packetizer.h	1 Feb 2010 20:42:57 -0000	1.5
+++ h264packetizer.h	26 Jan 2012 04:02:09 -0000	1.5.8.1
@@ -142,6 +142,7 @@
     UINT16 usDON;
     UINT32 ulTimeStamp;
     UINT32 ulRTPTimeStamp;
+    UINT32 ulMediaTime;
     UINT16 usStream;
     UINT8 uASMFlags;
     UINT16 usASMRule;
@@ -156,6 +157,7 @@
     , usDON(0)
     , ulTimeStamp(0)
     , ulRTPTimeStamp(0)
+    , ulMediaTime(0)
     , usStream(0)
     , uASMFlags(0)
     , usASMRule(0)


_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic