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

illiminable at svn.xiph.org illiminable at svn.xiph.org
Sun Oct 23 00:44:49 PDT 2005


Author: illiminable
Date: 2005-10-23 00:44:42 -0700 (Sun, 23 Oct 2005)
New Revision: 10260

Modified:
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.cpp
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.h
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.cpp
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/dsfOggDemux2.vcproj
Log:
* Revert back to packet demuxing

Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.cpp	2005-10-23 07:11:11 UTC (rev 10259)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.cpp	2005-10-23 07:44:42 UTC (rev 10260)
@@ -34,24 +34,28 @@
 OggDemuxPacketSourcePin::	OggDemuxPacketSourcePin(		TCHAR* inObjectName
 												,	OggDemuxPacketSourceFilter* inParentFilter
 												,	CCritSec* inFilterLock
-												,	OggPage* inBOSPage)
+												,	OggPacket* inIdentHeader
+												,	unsigned long inSerialNo)
 	:	CBaseOutputPin(			NAME("Ogg Demux Output Pin")
 							,	inParentFilter
 							,	inFilterLock
 							,	&mFilterHR
 							,	L"Ogg Stream" )
-	,	mBOSPage(inBOSPage)
+	,	mIdentHeader(inIdentHeader)
+	,	mSerialNo(inSerialNo)
 	,	mIsStreamReady(false)
 {
 
-	mBOSAsFormatBlock = (BYTE*)inBOSPage->createRawPageData();
 	
+		//(BYTE*)inBOSPage->createRawPageData();
+	
 }
 
 OggDemuxPacketSourcePin::~OggDemuxPacketSourcePin(void)
 {
-	delete[] mBOSAsFormatBlock;
-	delete mBOSPage;
+	//delete[] mBOSAsFormatBlock;
+	//delete mBOSPage;
+	delete mIdentHeader;
 }
 
 bool OggDemuxPacketSourcePin::acceptOggPage(OggPage* inOggPage)
@@ -59,14 +63,19 @@
 	//TODO:::
 	return true;
 }
-BYTE* OggDemuxPacketSourcePin::getBOSAsFormatBlock()
+BYTE* OggDemuxPacketSourcePin::getIdentAsFormatBlock()
 {
-	return mBOSAsFormatBlock;
+	return (BYTE*)mIdentHeader->packetData();
 }
 
+unsigned long OggDemuxPacketSourcePin::getIdentSize()
+{
+	return mIdentHeader->packetSize();
+}
+
 unsigned long OggDemuxPacketSourcePin::getSerialNo()
 {
-	return mBOSPage->header()->StreamSerialNo();
+	return mSerialNo;//mBOSPage->header()->StreamSerialNo();
 }
 
 IOggDecoder* OggDemuxPacketSourcePin::getDecoderInterface()
