[xiph-commits] r10255 - branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2

illiminable at svn.xiph.org illiminable at svn.xiph.org
Sat Oct 22 13:10:53 PDT 2005


Author: illiminable
Date: 2005-10-22 13:10:47 -0700 (Sat, 22 Oct 2005)
New Revision: 10255

Modified:
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourceFilter.cpp
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.cpp
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.h
Log:
* Allow the pins in the stream mapper to be index
* Implement getPinCount and getPin on IBaseFilter interface

Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourceFilter.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourceFilter.cpp	2005-10-22 19:35:15 UTC (rev 10254)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourceFilter.cpp	2005-10-22 20:10:47 UTC (rev 10255)
@@ -267,20 +267,22 @@
 int OggDemuxPageSourceFilter::GetPinCount() 
 {
 	//TODO::: Implement
-	return 0;//mStreamMapper->numStreams();
+	return mStreamMapper->numPins();
 }
 CBasePin* OggDemuxPageSourceFilter::GetPin(int inPinNo) 
 {
-	//TODO::: IMplement
-	return NULL;
+	if (inPinNo < 0) {
+		return NULL;
+	}
+	return mStreamMapper->getPinByIndex(inPinNo);
 }
 
 //IFileSource Interface
 STDMETHODIMP OggDemuxPageSourceFilter::GetCurFile(LPOLESTR* outFileName, AM_MEDIA_TYPE* outMediaType) 
 {
 	////Return the filename and mediatype of the raw data
-	//LPOLESTR x = SysAllocString(mFileName.c_str());
-	//*outFileName = x;
+	LPOLESTR x = SysAllocString(mFileName.c_str());
+	*outFileName = x;
 
 	//TODO:::
 	

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 19:35:15 UTC (rev 10254)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.cpp	2005-10-22 20:10:47 UTC (rev 10255)
@@ -11,7 +11,14 @@
 OggStreamMapper::~OggStreamMapper(void)
 {
 }
-
+OggDemuxPageSourcePin* OggStreamMapper::getPinByIndex(unsigned long inIndex)
+{
+	if (inIndex < mPins.size()) {
+		return mPins[inIndex];
+	} else {
+		return NULL;
+	}
+}
 bool OggStreamMapper::acceptOggPage(OggPage* inOggPage)
 {
 	

Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.h	2005-10-22 19:35:15 UTC (rev 10254)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.h	2005-10-22 20:10:47 UTC (rev 10255)
@@ -32,6 +32,9 @@
 
 	bool allStreamsReady();
 
+	unsigned long numPins()				{		return mPins.size();		}
+	OggDemuxPageSourcePin* getPinByIndex(unsigned long inIndex);
+
 protected:
 	eStreamState mStreamState;
 	vector<OggDemuxPageSourcePin*> mPins;



More information about the commits mailing list