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

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] xps/fileformat CXPSFileformat.h, 1.1.1.1.2.9,
From:       anugrahk () helixcommunity ! org
Date:       2010-05-27 8:38:49
Message-ID: 201005270838.o4R8csBh020335 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/datatype/xps/fileformat
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv16336

Modified Files:
      Tag: hxclient_2_1_0_cayennes
	CXPSFileformat.h 
Log Message:
"Nokia submits this code under the terms of a commercial contribution agreement with \
RealNetworks, and I am authorized to contribute this code under said agreement."  
Modified by: ext-anugrah.2.kashari@nokia.com 
 
Reviewed by: rajesh.rathinasamy@nokia.com
             Sheldon Fu [sfu@real.com]
 
TSW Id: ARAO-84JSQ4 

Date: 05/26/2010
                 
Project: SymbianMmf_wm
 
Synopsis: FlashLite: Video flickers a lot when H264 video has B-Frames
 
Overview: Although XPS FF uses IHXRTPPacket, it uses presentation time for RTP time \
and presentation time. As a result packets were getting rearranged in helix core and \
unordered video frames were sent to decoder which results in flickering. Presentation \
time shall carry increasing timestamps (and it must be adjusted to maintain the \
decoding order) and RTP time shall carries the proper presentation time in RTP \
format. 

Fix: 1. These changes are done only for video. Currently CMediaStream is not aware of \
type, therefore added a variable m_TrackType to identify the track.

2. B-Frame is identified by from timestamp of next unique packet( or complete \
packet). If timestamp of next packet is less than timestamp of current packet then \
decoding time of current packet is same timestamp of next packet. 

2a. Logic for making decision on whether current packet can be sent to core or not is \
done in CMediaStream::IsPktReadyForDispatch().  2b. Decoding time is modified in \
CMediaStream::DoAdjustPresentationTime(). This API is called from \
CMediaStream::GetNextPacket(). 2c. CMediaStream::GetNextValidPktTS() searches for \
unique frame in the queue (limited to 10 packets). 

IHXRTPPacket::SetRTP() is allowed if packet is owned by one user. When DispatchPkt() \
is called from CXPSFileFormat::PacketReady() and the packet that is being dispatched \
is the same packet that was added last then IHXRTPPacket will have two references and \
IHXRTPPacket::SetRTP() will fail. To avoid this condition I have moved DispatchPkt() \
call after releasing  IHXRTPPacket in CXPSFileFormat::PacketReady().

3. CMediaStream::GetInsertIndex() called from CMediaStream::AddPacket() always return \
insert index as zero unless first packet has been sent to helix core. After making \
changes for video stream which requires at least two packets in queue so that first \
packet can be sent to core, this was creating problem. I made changes in \
GetInsertIndex() so that it allows addition of packet at appropriate index.

Files modified & changes:
/datatype/xps/fileformat/CXPSFileformat.cpp
/datatype/xps/fileformat/CXPSFileformat.h

Image Size and Heap Use impact: No major impact
 
Module Release testing (STIF) : Done 
 
Test case(s) Added  : No, tested with XPSTestApp

Memory leak check performed : Passed, No additional leaks introduced.
 
Platforms and Profiles Build Verified: helix-client-s60-52-mmf-mdf-dsp
 
Platforms and Profiles Functionality verified: armv5
 
Branch: 210CayS, 420Bizo and HEAD


Index: CXPSFileformat.h
===================================================================
RCS file: /cvsroot/datatype/xps/fileformat/CXPSFileformat.h,v
retrieving revision 1.1.1.1.2.9
retrieving revision 1.1.1.1.2.10
diff -u -d -r1.1.1.1.2.9 -r1.1.1.1.2.10
--- CXPSFileformat.h	3 Feb 2010 22:29:04 -0000	1.1.1.1.2.9
+++ CXPSFileformat.h	27 May 2010 08:38:46 -0000	1.1.1.1.2.10
@@ -163,13 +163,20 @@
 
     inline UINT32 SeekOffset() {return m_ulRTPSeekOffset;}
     void Seek(UINT32 ulSeekOffset);
-
+    UINT32 GetDecodingTime(UINT32 aCurrPktTime);
+    HXBOOL IsPktReadyForDispatch();
+    UINT32 GetNextValidPktTS(UINT32 aStartIndex, HXBOOL& aUniqueFrame, UINT32 \
aCurrPktTime);  private:
 
     UINT32 GetInsertIndex(UINT32 ulCurrSeqNo);
     void GenerateLostPacket(IHXRTPPacket*& pRTPPacket);
     void ResetQue();
     HX_RESULT InsertFillers(UINT32 ulFillerCnt);
+    
+    void DoAdjustPresentationTime(IHXRTPPacket* pRTPPacket);
+    HXBOOL IsNextPacketLost();
+    
+    typedef enum{TrackUnKnown, TrackAudio, TrackVideo} TrackType;
 
 private:
     // Data members
@@ -183,7 +190,7 @@
     HXBOOL      m_bFirstPacketRcvd;
     UINT32      m_ulRTPTSOffset;
     UINT32      m_ulRTPSeekOffset;
-    
+    TrackType   m_TrackType;
    
 };
 


_______________________________________________
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