[xiph-commits] r6937 - in trunk/oggdsf/src/lib:

illiminable at dactyl.lonelymoon.com illiminable
Wed Jun 30 14:15:19 PDT 2004


codecs/theora/filters/dsfTheoraEncoder
codecs/vorbis/filters/dsfVorbisEncoder
core/directshow/dsfAbstractAudioDecoder
core/directshow/dsfAbstractAudioEncoder
core/directshow/dsfAbstractVideoDecoder
core/directshow/dsfAbstractVideoEncoder
core/directshow/dsfOggMux core/ogg/libOOOgg
Message-ID: <20040630211519.3EE149AAAD at dactyl.lonelymoon.com>

Author: illiminable
Date: Wed Jun 30 14:15:19 2004
New Revision: 6937

Modified:
trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.h
trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp
trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.h
trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeOutputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeOutputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.h
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.h
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
Log:
* Change a lot fo the mux code to use absolute times.
* Encoders only partially advertise parameters... this would prevent you connecting a theora encoder to a theora decoder... but you probably wouldn't want to do that anyway.
* Encoder works now, video shape looks a bit borked, stretched vertically
* Fixed muxer to properly handle -1 pages
* Fixed paginator to properly mark -1 pages with 1 flag on header.
* Encoding high quality files has exposed some problems in the decoder.

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.h	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.h	2004-06-30 21:15:17 UTC (rev 6937)
@@ -43,7 +43,7 @@
:	public AbstractVideoEncodeFilter
{
public:
-
+	friend class TheoraEncodeInputPin;
friend class TheoraEncodeOutputPin;
TheoraEncodeFilter(void);
virtual ~TheoraEncodeFilter(void);

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp	2004-06-30 21:15:17 UTC (rev 6937)
@@ -260,13 +260,16 @@
mTheoraInfo.dropframes_p=0;
mTheoraInfo.quick_p=1;
mTheoraInfo.keyframe_auto_p=1;
-	mTheoraInfo.keyframe_frequency=64;
-	mTheoraInfo.keyframe_frequency_force=64;
+	mTheoraInfo.keyframe_frequency=64;   //If you change this... change the logged value below
+	mTheoraInfo.keyframe_frequency_force=64;  //ditto
mTheoraInfo.keyframe_data_target_bitrate=mTheoraInfo.target_bitrate*1.5;
mTheoraInfo.keyframe_auto_threshold=80;
mTheoraInfo.keyframe_mindistance=8;
mTheoraInfo.noise_sensitivity=1;

+	((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.frameRateNumerator = locNum;
+	((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.frameRateDenominator = 1;
+	((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.maxKeyframeInterval = 6;   //log2(keyframe_freq) from above
return true;

}

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.h	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.h	2004-06-30 21:15:17 UTC (rev 6937)
@@ -43,7 +43,7 @@
:	public AbstractAudioEncodeFilter
{
public:
-
+	friend class VorbisEncodeInputPin;
friend class VorbisEncodeOutputPin;
VorbisEncodeFilter(void);
virtual ~VorbisEncodeFilter(void);

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeInputPin.cpp	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeInputPin.cpp	2004-06-30 21:15:17 UTC (rev 6937)
@@ -84,11 +84,15 @@
mFishInfo.channels = mWaveFormat->nChannels;
mFishInfo.format = FISH_SOUND_VORBIS;
mFishInfo.samplerate = mWaveFormat->nSamplesPerSec;
-
-
+
mFishInfo.format = FISH_SOUND_VORBIS;
mFishSound = fish_sound_new (FISH_SOUND_ENCODE, &mFishInfo);

+	//Change to fill in vorbis format block so muxer can work
+	((VorbisEncodeFilter*)mParentFilter)->mVorbisFormatBlock.numChannels = mWaveFormat->nChannels;
+	((VorbisEncodeFilter*)mParentFilter)->mVorbisFormatBlock.samplesPerSec = mWaveFormat->nSamplesPerSec;
+	//
+
int i = 1;
//FIX::: Use new API for interleave setting
fish_sound_command(mFishSound, FISH_SOUND_SET_INTERLEAVE, &i, sizeof(int));

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeOutputPin.cpp	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeOutputPin.cpp	2004-06-30 21:15:17 UTC (rev 6937)
@@ -66,8 +66,8 @@

const unsigned long MIN_BUFFER_SIZE = 1096;
const unsigned long DEFAULT_BUFFER_SIZE = 32192;
-	const unsigned long MIN_NUM_BUFFERS = 3;
-	const unsigned long DEFAULT_NUM_BUFFERS = 5;
+	const unsigned long MIN_NUM_BUFFERS = 10;
+	const unsigned long DEFAULT_NUM_BUFFERS = 20;




Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp	2004-06-30 21:15:17 UTC (rev 6937)
@@ -121,12 +121,19 @@
return E_INVALIDARG;
}

+	BYTE* locFormatBuffer = NULL;
switch (inPosition) {
case 0:

outMediaType->SetType(&MEDIATYPE_Audio);
outMediaType->SetSubtype(&(mOutputMediaType->subtype));
outMediaType->SetFormatType(&(mOutputMediaType->formattype));
+			//
+			locFormatBuffer = new BYTE[FormatBufferSize()];
+			FillFormatBuffer(locFormatBuffer);
+			outMediaType->SetFormat(locFormatBuffer, FormatBufferSize());
+			delete locFormatBuffer;
+			//
return S_OK;
default:
return VFW_S_NO_MORE_ITEMS;

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeInputPin.cpp	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeInputPin.cpp	2004-06-30 21:15:17 UTC (rev 6937)
@@ -115,10 +115,11 @@
inSample->GetTime(&locStart, &locEnd);
//Error chacks needed here

-		if (mLastSeenStartGranPos != locStart) {
+		if ((mLastSeenStartGranPos != locStart) && (locStart != -1)) {
ResetFrameCount();
+			mLastSeenStartGranPos = locStart;
}
-		mLastSeenStartGranPos = locStart;
+
//End of additions



Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.cpp	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.cpp	2004-06-30 21:15:17 UTC (rev 6937)
@@ -234,7 +234,7 @@
HRESULT locHR = S_OK;
//This may cause issue if pins are disconnected and reconnected
//DELETE in DEStructor
-	mDataQueue = new COutputQueue (inReceivePin, &locHR, FALSE, TRUE, 1, TRUE, 10);
+	mDataQueue = new COutputQueue (inReceivePin, &locHR, FALSE, TRUE, 1, TRUE, 25);
if (FAILED(locHR)) {
locHR = locHR;
}

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeOutputPin.cpp	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeOutputPin.cpp	2004-06-30 21:15:17 UTC (rev 6937)
@@ -114,16 +114,25 @@

HRESULT AbstractVideoEncodeOutputPin::GetMediaType(int inPosition, CMediaType *outMediaType) {

+
if (inPosition < 0) {
return E_INVALIDARG;
}

+	BYTE* locFormatBuffer = NULL;
switch (inPosition) {
case 0:

outMediaType->SetType(&MEDIATYPE_Video);
outMediaType->SetSubtype(&(mOutputMediaType->subtype));
outMediaType->SetFormatType(&(mOutputMediaType->formattype));
+			//FillFormatBuffer(outMediaType->pbformat);
+			//
+			locFormatBuffer = new BYTE[FormatBufferSize()];
+			FillFormatBuffer(locFormatBuffer);
+			outMediaType->SetFormat(locFormatBuffer, FormatBufferSize());
+			delete locFormatBuffer;
+			//
return S_OK;
default:
return VFW_S_NO_MORE_ITEMS;
@@ -165,7 +174,7 @@
{
HRESULT locHR = S_OK;
//DELETE in DEStructor
-	mDataQueue = new COutputQueue (inReceivePin, &locHR, FALSE, TRUE, 1, TRUE, 10);
+	mDataQueue = new COutputQueue (inReceivePin, &locHR, FALSE, TRUE, 1, TRUE, 25);
if (FAILED(locHR)) {
locHR = locHR;
}

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp	2004-06-30 21:15:17 UTC (rev 6937)
@@ -57,7 +57,27 @@
debugLog.close();
}

+HRESULT OggMuxInputPin::SetMediaType(const CMediaType* inMediaType) {
+	if ((inMediaType->majortype == MEDIATYPE_Video) && (inMediaType->subtype == MEDIASUBTYPE_Theora)) {
+		//Theora
+		sTheoraFormatBlock* locTheora = (sTheoraFormatBlock*)inMediaType->pbFormat;
+		mMuxStream->setConversionParams(locTheora->frameRateNumerator, locTheora->frameRateDenominator, 10000000, locTheora->maxKeyframeInterval);

+	} else if (inMediaType->majortype == MEDIATYPE_Audio) {
+		if (inMediaType->subtype == MEDIASUBTYPE_Vorbis) {
+			//Vorbis
+			sVorbisFormatBlock* locVorbis = (sVorbisFormatBlock*)inMediaType->pbFormat;
+			mMuxStream->setConversionParams(locVorbis->samplesPerSec, 1, 10000000);
+
+		} else if (inMediaType->subtype == MEDIASUBTYPE_Speex) {
+			//Speex
+			sSpeexFormatBlock* locSpeex = (sSpeexFormatBlock*)inMediaType->pbFormat;
+			mMuxStream->setConversionParams(locSpeex->samplesPerSec, 1, 10000000);
+		}
+	}
+	return S_OK;
+}
+
HRESULT OggMuxInputPin::GetMediaType(int inPosition, CMediaType* outMediaType) {
switch(inPosition) {
case 0:

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h	2004-06-30 21:15:17 UTC (rev 6937)
@@ -52,8 +52,10 @@
virtual HRESULT GetMediaType(int inPosition, CMediaType* outMediaType);
virtual HRESULT CheckMediaType(const CMediaType* inMediaType);
//virtual HRESULT DecideBufferSize(IMemAllocator* inoutAllocator, ALLOCATOR_PROPERTIES* inoutInputRequest);
+	virtual HRESULT SetMediaType(const CMediaType* inMediaType);


+
//IOggCallback
//virtual bool acceptOggPage(OggPage* inOggPage);


Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp	2004-06-30 21:15:17 UTC (rev 6937)
@@ -35,6 +35,11 @@
:	mIsEOS(false)
,	mIsActive(false)
,	mNotifier(inNotifier)
+	,	mIsSensibleTime(true)
+	,	mConvNumerator(1)
+	,	mConvDenominator(1)
+	,	mConvScaleFactor(1)
+	,	mConvTheoraLogKeyFrameInterval(0)
{
}

@@ -74,6 +79,51 @@
return retTime;
}

+__int64 OggMuxStream::scaledFrontTime() {
+
+	return convertTime(frontTime());
+}
+
+__int64 OggMuxStream::convertTime(__int64 inGranulePos) {
+	__int64 retTime = INT64_MAX;
+	if (inGranulePos != INT64_MAX) {
+		if (mIsSensibleTime) {
+			retTime = (inGranulePos * mConvScaleFactor * mConvDenominator) / mConvNumerator;
+		} else {
+			//Timestamp hacks start here...
+			unsigned long locMod = (unsigned long)pow(2, mConvTheoraLogKeyFrameInterval);
+
+			unsigned long locInterFrameNo = (inGranulePos) % locMod;
+
+			__int64 locAbsFramePos = (inGranulePos >> mConvTheoraLogKeyFrameInterval) + locInterFrameNo;
+
+			retTime = (locAbsFramePos * mConvScaleFactor * mConvDenominator) / mConvNumerator;
+
+
+		}
+	}
+	return retTime;
+
+
+}
+
+bool OggMuxStream::setConversionParams(__int64 inNumerator, __int64 inDenominator, __int64 inScaleFactor) {
+	mConvNumerator = inNumerator;
+	mConvDenominator = inDenominator;
+	mConvScaleFactor = inScaleFactor;
+	mIsSensibleTime = true;
+	return true;
+}
+
+bool OggMuxStream::setConversionParams(__int64 inNumerator, __int64 inDenominator, __int64 inScaleFactor, __int64 inTheoraLogKFI) {
+	mConvNumerator = inNumerator;
+	mConvDenominator = inDenominator;
+	mConvScaleFactor = inScaleFactor;
+	mConvTheoraLogKeyFrameInterval = inTheoraLogKFI;
+	mIsSensibleTime = false;
+	return true;
+}
+
bool OggMuxStream::isEmpty() {
return mPageQueue.empty();
}

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.h	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.h	2004-06-30 21:15:17 UTC (rev 6937)
@@ -33,6 +33,7 @@
#include "OggPage.h"
#include "IOggCallback.h"
#include "INotifyArrival.h"
+#include <math.h>
#include <deque>
using namespace std;
class LIBOOOGG_API OggMuxStream
@@ -47,16 +48,29 @@
virtual OggPage* popFront();
virtual OggPage* peekFront();
virtual __int64 frontTime();
+	virtual __int64 scaledFrontTime();
virtual bool isEmpty();
virtual bool isEOS();
virtual bool isProcessable();
virtual void setIsEOS(bool inIsEOS);
virtual bool isActive();
virtual void setIsActive(bool inIsActive);
+
+	virtual bool setConversionParams(__int64 inNumerator, __int64 inDenominator, __int64 inScaleFactor, __int64 inTheoraLogKFI);
+	bool setConversionParams(__int64 inNumerator, __int64 inDenominator, __int64 inScaleFactor);
+

protected:
+	__int64 convertTime(__int64 inGranulePos);
+
bool mIsEOS;
bool mIsActive;
+	bool mIsSensibleTime;
+
+	__int64 mConvNumerator;
+	__int64 mConvDenominator;
+	__int64 mConvScaleFactor;
+	__int64 mConvTheoraLogKeyFrameInterval;
deque<OggPage*> mPageQueue;
INotifyArrival* mNotifier;


Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp	2004-06-30 21:15:17 UTC (rev 6937)
@@ -35,11 +35,12 @@
:	mFileWriter(inFileWriter)
,	mNotifier(inNotifier)
{
-
+	debugLog.open("G:\\logs\\interleaver.log", ios_base::out);
}

OggPageInterleaver::~OggPageInterleaver(void)
{
+	debugLog.close();
}

OggMuxStream* OggPageInterleaver::newStream() {
@@ -100,14 +101,35 @@
if (!mInputStreams[i]->isEmpty() && mInputStreams[i]->isActive()) {
if (locLowestStream == NULL) {
locLowestStream = mInputStreams[i];
-				} else if ((mInputStreams[i]->frontTime() < locLowestStream->frontTime()) || (((mInputStreams[i]->peekFront() != NULL) && (mInputStreams[i]->peekFront()->header()->isBOS())))) {
-					locLowestStream = mInputStreams[i];
+					debugLog<<"writeLowest : Defaulting stream "<<i<<endl;
+				} else {
+					__int64 locCurrLowTime = locLowestStream->scaledFrontTime();
+					__int64 locTestLowTime = mInputStreams[i]->scaledFrontTime();
+					debugLog<<"writeLowest : Curr = "<<locCurrLowTime<<" -- Test["<<i<<"] = "<<locTestLowTime<<endl;
+					if (locTestLowTime == 3579139411666666) {
+						locTestLowTime = locTestLowTime;
+					}
+					//In english this means... any bos pages go first... then any no gran pos pages (-1 gran pos).. then
+					// whoevers got the lowest time.
+					if (
+						(	(mInputStreams[i]->peekFront() != NULL) &&
+							(mInputStreams[i]->peekFront()->header()->isBOS()) ) ||
+
+						(	(mInputStreams[i]->peekFront() != NULL) &&
+							((mInputStreams[i]->peekFront()->header()->GranulePos()->value()) == -1) ) ||
+						(locTestLowTime < locCurrLowTime)
+						)
+					{
+						debugLog<<"writeLowest : Selecting stream "<<i<<endl;
+						locLowestStream = mInputStreams[i];
+					}
}
}
}
if (locLowestStream == NULL) {
throw 0;
} else {
+			debugLog<<"writeLowest : Writing..."<<endl;
mFileWriter->acceptOggPage(locLowestStream->popFront());
}


Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.h	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.h	2004-06-30 21:15:17 UTC (rev 6937)
@@ -33,6 +33,9 @@
#include "INotifyComplete.h"
#include "OggMuxStream.h"
#include <vector>
+
+//DEBUG ONLY
+#include <fstream>
using namespace std;
class LIBOOOGG_API OggPageInterleaver
:	public INotifyArrival
@@ -56,4 +59,8 @@
vector<OggMuxStream*> mInputStreams;
IOggCallback* mFileWriter;
INotifyComplete* mNotifier;
+
+	//DEBUG ONLY
+	fstream debugLog;
+	//
};

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp	2004-06-30 19:36:27 UTC (rev 6936)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp	2004-06-30 21:15:17 UTC (rev 6937)
@@ -236,8 +236,12 @@
mPendingPage->header()->setHeaderSize(OggPageHeader::OGG_BASE_HEADER_SIZE + mSegmentTableSize);
mPendingPage->header()->setNumPageSegments(mSegmentTableSize);
mPendingPage->header()->setSegmentTable(mSegmentTable);
+	if (mPendingPage->header()->GranulePos()->value() == -1) {
+		mPendingPage->header()->setHeaderFlags(mPendingPage->header()->HeaderFlags() | 1);
+	}
+	setChecksum();
+

-	setChecksum();
mPageCallback->acceptOggPage(mPendingPage);
createFreshPage();
return true;



More information about the commits mailing list