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

List:       helix-server-cvs
Subject:    [Server-cvs] include sink.h,1.11.4.1.2.1,1.11.4.1.2.2
From:       jzeng () helixcommunity ! org
Date:       2009-03-31 20:15:57
Message-ID: 200903312117.n2VLHv85029421 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/include
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv1725/server/include

Modified Files:
      Tag: SERVER_12_1
	sink.h 
Log Message:
Synopsis
========
fix 231971 Client goes into rebuffering with Repeated switching, and other live fcs issues
Branches:  head, server_12_1
Suggested Reviewer: Chytanya, Jamie 

Description
===========
This should fix most of the fcs/sspl live issues.  Here is the
changes:


To make the gap between audio and video, we may new a few audio packets in front of the video
keyframe.  The way to do it is to seek through the rsd queue until you see the video keyframe, and
save all audio packets along the way.  In the end we can decide how many audio packets we want to
keep.

1. In bcastmgr:

Current rsd queues don't guarantee  you will see another  video keyframe  if  you skip the first
one.  The  fix is to introduce  a third queue: the long queue, in addition to current and future
queue.  
When future queue becomes current, the current queue will become the long queue.  

2. In live source wrapper:

Before it starts sending packets to base shim, it will get the long rsd queue, and seek through it
to get to the video keyframe.  It will save all the audio packets. When it sees a video keyframe, it
will check if the audio packets' duration satifies the gap.  If yes, it will stop seeking, and
shrink the audio packets' size to just over the gap.

Even the gap is 0, we still save audio packets, to the point that the first audio packet is earlier
than the video key frame.

3. In base shim:

Now we can get the duration of last packet, please see the comment for more details:

//We switch off this packet, and we can get accurate duration of last packet.
//This solves the problem.  We switch off video stream, so the timeline of video stream //is
//accurate now.  For audio stream packets, since they always has constant size, so the //old way of
//estimate is sufficient.

It also use the IHXLiveSourceWrapper::GetFirstAudioPacket to get the audio packet, so it can sync on
the audio(As most players do).

4. In clientsession:

I add some code to parse additional headers, and asm rulebook for information needed in live source
wrapper.

5. In ppm:

make fds/sspl always timestamp delivery, since we may have bitrate fluctuation.



Files Affected
==============
server/common/util/header_helper.cpp,v
server/engine/core/bcastmgr.cpp,v
server/engine/core/pub/bcastmgr.h,v
server/engine/dataflow/ppm.cpp,v
server/engine/inputsource/base_shim.cpp,v
server/engine/inputsource/live_source_wrapper.cpp,v
server/engine/inputsource/mdpshim.cpp,v
server/engine/inputsource/ppmstaticshim.cpp,v
server/engine/inputsource/pub/base_shim.h,v
server/engine/inputsource/pub/live_source_wrapper.h,v
server/engine/session/clientsession.cpp,v
server/engine/session/pub/clientsession.h,v
server/include/sink.h,v
server-restricted/broadcast/transport/bcng/recv/strmsess.cpp,v

Testing Performed
=================

Unit Tests:
None.

Integration Tests:

Verify 3gp sr/mr live switching work perfectly.

Verify realmedia sr/mr switching work okay, sometimes a little bit longer of frozen frames, but the
a/v are never out of sync.

Verify on-demand and regular live playback still work.

Leak Tests:

--lct did find a few leaks.  The last run looks clean to me.

Performance Tests:
- None

Platforms Tested: linux-rhel5-i686
Build verified: linux-rhel5-i686




Index: sink.h
===================================================================
RCS file: /cvsroot/server/include/sink.h,v
retrieving revision 1.11.4.1.2.1
retrieving revision 1.11.4.1.2.2
diff -u -d -r1.11.4.1.2.1 -r1.11.4.1.2.2
--- sink.h	10 Dec 2008 23:40:13 -0000	1.11.4.1.2.1
+++ sink.h	31 Mar 2009 20:15:55 -0000	1.11.4.1.2.2
@@ -283,6 +283,8 @@
 
     STDMETHOD(GetPacketBufferQueue)    (THIS_
                                         IHXLivePacketBufferQueue*& pQueue) PURE;
+    STDMETHOD(GetLongPacketBufferQueue) (THIS_
+                                         IHXLivePacketBufferQueue*& pQueue) PURE;
 };
 
 /****************************************************************************
@@ -354,6 +356,9 @@
     STDMETHOD_(BOOL, IsPayloadWirePacket) (THIS) PURE;
     STDMETHOD_(INT32, GetRTPTimeOffset) (THIS_ UINT16 usStrm) PURE;
     //STDMETHOD_(UINT32, GetStartingRTPTime) (THIS_ UINT16 usStrm) PURE;
+
+    STDMETHOD(SetAudioAheadDuration)     (THIS_ UINT32 ulAudioAhead) PURE;
+    STDMETHOD_(IHXPacket*, GetFirstAudioPacket) (THIS) PURE;
 };
 
 #endif /* _SINK_H_ */


_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

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