[xiph-commits] r8287 - in trunk/oggdsf: docs sln/oggdsf_all src/lib/core/directshow/dsfAnxDemux src/lib/core/directshow/dsfOggDemux src/lib/core/directshow/dsfOggMux src/lib/core/ogg/libOOOggSeek

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Fri Nov 26 01:19:30 PST 2004


Author: illiminable
Date: 2004-11-26 01:19:29 -0800 (Fri, 26 Nov 2004)
New Revision: 8287

Modified:
   trunk/oggdsf/docs/refactor.txt
   trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
   trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.h
   trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/dsfAnxDemux.vcproj
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FFDShowVideoStream.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FFDShowVideoStream.h
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.h
   trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h
   trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
Log:
* Enabled seeking in OGM videos... still a bit flaky.

Modified: trunk/oggdsf/docs/refactor.txt
===================================================================
--- trunk/oggdsf/docs/refactor.txt	2004-11-25 13:13:03 UTC (rev 8286)
+++ trunk/oggdsf/docs/refactor.txt	2004-11-26 09:19:29 UTC (rev 8287)
@@ -47,6 +47,10 @@
 
 Check initialisation lists.
 
+Crashing problems with video encoder.
+
+Account for drop frame sample rates in the seek table (29.97)
+
 DONE::::
 
 Fix the leaks caused by the accept media types.

Modified: trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2004-11-25 13:13:03 UTC (rev 8286)
+++ trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2004-11-26 09:19:29 UTC (rev 8287)
@@ -944,10 +944,10 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfAnxDemux", "..\..\src\lib\core\directshow\dsfAnxDemux\dsfAnxDemux.vcproj", "{F9F22B14-22FE-4651-81B8-5AE267A6B189}"
 	ProjectSection(ProjectDependencies) = postProject
 		{223ACC19-608E-4E1B-A054-067F0CACB272} = {223ACC19-608E-4E1B-A054-067F0CACB272}
-		{A882A968-3013-4A27-B653-E18CF5C791FE} = {A882A968-3013-4A27-B653-E18CF5C791FE}
 		{4CBC0173-27E6-4218-AE06-5EFDCA7B2547} = {4CBC0173-27E6-4218-AE06-5EFDCA7B2547}
 		{AE32588D-2807-4796-9E68-C9104817BC1A} = {AE32588D-2807-4796-9E68-C9104817BC1A}
 		{9A14F6AC-BC6E-401A-A300-07369BD6C5FE} = {9A14F6AC-BC6E-401A-A300-07369BD6C5FE}
+		{EA7091BB-9906-41DF-9738-F4858A136086} = {EA7091BB-9906-41DF-9738-F4858A136086}
 		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
 	EndProjectSection
 EndProject

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.h	2004-11-25 13:13:03 UTC (rev 8286)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.h	2004-11-26 09:19:29 UTC (rev 8287)
@@ -68,6 +68,7 @@
 
 	virtual bool isReady();
 	virtual bool toStartOfData();
+
 protected:
 	//Helper Methods
 	bool isAnnodexEOS(OggPage* inOggPage);
@@ -76,6 +77,7 @@
 	unsigned long getAnxVersion(OggPage* inOggPage);
 	bool handleAnxVersion_2_0(OggPage* inOggPage);
 	bool handleAnxVersion_3_0(OggPage* inOggPage);
+
 	//Member Data
 	vector<unsigned long> mSeenStreams;
 	bool mSeenAnnodexBOS;

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/dsfAnxDemux.vcproj
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/dsfAnxDemux.vcproj	2004-11-25 13:13:03 UTC (rev 8286)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/dsfAnxDemux.vcproj	2004-11-26 09:19:29 UTC (rev 8287)
@@ -19,7 +19,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\ogg\libOOOgg;..\..\ogg\libOOOggSeek;..\dsfSeeking;..\dsfOggDemux;..\..\..\helper\libilliCore"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\ogg\libOOOgg;..\..\ogg\libOOOggSeek;..\libDirectshowAbstracts;..\dsfOggDemux;..\..\..\helper\libilliCore"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFANXDEMUX_EXPORTS"
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
@@ -80,7 +80,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\ogg\libOOOgg;..\..\ogg\libOOOggSeek;..\dsfSeeking;..\dsfOggDemux;..\..\..\helper\libilliCore"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\ogg\libOOOgg;..\..\ogg\libOOOggSeek;..\libDirectshowAbstracts;..\dsfOggDemux;..\..\..\helper\libilliCore"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFANXDEMUX_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -143,7 +143,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\ogg\libOOOgg;..\..\ogg\libOOOggSeek;..\dsfSeeking;..\dsfOggDemux;..\..\..\helper\libilliCore"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\ogg\libOOOgg;..\..\ogg\libOOOggSeek;..\libDirectshowAbstracts;..\dsfOggDemux;..\..\..\helper\libilliCore"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFANXDEMUX_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -207,7 +207,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\ogg\libOOOgg;..\..\ogg\libOOOggSeek;..\dsfSeeking;..\dsfOggDemux;..\..\..\helper\libilliCore"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\ogg\libOOOgg;..\..\ogg\libOOOggSeek;..\libDirectshowAbstracts;..\dsfOggDemux;..\..\..\helper\libilliCore"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFANXDEMUX_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FFDShowVideoStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FFDShowVideoStream.cpp	2004-11-25 13:13:03 UTC (rev 8286)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FFDShowVideoStream.cpp	2004-11-26 09:19:29 UTC (rev 8287)
@@ -42,12 +42,12 @@
 	,	mGranuleOffset(0)
 {
 	InitCodec(inBOSPage->getStampedPacket(0));
-	//debugLog.open("g:\\downloads\\ffd_dump.out", ios_base::out|ios_base::binary);
+	debugLog.open("g:\\logs\\ffd_dump.out", ios_base::out);
 }
 
 FFDShowVideoStream::~FFDShowVideoStream(void)
 {
-	//debugLog.close();
+	debugLog.close();
 	delete mFFDShowVideoFormatBlock;
 }
 
