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

List:       helix-datatype-cvs
Subject:    [Datatype-cvs] samples/cmp_decoder raac.cpp,1.1.1.1,1.1.1.1.2.1
From:       sfu () helixcommunity ! org
Date:       2009-11-25 22:22:16
Message-ID: 200911252334.nAPNYmpi025519 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/datatype/samples/cmp_decoder
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv30122

Modified Files:
      Tag: hxclient_4_0_1_brizo
	raac.cpp 
Log Message:
add small wait in audio thread when it is not running

Index: raac.cpp
===================================================================
RCS file: /cvsroot/datatype/samples/cmp_decoder/raac.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -u -d -r1.1.1.1 -r1.1.1.1.2.1
--- raac.cpp	17 Oct 2009 01:07:06 -0000	1.1.1.1
+++ raac.cpp	25 Nov 2009 22:22:14 -0000	1.1.1.1.2.1
@@ -194,7 +194,6 @@
   CreateInstanceCCF(CLSID_IHXThread, (void**)&m_pAudioThread, m_pContext);
   HX_ASSERT(m_pAudioQueue && m_pMutex && m_pAudioThread);
   m_pAudioThread->CreateThread(StaticAudioThreadFunc, (void*)this, 0);
-
   return HXR_OK;
 }
 
@@ -295,7 +294,6 @@
            // is there anything in the queue?
            CAACDecDSP::AudioFrame* pAudioFrame = NULL;
            HX_LOCK(m_pMutex);
-           printf("Queue size: %d\n", m_pAudioQueue->GetCount());
            if (m_pAudioQueue->GetCount() > 0)
            {
              pAudioFrame = (CAACDecDSP::AudioFrame*)m_pAudioQueue->RemoveHead();
@@ -370,6 +368,10 @@
               HX_DELETE(pAudioFrame);
            }
        }
+       else
+       {
+          usleep(10);
+       }
     }
     m_eState = STOPPED;
     return NULL;


_______________________________________________
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