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

illiminable at svn.xiph.org illiminable at svn.xiph.org
Sat Oct 22 00:48:43 PDT 2005


Author: illiminable
Date: 2005-10-22 00:48:39 -0700 (Sat, 22 Oct 2005)
New Revision: 10238

Modified:
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourceFilter.cpp
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourceFilter.h
Log:
* Add skeletons for required virtual functions
* Add com factory method
* Add COM queryinterface method

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 07:36:49 UTC (rev 10237)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourceFilter.cpp	2005-10-22 07:48:39 UTC (rev 10238)
@@ -29,7 +29,7 @@
 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //===========================================================================
 #include "StdAfx.h"
-#include ".\oggdemuxpagesourcefilter.h"
+#include "OggDemuxPageSourceFilter.h"
 
 
 // This template lets the Object factory create us properly and work with COM infrastructure.
@@ -58,11 +58,59 @@
 // Generic way of determining the number of items in the template
 int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]); 
 
+//COM Creator Function
+CUnknown* WINAPI OggDemuxPageSourceFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr) 
+{
+	OggDemuxPageSourceFilter *pNewObject = new OggDemuxPageSourceFilter();
+    if (pNewObject == NULL) {
+        *pHr = E_OUTOFMEMORY;
+    }
+    return pNewObject;
+} 
+//COM Interface query function
+STDMETHODIMP OggDemuxPageSourceFilter::NonDelegatingQueryInterface(REFIID riid, void **ppv)
+{
+	if (riid == IID_IFileSourceFilter) {
+		*ppv = (IFileSourceFilter*)this;
+		((IUnknown*)*ppv)->AddRef();
+		return NOERROR;
+	/*} else if (riid == IID_IMediaSeeking) {
+		*ppv = (IMediaSeeking*)this;
+		((IUnknown*)*ppv)->AddRef();
+		return NOERROR;*/
+	}/* else if (riid == IID_ISpecifyPropertyPages) {
+		*ppv = (ISpecifyPropertyPages*)this;
+		((IUnknown*)*ppv)->AddRef();
+		return NOERROR;
+	}*/  else if (riid == IID_IAMFilterMiscFlags) {
+		*ppv = (IAMFilterMiscFlags*)this;
+		((IUnknown*)*ppv)->AddRef();
+		return NOERROR;
+	//} else if (riid == IID_IAMMediaContent) {
+	//	//debugLog<<"Queries for IAMMediaContent///"<<endl;
+	//	*ppv = (IAMMediaContent*)this;
+	//	((IUnknown*)*ppv)->AddRef();
+	//	return NOERROR;
+	}
 
+	return CBaseFilter::NonDelegatingQueryInterface(riid, ppv); 
+}
 OggDemuxPageSourceFilter::OggDemuxPageSourceFilter(void)
+	:	CBaseFilter(NAME("OggDemuxPageSourceFilter"), NULL, m_pLock, CLSID_OggDemuxPageSourceFilter)
 {
 }
 
 OggDemuxPageSourceFilter::~OggDemuxPageSourceFilter(void)
 {
 }
+
+int OggDemuxPageSourceFilter::GetPinCount() 
+{
+	//TODO::: Implement
+	return 0;//mStreamMapper->numStreams();
+}
+CBasePin* OggDemuxPageSourceFilter::GetPin(int inPinNo) 
+{
+	//TODO::: IMplement
+	return NULL;
+}

Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourceFilter.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourceFilter.h	2005-10-22 07:36:49 UTC (rev 10237)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPageSourceFilter.h	2005-10-22 07:48:39 UTC (rev 10238)
@@ -31,8 +31,28 @@
 #pragma once
 
 class OggDemuxPageSourceFilter
+	:	public CBaseFilter
+	//,	public CAMThread
+	//,	public IFileSourceFilter
+	//,	public IOggCallback
+	//,	public BasicSeekPassThrough
+	//,	public ISpecifyPropertyPages
+	//,	public IAMFilterMiscFlags
+	//,	public IAMMediaContent
 {
 public:
 	OggDemuxPageSourceFilter(void);
-	~OggDemuxPageSourceFilter(void);
+	virtual ~OggDemuxPageSourceFilter(void);
+
+	//Com Stuff
+	//DECLARE_IUNKNOWN
+
+	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
+	static CUnknown * WINAPI CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr);
+
+
+	//PURE VIRTUALS From CBaseFilter
+	virtual int GetPinCount();
+	virtual CBasePin* GetPin(int inPinNo);
+
 };



More information about the commits mailing list