[xiph-commits] r7083 - in trunk/oggdsf/src/lib/codecs:
illiminable at dactyl.lonelymoon.com
illiminable
Sat Jul 10 09:54:50 PDT 2004
cmml/dsfCMMLDecoder theora/filters/dsfTheoraEncoder
Message-ID: <20040710165450.469FC9AAAB at dactyl.lonelymoon.com>
Author: illiminable
Date: Sat Jul 10 09:54:50 2004
New Revision: 7083
Added:
trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecoderIIDs.h
trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/ICMMLAppControl.h
trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/ICMMLCallbacks.cpp
trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/ICMMLCallbacks.h
Modified:
trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.cpp
trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.h
trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.cpp
trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.h
trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/dsfCMMLDecoder.vcproj
trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/stdafx.cpp
trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/stdafx.h
trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/ITheoraEncodeSettings.h
Log:
* Added application control interface to CMMLDecoder, so that an application can set a callback to receive Tags as they are rendered.
Modified: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.cpp 2004-07-10 16:05:25 UTC (rev 7082)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.cpp 2004-07-10 16:54:49 UTC (rev 7083)
@@ -1,7 +1,7 @@
//===========================================================================
//Copyright (C) 2003, 2004 Zentaro Kavanagh
//
-//Copyright (C) 2003 Commonwealth Scientific and Industrial Research
+//Copyright (C) 2003, 2004 Commonwealth Scientific and Industrial Research
// Organisation (CSIRO) Australia
//
//Redistribution and use in source and binary forms, with or without
@@ -58,6 +58,7 @@
, mCMMLParser(NULL)
, mSeenHead(false)
, mHeadTag(NULL)
+ , mCMMLCallbacks(NULL)
{
mCMMLParser = new CMMLParser;
//debugLog.open("C:\\Temp\\cmmlfilter.log", ios_base::out);
@@ -81,6 +82,16 @@
return pNewObject;
}
+STDMETHODIMP CMMLDecodeFilter::NonDelegatingQueryInterface(REFIID riid, void **ppv) {
+ if (riid == IID_ICMMLAppControl) {
+ *ppv = (ICMMLAppControl*)this;
+ ((IUnknown*)*ppv)->AddRef();
+ return NOERROR;
+ }
+
+ return CTransformFilter::NonDelegatingQueryInterface(riid, ppv);
+}
+
HRESULT CMMLDecodeFilter::CheckInputType(const CMediaType* inInputMediaType) {
if ( (inInputMediaType->majortype == MEDIATYPE_Text) &&
(inInputMediaType->subtype == MEDIASUBTYPE_CMML) &&
@@ -254,3 +265,13 @@
return retVal;
}
+
+//Implementation of ICMMLAppControl
+STDMETHODIMP_(bool) CMMLDecodeFilter::setCallbacks(ICMMLCallbacks* inCallbacks) {
+ mCMMLCallbacks = inCallbacks;
+ return true;
+}
+STDMETHODIMP_(ICMMLCallbacks*) CMMLDecodeFilter::getCallbacks() {
+ return mCMMLCallbacks;
+}
+
Modified: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.h 2004-07-10 16:05:25 UTC (rev 7082)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.h 2004-07-10 16:54:49 UTC (rev 7083)
@@ -1,7 +1,7 @@
//===========================================================================
//Copyright (C) 2003, 2004 Zentaro Kavanagh
//
-//Copyright (C) 2003 Commonwealth Scientific and Industrial Research
+//Copyright (C) 2003, 2004 Commonwealth Scientific and Industrial Research
// Organisation (CSIRO) Australia
//
//Redistribution and use in source and binary forms, with or without
@@ -39,9 +39,11 @@
#include "libWinCMMLParse.h"
#include "CMMLParser.h"
#include "libCMMLTags.h"
+#include "ICMMLAppControl.h"
using namespace std;
class CMMLDecodeFilter
: public CTransformFilter
+ , public ICMMLAppControl
{
public:
CMMLDecodeFilter(void);
@@ -49,6 +51,7 @@
//COM Creator Function
DECLARE_IUNKNOWN
static CUnknown* WINAPI CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr);
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
//Implement the Tranform filter interface
HRESULT CMMLDecodeFilter::CheckInputType(const CMediaType* inInputMediaType);
@@ -57,11 +60,15 @@
HRESULT CMMLDecodeFilter::GetMediaType(int inPosition, CMediaType* outMediaType);
HRESULT CMMLDecodeFilter::Transform(IMediaSample* inSample, IMediaSample* outSample);
+ //Implement ICMMLAppControl
+ virtual STDMETHODIMP_(bool) setCallbacks(ICMMLCallbacks* inCallbacks);
+ virtual STDMETHODIMP_(ICMMLCallbacks*) getCallbacks();
protected:
wstring toWStr(string inString);
CMMLParser* mCMMLParser;
bool mSeenHead;
C_HeadTag* mHeadTag;
+ ICMMLCallbacks* mCMMLCallbacks;
//fstream debugLog;
Added: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecoderIIDs.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecoderIIDs.h 2004-07-10 16:05:25 UTC (rev 7082)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecoderIIDs.h 2004-07-10 16:54:49 UTC (rev 7083)
@@ -0,0 +1,3 @@
+// {6188AD0C-62CB-4658-A14E-CD23CF84EC31}
+DEFINE_GUID(IID_ICMMLAppControl,
+0x6188ad0c, 0x62cb, 0x4658, 0xa1, 0x4e, 0xcd, 0x23, 0xcf, 0x84, 0xec, 0x31);
Added: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/ICMMLAppControl.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/ICMMLAppControl.h 2004-07-10 16:05:25 UTC (rev 7082)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/ICMMLAppControl.h 2004-07-10 16:54:49 UTC (rev 7083)
@@ -0,0 +1,56 @@
+//===========================================================================
+//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 Zentaro Kavanagh nor the names of 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.
+//===========================================================================
+
+#pragma once
+#include "ICMMLCallbacks.h"
+
+#ifndef __ICMMLAPPCONTROL__
+#define __ICMMLAPPCONTROL__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+DECLARE_INTERFACE_(ICMMLAppControl, IUnknown) {
+
+ virtual STDMETHODIMP_(bool) setCallbacks(ICMMLCallbacks* inCallbacks) PURE;
+ virtual STDMETHODIMP_(ICMMLCallbacks*) getCallbacks() PURE;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
\ No newline at end of file
Added: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/ICMMLCallbacks.cpp
===================================================================
Added: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/ICMMLCallbacks.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/ICMMLCallbacks.h 2004-07-10 16:05:25 UTC (rev 7082)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/ICMMLCallbacks.h 2004-07-10 16:54:49 UTC (rev 7083)
@@ -0,0 +1,42 @@
+//===========================================================================
+//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 Zentaro Kavanagh nor the names of 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.
+//===========================================================================
+
+#pragma once
+
+class ICMMLCallbacks
+{
+public:
+ virtual bool clipCallback(C_ClipTag* inClipTag) = 0;
+ virtual bool headCallback(C_HeadTag* inHeadTag) = 0;
+};
Modified: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.cpp 2004-07-10 16:05:25 UTC (rev 7082)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.cpp 2004-07-10 16:54:49 UTC (rev 7083)
@@ -1,7 +1,7 @@
//===========================================================================
//Copyright (C) 2003, 2004 Zentaro Kavanagh
//
-//Copyright (C) 2003 Commonwealth Scientific and Industrial Research
+//Copyright (C) 2003, 2004 Commonwealth Scientific and Industrial Research
// Organisation (CSIRO) Australia
//
//Redistribution and use in source and binary forms, with or without
Modified: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.h 2004-07-10 16:05:25 UTC (rev 7082)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.h 2004-07-10 16:54:49 UTC (rev 7083)
@@ -1,7 +1,7 @@
//===========================================================================
//Copyright (C) 2003, 2004 Zentaro Kavanagh
//
-//Copyright (C) 2003 Commonwealth Scientific and Industrial Research
+//Copyright (C) 2003, 2004 Commonwealth Scientific and Industrial Research
// Organisation (CSIRO) Australia
//
//Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,7 @@
#include <pullpin.h>
#include <initguid.h>
+#include "CMMLDecoderIIDs.h"
// {966D76B4-7D2F-4f01-B840-94E425D2214F}
DEFINE_GUID(MEDIASUBTYPE_SubtitleVMR9,
0x966d76b4, 0x7d2f, 0x4f01, 0xb8, 0x40, 0x94, 0xe4, 0x25, 0xd2, 0x21, 0x4f);
Modified: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/dsfCMMLDecoder.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/dsfCMMLDecoder.vcproj 2004-07-10 16:05:25 UTC (rev 7082)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/dsfCMMLDecoder.vcproj 2004-07-10 16:54:49 UTC (rev 7083)
@@ -152,6 +152,15 @@
RelativePath="CMMLDecodeFilter.h">
</File>
<File
+ RelativePath="CMMLDecoderIIDs.h">
+ </File>
+ <File
+ RelativePath="ICMMLAppControl.h">
+ </File>
+ <File
+ RelativePath="ICMMLCallbacks.h">
+ </File>
+ <File
RelativePath="cmmldecoderdllstuff.h">
</File>
<File
Modified: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/stdafx.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/stdafx.cpp 2004-07-10 16:05:25 UTC (rev 7082)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/stdafx.cpp 2004-07-10 16:54:49 UTC (rev 7083)
@@ -1,7 +1,7 @@
//===========================================================================
//Copyright (C) 2003, 2004 Zentaro Kavanagh
//
-//Copyright (C) 2003 Commonwealth Scientific and Industrial Research
+//Copyright (C) 2003, 2004 Commonwealth Scientific and Industrial Research
// Organisation (CSIRO) Australia
//
//Redistribution and use in source and binary forms, with or without
Modified: trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/stdafx.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/stdafx.h 2004-07-10 16:05:25 UTC (rev 7082)
+++ trunk/oggdsf/src/lib/codecs/cmml/dsfCMMLDecoder/stdafx.h 2004-07-10 16:54:49 UTC (rev 7083)
@@ -1,7 +1,7 @@
//===========================================================================
//Copyright (C) 2003, 2004 Zentaro Kavanagh
//
-//Copyright (C) 2003 Commonwealth Scientific and Industrial Research
+//Copyright (C) 2003, 2004 Commonwealth Scientific and Industrial Research
// Organisation (CSIRO) Australia
//
//Redistribution and use in source and binary forms, with or without
Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/ITheoraEncodeSettings.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/ITheoraEncodeSettings.h 2004-07-10 16:05:25 UTC (rev 7082)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/ITheoraEncodeSettings.h 2004-07-10 16:54:49 UTC (rev 7083)
@@ -20,8 +20,8 @@
//
//};
-#ifndef __IGARGLEDMO__
-#define __IGARGLEDMO__
+#ifndef __ITHEORAENCODESETTINGS__
+#define __ITHEORAENCODESETTINGS__
#ifdef __cplusplus
extern "C" {
More information about the commits
mailing list