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

List:       helix-datatype-cvs
Subject:    [Datatype-cvs]
From:       mazimi () helixcommunity ! org
Date:       2010-03-31 19:34:11
Message-ID: 201003311934.o2VJYTV8022353 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/datatype/mp4/filewriter
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv8742/filewriter

Modified Files:
      Tag: PRODUCER_13_0_RN
	mp4sm.cpp mp4sm.h mp4wrtr.cpp 
Log Message:
Synopsis
========
Fixed a streaming issue for 3gp hinted files with QTSS. 

Reviewed by Eswar Bala

Branches:  HEAD, P13_0
 
Description
===========
This bug has been reported by Akami. Currently, 3gp files generated by HMP13 which \
are hinted cannot be streamed with QTSS.  The issue turns out to be how the file \
level SDP is written, there were two issues in the SDP text:  1) the session \
parameter was not being properly set in mp4writer (was using "s=") this is changed to \
"s=0" 2) the duration param was being written as 0-0. The code is updated to write \
the proper duration obtained from fileheader at the end of stream.   
Files Affected
==============
Changed files:
/datatype/mp4/filewriter/mp4sm.cpp
/datatype/mp4/filewriter/mp4sm.h
/datatype/mp4/filewriter/mp4wrtr.cpp

 
Testing Performed
=================
verified that h263 and h263 single rate and multi rate play OK with QTSS. Did not \
test with Helix server though.

Performance Tests:
- None

Platforms Tested: win32-i386-vc7

QA Hints
========

Index: mp4sm.cpp
===================================================================
RCS file: /cvsroot/datatype/mp4/filewriter/mp4sm.cpp,v
retrieving revision 1.14.2.5
retrieving revision 1.14.2.6
diff -u -d -r1.14.2.5 -r1.14.2.6
--- mp4sm.cpp	23 Dec 2009 03:06:27 -0000	1.14.2.5
+++ mp4sm.cpp	31 Mar 2010 19:34:08 -0000	1.14.2.6
@@ -645,7 +645,10 @@
     , m_eIsRtp(UNCHECKED)
     , m_bMoovAtEnd(FALSE)
     , m_bForceMoovFirst(FALSE)
+    , m_pRootAtom(NULL)
     , m_pMvhd(NULL)
+    , m_pMdhd(NULL)
+    , m_pRTP(NULL)
     , m_pFileHeader(NULL)
     , m_pStreamInfo(NULL)
     , m_ulStreamCount(0)
@@ -788,23 +791,32 @@
     HX_RESULT retVal = HXR_OK;
 
     pFileHeader->AddRef();
-    m_pFileHeader = pFileHeader;
 
-    //get stream count; this may be bigger than the actual number of tracks in
-    //the output file, depending on how many NUL handlers are there
-    m_pFileHeader->GetPropertyULONG32("StreamCount", m_ulStreamCount);
-    m_pFileHeader->GetPropertyULONG32("StreamGroupCount", m_ulStreamGroupCount);
-
-    if (m_ulStreamCount)
+    if (m_pFileHeader)
     {
-        m_pStreamInfo = new StreamInfo[m_ulStreamCount];
+        HX_RELEASE(m_pFileHeader);
+        m_pFileHeader = pFileHeader;
     }
+    else
+    {
+        m_pFileHeader = pFileHeader;
 
-    HX_ASSERT(m_pStreamInfo);
+	    //get stream count; this may be bigger than the actual number of tracks in
+	    //the output file, depending on how many NUL handlers are there
+	    m_pFileHeader->GetPropertyULONG32("StreamCount", m_ulStreamCount);
+	    m_pFileHeader->GetPropertyULONG32("StreamGroupCount", m_ulStreamGroupCount);
 
-    m_ulStreamHeaderReceived = 0;
-    m_ulStreamDoneReceived = 0;
+	    if (m_ulStreamCount)
+	    {
+	        m_pStreamInfo = new StreamInfo[m_ulStreamCount];
+	    }
 
+	    HX_ASSERT(m_pStreamInfo);
+
+	    m_ulStreamHeaderReceived = 0;
+	    m_ulStreamDoneReceived = 0;
+
+	}
     return retVal;
 }
 
@@ -1174,6 +1186,17 @@
         if( m_ulReportedDuration != m_ulActualDuration )
         {
             UpdateDuration( m_ulActualDuration );
+            if (m_pRTP)
+            {
+                // Re-Generate the movie-level SDP
+                CHXString strMovieLevelSDP;
+                retVal = GenerateMovieLevelSDP(&strMovieLevelSDP);
+                if (SUCCEEDED(retVal))
+                {
+                    // Add this new SDP to m_pRTP which is the \
CMP4Atom_RTPMovieHintInformation box +                    retVal = \
m_pRTP->SetSDP((const char*) strMovieLevelSDP, strMovieLevelSDP.GetLength()); +       \
} +            }
         }
 
         CMP4Atom_mdat* pMdat = (CMP4Atom_mdat*)m_pRootAtom->FindChild("mdat");
@@ -2030,6 +2053,9 @@
                             pHnti->AddChild(pRTP);
                             // Add the hnti box as a child of the udta box
                             pUdta->AddChild(pHnti);
+
+                            HX_RELEASE(m_pRTP);
+                            m_pRTP = pRTP;
                         }
                     }
                 }
@@ -2068,7 +2094,7 @@
         // alt-group attribute ("a=alt-group")
         //
         // The protocol version, session name, and session time we can make constant \
                strings.
-        *pSDPStr = "v=0\r\ns= \r\nt=0 0\r\n";
+        *pSDPStr = "v=0\r\ns=0\r\nt=0 0\r\n";
         // Do we have a file header?
         if (m_pFileHeader)
         {

Index: mp4wrtr.cpp
===================================================================
RCS file: /cvsroot/datatype/mp4/filewriter/mp4wrtr.cpp,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -u -d -r1.12 -r1.12.2.1
--- mp4wrtr.cpp	7 May 2009 15:41:10 -0000	1.12
+++ mp4wrtr.cpp	31 Mar 2010 19:34:08 -0000	1.12.2.1
@@ -516,6 +516,12 @@
                 }
 
                 HX_RELEASE(pNewHeader);
+
+                if(m_pStreamMixer)
+                {
+                    m_pStreamMixer->SetFileHeader( m_FileHeaderInfo.m_pFileHeader );
+                }
+
             }
         }
     }

Index: mp4sm.h
===================================================================
RCS file: /cvsroot/datatype/mp4/filewriter/mp4sm.h,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.2
diff -u -d -r1.11.2.1 -r1.11.2.2
--- mp4sm.h	10 Jun 2009 15:57:03 -0000	1.11.2.1
+++ mp4sm.h	31 Mar 2010 19:34:08 -0000	1.11.2.2
@@ -52,6 +52,8 @@
 class CMP4Atom_stsd;
 class CMP4Atom_sdp;
 class CMP4Atom_udta;
+class CMP4Atom_meta;
+class CMP4Atom_RTPMovieHintInformation;
 class CMP4Archiver;
 
 class CMP4VersionedAtom;
@@ -278,6 +280,7 @@
     // multiple atom searches
     CMP4Atom_mvhd* m_pMvhd;
     CMP4Atom_mdhd* m_pMdhd;
+    CMP4Atom_RTPMovieHintInformation* m_pRTP;   
 
     UINT32     m_ulReportedDuration;
     UINT32     m_ulActualDuration;


_______________________________________________
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