[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-datatype-cvs
Subject: [Datatype-cvs] wm/video/renderer wmvdecoder.cpp, 1.5.2.4,
From: gahluwalia () helixcommunity ! org
Date: 2009-11-24 9:36:00
Message-ID: 200911241048.nAOAmlCT019768 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/datatype/wm/video/renderer
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv23145
Modified Files:
Tag: hxclient_3_1_0_atlas
wmvdecoder.cpp wmvformat.cpp
Log Message:
merge from atlas 361
Index: wmvdecoder.cpp
===================================================================
RCS file: /cvsroot/datatype/wm/video/renderer/wmvdecoder.cpp,v
retrieving revision 1.5.2.4
retrieving revision 1.5.2.5
diff -u -d -r1.5.2.4 -r1.5.2.5
--- wmvdecoder.cpp 22 Oct 2009 16:02:22 -0000 1.5.2.4
+++ wmvdecoder.cpp 24 Nov 2009 09:35:58 -0000 1.5.2.5
@@ -310,7 +310,7 @@
// values mean it was behind.
m_pCodecLib->PNStream_SetProperty(m_pStream, SP_LAST_FRAME_AHEAD, &m_lLastTimeAhead);
// Pass the input data into the codec
- m_pCodecLib->PNStream_Input(m_pStream, NULL, (HXCODEC_DATA*) pFrameToDecode->m_pData);
+ retVal = m_pCodecLib->PNStream_Input(m_pStream, NULL, (HXCODEC_DATA*) pFrameToDecode->m_pData);
// NULL out the pointer so it doesn't get deleted yet
((HXCODEC_DATA*) pFrameToDecode->m_pData)->data = NULL;
}
@@ -803,3 +803,11 @@
{
return m_pCodecLib->PNStream_SetProperty(m_pStream, SP_SEEK, &uval);
}
+
+void
+CWMVideoDecoder::ProcessOutputFrames()
+{
+ UINT32 uval = 0;
+ m_pCodecLib->PNStream_SetProperty(m_pStream, SP_PROCIDLE, &uval);
+}
+
Index: wmvformat.cpp
===================================================================
RCS file: /cvsroot/datatype/wm/video/renderer/wmvformat.cpp,v
retrieving revision 1.5.12.4
retrieving revision 1.5.12.5
diff -u -d -r1.5.12.4 -r1.5.12.5
--- wmvformat.cpp 9 Nov 2009 05:49:47 -0000 1.5.12.4
+++ wmvformat.cpp 24 Nov 2009 09:35:58 -0000 1.5.12.5
@@ -613,18 +613,27 @@
HXBOOL bInputFrameProcessed = FALSE;
HX_RESULT status = HXR_OK;
- // Get the ASM rule from the sample description
- UINT32 ulSampDesc = (UINT32) pFrameToDecode->m_pSampleDesc;
- UINT16 usASMRule = (UINT16) (ulSampDesc & 0x0000FFFF);
+ UINT32 ulSampDesc = 0;
+ UINT16 usASMRule = 0;
UINT32 ulSubStreamIndex = 0;
- if (m_pRuleToSubStreamMap && usASMRule < m_pRuleToSubStreamMap->num_rules)
+ if(pFrameToDecode)
{
- ulSubStreamIndex = (UINT32) m_pRuleToSubStreamMap->rule_to_flag_map[usASMRule];
+ // Get the ASM rule from the sample description
+ ulSampDesc = (UINT32) pFrameToDecode->m_pSampleDesc;
+ usASMRule = (UINT16) (ulSampDesc & 0x0000FFFF);
+ if (m_pRuleToSubStreamMap && usASMRule < m_pRuleToSubStreamMap->num_rules)
+ {
+ ulSubStreamIndex = (UINT32) m_pRuleToSubStreamMap->rule_to_flag_map[usASMRule];
+ }
+ }
+ else
+ {
+ bInputFrameProcessed = TRUE;
}
#if defined(HELIX_FEATURE_WM_VIDEO_DISCARD_LATE_ENCODED_FRAMES)
HXBOOL bDecodeThisOne = TRUE;
// Are we currently playing?
- if (m_pWMVideoRenderer->IsActive())
+ if (pFrameToDecode && m_pWMVideoRenderer->IsActive())
{
// Determine how much time ahead this encoded frame is
INT32 lTimeAhead = m_pWMVideoRenderer->ComputeTimeAhead(pFrameToDecode->m_ulTime, 0);
@@ -802,9 +811,9 @@
// Report a sampled frame
m_pWMVideoRenderer->ReportSampledFrame();
// Check the error return
- if (status == HXR_OUTOFMEMORY)
+ if (status == HXR_OUTOFMEMORY || status == HXR_UNSUPPORTED_VIDEO)
{
- m_LastError = HXR_OUTOFMEMORY;
+ m_LastError = status;
}
// Get the first decoded frame in the ring buffer
pDecodedPacket = (HXCODEC_DATA*) m_pDecodedRingBuffer->Get();
@@ -1262,3 +1271,29 @@
}
+HXBOOL
+CWMVideoFormat::DecodeFrame(UINT32 ulMaxExtraFrames)
+{
+ HXBOOL bRet = CVideoFormat::DecodeFrame(ulMaxExtraFrames);
+ if(!bRet)
+ {
+ if(m_ppWMVideoDecoder && m_ppWMVideoDecoder[m_ulActiveSubStreamIndex])
+ {
+ m_ppWMVideoDecoder[m_ulActiveSubStreamIndex]->ProcessOutputFrames();
+ }
+ CMediaPacket* pPacket = CreateDecodedPacket(NULL);
+ if(pPacket)
+ {
+ if(!ReturnDecodedPacket(pPacket))
+ {
+ m_pFramePool->Put(pPacket);
+ m_pWMVideoRenderer->ReportDroppedFrame();
+ }
+ pPacket = NULL;
+ }
+ }
+ return bRet;
+}
+
+
+
_______________________________________________
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