[xiph-commits] r7646 - trunk/oggdsf/src/lib/core/directshow/dsfOggDemux

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Fri Aug 27 08:50:31 PDT 2004


Author: illiminable
Date: 2004-08-27 08:50:30 -0700 (Fri, 27 Aug 2004)
New Revision: 7646

Modified:
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h
Log:
* Added skeleton of interfaces to get metadata (ie vorbis comments)

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp	2004-08-27 12:29:04 UTC (rev 7645)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp	2004-08-27 15:50:30 UTC (rev 7646)
@@ -86,6 +86,10 @@
 		*ppv = (IAMFilterMiscFlags*)this;
 		((IUnknown*)*ppv)->AddRef();
 		return NOERROR;
+	} else if (riid == IID_IAMMediaContent) {
+		*ppv = (IAMMediaContent*)this;
+		((IUnknown*)*ppv)->AddRef();
+		return NOERROR;
 	}
 
 	return CBaseFilter::NonDelegatingQueryInterface(riid, ppv); 
@@ -705,3 +709,73 @@
 CCritSec* OggDemuxSourceFilter::theLock() {
 	return m_pLock;
 }
+
+
+//IAMMediaContent Interface
+STDMETHODIMP  OggDemuxSourceFilter::get_AuthorName(BSTR* outAuthorName) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_Title(BSTR* outTitle) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_Rating(BSTR* outRating) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_Description(BSTR* outDescription) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_Copyright(BSTR* outCopyright) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_BaseURL(BSTR* outBaseURL) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_LogoURL(BSTR* outLogoURL) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_LogoIconURL(BSTR* outLogoIconURL) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_WatermarkURL(BSTR* outWatermarkURL) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_MoreInfoURL(BSTR* outMoreInfoURL) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_MoreInfoBannerImage(BSTR* outMoreInfoBannerImage) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_MoreInfoBannerURL(BSTR* outMoreInfoBannerURL) { 
+	return E_NOTIMPL;
+}
+STDMETHODIMP  OggDemuxSourceFilter::get_MoreInfoText(BSTR* outMoreInfoText) { 
+	return E_NOTIMPL;
+}
+
+//IDispatch Interface
+STDMETHODIMP OggDemuxSourceFilter::GetTypeInfoCount(	unsigned int FAR*  pctinfo ) {
+	return E_NOTIMPL;
+
+}
+STDMETHODIMP OggDemuxSourceFilter::GetIDsOfNames(		REFIID  riid, 
+								OLECHAR FAR* FAR* rgszNames, 
+								unsigned int cNames, 
+								LCID lcid, 
+								DISPID FAR* rgDispId ) {
+	return E_NOTIMPL;
+								}
+STDMETHODIMP OggDemuxSourceFilter::GetTypeInfo(		unsigned int iTInfo, 
+								LCID lcid, 
+								ITypeInfo FAR* FAR*  ppTInfo ) {
+	return E_NOTIMPL;
+}
+STDMETHODIMP OggDemuxSourceFilter::Invoke(			DISPID  dispIdMember,
+								REFIID  riid,
+								LCID  lcid,
+								WORD  wFlags,
+								DISPPARAMS FAR*  pDispParams,  
+								VARIANT FAR*  pVarResult,  
+								EXCEPINFO FAR*  pExcepInfo,  
+								unsigned int FAR*  puArgErr ) {
+	return E_NOTIMPL;
+}

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h	2004-08-27 12:29:04 UTC (rev 7645)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h	2004-08-27 15:50:30 UTC (rev 7646)
@@ -30,6 +30,9 @@
 //===========================================================================
 #pragma once
 
+#include <Dshow.h>
+#include <Initguid.h>
+#include <Qnetwork.h>
 #include "oggdllstuff.h"
 #include "OggDemuxSourcePin.h"
 #include "OggStreamMapper.h"
@@ -52,6 +55,7 @@
 	,	public BasicSeekable
 	,	public ISpecifyPropertyPages
 	,	public IAMFilterMiscFlags
