[xiph-commits] r7138 - in trunk/oggdsf/src/lib/core:
illiminable at dactyl.lonelymoon.com
illiminable
Thu Jul 15 10:15:16 PDT 2004
directshow/dsfOggDemux ogg/libOOOgg ogg/libOOOggSeek
Message-ID: <20040715171516.4B9E89AAAB at dactyl.lonelymoon.com>
Author: illiminable
Date: Thu Jul 15 10:15:16 2004
New Revision: 7138
Modified:
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h
Log:
* Commiting before changing seek pass through rules.
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp 2004-07-15 14:53:36 UTC (rev 7137)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp 2004-07-15 17:15:13 UTC (rev 7138)
@@ -278,8 +278,8 @@
CAutoLock locSourceLock(mSourceFileLock);
-
- DeliverBeginFlush();
+ DeliverBeginFlush();
+
//debugLog<<" : Begin flush Delviered."<<endl;
//debugLog<<" : Delivering new segemnt"<<endl;
@@ -303,8 +303,10 @@
}
//debugLog<<" : Seeking to position "<<mSeekTable->getStartPos(*pCurrent)<<endl;
{
- CAutoLock locDemuxLock(mDemuxLock);
- mOggBuffer.clearData();
+ //Unneeded... this is done in deliver begin flush
+ //CAutoLock locDemuxLock(mDemuxLock);
+ //mOggBuffer.debugWrite("%%%%%% Clear calling from SetPos");
+ //mOggBuffer.clearData();
}
//debugLog << "Setting GranPos : "<<mSeekTable->getRealStartPos()<<endl;
@@ -466,6 +468,7 @@
mDataSource = NULL;
//
+ mOggBuffer.debugWrite("%%%%%% Clear calling from ResetStream");
mOggBuffer.clearData();
//SOURCE ABSTRACTION::: clear, close, open, seek
@@ -494,6 +497,7 @@
//Should this be here or endflush or neither ?
//debugLog << "Calling Reset Stream"<<endl;
+ mOggBuffer.debugWrite("%%%%%% Reset calling from DeliverBegingFlush");
resetStream();
}
@@ -511,7 +515,7 @@
for (unsigned long i = 0; i < mStreamMapper->numStreams(); i++) {
mStreamMapper->getOggStream(i)->getPin()->DeliverEndOfStream();
}
-
+ mOggBuffer.debugWrite("%%%%%% Reset calling from DeliverEOS");
resetStream();
}
@@ -553,6 +557,7 @@
{
CAutoLock locSourceLock(mSourceFileLock);
+ //CAutoLock locDemuxLock(mDemuxLock);
//debugLog << "DataProcessLoop : Getpointer = "<<mSourceFile.tellg()<<endl;
//SOURCE ABSTRACTION::: read, numbytes read
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp 2004-07-15 14:53:36 UTC (rev 7137)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp 2004-07-15 17:15:13 UTC (rev 7138)
@@ -40,6 +40,16 @@
mNumBytesNeeded = OggPageHeader::OGG_BASE_HEADER_SIZE;
}
+//Debug only
+OggDataBuffer::OggDataBuffer(bool x)
+{
+ debugLog.open("G:\\logs\\OggDataBufferSeek.log", ios_base::out);
+ pendingPage = NULL;
+ mState = AWAITING_BASE_HEADER;
+ mNumBytesNeeded = OggPageHeader::OGG_BASE_HEADER_SIZE;
+}
+//
+
OggDataBuffer::~OggDataBuffer(void)
{
debugLog.close();
@@ -120,11 +130,12 @@
bool OggDataBuffer::feed(const char* inData, unsigned long inNumBytes) {
if (inNumBytes != 0) {
- debugLog<<"Fed "<<inNumBytes<<" bytes..."<<endl;
+ debugLog<<"********** Fed "<<inNumBytes<<" bytes..."<<endl;
mStream.write(inData, inNumBytes);
//FIX ::: Need error checking.
-
- return processBuffer();
+ bool retVal = processBuffer();
+ debugLog<<"########## End feed - After process buffer"<<endl;
+ return retVal;
} else {
debugLog<<"Fed *zero* bytes..."<<endl;
return true;
@@ -296,4 +307,9 @@
}
return true;
+}
+
+//Debug Only
+void OggDataBuffer::debugWrite(string inString) {
+ debugLog<<inString<<endl;
}
\ No newline at end of file
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h 2004-07-15 14:53:36 UTC (rev 7137)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h 2004-07-15 17:15:13 UTC (rev 7138)
@@ -57,6 +57,9 @@
};
OggDataBuffer(void);
+ //Debug only
+ OggDataBuffer::OggDataBuffer(bool x);
+ //
~OggDataBuffer(void);
bool registerPageCallback(OggCallbackRego* inPageCB);
@@ -74,6 +77,10 @@
eState state();
+ //Debug only
+ void debugWrite(string inString);
+ //
+
protected:
stringstream mStream;
eState mState;
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp 2004-07-15 14:53:36 UTC (rev 7137)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp 2004-07-15 17:15:13 UTC (rev 7138)
@@ -47,11 +47,14 @@
{
mFileName = inFileName;
- mOggDemux.registerVirtualCallback(this);
+ mOggDemux = new OggDataBuffer(true);
+ mOggDemux->registerVirtualCallback(this);
+
}
AutoOggSeekTable::~AutoOggSeekTable(void)
{
+ delete mOggDemux;
}
bool AutoOggSeekTable::acceptOggPage(OggPage* inOggPage) {
@@ -132,7 +135,7 @@
unsigned char* locBuff = new unsigned char[BUFF_SIZE];
while (!mFile.eof()) {
mFile.read((char*)locBuff, BUFF_SIZE);
- mOggDemux.feed((const char*)locBuff, mFile.gcount());
+ mOggDemux->feed((const char*)locBuff, mFile.gcount());
}
mFile.close();
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h 2004-07-15 14:53:36 UTC (rev 7137)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h 2004-07-15 17:15:13 UTC (rev 7138)
@@ -70,6 +70,7 @@
__int64 mFileDuration;
fstream mFile;
string mFileName;
- OggDataBuffer mOggDemux;
+ //Changed for debugging to *
+ OggDataBuffer* mOggDemux;
};
More information about the commits
mailing list