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

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] rm/audio/renderer raformat.cpp, 1.38.8.3.6.1,
From:       zlin () helixcommunity ! org
Date:       2011-03-30 9:51:52
Message-ID: 201103300951.p2U9pmgP018764 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/datatype/rm/audio/renderer
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv5760

Modified Files:
      Tag: hxclient_3_6_5_atlas
	raformat.cpp 
Log Message:
merge from 361


Index: raformat.cpp
===================================================================
RCS file: /cvsroot/datatype/rm/audio/renderer/raformat.cpp,v
retrieving revision 1.38.8.3.6.1
retrieving revision 1.38.8.3.6.2
diff -u -d -r1.38.8.3.6.1 -r1.38.8.3.6.2
--- raformat.cpp	28 Mar 2011 10:50:25 -0000	1.38.8.3.6.1
+++ raformat.cpp	30 Mar 2011 09:51:49 -0000	1.38.8.3.6.2
@@ -141,6 +141,7 @@
     , m_bSecure(FALSE)
     , m_uStreamNumber(uStreamNumber)
     , m_bIsVBR(FALSE)
+    , m_uSampleIn(0)
 {
     if (m_pContext)
     {
@@ -435,6 +436,10 @@
             param.uFlavorIndex,
             FLV_PROP_SAMPLES_IN,
             &uPropSize);
+        if(uPropSize)
+        {
+            m_uSampleIn = *pulSamplesPerBlock;
+        }
     }
 
     if (m_bIsVBR)
@@ -972,6 +977,48 @@
             ulOutSize = audioData.pData->GetSize();
 	    theError = DecodeAudioBlock(pData, ulInSize, audioData.pData->GetBuffer(), 
 					&ulOutSize, ulDataFlags);
+#ifdef HELIX_FEATURE_DYNAMICRESAMPLING
+           // xxGSAxx Retrieve latest audio format
+            UINT32* ulVal = NULL;
+            UINT16  uPropSize = 0;
+
+            ulVal = (ULONG32*) m_pCodec->GetFlavorProperty(
+            m_StreamParam.uFlavorIndex,
+            FLV_PROP_SAMPLERATE,
+            &uPropSize);
+            if(uPropSize)
+            {
+                m_StreamParam.ulSampleRate = *ulVal;
+            }
+
+            ulVal = (ULONG32*) m_pCodec->GetFlavorProperty(
+            m_StreamParam.uFlavorIndex,
+            FLV_PROP_CHANNELS,
+            &uPropSize);
+            if(uPropSize)
+            {
+                m_StreamParam.uChannels = *ulVal;
+            }
+
+            ulVal = (ULONG32*) m_pCodec->GetFlavorProperty(
+            m_StreamParam.uFlavorIndex,
+            FLV_PROP_SAMPLES_IN,
+            &uPropSize);
+
+            if(uPropSize && m_uSampleIn != *ulVal)
+            {
+                m_IBufs.SetSamplesIn(*ulVal); 
+                theError = m_IBufs.InitDeinterleaver();
+                if (theError == HXR_OK)
+                {
+	                m_IBufs.AllocIBufs();
+                }
+                m_uSampleIn =*ulVal;
+                m_ulAudioBufSize = m_uSampleIn * m_StreamParam.uSampleSize / 8 * \
m_StreamParam.uChannels; +
+            }
+#endif
+
 	}
 	else
 	{
@@ -2115,6 +2162,7 @@
 	if (uPropSize != 0)
 	{
 	    HX_ASSERT(uPropSize == sizeof(UINT32));
+	    m_uSampleIn = *(UINT32*)pProp;
 	    m_IBufs.SetSamplesIn(*(UINT32*)pProp);
 	}
     }


_______________________________________________
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