[hxdatatype] CR: making plugins unloadable
Jonathan H.H. Bloedow jbloedow at real.comOK, here's a bunch of diffs that are designed to make sure every datatype
plugin has a working CanUnload2 function. In some cases I've removed custom
global ref counter solutions and replaced them with CHXBaseCountingObject
based solutions.
-- Jonathan
Index: Umakefil
===================================================================
RCS file: /cvs/datatype/rm/fileformat/Umakefil,v
retrieving revision 1.7
diff -b -u -5 -r1.7 Umakefil
--- Umakefil 4 Apr 2003 16:53:51 -0000 1.7
+++ Umakefil 29 Jul 2003 20:29:08 -0000
@@ -59,9 +59,10 @@
project.ExportFunction("RMACreateInstance",
"IUnknown** ppObj",
"common/include",
"hxcom.h")
project.ExportFunction("CanUnload", "void")
+project.ExportFunction("CanUnload2", "void")
DLLTarget("rmfformat")
DependTarget()
Index: plugin.cpp
===================================================================
RCS file: /cvs/datatype/rm/fileformat/plugin.cpp,v
retrieving revision 1.1.1.1
diff -b -u -5 -r1.1.1.1 plugin.cpp
--- plugin.cpp 18 Oct 2002 01:56:33 -0000 1.1.1.1
+++ plugin.cpp 29 Jul 2003 20:29:08 -0000
@@ -70,5 +70,11 @@
STDAPI ENTRYPOINT(CanUnload)(void)
{
return (CHXBaseCountingObject::ObjectsActive() > 0 ? HXR_FAIL : HXR_OK);
}
+
+STDAPI ENTRYPOINT(CanUnload2)(void)
+{
+ return CanUnload();
+}
+
Index: rarender.h
===================================================================
RCS file: /cvs/datatype/rm/audio/renderer/rarender.h,v
retrieving revision 1.7
diff -b -u -5 -r1.7 rarender.h
--- rarender.h 13 May 2003 15:31:17 -0000 1.7
+++ rarender.h 29 Jul 2003 20:55:16 -0000
@@ -48,10 +48,11 @@
/****************************************************************************
* Includes
*/
#include "hxcom.h"
+#include "baseobj.h"
#include "hxtypes.h"
#include "hxslist.h"
#include "hxresult.h"
#include "hxmarsh.h"
#include "netbyte.h"
@@ -120,11 +121,12 @@
public IHXInterruptSafe,
public IHXDryNotification,
public IHXBandwidthLister,
public IHXStatistics,
public IHXValues, // for
HELIX_FEATURE_SETSRCPROPS
- public IHXUpdateProperties
+ public IHXUpdateProperties,
+ public CHXBaseCountingObject
{
protected:
LONG32 m_lRefCount;
IUnknown* m_pContext;
IHXStream* m_pStream;
Index: plugin.cpp
===================================================================
RCS file: /cvs/datatype/rm/audio/renderer/plugin.cpp,v
retrieving revision 1.1.1.1
diff -b -u -5 -r1.1.1.1 plugin.cpp
--- plugin.cpp 18 Oct 2002 01:56:32 -0000 1.1.1.1
+++ plugin.cpp 29 Jul 2003 20:55:15 -0000
@@ -69,12 +69,11 @@
#endif
}
STDAPI ENTRYPOINT(CanUnload)(void)
{
- // XXXMEH - correct this
- return HXR_FAIL;
+ return (CHXBaseCountingObject::ObjectsActive() > 0 ? HXR_FAIL : HXR_OK);
}
STDAPI ENTRYPOINT(CanUnload2)(void)
{
return ENTRYPOINT(CanUnload)();
Index: rarender.cpp
===================================================================
RCS file: /cvs/datatype/rm/audio/renderer/rarender.cpp,v
retrieving revision 1.15
diff -b -u -5 -r1.15 rarender.cpp
--- rarender.cpp 27 Jun 2003 20:13:47 -0000 1.15
+++ rarender.cpp 29 Jul 2003 21:01:04 -0000
@@ -62,13 +62,10 @@
#define DEFAULT_DRY_NOTIFICATION 0
#define MAX_TRANSPORT_BUFFER_DURATION 20000
-#ifndef HELIX_CONFIG_NOSTATICS
-INT32 g_nRefCount_rare = 0;
-#endif // HELIX_CONFIG_NOSTATICS
ENABLE_DLLACCESS_PATHS(RACodec);
//#define RARENDER_LOGING_ON
#ifdef RARENDER_LOGING_ON
@@ -379,20 +376,14 @@
, m_pASMStream(NULL)
#endif
, m_pValues(NULL)
, m_ulSrcPropertySubStream(NO_STREAM_SET)
{
-#ifndef HELIX_CONFIG_NOSTATICS
- g_nRefCount_rare++;
-#endif // HELIX_CONFIG_NOSTATICS
}
CRealAudioRenderer::~CRealAudioRenderer()
{
-#ifndef HELIX_CONFIG_NOSTATICS
- g_nRefCount_rare--;
-#endif // HELIX_CONFIG_NOSTATICS
EndStream();
HX_DELETE(m_pMutex);
}
Index: umakedll
===================================================================
RCS file: /cvs/datatype/rm/video/renderer/umakedll,v
retrieving revision 1.6
diff -b -u -5 -r1.6 umakedll
--- umakedll 22 Jun 2003 20:18:34 -0000 1.6
+++ umakedll 29 Jul 2003 21:42:18 -0000
@@ -75,10 +75,11 @@
project.ExportFunction("RMACreateInstance",
"IUnknown** ppObj",
"common/include",
"hxcom.h")
project.ExportFunction("CanUnload", "void")
+project.ExportFunction("CanUnload2", "void")
project.ExportFunction("SetDLLAccessPath", "const char* pszPath")
DLLTarget("rvxrender")
DependTarget()
Index: rvxdll.cpp
===================================================================
RCS file: /cvs/datatype/rm/video/renderer/rvxdll.cpp,v
retrieving revision 1.3
diff -b -u -5 -r1.3 rvxdll.cpp
--- rvxdll.cpp 1 Jul 2003 02:23:34 -0000 1.3
+++ rvxdll.cpp 29 Jul 2003 21:42:35 -0000
@@ -77,5 +77,10 @@
STDAPI ENTRYPOINT(CanUnload)(void)
{
return CRVXVideoRenderer::CanUnload();
}
+STDAPI ENTRYPOINT(CanUnload2)(void)
+{
+ return CRVXVideoRenderer::CanUnload();
+}
+
Index: Umakefil
===================================================================
RCS file: /cvs/datatype/mp3/fileformat/Umakefil,v
retrieving revision 1.9
diff -b -u -5 -r1.9 Umakefil
--- Umakefil 28 Apr 2003 18:29:17 -0000 1.9
+++ Umakefil 29 Jul 2003 21:04:56 -0000
@@ -61,9 +61,10 @@
project.ExportFunction("RMACreateInstance",
"IUnknown** ppObj",
"common/include",
"hxcom.h")
project.ExportFunction("CanUnload", "void")
+project.ExportFunction("CanUnload2", "void")
DLLTarget("mp3fformat")
DependTarget()
Index: pub/mp3ff.h
===================================================================
RCS file: /cvs/datatype/mp3/fileformat/pub/mp3ff.h,v
retrieving revision 1.8
diff -b -u -5 -r1.8 mp3ff.h
--- pub/mp3ff.h 24 Jul 2003 17:55:14 -0000 1.8
+++ pub/mp3ff.h 29 Jul 2003 21:05:07 -0000
@@ -34,10 +34,11 @@
* ***** END LICENSE BLOCK ***** */
#ifndef _HXMP3FMT_H_
#define _HXMP3FMT_H_
+#include "baseobj.h"
///////////////////////////////////////////////////////////////////////////////
// Constants
///////////////////////////////////////////////////////////////////////////////
#define MY_PLUGIN_VERSION 0
@@ -159,11 +160,12 @@
class CRnMp3Fmt : public IHXFileFormatObject,
public IHXFileResponse,
public IHXFileStatResponse,
public IHXPacketFormat,
public IHXPlugin,
- public IHXThreadSafeMethods
+ public IHXThreadSafeMethods,
+ public CHXBaseCountingObject
{
public:
CRnMp3Fmt();
///////////////////////////////////////////////////////////////////////////
Index: mp3ff.cpp
===================================================================
RCS file: /cvs/datatype/mp3/fileformat/mp3ff.cpp,v
retrieving revision 1.21
diff -b -u -5 -r1.21 mp3ff.cpp
--- mp3ff.cpp 24 Jul 2003 17:55:14 -0000 1.21
+++ mp3ff.cpp 29 Jul 2003 21:05:54 -0000
@@ -141,12 +141,17 @@
* then the pluginhandler can unload the DLL
*
*/
STDAPI ENTRYPOINT(CanUnload)(void)
{
+ return (CHXBaseCountingObject::ObjectsActive() > 0 ? HXR_FAIL : HXR_OK );
+}
+
+STDAPI ENTRYPOINT(CanUnload2)(void)
+{
///XXX TBD: Use global refcount -- check other plugins
- return HXR_FAIL;
+ return CanUnload();
}
///////////////////////////////////////////////////////////////////////////////
// CRnMp3Fmt static variables ref: filefmt1.h
//
Index: Umakefil
===================================================================
RCS file: /cvs/datatype/mp3/renderer/Umakefil,v
retrieving revision 1.8
diff -b -u -5 -r1.8 Umakefil
--- Umakefil 11 Jul 2003 20:15:08 -0000 1.8
+++ Umakefil 29 Jul 2003 21:06:22 -0000
@@ -43,10 +43,11 @@
project.AddModuleLibraries("common/runtime[runtlib]",
"common/dbgtool[debuglib]",
"common/util[utillib]",
"common/container[contlib]",
+ "common/system[syslib]",
"datatype/mp3/common[mp3lib]",
"datatype/mp3/payload[mp3payld]")
project.AddModuleIncludes("datatype/mp3/codec/pub")
@@ -78,9 +79,10 @@
project.ExportFunction("RMACreateInstance",
"IUnknown** ppObj",
"common/include",
"hxcom.h")
project.ExportFunction("CanUnload", "void")
+project.ExportFunction("CanUnload2", "void")
DLLTarget("mp3render")
DependTarget()
Index: pub/mp3rend.h
===================================================================
RCS file: /cvs/datatype/mp3/renderer/pub/mp3rend.h,v
retrieving revision 1.5
diff -b -u -5 -r1.5 mp3rend.h
--- pub/mp3rend.h 25 Apr 2003 19:49:39 -0000 1.5
+++ pub/mp3rend.h 29 Jul 2003 21:06:40 -0000
@@ -35,10 +35,11 @@
#ifndef _HXMP3REN_H_
#define _HXMP3REN_H_
#include "ihxdefpackethookhlp.h"
+#include "baseobj.h"
///////////////////////////////////////////////////////////////////////////////
// Constants
//
@@ -114,11 +115,12 @@
class CRnMp3Ren : public IHXRenderer,
public IHXInterruptSafe,
public IHXDryNotification,
public IHXStatistics,
public IHXPlugin,
- public IHXUpdateProperties
+ public IHXUpdateProperties,
+ public CHXBaseCountingObject
{
public:
CRnMp3Ren();
virtual ~CRnMp3Ren(void);
Index: plugin.cpp
===================================================================
RCS file: /cvs/datatype/mp3/renderer/plugin.cpp,v
retrieving revision 1.3
diff -b -u -5 -r1.3 plugin.cpp
--- plugin.cpp 11 Jul 2003 20:15:08 -0000 1.3
+++ plugin.cpp 29 Jul 2003 21:07:07 -0000
@@ -88,8 +88,13 @@
return HXR_OUTOFMEMORY;
}
STDAPI ENTRYPOINT(CanUnload)(void)
{
- return HXR_FAIL;
+ return (CHXBaseCountingObject::ObjectsActive() > 0 ? HXR_FAIL : HXR_OK );
+}
+
+STDAPI ENTRYPOINT(CanUnload2)(void)
+{
+ return CanUnload();
}
Index: atomizer.cpp
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/atomizer.cpp,v
retrieving revision 1.4
diff -b -u -5 -r1.4 atomizer.cpp
--- atomizer.cpp 14 Jul 2003 07:31:11 -0000 1.4
+++ atomizer.cpp 29 Jul 2003 21:20:46 -0000
@@ -103,18 +103,16 @@
, m_bSyncAccessEnabled(FALSE)
, m_pRecursionCallback(NULL)
, m_ulRecursionCount(0)
, m_lRefCount(0)
{
- g_nRefCount_qtff++;
}
CAtomizer::~CAtomizer()
{
Close();
- g_nRefCount_qtff--;
}
/****************************************************************************
* Main Interface
Index: bfragfct.cpp
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/bfragfct.cpp,v
retrieving revision 1.2
diff -b -u -5 -r1.2 bfragfct.cpp
--- bfragfct.cpp 26 Apr 2003 03:18:21 -0000 1.2
+++ bfragfct.cpp 29 Jul 2003 21:20:46 -0000
@@ -57,12 +57,10 @@
ULONG32 ulInitialOccupancy)
: m_lRefCount(0)
{
CBufferFragment* pBufferFragment;
- g_nRefCount_qtff++;
-
m_pRingBuffer = new CRingBuffer(ulMaxSize);
HX_ASSERT(m_pRingBuffer);
while (ulInitialOccupancy > 0)
Index: fswtchr.cpp
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/fswtchr.cpp,v
retrieving revision 1.3
diff -b -u -5 -r1.3 fswtchr.cpp
--- fswtchr.cpp 26 Apr 2003 03:18:21 -0000 1.3
+++ fswtchr.cpp 29 Jul 2003 21:20:46 -0000
@@ -75,18 +75,16 @@
, m_uLastDisownedChild(0)
, m_bClosing(FALSE)
, m_CloseStatus(HXR_OK)
, m_bSyncMode(FALSE)
{
- g_nRefCount_qtff++;
}
CFileSwitcher::~CFileSwitcher()
{
Reset();
- g_nRefCount_qtff--;
}
/****************************************************************************
* IHXFileSwitcher private methods
Index: fswtchr_passthrough.cpp
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/fswtchr_passthrough.cpp,v
retrieving revision 1.1
diff -b -u -5 -r1.1 fswtchr_passthrough.cpp
--- fswtchr_passthrough.cpp 3 Jun 2003 20:25:09 -0000 1.1
+++ fswtchr_passthrough.cpp 29 Jul 2003 21:20:46 -0000
@@ -51,18 +51,16 @@
: m_pFileObject(NULL)
, m_pResponse(NULL)
, m_State(FSWCHR_Offline)
, m_lRefCount(0)
{
- g_nRefCount_qtff++;
}
CFileSwitcherPassthrough::~CFileSwitcherPassthrough()
{
Reset();
- g_nRefCount_qtff--;
}
/****************************************************************************
* IHXFileSwitcher private methods
Index: mempager.cpp
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/mempager.cpp,v
retrieving revision 1.3
diff -b -u -5 -r1.3 mempager.cpp
--- mempager.cpp 14 Jul 2003 07:31:11 -0000 1.3
+++ mempager.cpp 29 Jul 2003 21:20:46 -0000
@@ -78,18 +78,16 @@
, m_ulMinPageSize(MEMPAGER_DFLT_MIN_PAGE_SIZE)
, m_pPageBuffer(NULL)
, m_bSyncMode(FALSE)
, m_lRefCount(0)
{
- g_nRefCount_qtff++;
}
CMemPager::~CMemPager()
{
Reset();
- g_nRefCount_qtff--;
}
/****************************************************************************
* CMemPager private methods
Index: plugin.cpp
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/plugin.cpp,v
retrieving revision 1.2
diff -b -u -5 -r1.2 plugin.cpp
--- plugin.cpp 26 Apr 2003 03:18:21 -0000 1.2
+++ plugin.cpp 29 Jul 2003 21:20:46 -0000
@@ -109,11 +109,11 @@
* Function implemented by all plugin DLL's if it returns HXR_OK
* then the pluginhandler can unload the DLL
*/
STDAPI ENTRYPOINT(CanUnload)(void)
{
- return (g_nRefCount_qtff ? HXR_FAIL : HXR_OK);
+ return (CHXBaseCountingObject::ObjectsActive() > 0 ? HXR_FAIL : HXR_OK);
}
STDAPI ENTRYPOINT(CanUnload2)(void)
{
return ENTRYPOINT(CanUnload)();
Index: qtffplin.cpp
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/qtffplin.cpp,v
retrieving revision 1.17
diff -b -u -5 -r1.17 qtffplin.cpp
--- qtffplin.cpp 8 Jul 2003 21:16:17 -0000 1.17
+++ qtffplin.cpp 29 Jul 2003 21:20:46 -0000
@@ -114,11 +114,10 @@
/****************************************************************************
* Globals
*/
-g_base_nRefCount_qtff_TypeModifier INT32 g_base_nRefCount_qtff = 0;
/****************************************************************************
* Constructor/Destructor
*/
@@ -144,17 +143,15 @@
#ifdef QTCONFIG_BFRAG_FACTORY
, m_pBufferFragmentFactory(NULL)
#endif // QTCONFIG_BFRAG_FACTORY
, m_ulStreamMetaInfoMask(META_INFO_NONE)
{
- g_nRefCount_qtff++;
}
CQTFileFormat::~CQTFileFormat()
{
Close();
- g_nRefCount_qtff--;
}
/************************************************************************
* IHXPlugin methods
Index: qttrack.cpp
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/qttrack.cpp,v
retrieving revision 1.9
diff -b -u -5 -r1.9 qttrack.cpp
--- qttrack.cpp 3 Jun 2003 18:10:27 -0000 1.9
+++ qttrack.cpp 29 Jul 2003 21:20:46 -0000
@@ -91,19 +91,15 @@
if (pTrackHeaderAtom)
{
m_ulTrackID = pTrackHeaderAtom->Get_TrackID();
}
-
- g_nRefCount_qtff++;
}
CQTTrack::~CQTTrack()
{
Close();
-
- g_nRefCount_qtff--;
}
/****************************************************************************
* Main Interface
*/
Index: hinttrackstub/qtpktasmstub.cpp
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/hinttrackstub/qtpktasmstub.cpp,v
retrieving revision 1.3
diff -b -u -5 -r1.3 qtpktasmstub.cpp
--- hinttrackstub/qtpktasmstub.cpp 28 May 2003 19:50:20 -0000 1.3
+++ hinttrackstub/qtpktasmstub.cpp 29 Jul 2003 21:20:46 -0000
@@ -44,16 +44,14 @@
, m_pCurrentSegmentStart(NULL)
, m_ulCurrentSegmentSize(0)
, m_ulCurrentSegmentIdx(0)
, m_ulSegmentFragments(0)
{
- g_nRefCount_qtff++;
}
CQTPacketAssembler::~CQTPacketAssembler()
{
- g_nRefCount_qtff--;
}
/****************************************************************************
* Main Interface
*/
Index: pub/bfragfct.h
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/pub/bfragfct.h,v
retrieving revision 1.2
diff -b -u -5 -r1.2 bfragfct.h
--- pub/bfragfct.h 26 Apr 2003 03:18:21 -0000 1.2
+++ pub/bfragfct.h 29 Jul 2003 21:20:46 -0000
@@ -122,12 +122,10 @@
while (pDeadFragment = ((CBufferFragment*) m_pRingBuffer->Get()))
{
pDeadFragment->Release();
}
delete m_pRingBuffer;
-
- g_nRefCount_qtff--;
}
PRIVATE_DESTRUCTORS_ARE_NOT_A_CRIME
};
Index: pub/qtffplin.h
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/pub/qtffplin.h,v
retrieving revision 1.7
diff -b -u -5 -r1.7 qtffplin.h
--- pub/qtffplin.h 14 Jul 2003 18:40:13 -0000 1.7
+++ pub/qtffplin.h 29 Jul 2003 21:20:46 -0000
@@ -51,10 +51,11 @@
/****************************************************************************
* Includes
*/
#include "hxcom.h"
+#include "baseobj.h"
#include "hxplugn.h"
#include "hxformt.h"
#include "hxfiles.h"
#include "hxerror.h"
#include "hxasm.h"
@@ -85,10 +86,11 @@
public IHXFileResponse,
public IHXAtomizationCommander,
public IHXAtomizerResponse,
public IHXThreadSafeMethods,
public IHXASMSource,
+ public CHXBaseCountingObject,
public IHXPacketFormat
{
public:
/*
* Constructor
Index: pub/qtffrefcounter.h
===================================================================
RCS file: /cvs/datatype/mp4/fileformat/pub/qtffrefcounter.h,v
retrieving revision 1.1
diff -b -u -5 -r1.1 qtffrefcounter.h
--- pub/qtffrefcounter.h 26 Apr 2003 03:18:21 -0000 1.1
+++ pub/qtffrefcounter.h 29 Jul 2003 21:20:46 -0000
@@ -37,20 +37,11 @@
#define _QTFFREFCOUNTER_H_
/****************************************************************************
* Defines
*/
-#ifdef HELIX_CONFIG_NOSTATICS
-#include "globals/hxglobals.h"
-#define g_nRefCount_qtff HXGlobalInt32::Get(&g_base_nRefCount_qtff)
-#define g_base_nRefCount_qtff_TypeModifier const
-#else // HELIX_CONFIG_NOSTATICS
-#define g_nRefCount_qtff g_base_nRefCount_qtff
-#define g_base_nRefCount_qtff_TypeModifier /**/
-#endif // HELIX_CONFIG_NOSTATICS
/****************************************************************************
* Globals
*/
-extern g_base_nRefCount_qtff_TypeModifier INT32 g_base_nRefCount_qtff;
#endif // _QTFFREFCOUNTER_H_
Index: dllumakefil
===================================================================
RCS file: /cvs/datatype/mp4/audio/renderer/dllumakefil,v
retrieving revision 1.1
diff -b -u -5 -r1.1 dllumakefil
--- dllumakefil 14 Feb 2003 16:34:20 -0000 1.1
+++ dllumakefil 29 Jul 2003 21:30:42 -0000
@@ -64,10 +64,11 @@
project.ExportFunction("RMACreateInstance",
"IUnknown** ppObj",
"common/include",
"hxcom.h")
project.ExportFunction("CanUnload", "void")
+project.ExportFunction("CanUnload2", "void")
project.ExportFunction("SetDLLAccessPath", "const char* pszPath")
DLLTarget("mp4arender")
DependTarget()
Index: audiids.cpp
===================================================================
RCS file: /cvs/datatype/mp4/audio/renderer/audiids.cpp,v
retrieving revision 1.2
diff -b -u -5 -r1.2 audiids.cpp
--- audiids.cpp 27 Jun 2003 18:17:27 -0000 1.2
+++ audiids.cpp 29 Jul 2003 21:31:02 -0000
@@ -121,8 +121,12 @@
*
*/
STDAPI ENTRYPOINT(CanUnload)(void)
{
- return ((CHXBaseCountingObject::ObjectsActive() > 0) ?
- HXR_FAIL : HXR_OK);
+ return ((CHXBaseCountingObject::ObjectsActive() > 0) ? HXR_FAIL : HXR_OK);
+}
+
+STDAPI ENTRYPOINT(CanUnload2)(void)
+{
+ return CanUnload();
}
Index: dllumakefil
===================================================================
RCS file: /cvs/datatype/mp4/video/renderer/dllumakefil,v
retrieving revision 1.3
diff -b -u -5 -r1.3 dllumakefil
--- dllumakefil 22 Jun 2003 20:17:16 -0000 1.3
+++ dllumakefil 29 Jul 2003 21:31:29 -0000
@@ -30,10 +30,11 @@
project.ExportFunction("RMACreateInstance",
"IUnknown** ppObj",
"common/include",
"hxcom.h")
project.ExportFunction("CanUnload", "void")
+project.ExportFunction("CanUnload2", "void")
project.ExportFunction("SetDLLAccessPath", "const char* pszPath")
DLLTarget('mp4vrender')
DependTarget()
Index: plugin.cpp
===================================================================
RCS file: /cvs/datatype/mp4/video/renderer/plugin.cpp,v
retrieving revision 1.2
diff -b -u -5 -r1.2 plugin.cpp
--- plugin.cpp 13 May 2003 02:15:39 -0000 1.2
+++ plugin.cpp 29 Jul 2003 21:31:29 -0000
@@ -104,5 +104,10 @@
STDAPI ENTRYPOINT(CanUnload)(void)
{
return CMP4VideoRenderer::CanUnload();
}
+
+STDAPI ENTRYPOINT(CanUnload2)(void)
+{
+ return CMP4VideoRenderer::CanUnload();
+}
Index: plugin.cpp
===================================================================
RCS file: /cvs/datatype/h263/renderer/plugin.cpp,v
retrieving revision 1.3
diff -b -u -5 -r1.3 plugin.cpp
--- plugin.cpp 26 Jun 2003 02:32:29 -0000 1.3
+++ plugin.cpp 29 Jul 2003 21:43:08 -0000
@@ -102,5 +102,10 @@
STDAPI ENTRYPOINT(CanUnload)(void)
{
return CH263VideoRenderer::CanUnload();
}
+
+STDAPI ENTRYPOINT(CanUnload2)(void)
+{
+ return CH263VideoRenderer::CanUnload();
+}
Index: umakedll
===================================================================
RCS file: /cvs/datatype/h263/renderer/umakedll,v
retrieving revision 1.1
diff -b -u -5 -r1.1 umakedll
--- umakedll 13 May 2003 01:57:04 -0000 1.1
+++ umakedll 29 Jul 2003 21:43:08 -0000
@@ -70,10 +70,11 @@
project.ExportFunction("RMACreateInstance",
"IUnknown** ppObj",
"common/include",
"hxcom.h")
project.ExportFunction("CanUnload", "void")
+project.ExportFunction("CanUnload2", "void")
project.ExportFunction("SetDLLAccessPath",
"const char* pszPath")
DLLTarget('h263render')
Index: Umakefil
===================================================================
RCS file: /cvs/datatype/group/video/Umakefil,v
retrieving revision 1.1
diff -b -u -5 -r1.1 Umakefil
--- Umakefil 13 May 2003 02:32:24 -0000 1.1
+++ Umakefil 29 Jul 2003 22:24:19 -0000
@@ -49,10 +49,11 @@
project.ExportFunction("RMACreateInstance",
"IUnknown** ppObj",
"common/include",
"hxcom.h")
project.ExportFunction("CanUnload", "void")
+project.ExportFunction("CanUnload2", "void")
project.ExportFunction("SetDLLAccessPath", "const char* pszPath")
DLLTarget("vidplin")
DependTarget()
Index: vidplin.cpp
===================================================================
RCS file: /cvs/datatype/group/video/vidplin.cpp,v
retrieving revision 1.1
diff -b -u -5 -r1.1 vidplin.cpp
--- vidplin.cpp 13 May 2003 02:32:24 -0000 1.1
+++ vidplin.cpp 29 Jul 2003 22:24:01 -0000
@@ -149,19 +149,24 @@
* then the pluginhandler can unload the DLL
*
*/
STDAPI CanUnload(void)
{
- HX_RESULT (STDAPICALLTYPE * const *iterator)(void) =
&(VideoPluginFactory::m_fpUnloadArray[0]);
- while(*iterator)
+ for( int i=0; VideoPluginFactory::m_fpUnloadArray[i]; i++ )
{
- if (HXR_OK != (*iterator++)())
+ if( (VideoPluginFactory::m_fpUnloadArray[i])() != HXR_OK )
{
return HXR_FAIL;
}
}
+
return HXR_OK;
+}
+
+STDAPI CanUnload2(void)
+{
+ return CanUnload();
}
/////////////////////////////////////////////////////////////////////////
// Method:
// VideoPluginFactory
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at datatype.helixcommunity.org
For additional commands, e-mail: dev-help at datatype.helixcommunity.org