[xiph-commits] r9107 - in trunk/oggdsf/src: lib/codecs/cmml/dsfCMMLRawSource lib/codecs/cmml/libCMMLTags lib/codecs/theora/filters/dsfTheoraEncoder lib/core/directshow/dsfOggMux lib/helper/libOOOggChef tools/CMMLDump

ozone at motherfish-iii.xiph.org ozone at motherfish-iii.xiph.org
Sun Apr 3 07:12:28 PDT 2005


Author: ozone
Date: 2005-04-03 07:12:19 -0700 (Sun, 03 Apr 2005)
New Revision: 9107

Modified:
   trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLRawSource/CMMLRawSourcePin.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLTag.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h
   trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp
   trunk/oggdsf/src/lib/helper/libOOOggChef/CMMLRecomposer.cpp
   trunk/oggdsf/src/tools/CMMLDump/CMMLDump.cpp
   trunk/oggdsf/src/tools/CMMLDump/CMMLDump.vcproj
Log:
oggcodecs:
 * Oops, revert bad changes in changeset:9106, which had alot of local unwanted changes
 

Modified: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLRawSource/CMMLRawSourcePin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLRawSource/CMMLRawSourcePin.cpp	2005-04-03 13:58:44 UTC (rev 9106)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLRawSource/CMMLRawSourcePin.cpp	2005-04-03 14:12:19 UTC (rev 9107)
@@ -1,8 +1,6 @@
 #include "stdafx.h"
 #include ".\cmmlrawsourcepin.h"
 
-#define OGGCODECS_LOGGING
-
 CMMLRawSourcePin::CMMLRawSourcePin(CMMLRawSourceFilter* inParentFilter, CCritSec* inFilterLock)
 	:	CBaseOutputPin(NAME("CMML Raw Source Pin"), inParentFilter, inFilterLock, &mFilterHR, L"CMML Source")
 	,	mDataQueue(NULL)
@@ -85,9 +83,6 @@
 	//NOTE::: May have missed some fields ????
 	//NOTE::: May want to check for null pointers
 	//outMediaType->SetFormat(mMediaType->Format(), mMediaType->FormatLength());
-
-	debugLog << "CMMLRawSourcePin::GetMediaType called" << endl;
-	
 	if (inPosition == 0) {
 		CMediaType locMediaType;
 
@@ -108,10 +103,8 @@
 }
 HRESULT CMMLRawSourcePin::CheckMediaType(const CMediaType* inMediaType) {
 	if ((inMediaType->majortype == MEDIATYPE_Text) && (inMediaType->subtype == MEDIASUBTYPE_CMML) && (inMediaType->formattype == FORMAT_CMML)) {
-		debugLog << "CheckMediaType returned S_OK" << endl;
 		return S_OK;
 	} else {
-		debugLog << "CheckMediaType returned E_FAIL" << endl;
 		return E_FAIL;
 	}
 }
@@ -165,7 +158,6 @@
 
 	wstring locStr = inTag->toString();
 
-	debugLog << "ANX_VERSION_MAJOR == " << ANX_VERSION_MAJOR << ", " << ANX_VERSION_MINOR << endl;
 	
 	//TODO::: For now, this narrowfies the string... to ascii, instead of sending
 	// 2 byte chars.
