[xiph-cvs] r6803 - in trunk/oggdsf: . src/lib/codecs/flac/libs/libflac/src/libFLAC++/Debug_dynamic src/lib/codecs/helper/libfishsound/win32 src/lib/core/directshow/dsfAnxDemux src/lib/core/directshow/dsfOggDemux src/lib/core/directshow/dsfSubtitleVMR9
illiminable at xiph.org
illiminable at xiph.org
Wed Jun 2 02:35:38 PDT 2004
Author: illiminable
Date: 2004-06-02 05:35:37 -0400 (Wed, 02 Jun 2004)
New Revision: 6803
Added:
trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.h
Modified:
trunk/oggdsf/AUTHORS
trunk/oggdsf/COPYRIGHTS
trunk/oggdsf/src/lib/codecs/flac/libs/libflac/src/libFLAC++/Debug_dynamic/BuildLog.htm
trunk/oggdsf/src/lib/codecs/helper/libfishsound/win32/libfishsound.exp
trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.h
trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/anxdllstuff.h
trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/dsfAnxDemux.vcproj
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.h
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStreamMapper.h
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/StreamHeaders.h
trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.cpp
trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.h
Log:
Annodex Demux now creates cmml streams.
Subtitle renderer implemented in test mode.
Modified: trunk/oggdsf/AUTHORS
===================================================================
--- trunk/oggdsf/AUTHORS 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/AUTHORS 2004-06-02 09:35:37 UTC (rev 6803)
@@ -11,11 +11,14 @@
*** dsfAbstractAudioEncoder
*** dsfAbstractVideoDecoder
*** dsfSeeking
+*** dsfSubtitleVMR9
*** libOOTheora
*** libOOOgg
*** libOOOggSeek
+*** libCMMLTags
*** OOOggDump
*** OOOggStat
+
Zentaro Kavanagh <ogg at illiminable.com>
- Design and coding.
==============================================================
Modified: trunk/oggdsf/COPYRIGHTS
===================================================================
--- trunk/oggdsf/COPYRIGHTS 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/COPYRIGHTS 2004-06-02 09:35:37 UTC (rev 6803)
@@ -98,7 +98,42 @@
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+------------------------------------------------------------------------
+*** libCMMLTags
+*** dsfAnxDemuxSourceFilter
+Copyright (C) 2003, 2004 Zentaro Kavanagh
+
+Copyright (C) 2003, 2004 Commonwealth Scientific and Industrial Research
+ Organisation (CSIRO) Australia
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+- Neither the name of CSIRO Australia nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
------------------------------------------------------------------------
*** dsfOggDemux
*** dsfOggMux
@@ -111,6 +146,7 @@
*** dsfAbstractOggAudioDecoder
*** dsfAbstractAudioEncoder
*** dsfAbstractVideoDecoder
+*** dsfSubtitleVMR9
*** libOOTheora
*** libOOOgg
*** libOOOggSeek
Modified: trunk/oggdsf/src/lib/codecs/flac/libs/libflac/src/libFLAC++/Debug_dynamic/BuildLog.htm
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/libs/libflac/src/libFLAC++/Debug_dynamic/BuildLog.htm 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/codecs/flac/libs/libflac/src/libFLAC++/Debug_dynamic/BuildLog.htm 2004-06-02 09:35:37 UTC (rev 6803)
@@ -14,6 +14,7 @@
</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5> </td><td width=0 bgcolor=#FFFFFF> </td><td width=*><pre> ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\illiminable\Application Data
APR_ICONV_PATH=G:\Program Files\Subversion\iconv
+ CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=TIGER
ComSpec=C:\WINDOWS\system32\cmd.exe
@@ -45,8 +46,8 @@
VSCOMNTOOLS="C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\"
windir=C:\WINDOWS
_ACP_ATLPROV=C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin\ATLPROV.DLL
- _ACP_INCLUDE="C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\ogg\libOOOgg;..\..\ogg\libOOOggSeek;..\dsfSeeking;C:\DXSDK\Include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include\prerelease;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include
- _ACP_LIB=C:\DXSDK\Lib;C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib;C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\lib;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\lib\prerelease;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\lib;C:\DXSDK\Include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include\prerelease;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include
+ _ACP_INCLUDE=C:\DXSDK\Include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include\prerelease;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include
+ _ACP_LIB=C:\DXSDK\Lib;C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib;C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\lib;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\lib\prerelease;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\lib;"C:\DXSDK\Samples\C++\DirectShow\BaseClasses";C:\DXSDK\Include;..\..\ogg\libOOOgg;..\..\ogg\libOOOggSeek;..\dsfSeeking;..\dsfOggDemux;C:\DXSDK\Include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\include;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include\prerelease;C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include
_ACP_PATH=C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\bin\prerelease;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio .NET\Common7\tools;C:\Program Files\Microsoft Visual Studio .NET\Common7\ide;C:\Program Files\HTML Help Workshop\;C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\bin;C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel
</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
Command Lines
Modified: trunk/oggdsf/src/lib/codecs/helper/libfishsound/win32/libfishsound.exp
===================================================================
(Binary files differ)
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.cpp 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.cpp 2004-06-02 09:35:37 UTC (rev 6803)
@@ -6,6 +6,7 @@
, mAnnodexSerial(0)
, mSeenAnnodexBOS(false)
, mReadyForCodecs(false)
+ , mSeenCMML(false)
{
}
@@ -13,6 +14,17 @@
{
}
+bool AnxStreamMapper::isReady() {
+ bool retVal = true;
+ bool locWasAny = false;
+ //Use 1 instead of 0... cmml is always ready and terminates the graph creation early.
+ //We want to know when everything else is ready.
+ for (unsigned long i = 1; i < mStreamList.size(); i++) {
+ locWasAny = true;
+ retVal = retVal && mStreamList[i]->streamReady();
+ }
+ return locWasAny && retVal;
+}
bool AnxStreamMapper::acceptOggPage(OggPage* inOggPage)
{
@@ -31,9 +43,22 @@
//Need to save the data from the header here.
} else {
//This is anxdata
+
+ if ( (mSeenCMML == false) ) {
+ //This is a really nasty way to do it ! Fix this up properly later.
+ char* locStr = (char*)(inOggPage->getPacket(0)->packetData() + 28);
+ if (strstr(locStr, "text/x-cmml") != NULL) {
+ mSeenCMML = true;
+ OggStream* locStream = new CMMLStream(inOggPage, mOwningFilter);//OggStreamFactory::CreateStream(inOggPage, mOwningFilter);
+ if (locStream != NULL) {
+ mStreamList.push_back(locStream);
+ }
+ }
+ } else {
//Need to save header data here.
- mSeenStreams.push_back(inOggPage->header()->StreamSerialNo());
+ mSeenStreams.push_back(inOggPage->header()->StreamSerialNo());
+ }
}
}
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.h 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.h 2004-06-02 09:35:37 UTC (rev 6803)
@@ -1,6 +1,7 @@
#pragma once
#include "OggStreamMapper.h"
+#include "CMMLStream.h"
class AnxStreamMapper
: public OggStreamMapper
{
@@ -11,9 +12,11 @@
virtual bool acceptOggPage(OggPage* inOggPage);
+ virtual bool AnxStreamMapper::isReady();
protected:
vector<unsigned long> mSeenStreams;
bool mSeenAnnodexBOS;
bool mReadyForCodecs;
+ bool mSeenCMML;
unsigned long mAnnodexSerial;
};
Added: trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.cpp 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.cpp 2004-06-02 09:35:37 UTC (rev 6803)
@@ -0,0 +1,64 @@
+#include "StdAfx.h"
+#include "cmmlstream.h"
+
+CMMLStream::CMMLStream(OggPage* inBOSPage, OggDemuxSourceFilter* inOwningFilter)
+ : OggStream(inBOSPage, inOwningFilter)
+ , mCMMLFormatBlock(NULL)
+{
+ InitCodec(inBOSPage->getStampedPacket(0));
+}
+
+CMMLStream::~CMMLStream(void)
+{
+ delete mCMMLFormatBlock;
+}
+
+
+bool CMMLStream::InitCodec(StampedOggPacket* inOggPacket) {
+ mCodecHeaders = new StreamHeaders;
+ mCodecHeaders->mCodecType = StreamHeaders::CMML;
+ mAnxDataPacket = inOggPacket->clone();
+ //mCodecHeaders->addPacket((StampedOggPacket*)inOggPacket->clone());
+ mNumHeadersNeeded = 0;
+ return true;
+}
+
+BYTE* CMMLStream::getFormatBlock() {
+
+ return (BYTE*)mCMMLFormatBlock;
+
+}
+bool CMMLStream::createFormatBlock() {
+ //Check where this gets deleted
+ mCMMLFormatBlock = new sCMMLFormatBlock;
+ mCMMLFormatBlock->granuleNumerator = OggMath::charArrToULong(mAnxDataPacket->packetData() + 8) + ((OggMath::charArrToULong(mAnxDataPacket->packetData() + 12)) << 32);
+ mCMMLFormatBlock->granuleDenominator = OggMath::charArrToULong(mAnxDataPacket->packetData() + 16) + ((OggMath::charArrToULong(mAnxDataPacket->packetData() + 20)) << 32);
+
+ return true;
+}
+
+void CMMLStream::setLastEndGranPos(__int64 inPos) {
+
+ mLastEndGranulePos = ((inPos * mCMMLFormatBlock->granuleNumerator) / mCMMLFormatBlock->granuleDenominator)/ UNITS;
+ //osDebug<<"Vorbis sets End Gran : "<<mLastEndGranulePos<<endl;
+}
+unsigned long CMMLStream::getFormatBlockSize() {
+ return sizeof(sCMMLFormatBlock);
+}
+GUID CMMLStream::getFormatGUID() {
+ return FORMAT_CMML;
+}
+GUID CMMLStream::getSubtypeGUID() {
+ return MEDIASUBTYPE_CMML;
+}
+wstring CMMLStream::getPinName() {
+ wstring retName = L"CMML Out";
+ return retName;
+}
+GUID CMMLStream::getMajorTypeGUID() {
+ return MEDIATYPE_Text;
+}
+
+LONGLONG CMMLStream::getCurrentPos() {
+ return (mLastEndGranulePos * UNITS * mCMMLFormatBlock->granuleDenominator) / mCMMLFormatBlock->granuleNumerator;
+}
\ No newline at end of file
Added: trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.h 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/CMMLStream.h 2004-06-02 09:35:37 UTC (rev 6803)
@@ -0,0 +1,30 @@
+#pragma once
+
+#include "anxdllstuff.h"
+#include "OggPacket.h"
+#include "OggStream.h"
+class CMMLStream
+ : public OggStream
+{
+public:
+ CMMLStream(OggPage* inBOSPage, OggDemuxSourceFilter* inOwningFilter);
+ virtual ~CMMLStream(void);
+ virtual void setLastEndGranPos(__int64 inGranPos);
+
+
+ virtual bool InitCodec(StampedOggPacket* inOggPacket);
+ virtual BYTE* getFormatBlock();
+ virtual unsigned long getFormatBlockSize();
+
+ virtual GUID getMajorTypeGUID();
+ virtual GUID getFormatGUID();
+ virtual GUID getSubtypeGUID();
+ virtual wstring getPinName();
+ virtual bool createFormatBlock();
+
+ virtual LONGLONG getCurrentPos();
+
+protected:
+ OggPacket* mAnxDataPacket;
+ sCMMLFormatBlock* mCMMLFormatBlock;
+};
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/anxdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/anxdllstuff.h 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/anxdllstuff.h 2004-06-02 09:35:37 UTC (rev 6803)
@@ -7,10 +7,24 @@
DEFINE_GUID(CLSID_AnxDemuxSourceFilter,
0x6f767551, 0xe3e1, 0x461f, 0xa8, 0xe5, 0xc8, 0xed, 0x36, 0x34, 0x2e, 0xd1);
+// {53696C76-6961-40b2-B136-436F6E726164}
+DEFINE_GUID(FORMAT_CMML,
+0x53696c76, 0x6961, 0x40b2, 0xb1, 0x36, 0x43, 0x6f, 0x6e, 0x72, 0x61, 0x64);
+
+
+// {5A656E74-6172-6F26-B79C-D6416E647282}
+DEFINE_GUID(MEDIASUBTYPE_CMML,
+0x5a656e74, 0x6172, 0x6f26, 0xb7, 0x9c, 0xd6, 0x41, 0x6e, 0x64, 0x72, 0x82);
+
const REGFILTER2 AnxDemuxSourceFilterReg = {
1,
MERIT_NORMAL,
0,
NULL
+};
+
+struct sCMMLFormatBlock {
+ __int64 granuleNumerator;
+ __int64 granuleDenominator;
};
\ No newline at end of file
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/dsfAnxDemux.vcproj
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/dsfAnxDemux.vcproj 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/dsfAnxDemux.vcproj 2004-06-02 09:35:37 UTC (rev 6803)
@@ -128,6 +128,9 @@
RelativePath="AnxStreamMapper.cpp">
</File>
<File
+ RelativePath="CMMLStream.cpp">
+ </File>
+ <File
RelativePath="anxdllstuff.cpp">
</File>
<File
@@ -156,6 +159,9 @@
RelativePath="AnxStreamMapper.h">
</File>
<File
+ RelativePath="CMMLStream.h">
+ </File>
+ <File
RelativePath="anxdllstuff.h">
</File>
<File
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.h 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.h 2004-06-02 09:35:37 UTC (rev 6803)
@@ -43,7 +43,7 @@
class OggDemuxSourcePin;
class StreamHeaders;
-class OggStream
+class OGG_DEMUX_API OggStream
: public IOggCallback
{
public:
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStreamMapper.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStreamMapper.h 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStreamMapper.h 2004-06-02 09:35:37 UTC (rev 6803)
@@ -55,7 +55,7 @@
//IOggCalback INterface
virtual bool acceptOggPage(OggPage* inOggPage);
- bool isReady();
+ virtual bool isReady();
protected:
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/StreamHeaders.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/StreamHeaders.h 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/StreamHeaders.h 2004-06-02 09:35:37 UTC (rev 6803)
@@ -44,7 +44,7 @@
//If the codec needs them again... you have to sort it out from the output pin. The codec should remember !
-class StreamHeaders
+class OGG_DEMUX_API StreamHeaders
: public IOggPackSource
{
public:
@@ -57,6 +57,7 @@
SPEEX = 2,
FLAC = 3,
THEORA = 4,
+ CMML = 20,
FFDSHOW_VIDEO = 100
};
//IOggPacketSource
Modified: trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.cpp 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.cpp 2004-06-02 09:35:37 UTC (rev 6803)
@@ -55,7 +55,8 @@
return S_OK;
}
HRESULT SubtitleVMR9Filter::DoRenderSample(IMediaSample *pMediaSample) {
-
+ static int c = 0;
+ const int hm = 50;
if (mBitmapMixer == NULL) {
IFilterGraph* locFilterGraph = NULL;
locFilterGraph = GetFilterGraph();
@@ -70,8 +71,31 @@
return S_OK;
}
} else {
- wstring x = L"blah";
- SetSubtitle(x);
+ c++;
+ string x;
+ switch ((c / hm) % 4) {
+ case 0:
+ x = "One";
+ SetSubtitle(x);
+ break;
+ case 1:
+ x = "Two";
+ SetSubtitle(x);
+ break;
+
+ case 2:
+ x = "Three";
+ SetSubtitle(x);
+ break;
+ case 3:
+ x = "Four";
+ SetSubtitle(x);
+ break;
+ default:
+ break;
+ }
+
+
return S_OK;
}
}
@@ -79,7 +103,7 @@
-HRESULT SubtitleVMR9Filter::SetSubtitle(wstring inSubtitle) {
+HRESULT SubtitleVMR9Filter::SetSubtitle(string inSubtitle) {
// LONG cx, cy;
// HRESULT locHR;
@@ -212,7 +236,7 @@
int nLength, nTextBmpWidth, nTextBmpHeight;
SIZE sz={0};
- TCHAR* szNewText = _T("Annodex Me Baby !");//inSubtitle.c_str();
+ TCHAR* szNewText = (TCHAR*)inSubtitle.c_str();//_T("Annodex Me Baby !");//inSubtitle.c_str();
nLength = _tcslen(szNewText); ;//(int) inSubtitle.size();
GetTextExtentPoint32(hdcBmp, szNewText, nLength, &sz);
Modified: trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.h 2004-06-02 03:59:20 UTC (rev 6802)
+++ trunk/oggdsf/src/lib/core/directshow/dsfSubtitleVMR9/SubtitleVMR9Filter.h 2004-06-02 09:35:37 UTC (rev 6803)
@@ -47,7 +47,7 @@
void SetColorRef(VMR9AlphaBitmap& bmpInfo);
HRESULT mHR;
//SubtitleVMR9OutputPin* mOutputPin;
- virtual HRESULT SetSubtitle(wstring inSubtitle);
+ virtual HRESULT SetSubtitle(string inSubtitle);
IVideoWindow* mVideoWindow;
IVMRMixerBitmap9* mBitmapMixer;
VMR9AlphaBitmap mAlphaBitmap;
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list