@@ -90,12 +99,12 @@
 	//Put it in from the info we got in the constructor.
 	if (inPosition == 0) {
 		AM_MEDIA_TYPE locAMMediaType;
-		locAMMediaType.majortype = MEDIATYPE_OggPageStream;
+		locAMMediaType.majortype = MEDIATYPE_OggPacketStream;
 
 		locAMMediaType.subtype = MEDIASUBTYPE_None;
-		locAMMediaType.formattype = FORMAT_OggBOSPage;
-		locAMMediaType.cbFormat = mBOSPage->pageSize();
-		locAMMediaType.pbFormat = getBOSAsFormatBlock();
+		locAMMediaType.formattype = FORMAT_OggIdentHeader;
+		locAMMediaType.cbFormat = getIdentSize();
+		locAMMediaType.pbFormat = getIdentAsFormatBlock();
 		locAMMediaType.pUnk = NULL;
 	
 			
@@ -108,9 +117,9 @@
 	}
 }
 HRESULT OggDemuxPacketSourcePin::CheckMediaType(const CMediaType* inMediaType) {
-	if (		(inMediaType->majortype == MEDIATYPE_OggPageStream) 
+	if (		(inMediaType->majortype == MEDIATYPE_OggPacketStream) 
 			&&	(inMediaType->subtype == MEDIASUBTYPE_None)
-			&&	(inMediaType->formattype == FORMAT_OggBOSPage)) {
+			&&	(inMediaType->formattype == FORMAT_OggIdentHeader)) {
 			//&&	(inMediaType->cbFormat == mBOSPage->pageSize()) {
 
 		return S_OK;

Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.h	2005-10-23 07:11:11 UTC (rev 10259)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourcePin.h	2005-10-23 07:44:42 UTC (rev 10260)
@@ -30,7 +30,7 @@
 //===========================================================================
 #pragma once
 
-#include <libOOOgg/OggPage.h>
+#include <libOOOgg/OggPacket.h>
 #include <libOOOgg/IOggCallback.h>
 #include "IOggDecoder.h"
 class OggDemuxPacketSourcePin
@@ -42,7 +42,8 @@
 	OggDemuxPacketSourcePin(	TCHAR* inObjectName, 
 							OggDemuxPacketSourceFilter* inParentFilter,
 							CCritSec* inFilterLock,
-							OggPage* inBOSPage);
+							OggPacket* inIdentHeader,
+							unsigned long inSerialNo);
 							//StreamHeaders* inHeaderSource, 
 							//CMediaType* inMediaType,
 							//wstring inPinName,
@@ -69,9 +70,11 @@
 	//What is this actually for ?
 	HRESULT mFilterHR;
 
-	BYTE* getBOSAsFormatBlock();
-	BYTE* mBOSAsFormatBlock;
-	OggPage* mBOSPage;
+	BYTE* getIdentAsFormatBlock();
+	unsigned long getIdentSize();
+	unsigned long mSerialNo;
+	
+	OggPacket* mIdentHeader;
 	IOggDecoder* mDecoderInterface;
 
 	bool mIsStreamReady;

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-23 07:11:11 UTC (rev 10259)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggStreamMapper.cpp	2005-10-23 07:44:42 UTC (rev 10260)
@@ -104,7 +104,8 @@
 
 bool OggStreamMapper::addNewPin(OggPage* inOggPage)
 {
-	OggDemuxPacketSourcePin* locNewPin = new OggDemuxPacketSourcePin(NAME("OggPageSourcePin"), mParentFilter, mParentFilterLock, inOggPage);
+	OggDemuxPacketSourcePin* locNewPin = new OggDemuxPacketSourcePin(NAME("OggPageSourcePin"), mParentFilter, mParentFilterLock, inOggPage->getPacket(0)->clone(), inOggPage->header()->StreamSerialNo());
+	delete inOggPage;
 	mPins.push_back(locNewPin);
 	return true;
 }

Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/dsfOggDemux2.vcproj
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/dsfOggDemux2.vcproj	2005-10-23 07:11:11 UTC (rev 10259)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/dsfOggDemux2.vcproj	2005-10-23 07:44:42 UTC (rev 10260)
@@ -138,10 +138,10 @@
 				RelativePath=".\HTTPSocket.cpp">
 			</File>
 			<File
-				RelativePath=".\OggDemuxPageSourceFilter.cpp">
+				RelativePath=".\OggDemuxPacketSourceFilter.cpp">
 			</File>
 			<File
-				RelativePath=".\OggDemuxPageSourcePin.cpp">
+				RelativePath=".\OggDemuxPacketSourcePin.cpp">
 			</File>
 			<File
 				RelativePath=".\oggdllstuff.cpp">
@@ -197,10 +197,10 @@
 				RelativePath=".\IOggDecoder.h">
 			</File>
 			<File
-				RelativePath=".\OggDemuxPageSourceFilter.h">
+				RelativePath=".\OggDemuxPacketSourceFilter.h">
 			</File>
 			<File
-				RelativePath=".\OggDemuxPageSourcePin.h">
+				RelativePath=".\OggDemuxPacketSourcePin.h">
 			</File>
 			<File
 				RelativePath=".\oggdllstuff.h">



More information about the commits mailing list