@@ -182,9 +174,6 @@
 		if ((ANX_VERSION_MAJOR == 2) && (ANX_VERSION_MINOR == 0)) {
 			locStart = locStartStamp.toHunNanos() / 10000;
 		} else if ((ANX_VERSION_MAJOR == 3) && (ANX_VERSION_MINOR == 0)) {
-#ifdef OGGCODECS_LOGGING
-			debugLog << "mLastTime pre-locStart: " << mLastTime << endl;
-#endif
 			locStart = (mLastTime << 32) + ((locStartStamp.toHunNanos() - mLastTime) / 10000);
 			
 		} else {
@@ -200,9 +189,6 @@
 		if ((ANX_VERSION_MAJOR == 2) && (ANX_VERSION_MINOR == 0)) {
 			locStop = locEndStamp.toHunNanos() / 10000;
 		} else if ((ANX_VERSION_MAJOR == 3) && (ANX_VERSION_MINOR == 0)) {
-#ifdef OGGCODECS_LOGGING
-			debugLog << "mLastTime pre-locStop: " << mLastTime << endl;
-#endif
 			locStop = (mLastTime << 32) + ((locEndStamp.toHunNanos() - mLastTime) / 10000);
 		} else {
 			//If you are here you set the constants in the header file wrong
@@ -210,9 +196,6 @@
 		}
 
 		mLastTime = locStartStamp.toHunNanos() / 10000;
-#ifdef OGGCODECS_LOGGING
-		debugLog << "mLastTime after setup: " << mLastTime << endl;
-#endif
 		//locStop = StringHelper::stringToNum(StringHelper::toNarrowStr(locClip->start())) * 1000ULL;
 		
 

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLTag.cpp	2005-04-03 13:58:44 UTC (rev 9106)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTags/C_CMMLTag.cpp	2005-04-03 14:12:19 UTC (rev 9107)
@@ -93,13 +93,11 @@
 {
 	wstring retStr = inString;
 	//Do the ampersand first !!
-#if 0
 	retStr = replaceAll(retStr, L'&', L"&amp;");
 	retStr = replaceAll(retStr, L'<', L"&lt;");
 	retStr = replaceAll(retStr, L'>', L"&gt;");
 	retStr = replaceAll(retStr, L'"', L"&quot;");
 	retStr = replaceAll(retStr, L'\'', L"&apos;");
-#endif
 
 	return retStr;
 

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp	2005-04-03 13:58:44 UTC (rev 9106)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp	2005-04-03 14:12:19 UTC (rev 9107)
@@ -1345,7 +1345,7 @@
 	mTheoraInfo.aspect_denominator=0;
 	
 	mTheoraInfo.colorspace=OC_CS_UNSPECIFIED;		//YV12
-	mTheoraInfo.target_bitrate=200000; //mVideoFormat->dwBitRate;
+	mTheoraInfo.target_bitrate=400000; //mVideoFormat->dwBitRate;
 
 	//Hard code for now
 	mTheoraInfo.quality=30; //video_q;

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp	2005-04-03 13:58:44 UTC (rev 9106)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp	2005-04-03 14:12:19 UTC (rev 9107)
@@ -31,8 +31,6 @@
 #include "stdafx.h"
 #include "oggmuxinputpin.h"
 
-#define OGGCODECS_LOGGING
-
 OggMuxInputPin::OggMuxInputPin(OggMuxFilter* inParentFilter, CCritSec* inFilterLock, HRESULT* inHR, OggMuxStream* inMuxStream)
 	:	CBaseInputPin(NAME("OggMuxInputPin"), inParentFilter, inFilterLock, inHR, L"Ogg Packet In")
 	,	mParentFilter(inParentFilter)
@@ -60,12 +58,6 @@
 	//debugLog.open(x.c_str(), ios_base::out);
 	//locSettings->mSerialNo = 13130;
 	
-#ifdef OGGCODECS_LOGGING
-	debugLog.open("G:\\logs\\oggmuxinputpin.log", ios_base::out);
-#endif
-
-	debugLog << "OggMuxInputPin constructed" << endl;
-
 	mPaginator.setParameters(locSettings);
 	mPaginator.setPageCallback(mMuxStream);
 
@@ -74,7 +66,7 @@
 
 OggMuxInputPin::~OggMuxInputPin(void)
 {
-	debugLog.close();
+	//debugLog.close();
 }
 
 STDMETHODIMP OggMuxInputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
@@ -92,9 +84,6 @@
 HRESULT OggMuxInputPin::SetMediaType(const CMediaType* inMediaType) {
 	//debugLog.open("G:\\logs\\oggmuxinpin.log", ios_base::out);
 	//debugLog<<"Set media type..."<<endl;
-	
-	debugLog << "OggMuxInputPin::SetMediaType called" << endl;
-
 	if ((inMediaType->majortype == MEDIATYPE_Video) && (inMediaType->subtype == MEDIASUBTYPE_Theora)) {
 		//Theora
 		
@@ -138,7 +127,6 @@
 		
 	} else if (inMediaType->majortype == MEDIATYPE_Text) {
 		if (inMediaType->subtype == MEDIASUBTYPE_CMML) {
-			debugLog << "OggMuxInputPin::SetMediaType got to CMML" << endl;
 			sCMMLFormatBlock* locCMML = (sCMMLFormatBlock*)inMediaType->pbFormat;
 			mMuxStream->setConversionParams(locCMML->granuleNumerator,locCMML->granuleDenominator, 10000000);
 			mMuxStream->setNumHeaders(1);

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h	2005-04-03 13:58:44 UTC (rev 9106)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h	2005-04-03 14:12:19 UTC (rev 9107)
@@ -86,5 +86,5 @@
 	
 	OggPaginator mPaginator;
 	OggMuxStream* mMuxStream;
-	fstream debugLog;
+	//fstream debugLog;
 };

Modified: trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp	2005-04-03 13:58:44 UTC (rev 9106)
+++ trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp	2005-04-03 14:12:19 UTC (rev 9107)
@@ -35,7 +35,6 @@
 #include "stdafx.h"
 
 #include <libOOOggChef/AnnodexRecomposer.h>
-#include <libOOOggChef/CMMLRecomposer.h>
 #include <libOOOggChef/utils.h>
 
 #include <libOOOgg/libOOOgg.h>
@@ -51,7 +50,7 @@
 using namespace std;
 
 
-#define DEBUG
+#undef DEBUG
 
 /** You may optionally ask
 	AnnodexRecomposer to use a cached representation of the seek table (which is
@@ -97,20 +96,6 @@
 
 	static const size_t BUFF_SIZE = 8192;
 
-	// Optimisation: If the client only wants CMML, and a file with .cmml
-	// exists, recompose from that instead of the original .anx file, which
-	// will be orders of magnitudes faster!
-	string locCMMLFilename = mFilename + ".cmml";
-	if (wantOnlyCMML(mWantedMIMETypes) && fileExists(locCMMLFilename)) {
-#ifdef DEBUG
-		mDebugFile << "Client wants CMML: " + locCMMLFilename + " exists" << endl;
-#endif
-		CMMLRecomposer *locCMMLRecomposer = new CMMLRecomposer(locCMMLFilename,
-			mBufferWriter, mBufferWriterUserData);
-		return locCMMLRecomposer->recomposeStreamFrom(inStartingTimeOffset,
-			inWantedMIMETypes);
-	}
-
 	// Turn the starting time offset into DirectSeconds
 	mRequestedStartTime = (LOOG_UINT64) inStartingTimeOffset * 10000000;
 

Modified: trunk/oggdsf/src/lib/helper/libOOOggChef/CMMLRecomposer.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libOOOggChef/CMMLRecomposer.cpp	2005-04-03 13:58:44 UTC (rev 9106)
+++ trunk/oggdsf/src/lib/helper/libOOOggChef/CMMLRecomposer.cpp	2005-04-03 14:12:19 UTC (rev 9107)
@@ -52,7 +52,7 @@
 
 using namespace std;
 
-#define DEBUG
+#undef DEBUG
 
 CMMLRecomposer::CMMLRecomposer(string inFilename, BufferWriter inBufferWriter, void* inBufferWriterUserData)
 	:	mCMMLFilename(inFilename)

Modified: trunk/oggdsf/src/tools/CMMLDump/CMMLDump.cpp
===================================================================
--- trunk/oggdsf/src/tools/CMMLDump/CMMLDump.cpp	2005-04-03 13:58:44 UTC (rev 9106)
+++ trunk/oggdsf/src/tools/CMMLDump/CMMLDump.cpp	2005-04-03 14:12:19 UTC (rev 9107)
@@ -120,7 +120,7 @@
 
 					// Get the packet's time in seconds
 					LOOG_INT64 locPacketGranulePos = inOggPage->header()->GranulePos();
-					float locPacketStartTimeInSeconds = (float) locPacketGranulePos / (float) 1000;
+					float locPacketStartTimeInSeconds = (float) locPacketGranulePos/ (float) 1000;
 
 					// Let's make the CMML parsing library decide whether it's a <head>
 					// or <clip> tag -- after all, that's what it's there for :)
@@ -157,6 +157,9 @@
 						wcout << locPacketDataWString << endl;
 					}
 
+					if (locDidParseClip) {
+						cout << locPacketStartTimeInSeconds << " seconds:" << endl;
+					}
 					wcout << locCMMLTag->toString() << endl;
 
 					delete locCMMLTag;
@@ -195,10 +198,6 @@
 
 	fstream locInputFile;
 
-	// Output XML preabmel
-	cout << "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" << endl;
-	cout << "<!DOCTYPE cmml SYSTEM \"cmml.dtd\">" << endl;
-
 	// Let's go!
 
 	const unsigned short BUFF_SIZE = 8092;

Modified: trunk/oggdsf/src/tools/CMMLDump/CMMLDump.vcproj
===================================================================
--- trunk/oggdsf/src/tools/CMMLDump/CMMLDump.vcproj	2005-04-03 13:58:44 UTC (rev 9106)
+++ trunk/oggdsf/src/tools/CMMLDump/CMMLDump.vcproj	2005-04-03 14:12:19 UTC (rev 9107)
@@ -70,7 +70,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalIncludeDirectories="..\..\lib\core\ogg;.;..\..\lib\helper;..\..\lib\codecs\cmml"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
+				RuntimeLibrary="0"
 				UsePrecompiledHeader="3"
 				WarningLevel="4"
 				Detect64BitPortabilityProblems="TRUE"



More information about the commits mailing list