[xiph-commits] r10298 -
branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder
illiminable at svn.xiph.org
illiminable at svn.xiph.org
Mon Oct 24 15:11:24 PDT 2005
Author: illiminable
Date: 2005-10-24 15:11:19 -0700 (Mon, 24 Oct 2005)
New Revision: 10298
Modified:
branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h
branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp
branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h
Log:
* Implement GetAllocatorRequirements on input pin of theora decoder
Modified: branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h 2005-10-24 22:01:08 UTC (rev 10297)
+++ branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.h 2005-10-24 22:11:19 UTC (rev 10298)
@@ -71,7 +71,7 @@
void setTheoraFormat(BYTE* inFormatBlock);
protected:
- static const unsigned long THEORA_IDENT_HEADER_SIZE = 50;
+ static const unsigned long THEORA_IDENT_HEADER_SIZE = 42;
virtual void ResetFrameCount();
void FillMediaType(CMediaType* outMediaType, unsigned long inSampleSize);
bool FillVideoInfoHeader(VIDEOINFOHEADER* inFormatBuffer);
Modified: branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp 2005-10-24 22:01:08 UTC (rev 10297)
+++ branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp 2005-10-24 22:11:19 UTC (rev 10298)
@@ -63,7 +63,20 @@
return CBaseInputPin::NonDelegatingQueryInterface(riid, ppv);
}
+HRESULT TheoraDecodeInputPin::GetAllocatorRequirements(ALLOCATOR_PROPERTIES *outRequestedProps)
+{
+ TheoraDecodeFilter* locParent = (TheoraDecodeFilter*)m_pFilter;
+ unsigned long locBuffSize = ((unsigned long)locParent->mTheoraFormatInfo->outerFrameHeight * (unsigned long)locParent->mTheoraFormatInfo->outerFrameWidth * 3) >> 3;
+ if (locBuffSize < 65536) {
+ locBuffSize = 65536;
+ }
+ outRequestedProps->cbBuffer = locBuffSize;
+ outRequestedProps->cBuffers = THEORA_NUM_BUFFERS;
+ outRequestedProps->cbAlign = 1;
+ outRequestedProps->cbPrefix = 0;
+ return S_OK;
+}
HRESULT TheoraDecodeInputPin::BreakConnect() {
CAutoLock locLock(m_pLock);
//debugLog<<"Break conenct"<<endl;
Modified: branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h 2005-10-24 22:01:08 UTC (rev 10297)
+++ branches/oggdsf_new_demux/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h 2005-10-24 22:11:19 UTC (rev 10298)
@@ -57,7 +57,7 @@
//XTODO::: Add a new segment override to get an integer rate change
//XTODO::: Possibly add an endflush override to clear buffered data
- //XTODO::: Implement IOggDecoder interface
+ virtual STDMETHODIMP GetAllocatorRequirements(ALLOCATOR_PROPERTIES *outRequestedProps);
//XTODO::: Implement getallocator requirements to tell demux what buffers to use
//IOggDecoder Interface
@@ -69,6 +69,7 @@
//fstream debugLog;
protected:
+ static const unsigned long THEORA_NUM_BUFFERS = 50;
enum eTheoraSetupState {
VSS_SEEN_NOTHING,
VSS_SEEN_BOS,
More information about the commits
mailing list