[xiph-commits] r8761 -
trunk/oggdsf/src/lib/core/directshow/dsfAnxMux
illiminable at motherfish-iii.xiph.org
illiminable at motherfish-iii.xiph.org
Mon Jan 17 15:38:24 PST 2005
Author: illiminable
Date: 2005-01-15 19:28:53 -0800 (Sat, 15 Jan 2005)
New Revision: 8761
Modified:
trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxFilter.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxFilter.h
trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.h
Log:
* Added code paths and versioning for anx3
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxFilter.cpp 2005-01-15 06:36:00 UTC (rev 8760)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxFilter.cpp 2005-01-16 03:28:53 UTC (rev 8761)
@@ -70,11 +70,13 @@
}
AnxMuxFilter::AnxMuxFilter(void)
: OggMuxFilter(CLSID_AnxMuxFilter)
+ , mAnxVersionMajor(2)
+ , mAnxVersionMinor(0)
{
//ANX3::: Need to have a better way to set this.
- mInterleaver = new AnxPageInterleaver(this, this, 2, 0);
- mInputPins.push_back(new AnxMuxInputPin(this, m_pLock, &mHR, mInterleaver->newStream()));
+ mInterleaver = new AnxPageInterleaver(this, this, mAnxVersionMajor, mAnxVersionMinor);
+ mInputPins.push_back(new AnxMuxInputPin(this, m_pLock, &mHR, mInterleaver->newStream(), mAnxVersionMajor, mAnxVersionMinor));
// //Make our delegate pin[0], the top pin... we send all out requests there.
@@ -93,6 +95,6 @@
}
HRESULT AnxMuxFilter::addAnotherPin() {
- mInputPins.push_back(new AnxMuxInputPin(this, m_pLock, &mHR, mInterleaver->newStream()));
+ mInputPins.push_back(new AnxMuxInputPin(this, m_pLock, &mHR, mInterleaver->newStream(), mAnxVersionMajor, mAnxVersionMinor));
return S_OK;
}
\ No newline at end of file
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxFilter.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxFilter.h 2005-01-15 06:36:00 UTC (rev 8760)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxFilter.h 2005-01-16 03:28:53 UTC (rev 8761)
@@ -62,4 +62,7 @@
virtual HRESULT addAnotherPin();
protected:
eAnxMuxState mAnxMuxState;
+
+ unsigned long mAnxVersionMajor;
+ unsigned long mAnxVersionMinor;
};
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp 2005-01-15 06:36:00 UTC (rev 8760)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp 2005-01-16 03:28:53 UTC (rev 8761)
@@ -34,9 +34,11 @@
#include "stdafx.h"
#include ".\anxmuxinputpin.h"
#include "AnxMuxFilter.h"
-AnxMuxInputPin::AnxMuxInputPin(AnxMuxFilter* inOwningFilter, CCritSec* inFilterLock, HRESULT* inHR, OggMuxStream* inMuxStream)
+AnxMuxInputPin::AnxMuxInputPin(AnxMuxFilter* inOwningFilter, CCritSec* inFilterLock, HRESULT* inHR, OggMuxStream* inMuxStream, unsigned long inAnxVersionMajor, unsigned long inAnxVersionMinor)
: OggMuxInputPin(inOwningFilter, inFilterLock, inHR, inMuxStream)
, mAnxDataPacket(NULL)
+ , mAnxVersionMajor(inAnxVersionMajor)
+ , mAnxVersionMinor(inAnxVersionMinor)
{
debugLog.open("g:\\logs\\anxmuxinputpin.log", ios_base::out);
}
@@ -58,8 +60,13 @@
HRESULT locHR = mParentFilter->addAnotherPin();
if ((locHR == S_OK) && (mAnxDataPacket != NULL)) {
//ANX3::: Only do this for anx2... in anx 3 we need to get the fishbone some other way.
- mPaginator.acceptStampedOggPacket(mAnxDataPacket);
- return S_OK;
+ if ((mAnxVersionMajor == 2) && (mAnxVersionMinor == 0)) {
+ mPaginator.acceptStampedOggPacket(mAnxDataPacket);
+ return S_OK;
+ } else {
+ return S_FALSE;
+ }
+
} else {
return S_FALSE;
}
@@ -162,7 +169,10 @@
if (locWasOK) {
//ANX3::: Need to make our fishbone here.
//Save the packet, we'll push it into the stream when the connection is established
- mAnxDataPacket = AnxPacketMaker::makeAnxData_2_0(2,0, locGranRateNum, locGranRateDenom, locNumHeaders, AnxPacketMaker::makeMessageHeaders(locCodecID));
+
+ if ((mAnxVersionMajor == 2) && (mAnxVersionMinor == 0)) {
+ mAnxDataPacket = AnxPacketMaker::makeAnxData_2_0(2, 0, locGranRateNum, locGranRateDenom, locNumHeaders, AnxPacketMaker::makeMessageHeaders(locCodecID));
+ }
return S_OK;
} else {
return S_FALSE;
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.h 2005-01-15 06:36:00 UTC (rev 8760)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.h 2005-01-16 03:28:53 UTC (rev 8761)
@@ -47,7 +47,7 @@
: public OggMuxInputPin
{
public:
- AnxMuxInputPin(AnxMuxFilter* inOwningFilter, CCritSec* inFilterLock, HRESULT* inHR, OggMuxStream* inMuxStream);
+ AnxMuxInputPin(AnxMuxFilter* inOwningFilter, CCritSec* inFilterLock, HRESULT* inHR, OggMuxStream* inMuxStream, unsigned long inAnxVersionMajor, unsigned long inAnxVersionMinor);
~AnxMuxInputPin(void);
virtual HRESULT CompleteConnect(IPin* inReceivePin);
@@ -57,4 +57,7 @@
fstream debugLog;
StampedOggPacket* mAnxDataPacket;
+
+ unsigned long mAnxVersionMajor;
+ unsigned long mAnxVersionMinor;
};
More information about the commits
mailing list