[xiph-commits] r10249 -
branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2
illiminable at svn.xiph.org
illiminable at svn.xiph.org
Sat Oct 22 08:50:48 PDT 2005
Author: illiminable
Date: 2005-10-22 08:50:41 -0700 (Sat, 22 Oct 2005)
New Revision: 10249
Modified:
branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourcePin.cpp
branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourcePin.h
branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.cpp
branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/ds_guids.h
Log:
* Add method to source pin to grab IOggDecoder interface from downstream
Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourcePin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourcePin.cpp 2005-10-22 15:32:26 UTC (rev 10248)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourcePin.cpp 2005-10-22 15:50:41 UTC (rev 10249)
@@ -57,6 +57,28 @@
{
return mBOSAsFormatBlock;
}
+
+unsigned long OggDemuxPageSourcePin::getSerialNo()
+{
+ return mBOSPage->header()->StreamSerialNo();
+}
+
+IOggDecoder* OggDemuxPageSourcePin::getDecoderInterface()
+{
+ if (mDecoderInterface == NULL) {
+ IOggDecoder* locDecoder = NULL;
+ if (IsConnected()) {
+ IPin* locPin = GetConnected();
+ if (locPin != NULL) {
+ locPin->QueryInterface(IID_IOggDecoder, (void**)&locDecoder);
+ }
+ }
+
+ mDecoderInterface = locDecoder;
+ }
+ return mDecoderInterface;
+
+}
HRESULT OggDemuxPageSourcePin::GetMediaType(int inPosition, CMediaType* outMediaType)
{
//Put it in from the info we got in the constructor.
Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourcePin.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourcePin.h 2005-10-22 15:32:26 UTC (rev 10248)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourcePin.h 2005-10-22 15:50:41 UTC (rev 10249)
@@ -31,6 +31,7 @@
#pragma once
#include <libOOOgg/OggPage.h>
+#include "IOggDecoder.h"
class OggDemuxPageSourcePin
: public CBaseOutputPin
{
@@ -49,6 +50,9 @@
~OggDemuxPageSourcePin(void);
static const unsigned long NUM_PAGE_BUFFERS = 100;
+
+ unsigned long getSerialNo();
+ IOggDecoder* getDecoderInterface();
//CBasePin virtuals
virtual HRESULT GetMediaType(int inPosition, CMediaType* outMediaType);
virtual HRESULT CheckMediaType(const CMediaType* inMediaType);
@@ -60,4 +64,5 @@
BYTE* getBOSAsFormatBlock();
BYTE* mBOSAsFormatBlock;
OggPage* mBOSPage;
+ IOggDecoder* mDecoderInterface;
};
Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.cpp 2005-10-22 15:32:26 UTC (rev 10248)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.cpp 2005-10-22 15:50:41 UTC (rev 10249)
@@ -27,7 +27,13 @@
}
//Partial fall through
case STRMAP_PARSING_BOS_PAGES:
- return addNewPin(inOggPage);
+ //WARNING::: Partial fall through
+ if (inOggPage->header()->isBOS()) {
+ return addNewPin(inOggPage);
+ } else {
+ mStreamState = STRMAP_PARSING_HEADERS;
+ }
+ //Partial fall through
case STRMAP_PARSING_HEADERS:
case STRMAP_DATA:
case STRMAP_FINISHED:
Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/ds_guids.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/ds_guids.h 2005-10-22 15:32:26 UTC (rev 10248)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/ds_guids.h 2005-10-22 15:50:41 UTC (rev 10249)
@@ -26,6 +26,11 @@
DEFINE_GUID(FORMAT_OggBOSPage,
0x95388704, 0x162c, 0x42a9, 0x81, 0x49, 0xc3, 0x57, 0x7c, 0x12, 0xaa, 0xf9);
+// {43F0F818-10B0-4c86-B9F1-F6B6E2D33462}
+DEFINE_GUID(IID_IOggDecoder,
+0x43f0f818, 0x10b0, 0x4c86, 0xb9, 0xf1, 0xf6, 0xb6, 0xe2, 0xd3, 0x34, 0x62);
+
+
//// {3913F0AB-E7ED-41c4-979B-1D1FDD983C07}
//DEFINE_GUID(MEDIASUBTYPE_FLAC,
//0x3913f0ab, 0xe7ed, 0x41c4, 0x97, 0x9b, 0x1d, 0x1f, 0xdd, 0x98, 0x3c, 0x7);
More information about the commits
mailing list