[xiph-commits] r6977 - in trunk/oggdsf: docs
illiminable at dactyl.lonelymoon.com
illiminable
Sun Jul 4 12:03:30 PDT 2004
src/lib/codecs/theora/filters/dsfTheoraEncoder
src/lib/core/directshow/dsfAbstractVideoDecoder
src/lib/core/directshow/dsfOggMux src/lib/core/ogg/libOOOgg
Message-ID: <20040704190330.E79F89AAAB at dactyl.lonelymoon.com>
Author: illiminable
Date: Sun Jul 4 12:03:30 2004
New Revision: 6977
Modified:
trunk/oggdsf/docs/TODO.txt
trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/PropsTheoraEncoder.h
trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.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/OggPageInterleaver.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.h
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
Log:
* Fixed some problems that cause encode settings not to be properly propagated... theora encoder working well now.
* Fixed the problem where the graph would block after encoding.
Modified: trunk/oggdsf/docs/TODO.txt
===================================================================
--- trunk/oggdsf/docs/TODO.txt 2004-07-04 11:20:52 UTC (rev 6976)
+++ trunk/oggdsf/docs/TODO.txt 2004-07-04 19:03:28 UTC (rev 6977)
@@ -1,7 +1,5 @@
-* Fix the theora decoder to deal properly with the frame/offset/etc stuff.
-* Fix the long string in the demux prop page.
* Figure out why the graph hangs at the end of lpayback sometimes. see debugging.txt
* Fix flac decoder
* Fix wmp 9 issues, probably by rewriting the decoder :(
* Add seeking to annodex
-* Add application cmml interface
\ No newline at end of file
+* Add application cmml interface
Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/PropsTheoraEncoder.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/PropsTheoraEncoder.h 2004-07-04 11:20:52 UTC (rev 6976)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/PropsTheoraEncoder.h 2004-07-04 19:03:28 UTC (rev 6977)
@@ -23,16 +23,16 @@
INT_PTR OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
HRESULT OnApplyChanges(void);
+ static unsigned long log2(unsigned long inNum);
+ static unsigned long pow2(unsigned long inNum);
-
protected:
//
//void SetupBitrateCombo();
//void SetupKeyframeFreqCombo();
//LRESULT addNumberToCombo(int inComboID, int inNum);
- unsigned long log2(unsigned long inNum);
- unsigned long pow2(unsigned long inNum);
+
void SetDirty();
void SetClean();
//
Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp 2004-07-04 11:20:52 UTC (rev 6976)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp 2004-07-04 19:03:28 UTC (rev 6977)
@@ -120,11 +120,14 @@
//Needs error checking
((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->target_bitrate = inBitrate;
((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->keyframe_data_target_bitrate = (inBitrate * 3)/2;
+ //mTheoraFormatBlock.targetBitrate = inBitrate;
+ //mTheoraFormatBlock.
return true;
}
STDMETHODIMP_(bool) TheoraEncodeFilter::setQuality(unsigned char inQuality) {
//Needs error checking
+
((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->quality = inQuality;
return true;
}
@@ -132,6 +135,8 @@
//Needs error checking
((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->keyframe_frequency = inKeyframeFreq;
((TheoraEncodeInputPin*)mInputPin)->theoraInfo()->keyframe_frequency_force = inKeyframeFreq;
+ //NOTE: If you ever change it so that _force can be higher... you must use the maximum.
+ mTheoraFormatBlock.maxKeyframeInterval = PropsTheoraEncoder::log2(inKeyframeFreq);
return true;
}
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.cpp 2004-07-04 11:20:52 UTC (rev 6976)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoDecoder/AbstractVideoDecodeOutputPin.cpp 2004-07-04 19:03:28 UTC (rev 6977)
@@ -238,7 +238,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, 5);
+ mDataQueue = new COutputQueue (inReceivePin, &locHR, FALSE, TRUE, 1, TRUE, 15);
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-07-04 11:20:52 UTC (rev 6976)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp 2004-07-04 19:03:28 UTC (rev 6977)
@@ -140,8 +140,11 @@
return mParentFilter->addAnotherPin();
}
STDMETHODIMP OggMuxInputPin::EndOfStream(void) {
+
mPaginator.finishStream();
mMuxStream->setIsEOS(true);
+
+
//HRESULT locHR = mParentFilter->NotifyEvent(EC_COMPLETE, S_OK, NULL);
return S_OK;
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h 2004-07-04 11:20:52 UTC (rev 6976)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.h 2004-07-04 19:03:28 UTC (rev 6977)
@@ -42,6 +42,7 @@
class OggMuxInputPin
: public CBaseInputPin
+ //, public BasicSeekable
{
public:
OggMuxInputPin(OggMuxFilter* inParentFilter, CCritSec* inFilterLock, HRESULT* inHR, OggMuxStream* inMuxStream);
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp 2004-07-04 11:20:52 UTC (rev 6976)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp 2004-07-04 19:03:28 UTC (rev 6977)
@@ -140,6 +140,8 @@
}
void OggMuxStream::setIsEOS(bool inIsEOS) {
mIsEOS = inIsEOS;
+ //Notify that the streams are in new state.
+ mNotifier->notifyArrival();
}
bool OggMuxStream::isActive() {
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp 2004-07-04 11:20:52 UTC (rev 6976)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp 2004-07-04 19:03:28 UTC (rev 6977)
@@ -35,12 +35,12 @@
: mFileWriter(inFileWriter)
, mNotifier(inNotifier)
{
- //debugLog.open("G:\\logs\\interleaver.log", ios_base::out);
+ debugLog.open("G:\\logs\\interleaver.log", ios_base::out);
}
OggPageInterleaver::~OggPageInterleaver(void)
{
- //debugLog.close();
+ debugLog.close();
}
OggMuxStream* OggPageInterleaver::newStream() {
@@ -77,21 +77,34 @@
WEND
END IF
*/
+ //
+ //Temp
+
+ debugLog<<endl<<"Process Data : "<<endl;
+ debugLog<<"==============="<<endl;
if (isAllEOS()) {
+ debugLog<<"Process Data : All are EOS."<<endl;
//Finish up
while (!isAllEmpty()) {
+ debugLog<<"Process Data : Finishing - Still not empty..."<<endl;
writeLowest();
}
+ debugLog<<"Process Data : Notifying completion... 1"<<endl;
mNotifier->NotifyComplete();
} else {
+ debugLog<<"Process Data : *NOT* all EOS"<<endl;
while (isProcessable()) {
+ debugLog<<"Process Data : Still processable data..."<<endl;
writeLowest();
}
+ debugLog<<"Process Data : No more processable data..."<<endl;
if (isAllEOS() && isAllEmpty()) {
+ debugLog<<"Process Data : All EOS and all Empty... Notifying complete 2..."<<endl;
mNotifier->NotifyComplete();
}
}
+ debugLog<<"==============="<<endl;
}
@@ -101,14 +114,13 @@
if (!mInputStreams[i]->isEmpty() && mInputStreams[i]->isActive()) {
if (locLowestStream == NULL) {
locLowestStream = mInputStreams[i];
+ debugLog<<"writeLowest : Defaulting stream "<<i<<" @ Gran = "<<locLowestStream->frontTime()<<" & Time = "<<locLowestStream->scaledFrontTime()<<endl;
//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 (
@@ -120,8 +132,9 @@
(locTestLowTime < locCurrLowTime)
)
{
- //debugLog<<"writeLowest : Selecting stream "<<i<<endl;
+
locLowestStream = mInputStreams[i];
+ debugLog<<"writeLowest : Selecting stream "<<i<<" @ Gran = "<<locLowestStream->frontTime()<<" & Time = "<<locLowestStream->scaledFrontTime()<<endl;
}
}
}
@@ -129,7 +142,7 @@
if (locLowestStream == NULL) {
throw 0;
} else {
- //debugLog<<"writeLowest : Writing..."<<endl;
+ debugLog<<"writeLowest : Writing..."<<endl;
mFileWriter->acceptOggPage(locLowestStream->popFront());
}
@@ -146,6 +159,11 @@
bool retVal = true;
//ASSERT(mInputStreams.size() >= 1)
for (int i = 0; i < mInputStreams.size(); i++) {
+ if (mInputStreams[i]->isEOS()) {
+ debugLog<<"***** Stream "<<i<<" is EOS"<<endl;
+ } else {
+ debugLog<<"***** Stream "<<i<<" not EOS"<<endl;
+ }
retVal = retVal && (mInputStreams[i]->isEOS() || !mInputStreams[i]->isActive());
}
return retVal;
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.h 2004-07-04 11:20:52 UTC (rev 6976)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.h 2004-07-04 19:03:28 UTC (rev 6977)
@@ -35,7 +35,7 @@
#include <vector>
//DEBUG ONLY
-//#include <fstream>
+#include <fstream>
//
using namespace std;
class LIBOOOGG_API OggPageInterleaver
@@ -62,6 +62,6 @@
INotifyComplete* mNotifier;
//DEBUG ONLY
- //fstream debugLog;
+ fstream debugLog;
//
};
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp 2004-07-04 11:20:52 UTC (rev 6976)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp 2004-07-04 19:03:28 UTC (rev 6977)
@@ -236,9 +236,9 @@
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);
- }
+ //if (mPendingPage->header()->GranulePos()->value() == -1) {
+ // mPendingPage->header()->setHeaderFlags(mPendingPage->header()->HeaderFlags() | 1);
+ //}
setChecksum();
More information about the commits
mailing list