[xiph-commits] r10291 - in branches/oggdsf_new_demux/src/lib/core:
directshow/dsfOggDemux2 ogg/libOOOggSeek
illiminable at svn.xiph.org
illiminable at svn.xiph.org
Mon Oct 24 08:43:20 PDT 2005
Author: illiminable
Date: 2005-10-24 08:43:13 -0700 (Mon, 24 Oct 2005)
New Revision: 10291
Modified:
branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp
branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.cpp
branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.h
Log:
* Implement IMediaSeeking/IMediaPosition except setPositions
Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp 2005-10-24 15:32:21 UTC (rev 10290)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp 2005-10-24 15:43:13 UTC (rev 10291)
@@ -526,32 +526,26 @@
STDMETHODIMP OggDemuxPacketSourceFilter::GetCapabilities(DWORD* inCapabilities)
{
- //if (mSeekTable->enabled()) {
- // //debugLog<<"GetCaps "<<mSeekingCap<<endl;
- // *inCapabilities = mSeekingCap;
- // return S_OK;
- //} else {
- // //debugLog<<"Get Caps failed !!!!!!!"<<endl;
- // *inCapabilities = 0;
- // return S_OK;;
- //}
-
-
- //TODO:::
- return E_NOTIMPL;
+ if (mSeekTable->enabled()) {
+ //debugLog<<"GetCaps "<<mSeekingCap<<endl;
+ *inCapabilities = mSeekingCap;
+ return S_OK;
+ } else {
+ //debugLog<<"Get Caps failed !!!!!!!"<<endl;
+ *inCapabilities = 0;
+ return S_OK;;
+ }
}
STDMETHODIMP OggDemuxPacketSourceFilter::GetDuration(LONGLONG* outDuration)
{
- //if (mSeekTable->enabled()) {
- // //debugLog<<"GetDuration = " << mSeekTable->fileDuration()<<" ds units"<<endl;
- // *outDuration = mSeekTable->fileDuration();
- // return S_OK;
- //} else {
- // return E_NOTIMPL;
- //}
+ if (mSeekTable->enabled()) {
+ //debugLog<<"GetDuration = " << mSeekTable->fileDuration()<<" ds units"<<endl;
+ *outDuration = mSeekTable->fileDuration();
+ return S_OK;
+ } else {
+ return E_NOTIMPL;
+ }
- //TODO:::
- return E_NOTIMPL;
}
@@ -565,16 +559,14 @@
STDMETHODIMP OggDemuxPacketSourceFilter::IsFormatSupported(const GUID *pFormat)
{
//ASSERT(pFormat != NULL);
- //if (*pFormat == TIME_FORMAT_MEDIA_TIME) {
- // //debugLog<<"IsFormatSupported : TRUE"<<endl;
- // return S_OK;
- //} else {
- // //debugLog<<"IsFormatSupported : FALSE !!!"<<endl;
- // return S_FALSE;
- //}
+ if (*pFormat == TIME_FORMAT_MEDIA_TIME) {
+ //debugLog<<"IsFormatSupported : TRUE"<<endl;
+ return S_OK;
+ } else {
+ //debugLog<<"IsFormatSupported : FALSE !!!"<<endl;
+ return S_FALSE;
+ }
- //TODO:::
- return E_NOTIMPL;
}
@@ -592,19 +584,18 @@
return S_OK;
}
STDMETHODIMP OggDemuxPacketSourceFilter::GetStopPosition(LONGLONG *pStop){
- //if (mSeekTable->enabled()) {
+ if (mSeekTable->enabled()) {
- // //debugLog<<"GetStopPos = " << mSeekTable->fileDuration()<<" ds units"<<endl;
- // *pStop = mSeekTable->fileDuration();
- // return S_OK;
- //} else {
- // //debugLog<<"GetStopPos NOT IMPL"<<endl;
- // return E_NOTIMPL;
- //}
+ //debugLog<<"GetStopPos = " << mSeekTable->fileDuration()<<" ds units"<<endl;
+ *pStop = mSeekTable->fileDuration();
+ return S_OK;
+ } else {
+ //debugLog<<"GetStopPos NOT IMPL"<<endl;
+ return E_NOTIMPL;
+ }
- //TODO:::
- return E_NOTIMPL;
+
}
STDMETHODIMP OggDemuxPacketSourceFilter::GetCurrentPosition(LONGLONG *pCurrent)
{
@@ -688,18 +679,16 @@
}
STDMETHODIMP OggDemuxPacketSourceFilter::GetAvailable(LONGLONG *pEarliest, LONGLONG *pLatest){
//debugLog<<"****GetAvailable : NOT IMPL"<<endl;
- //if (mSeekTable->enabled()) {
- // //debugLog<<"Get Avail ok"<<endl;
- // *pEarliest = 0;
- // //debugLog<<"+++++ Duration is "<<mSeekTable->fileDuration()<<endl;
- // *pLatest = mSeekTable->fileDuration();
- // return S_OK;
- //} else {
- // return E_NOTIMPL;
- //}
+ if (mSeekTable->enabled()) {
+ //debugLog<<"Get Avail ok"<<endl;
+ *pEarliest = 0;
+ //debugLog<<"+++++ Duration is "<<mSeekTable->fileDuration()<<endl;
+ *pLatest = mSeekTable->fileDuration();
+ return S_OK;
+ } else {
+ return E_NOTIMPL;
+ }
- //TODO:::
- return E_NOTIMPL;
}
STDMETHODIMP OggDemuxPacketSourceFilter::SetRate(double dRate)
@@ -721,16 +710,14 @@
return S_OK;
}
STDMETHODIMP OggDemuxPacketSourceFilter::IsUsingTimeFormat(const GUID *pFormat){
- //if (*pFormat == TIME_FORMAT_MEDIA_TIME) {
- // //debugLog<<"IsUsingTimeFormat : MEDIA TIME TRUE"<<endl;
- // return S_OK;
- //} else {
- // //debugLog<<"IsUsingTimeFormat : MEDIA TIME FALSE !!!!"<<endl;
- // return S_FALSE;
- //}
+ if (*pFormat == TIME_FORMAT_MEDIA_TIME) {
+ //debugLog<<"IsUsingTimeFormat : MEDIA TIME TRUE"<<endl;
+ return S_OK;
+ } else {
+ //debugLog<<"IsUsingTimeFormat : MEDIA TIME FALSE !!!!"<<endl;
+ return S_FALSE;
+ }
- //TODO:::
- return E_NOTIMPL;
}
Modified: branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.cpp 2005-10-24 15:32:21 UTC (rev 10290)
+++ branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.cpp 2005-10-24 15:43:13 UTC (rev 10291)
@@ -6,6 +6,7 @@
, mFilePos(0)
, mOggDemux(NULL)
, mDuration(0)
+ , mIsEnabled(false)
{
mOggDemux = new OggDataBuffer;
mOggDemux->registerVirtualCallback(this);
@@ -40,7 +41,10 @@
delete[] locBuff;
mFile.close();
+ mIsEnabled = true;
+ } else {
+ mIsEnabled = false;
}
return true;
}
Modified: branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.h 2005-10-24 15:32:21 UTC (rev 10290)
+++ branches/oggdsf_new_demux/src/lib/core/ogg/libOOOggSeek/AutoOggChainGranuleSeekTable.h 2005-10-24 15:43:13 UTC (rev 10291)
@@ -21,6 +21,8 @@
/// The duration of the file, in DirectShow time units.
LOOG_INT64 fileDuration();
+ bool enabled() { return mIsEnabled; }
+
bool addStream(unsigned long inSerialNo, IOggDecoderSeek* inSeekInterface);
unsigned long seekPos(LOOG_INT64 inTime);
@@ -34,6 +36,8 @@
vector<sStreamMapping> mStreamMaps;
+ bool mIsEnabled;
+
LOOG_INT64 mDuration;
sStreamMapping getMapping(unsigned long inSerialNo);
fstream mFile;
More information about the commits
mailing list