+	,	public IAMMediaContent
 		
 {
 public:
@@ -98,27 +102,61 @@
 	//IMediaSeeking
 	virtual STDMETHODIMP GetDuration(LONGLONG* outDuration);
 	virtual STDMETHODIMP GetCapabilities(DWORD* inCapabilities);
-
+	 
+	virtual STDMETHODIMP CheckCapabilities(DWORD *pCapabilities);
+	virtual STDMETHODIMP IsFormatSupported(const GUID *pFormat);
+	virtual STDMETHODIMP QueryPreferredFormat(GUID *pFormat);
+	virtual STDMETHODIMP SetTimeFormat(const GUID *pFormat);
+	virtual STDMETHODIMP GetTimeFormat( GUID *pFormat);
 	
-	 
-	 virtual STDMETHODIMP CheckCapabilities(DWORD *pCapabilities);
-	 virtual STDMETHODIMP IsFormatSupported(const GUID *pFormat);
-	 virtual STDMETHODIMP QueryPreferredFormat(GUID *pFormat);
-	 virtual STDMETHODIMP SetTimeFormat(const GUID *pFormat);
-	 virtual STDMETHODIMP GetTimeFormat( GUID *pFormat);
-	 
-	 virtual STDMETHODIMP GetStopPosition(LONGLONG *pStop);
-	 virtual STDMETHODIMP GetCurrentPosition(LONGLONG *pCurrent);
-	 virtual STDMETHODIMP ConvertTimeFormat(LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat);
-	 virtual STDMETHODIMP SetPositions(LONGLONG *pCurrent,DWORD dwCurrentFlags,LONGLONG *pStop,DWORD dwStopFlags);
-	 virtual STDMETHODIMP GetPositions(LONGLONG *pCurrent, LONGLONG *pStop);
-	 virtual STDMETHODIMP GetAvailable(LONGLONG *pEarliest, LONGLONG *pLatest);
-	 virtual STDMETHODIMP SetRate(double dRate);
-	 virtual STDMETHODIMP GetRate(double *dRate);
-	 virtual STDMETHODIMP GetPreroll(LONGLONG *pllPreroll);
-	 virtual STDMETHODIMP IsUsingTimeFormat(const GUID *pFormat);
-		
+	virtual STDMETHODIMP GetStopPosition(LONGLONG *pStop);
+	virtual STDMETHODIMP GetCurrentPosition(LONGLONG *pCurrent);
+	virtual STDMETHODIMP ConvertTimeFormat(LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat);
+	virtual STDMETHODIMP SetPositions(LONGLONG *pCurrent,DWORD dwCurrentFlags,LONGLONG *pStop,DWORD dwStopFlags);
+	virtual STDMETHODIMP GetPositions(LONGLONG *pCurrent, LONGLONG *pStop);
+	virtual STDMETHODIMP GetAvailable(LONGLONG *pEarliest, LONGLONG *pLatest);
+	virtual STDMETHODIMP SetRate(double dRate);
+	virtual STDMETHODIMP GetRate(double *dRate);
+	virtual STDMETHODIMP GetPreroll(LONGLONG *pllPreroll);
+	virtual STDMETHODIMP IsUsingTimeFormat(const GUID *pFormat);
+	
+	//IAMMediaContent Interface
+	virtual STDMETHODIMP get_AuthorName(BSTR* outAuthorName);
+	virtual STDMETHODIMP get_Title(BSTR* outTitle);
+	virtual STDMETHODIMP get_Rating(BSTR* outRating);
+	virtual STDMETHODIMP get_Description(BSTR* outDescription);
+	virtual STDMETHODIMP get_Copyright(BSTR* outCopyright);
+	virtual STDMETHODIMP get_BaseURL(BSTR* outBaseURL);
+	virtual STDMETHODIMP get_LogoURL(BSTR* outLogoURL);
+	virtual STDMETHODIMP get_LogoIconURL(BSTR* outLogoIconURL);
+	virtual STDMETHODIMP get_WatermarkURL(BSTR* outWatermarkURL);
+	virtual STDMETHODIMP get_MoreInfoURL(BSTR* outMoreInfoURL);
+	virtual STDMETHODIMP get_MoreInfoBannerImage(BSTR* outMoreInfoBannerImage);
+	virtual STDMETHODIMP get_MoreInfoBannerURL(BSTR* outMoreInfoBannerURL);
+	virtual STDMETHODIMP get_MoreInfoText(BSTR* outMoreInfoText);
 
+
+	//IDispatch Interface (Base interface of IAMMediaContent) - evil evil thing.
+	// Trying not to implement it ! I'm sure it was all very funny when they came up with it.
+	virtual STDMETHODIMP GetTypeInfoCount(	unsigned int FAR*  pctinfo );
+	virtual STDMETHODIMP GetIDsOfNames(		REFIID  riid, 
+											OLECHAR FAR* FAR* rgszNames, 
+											unsigned int cNames, 
+											LCID lcid, 
+											DISPID FAR* rgDispId );
+	virtual STDMETHODIMP GetTypeInfo(		unsigned int iTInfo, 
+											LCID lcid, 
+											ITypeInfo FAR* FAR*  ppTInfo );
+	virtual STDMETHODIMP Invoke(			DISPID  dispIdMember,
+											REFIID  riid,
+											LCID  lcid,
+											WORD  wFlags,
+											DISPPARAMS FAR*  pDispParams,  
+											VARIANT FAR*  pVarResult,  
+											EXCEPINFO FAR*  pExcepInfo,  
+											unsigned int FAR*  puArgErr );
+
+
 	 CCritSec* theLock();
 	//CAMThread
 	virtual DWORD ThreadProc(void);
@@ -129,6 +167,7 @@
 	REFERENCE_TIME mSeekTimeBase;  //Don't ask !
 
 protected:
+	//Internal helper methods
 	void resetStream();
 	void DeliverEOS();
 	void DeliverBeginFlush();
@@ -139,6 +178,7 @@
 	virtual HRESULT SetUpPins();
 	//virtual bool AddPin(OggDemuxSourcePin* inPin, unsigned long inSerialNo);
 
+
 	CCritSec* mSourceFileLock;
 	CCritSec* mDemuxLock;
 	AutoOggSeekTable* mSeekTable;



More information about the commits mailing list