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

List:       helix-datatype-cvs
Subject:    [Datatype-cvs]
From:       ckarusala () helixcommunity ! org
Date:       2011-12-29 9:49:49
[Download RAW message or body]

Update of /cvsroot/datatype/mp3/common/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv22869/pub

Modified Files:
      Tag: SERVER_14_2_GLOBECOMM_LR
	audinfo.h mp3format.h 
Log Message:

Porting MP3 payload changes needed for compiling MPEG2-TS demuxer and stream \
fileformat on SERVER_14_2_GLOBECOMM_LR branch for server's MPEG2-TS ingress feature.


Index: audinfo.h
===================================================================
RCS file: /cvsroot/datatype/mp3/common/pub/audinfo.h,v
retrieving revision 1.3
retrieving revision 1.3.154.1
diff -u -d -r1.3 -r1.3.154.1
--- audinfo.h	14 Mar 2005 19:17:04 -0000	1.3
+++ audinfo.h	29 Dec 2011 09:49:46 -0000	1.3.154.1
@@ -59,7 +59,7 @@
                 dPts,           // Time for packet presentation
                 dPtsDelta;      // Delta of file ts and stream ts
 
-    HXBOOL        bDiscontinuity, // Set marker bit to 1
+    HXBOOL      bDiscontinuity, // Set marker bit to 1
                 bPacketReady,   // Is this packet ready for the wire
                 bPacketFrag,    // Fragmentation on this packet
                 bServiceReq;    // Send packets for old requests
@@ -92,12 +92,41 @@
     virtual int CheckValidFrame(UINT8 *pBuf,
                                 UINT32 dwSize) = 0;
 
-    virtual INT32 ScanForSyncWord(UINT8 *pBuf,
-                                  INT32 lSize,
-                                  int &nFrameSize) = 0;
+    ///////////////////////////////////////////////////////////////////////////
+    // Function:    ScanForSyncWord
+    // Purpose:     Looks for a valid sync word or partial sync word
+    // Params:      pBuf is a buffer to scan for the sync word
+    //              ulSize is the size of pBuf
+    //              ulFrameSize will contain the size of the frame associated 
+    //                with the sync word, if known, or 0 if it could not yet 
+    //                be determined
+    //              lOffset will contain the offset to the syncword or -1
+    //                if no sync word found
+    // Returns:     TRUE if a sync word was found and verified, FALSE if not 
+    //                found or unverified
+    ///////////////////////////////////////////////////////////////////////////
+    virtual HXBOOL ScanForSyncWord(UINT8* pBuf, 
+                                    UINT32 ulSize,
+                                    UINT32& ulFrameSize,
+                                    INT32& lOffset) = 0;
 
-    virtual HXBOOL    IsInited();
+    ///////////////////////////////////////////////////////////////////////////
+    // Function:    ScanForSyncWord
+    // Purpose:     Looks for a sync word ensuring there is a full frame in pBuf
+    // Params:      pBuf is a buffer to scan for the sync word
+    //              lSize is the size of pBuf
+    //              nFrameSize will cotain the size of the frame associated with
+    //              the sync word.
+    // Returns:     The number of bytes scanned, or -1 for no sync word
+    // Author:      cts
+    ///////////////////////////////////////////////////////////////////////////
+    INT32 ScanForSyncWord(UINT8 *pBuf,
+                          INT32 lSize,
+                          int &nFrameSize);
+
+    virtual HXBOOL  IsInited();
     virtual INT16   GetSyncWord();
+    virtual UINT32  GetMaxFrameSize() = 0;
 
     UINT32 GetAudioRtpPacket(UINT8 *pRead,
                              UINT32 ulRead,
@@ -105,6 +134,6 @@
 protected:
 
 	UINT8   m_ySyncWord;    // Last byte of the sync word
-	HXBOOL    m_bIsInited;    // Has Init_c been called
+	HXBOOL  m_bIsInited;    // Has Init_c been called
 };
 #endif

Index: mp3format.h
===================================================================
RCS file: /cvsroot/datatype/mp3/common/pub/mp3format.h,v
retrieving revision 1.7
retrieving revision 1.7.24.1
diff -u -d -r1.7 -r1.7.24.1
--- mp3format.h	14 Jul 2009 20:36:21 -0000	1.7
+++ mp3format.h	29 Dec 2011 09:49:46 -0000	1.7.24.1
@@ -42,6 +42,8 @@
 
 class CMp3Queue;
 
+#define MAX_MPA_FRAME_SIZE 3456 // max size is MPEG-1 L2 384kbps @ 32kHz
+
 class CMp3Format : public CAudioInfoBase
 {
 public:
@@ -169,19 +171,18 @@
     int CheckValidFrame(UINT8 *pBuf,
                         UINT32 dwSize);
 
-    ///////////////////////////////////////////////////////////////////////////
-    // Function:    ScanForSyncWord
-    // Purpose:     Looks for a sync word ensuring there is a full frame in pBuf
-    // Params:      pBuf is a buffer to scan for the sync word
-    //              lSize is the size of pBuf
-    //              nFrameSize will cotain the size of the frame associated with
-    //              the sync word.
-    // Returns:     The number of bytes scanned, or -1 for no sync word
-    // Author:      cts
-    ///////////////////////////////////////////////////////////////////////////
-    INT32 ScanForSyncWord(UINT8 *pBuf,
-                          INT32 lSize,
-                          int &nFrameSize);
+
+    HXBOOL ScanForSyncWord(UINT8* pBuf, 
+                            UINT32 ulSize,
+                            UINT32& ulFrameSize,
+                            INT32& lOffset);
+
+    inline INT32 ScanForSyncWord(UINT8 *pBuf,
+                                INT32 lSize,
+                                int &nFrameSize)
+    {
+        return CAudioInfoBase::ScanForSyncWord(pBuf, lSize, nFrameSize);
+    }
 
     ///////////////////////////////////////////////////////////////////////////
     // Function:    CheckForHeaders
@@ -203,14 +204,16 @@
     INT16           GetSyncWord() {return 0xFF00 + m_ySyncWord;}
 
     // Check syncword
-    HXBOOL            IsValidSyncWord(BYTE cSync);
+    HXBOOL          IsValidSyncWord(BYTE cSync);
     void            SetTrustPackets(HXBOOL bTrust) { m_bTrustPackets = bTrust; }
 
+    UINT32          GetMaxFrameSize();
+
     // Functions to access the Id3 header values
     UINT8*  GetId3Title(int &nLen);
     UINT8*  GetId3Artist(int &nLen);
     UINT8*  GetId3Album(int &nLen);
-	UINT8*  GetId3Track(int &nLen);
+    UINT8*  GetId3Track(int &nLen);
     UINT8*  GetId3Genre(int &nLen);
     int     GetMetaOffset();
     int     GetMetaRepeat();
@@ -241,8 +244,8 @@
     CMp3Misc*   m_pMisc;
 
     int         m_nLayer;       // Layer of MPEG Audio stream
-    HXBOOL        m_bMpeg25;      // Is this MPEG 2.5
-    HXBOOL        m_bTrustPackets;
+    HXBOOL      m_bMpeg25;      // Is this MPEG 2.5
+    HXBOOL      m_bTrustPackets;
 
     GET_DATA_OFFSET m_pFnGetData;   // GetDataOffset Function
 };


_______________________________________________
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