[xiph-commits] r8495 - in trunk/oggdsf/src/lib: codecs/cmml/dsfCMMLRawSource core/directshow/dsfAnxDemux core/directshow/dsfAnxMux core/ogg/libOOOgg

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Sun Dec 19 13:05:49 PST 2004


Author: illiminable
Date: 2004-12-19 13:05:49 -0800 (Sun, 19 Dec 2004)
New Revision: 8495

Modified:
   trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLRawSource/CMMLRawSourcePin.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp
Log:
* More anx mux fixes... 

Modified: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLRawSource/CMMLRawSourcePin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLRawSource/CMMLRawSourcePin.cpp	2004-12-19 15:39:01 UTC (rev 8494)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLRawSource/CMMLRawSourcePin.cpp	2004-12-19 21:05:49 UTC (rev 8495)
@@ -170,6 +170,9 @@
 		
 
 	}
+
+	debugLog<<"Tag time = "<<locStart<<" - "<<locStop<<endl;
+	debugLog<<locNarrowStr<<endl<<endl;
 	locSample->SetActualDataLength(locNarrowStr.size());
 	locSample->SetTime(&locStart, &locStop);
 	locSample->SetMediaTime(NULL, NULL);

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.cpp	2004-12-19 15:39:01 UTC (rev 8494)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.cpp	2004-12-19 21:05:49 UTC (rev 8495)
@@ -74,7 +74,7 @@
 	mCodecHeaders->mCodecType = StreamHeaders::CMML;
 	mAnxDataPacket = inOggPacket->clone();
 	//mCodecHeaders->addPacket((StampedOggPacket*)inOggPacket->clone());
-	mNumHeadersNeeded = 0;		//TODO::: This should be 1 ???
+	mNumHeadersNeeded = 1;		//TODO::: This should be 1 ???
 	return true;
 }
 

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp	2004-12-19 15:39:01 UTC (rev 8494)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp	2004-12-19 21:05:49 UTC (rev 8495)
@@ -148,7 +148,7 @@
 			sCMMLFormatBlock* locCMML = (sCMMLFormatBlock*)inMediaType->pbFormat;
 			mMuxStream->setConversionParams(locCMML->granuleNumerator, locCMML->granuleDenominator, 10000000);
 			mPaginator.setNumHeaders(1);
-			mPaginator.setNumHeaders(1);
+			mMuxStream->setNumHeaders(1);
 
 
 			locWasOK = true;

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp	2004-12-19 15:39:01 UTC (rev 8494)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp	2004-12-19 21:05:49 UTC (rev 8495)
@@ -170,6 +170,20 @@
 	return mIsEOS;
 }
 
+//a) All inactive streams are processable.
+//b) All EOS empty streams are processable.
+
+//Empty				EOS				Active		Processable
+//=========================================================
+// T				T				T				T	-b
+// T				T				F				T	-a
+// T				F				T				F 
+// T				F				F				T	-a
+// F				T				T				T	-b
+// F				T				F				T	-a
+// F				F				T				T 
+// F				F				F				T	-a
+
 bool OggMuxStream::isProcessable() {
 	if (isEmpty() &&  !isEOS() && isActive()) {
 		return false;

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp	2004-12-19 15:39:01 UTC (rev 8494)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp	2004-12-19 21:05:49 UTC (rev 8495)
@@ -145,17 +145,21 @@
 					//In english this means... any bos pages go first... then any no gran pos pages (-1 gran pos).. 
 					// then any remaining streams with headers then whoevers got the lowest time.
 					if (
+						//Precedence goes to BOS pages.
 						(	(mInputStreams[i]->peekFront() != NULL) && 
 							(mInputStreams[i]->peekFront()->header()->isBOS()) ) ||
 						
 						(	(mInputStreams[i]->peekFront() != NULL) && 
 							((mInputStreams[i]->peekFront()->header()->GranulePos()) == -1) ) ||
 							
-						//Only choose a stream which hasn't sent all it's headers if the best one so far isn't a BOS
+						//If the tested page hasn't sent all it's headers and the current one either
+						// a) Has already sent all it's pages OR
+						// b) Has sent more than the test page
 						(	(mInputStreams[i]->peekFront() != NULL) && 
 							(!mInputStreams[i]->sentAllHeaders()) &&
 							//(!locLowestStream->peekFront()->header()->isBOS()) ) ||
-							(mInputStreams[i]->packetsSent() < locLowestStream->packetsSent()) ) ||
+							((locLowestStream->sentAllHeaders()) ||
+							(mInputStreams[i]->packetsSent() < locLowestStream->packetsSent())) ) ||
 						
 						(
 							(locTestLowTime < locCurrLowTime))
@@ -174,7 +178,7 @@
 
 						if	((mInputStreams[i]->peekFront() != NULL) && 
 							(!mInputStreams[i]->sentAllHeaders()) &&
-							(!locLowestStream->peekFront()->header()->isBOS()) ) {
+							(mInputStreams[i]->packetsSent() < locLowestStream->packetsSent()) ) {
 
 									debugLog<<"WriteLowest : Selecting because hasn't sent all headers"<<endl;
 						}

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp	2004-12-19 15:39:01 UTC (rev 8494)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp	2004-12-19 21:05:49 UTC (rev 8495)
@@ -350,7 +350,7 @@
 	//mPending page has data is useless, it was set before this function is called... need to fix that. maybe move into add part of pack into apge
 	if ((!mPendingPageHasData) && (inStartAt != 0)) {
 		debugLog<<"addAsMuchPacketAsPossible : Setting continuation flag"<<endl;
-		mPendingPage->header()->setHeaderFlags(mPendingPage->header()->HeaderFlags() | OggPageHeader::CONTINUATION);	
+		mPendingPage->header()->setHeaderFlags(mPendingPage->header()->HeaderFlags() | (unsigned char)OggPageHeader::CONTINUATION);	
 		
 	}
 

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp	2004-12-19 15:39:01 UTC (rev 8494)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp	2004-12-19 21:05:49 UTC (rev 8495)
@@ -120,5 +120,5 @@
 void StampedOggPacket::setTimeStamp(LOOG_INT64 inStartTime, LOOG_INT64 inEndTime, StampedOggPacket::eStampType inStampType) {
 	mStartTime = inStartTime;
 	mEndTime = inEndTime;
-	mStampType = inStampType;
+	mStampType = (unsigned short)inStampType;
 }



More information about the commits mailing list