@@ -81,6 +81,8 @@
 
 bool FFDShowVideoStream::deliverCodecHeaders() {
 	StampedOggPacket* locPacket = NULL;
+
+	//TODO::: Why 2 ?
 	for (unsigned long i = 2; i < mCodecHeaders->numPackets(); i++) {
 		locPacket = mCodecHeaders->getPacket(i);
 
@@ -146,10 +148,15 @@
 	
 	__int64 locSamplesPerBlock = iLE_Math::CharArrToInt64(mHeaderPack->packetData() + 25);
 
+	debugLog<<"t/block = "<<locTimePerBlock<<"        Sam/block = "<<locSamplesPerBlock<<endl;
 
 	mFFDShowVideoFormatBlock->AvgTimePerFrame = locTimePerBlock / locSamplesPerBlock;
 
+	debugLog<<"Time per frame = "<<mFFDShowVideoFormatBlock->AvgTimePerFrame<<endl;
+
 	__int64 locFPSec = (UNITS / locTimePerBlock) * locSamplesPerBlock;
+
+	debugLog<<"Rate = "<<locFPSec<<" fps"<<endl;
 	unsigned short locBPSample = ((unsigned char)(mHeaderPack->packetData()[41])) + (((unsigned short)(mHeaderPack->packetData()[42])) * 256);
 
 	
@@ -194,11 +201,15 @@
 	
 	
 
+	debugLog<<"Packet stamps = "<<inPacket->startTime() << " - "<<inPacket->endTime()<<endl;
 
+	debugLog<<"m_tStart = "<<mSourcePin->CurrentStartTime()<<endl;
+	LONGLONG locStart = mLastTimeStamp - mSourcePin->CurrentStartTime();
+	LONGLONG locEnd = (mGranuleOffset) * mFFDShowVideoFormatBlock->AvgTimePerFrame - mSourcePin->CurrentStartTime();
+	mGranuleOffset++;
 
-	LONGLONG locStart = mLastTimeStamp;
-	LONGLONG locEnd = (mGranuleOffset) * mFFDShowVideoFormatBlock->AvgTimePerFrame;
-	mGranuleOffset++;
+	debugLog<<"Time Stamps = "<<locStart<<" - "<<locEnd<<endl;
+	debugLog<<"Granule offset " << mGranuleOffset<<endl;
 	
 	mLastTimeStamp = (locEnd >= mLastTimeStamp)		?	locEnd
 													:	mLastTimeStamp;

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FFDShowVideoStream.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FFDShowVideoStream.h	2004-11-25 13:13:03 UTC (rev 8286)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FFDShowVideoStream.h	2004-11-26 09:19:29 UTC (rev 8287)
@@ -31,6 +31,9 @@
 #pragma once
 #include "oggstream.h"
 
+#include <fstream>
+using namespace std;
+
 class FFDShowVideoStream 
 	:	public OggStream
 {
@@ -65,5 +68,5 @@
 	//LONGLONG mLastGranulePos;
 	LONGLONG mGranuleOffset;
 
-	//fstream debugLog;
+	fstream debugLog;
 };

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp	2004-11-25 13:13:03 UTC (rev 8286)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.cpp	2004-11-26 09:19:29 UTC (rev 8287)
@@ -149,6 +149,8 @@
 }
 HRESULT OggDemuxSourcePin::DeliverNewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
 {
+	NewSegment(tStart, tStop, dRate);
+
 	mPartialPacket = NULL;
 	mDataQueue->NewSegment(tStart, tStop, dRate);
 

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.h	2004-11-25 13:13:03 UTC (rev 8286)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourcePin.h	2004-11-26 09:19:29 UTC (rev 8287)
@@ -92,9 +92,4 @@
 	COutputQueue* mDataQueue;
 	//fstream debugLog;
 	bool mFirstRun;
-
-
-
-
-
 };

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h	2004-11-25 13:13:03 UTC (rev 8286)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h	2004-11-26 09:19:29 UTC (rev 8287)
@@ -72,7 +72,7 @@
 	virtual STDMETHODIMP EndOfStream(void);
 	virtual HRESULT CompleteConnect(IPin* inReceivePin);
 
-
+	
 	//virtual HRESULT DeliverEndFlush(void);
 	//virtual HRESULT DeliverBeginFlush(void);
 

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp	2004-11-25 13:13:03 UTC (rev 8286)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp	2004-11-26 09:19:29 UTC (rev 8287)
@@ -154,8 +154,16 @@
 				}
 			}
 			
-		
+		} else if ((strncmp((char*)inOggPage->getPacket(0)->packetData(), "\001video\000\000\000", 9)) == 0) {
+			//FFDSHOW
+			__int64 locTimePerBlock = iLE_Math::CharArrToInt64(inOggPage->getPacket(0)->packetData() + 17);
+			__int64 locSamplesPerBlock = iLE_Math::CharArrToInt64(inOggPage->getPacket(0)->packetData() + 25);
 
+			mSampleRate = (10000000 / locTimePerBlock) * locSamplesPerBlock;
+			mFoundStreamInfo = true;
+			mSerialNoToTrack = inOggPage->header()->StreamSerialNo();
+			mNumHeaders = 1;
+
 		} else {
 			mFoundStreamInfo = true;		//Why do this ?
 			mEnabled = false;



More information about the commits mailing list