[xiph-commits] r9109 - trunk/oggdsf/src/lib/helper/libOOOggChef
ozone at motherfish-iii.xiph.org
ozone at motherfish-iii.xiph.org
Sun Apr 3 07:18:23 PDT 2005
Author: ozone
Date: 2005-04-03 07:18:21 -0700 (Sun, 03 Apr 2005)
New Revision: 9109
Modified:
trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp
Log:
oggcodecs:
* For libOOOggChef, if the client wants only CMML, recompose from a .cmml file in the same directory if it exists (since it will be orders of magnitude quicker)
Modified: trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp 2005-04-03 14:14:01 UTC (rev 9108)
+++ trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp 2005-04-03 14:18:21 UTC (rev 9109)
@@ -35,6 +35,7 @@
#include "stdafx.h"
#include <libOOOggChef/AnnodexRecomposer.h>
+#include <libOOOggChef/CMMLRecomposer.h>
#include <libOOOggChef/utils.h>
#include <libOOOgg/libOOOgg.h>
@@ -96,6 +97,20 @@
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;
More information about the commits
mailing list