[xiph-commits] r6982 -

illiminable at dactyl.lonelymoon.com illiminable
Sun Jul 4 12:56:39 PDT 2004


trunk/oggdsf/src/lib/core/directshow/dsfOggMux
Message-ID: <20040704195639.A128F9AAAB at dactyl.lonelymoon.com>

Author: illiminable
Date: Sun Jul  4 12:56:39 2004
New Revision: 6982

Modified:
trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h
Log:
* Added the seeking interface to the muxer.

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp	2004-07-04 19:49:17 UTC (rev 6981)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp	2004-07-04 19:56:38 UTC (rev 6982)
@@ -101,6 +101,11 @@
m_pLock = new CCritSec;
mInputPins.push_back(new OggMuxInputPin(this, m_pLock, &mHR, mInterleaver->newStream()));
//debugLog.open("C:\\temp\\muxer.log", ios_base::out);
+
+	//Make our delegate pin[0], the top pin... we send all out requests there.
+	IMediaSeeking* locSeeker = NULL;
+	this->NonDelegatingQueryInterface(IID_IMediaSeeking, (void**)&locSeeker);
+	mInputPins[0]->SetDelegate(locSeeker);

}


Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp	2004-07-04 19:49:17 UTC (rev 6981)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp	2004-07-04 19:56:38 UTC (rev 6982)
@@ -57,6 +57,18 @@
//debugLog.close();
}

+STDMETHODIMP OggMuxInputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
+{
+	if (riid == IID_IMediaSeeking) {
+		*ppv = (IMediaSeeking*)this;
+		((IUnknown*)*ppv)->AddRef();
+		return NOERROR;
+	}
+
+	return CBaseInputPin::NonDelegatingQueryInterface(riid, ppv);
+}
+
+
HRESULT OggMuxInputPin::SetMediaType(const CMediaType* inMediaType) {
if ((inMediaType->majortype == MEDIATYPE_Video) && (inMediaType->subtype == MEDIASUBTYPE_Theora)) {
//Theora
@@ -136,6 +148,12 @@
}

HRESULT OggMuxInputPin::CompleteConnect(IPin* inReceivePin) {
+
+	//Set our delegate to the pin that is connecting to us... we'll send them our seek messages.
+	IMediaSeeking* locSeeker = NULL;
+	inReceivePin->QueryInterface(IID_IMediaSeeking, (void**)&locSeeker);
+	SetDelegate(locSeeker);
+
mMuxStream->setIsActive(true);
return mParentFilter->addAnotherPin();
}

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h	2004-07-04 19:49:17 UTC (rev 6981)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h	2004-07-04 19:56:38 UTC (rev 6982)
@@ -33,6 +33,7 @@
#include "OggMuxFilter.h"
#include "OggPaginator.h"
#include "OggMuxStream.h"
+#include "BasicSeekable.h"
#include <time.h>
#include <fstream>
#include <windows.h>
@@ -42,14 +43,16 @@

class OggMuxInputPin
:	public CBaseInputPin
-	//,	public BasicSeekable
+	,	public BasicSeekable
{
public:
OggMuxInputPin(OggMuxFilter* inParentFilter, CCritSec* inFilterLock, HRESULT* inHR, OggMuxStream* inMuxStream);
virtual ~OggMuxInputPin(void);

+	//COM Setup
+	DECLARE_IUNKNOWN
+	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);

-
virtual HRESULT GetMediaType(int inPosition, CMediaType* outMediaType);
virtual HRESULT CheckMediaType(const CMediaType* inMediaType);
//virtual HRESULT DecideBufferSize(IMemAllocator* inoutAllocator, ALLOCATOR_PROPERTIES* inoutInputRequest);



More information about the commits mailing list