Henry Ping wrote:
> Looks good.
thanks, now checked into HEAD.
--greg.
>
> Do we need similar changes in
/unix/CHXClientEngineUnix.cpp for Windows and
> MacOSX? It seems some of the changes in Unix code can
be shared among the
> platforms.
>
> -->Henry
>
>> -----Original Message-----
>> From: player-dev-bounces helixcommunity.org
>> [mailto:player-dev-bounces helixcommunity.org] On
Behalf Of
>> Greg Wright
>> Sent: Tuesday, February 06, 2007 5:31 PM Ping
>> To: player-dev; olpc-player-dev lists.helixcommunity.org
>> Subject: [Player-dev] CR: Port HXClientKit to
Atlas
>>
>> Project
>> =======
>> HXClientKit modernization to Atlas platform.
>>
>>
>> Synopsis
>> ========
>> HXClientkit had yet to be ported over to use the
new
>> platform, to properly load and to initialize it.
>>
>> I did not go 100% to Atlas, like we did with splay.
What I
>> left out was the use of the Kicker and the
EventHandler. I
>> left HXClientKit using the old EventOccured(). This
is
>> because moving to the new Kick would require
upstream changes
>> to the player that I don't have time or the code
exposure
>> for. It will work just fine, but isn't ultimately
what we want.
>>
>> I also removed the hard coding of
'plugins','common' and 'codecs'
>> as the DT_* directories. I don't think this really
makes any
>> sense in the new platform. And, until we have a
player using
>> HXClientKit it makes it easier to build and test
with it.
>>
>> After these changes testkit builds and runs fine.
Plays back A/V.
>>
>>
>> Files Modified
>> ==============
>>
>>
>> Branch(s)
>> =========
>> HEAD only
>>
>> --greg.
>>
>>
>>
>> Index: pub/HXClientCFuncs.h
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/pub/HXClientCFuncs.h,v
>> retrieving revision 1.21
>> diff -u -w -r1.21 HXClientCFuncs.h
>> --- pub/HXClientCFuncs.h 1 Jul 2005 00:19:24
-0000 1.21
>> +++ pub/HXClientCFuncs.h 7 Feb 2007 01:27:45 -0000
>>  -65,11 +65,8 
>> bool ClientEngineHandleClassicEvent( EventRecord*
classicEvent );
>>
>> #elif defined(_UNIX)
>> -
>> #include <X11/Xlib.h>
>> -
>> bool ClientEngineProcessXEvent( XEvent* pXEvent
);
>> -
>> #endif
>>
>> void ClientEngineSetCallbacks( const
>> HXClientEngineCallbacks* pClientEngineCallbacks );
>> Index: src/CHXClientContext.cpp
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientContext.cpp,v
>> retrieving revision 1.22
>> diff -u -w -r1.22 CHXClientContext.cpp
>> --- src/CHXClientContext.cpp 23 Mar 2005 00:07:55
-0000 1.22
>> +++ src/CHXClientContext.cpp 7 Feb 2007 01:27:45
-0000
>>  -59,13 +59,6 
>> #include "hxfiles.h" // IHXRequest
>> #include "ihxpckts.h"
>> #include "hxcore.h"
>> -
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXBuffer, IHXBuffer );
>> -HX_SMART_POINTER_INLINE( SPIHXStreamSource,
IHXStreamSource
>> ); -HX_SMART_POINTER_INLINE( SPIHXPlayer, IHXPlayer
);
>> -HX_SMART_POINTER_INLINE( SPIHXPlayer2, IHXPlayer2
);
>> -HX_SMART_POINTER_INLINE( SPIHXRequest, IHXRequest
);
>> #include "exit_hx_headers.h"
>>
>> #include "hlxclib/string.h"
>> Index: src/CHXClientContext.h
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientContext.h,v
>> retrieving revision 1.14
>> diff -u -w -r1.14 CHXClientContext.h
>> --- src/CHXClientContext.h 23 Mar 2005 00:07:55
-0000 1.14
>> +++ src/CHXClientContext.h 7 Feb 2007 01:27:45
-0000
>>  -64,8 +64,8 
>> #include "hxwin.h" //
IHXStatusMessage
>> #include "hxauth.h"
>>
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE(
SPIHXAuthenticationManagerResponse,
>> IHXAuthenticationManagerResponse );
>> +#include "hxcomptr.h"
>> +DEFINE_SMART_PTR( IHXAuthenticationManagerResponse
);
>> #include "exit_hx_headers.h"
>>
>> #include "HXClientCallbacks.h"
>> Index: src/CHXClientDataStream.cpp
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientDataStream.cpp,v
>> retrieving revision 1.11
>> diff -u -w -r1.11 CHXClientDataStream.cpp
>> --- src/CHXClientDataStream.cpp 4 Apr 2005 22:05:49
>> -0000 1.11
>> +++ src/CHXClientDataStream.cpp 7 Feb 2007 01:27:45
-0000
>>  -64,16 +64,8 
>> #include "hxcore.h" // IHXValidator
>> #include "mfsiface.h"
>>
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXBuffer, IHXBuffer );
>> -HX_SMART_POINTER_INLINE( SPIHXValues, IHXValues );
>> -HX_SMART_POINTER_INLINE( SPIHXPlayer, IHXPlayer );
>> -HX_SMART_POINTER_INLINE( SPIHXClientEngine,
IHXClientEngine
>> ); -HX_SMART_POINTER_INLINE( SPIHXPlugin, IHXPlugin
);
>> -HX_SMART_POINTER_INLINE( SPIHXPlugin2Handler,
>> IHXPlugin2Handler ); -HX_SMART_POINTER_INLINE(
>> SPIHXMemoryFileSystem2, IHXMemoryFileSystem2 );
>> -HX_SMART_POINTER_INLINE( SPIHXValidator,
IHXValidator );
>> -HX_SMART_POINTER_INLINE( SPIHXCommonClassFactory,
>> IHXCommonClassFactory );
>> +#include "hxcomptr.h"
>> +DEFINE_SMART_PTR( IHXMemoryFileSystem2 );
>> #include "exit_hx_headers.h"
>>
>> static const char* const kProtocolMemFSName =
"mem";
>> Index: src/CHXClientEngine.cpp
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientEngine.cpp,v
>> retrieving revision 1.6
>> diff -u -w -r1.6 CHXClientEngine.cpp
>> --- src/CHXClientEngine.cpp 23 Mar 2005 00:07:55
-0000 1.6
>> +++ src/CHXClientEngine.cpp 7 Feb 2007 01:27:45
-0000
>>  -52,9 +52,6 
>>
>> #include "enter_hx_headers.h"
>> #include "hxcore.h"
>> -
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXClientEngineSetup,
>> IHXClientEngineSetup );
>> #include "exit_hx_headers.h"
>>
>> #include "CHXClientEngineContext.h"
>>  -216,7 +213,10 
>> CHXClientEngine::EventOccurred( HXxEvent* pEvent
)
>> {
>> IHXClientEngine* pIClientEngine =
GetClientEngine();
>> - if ( !pIClientEngine ) return HXR_OK; // XXXSEH:
Should
>> this fail?
>> + if ( !pIClientEngine )
>> + {
>> + return HXR_OK; // XXXSEH: Should this
fail?
>> + }
>>
>> return pIClientEngine->EventOccurred( pEvent
);
>> }
>> Index: src/CHXClientEngine.h
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientEngine.h,v
>> retrieving revision 1.6
>> diff -u -w -r1.6 CHXClientEngine.h
>> --- src/CHXClientEngine.h 23 Mar 2005 00:07:55
-0000 1.6
>> +++ src/CHXClientEngine.h 7 Feb 2007 01:27:45
-0000
>>  -53,6 +53,7 
>> #include "CHXClientUnknown.h"
>>
>> #include "enter_hx_headers.h"
>> +#include "ihxmedpltfm.h"
>> #include "hxcore.h"
>> #include "exit_hx_headers.h"
>>
>> Index: src/CHXClientEngineContext.cpp
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientEngineContext.cpp,v
>> retrieving revision 1.10
>> diff -u -w -r1.10 CHXClientEngineContext.cpp
>> --- src/CHXClientEngineContext.cpp 23 Mar 2005
00:07:55
>> -0000 1.10
>> +++ src/CHXClientEngineContext.cpp 7 Feb 2007
01:27:45 -0000
>>  -53,9 +53,6 
>> #include "enter_hx_headers.h"
>> #include "ihxpckts.h"
>> #include "hlxclib/string.h"
>> -
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXBuffer, IHXBuffer
);
>> #include "exit_hx_headers.h"
>>
>> CHXClientEngineContext::~CHXClientEngineContext(
void )
>> Index: src/CHXClientPlayer.cpp
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientPlayer.cpp,v
>> retrieving revision 1.42
>> diff -u -w -r1.42 CHXClientPlayer.cpp
>> --- src/CHXClientPlayer.cpp 2 Nov 2006 01:54:10
-0000 1.42
>> +++ src/CHXClientPlayer.cpp 7 Feb 2007 01:27:45
-0000
>>  -78,20 +78,9 
>> #include "hxmon.h" // IHXRegistry
>> #endif
>>
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXCommonClassFactory,
>> IHXCommonClassFactory ); -HX_SMART_POINTER_INLINE(
>> SPIHXBuffer, IHXBuffer ); -HX_SMART_POINTER_INLINE(
>> SPIHXValues, IHXValues ); -HX_SMART_POINTER_INLINE(
>> SPIHXRequest, IHXRequest );
-HX_SMART_POINTER_INLINE(
>> SPIHXAudioPlayer, IHXAudioPlayer );
-HX_SMART_POINTER_INLINE(
>> SPIHXPlayer2, IHXPlayer2 );
-HX_SMART_POINTER_INLINE(
>> SPIHXGroup, IHXGroup ); -HX_SMART_POINTER_INLINE(
>> SPIHXGroupManager, IHXGroupManager );
>> -HX_SMART_POINTER_INLINE( SPIHXViewSourceCommand,
>> IHXViewSourceCommand ); -HX_SMART_POINTER_INLINE(
>> SPIHXClientViewRights, IHXClientViewRights ); -#if
>> defined(HELIX_FEATURE_REGISTRY)
-HX_SMART_POINTER_INLINE(
>> SPIHXRegistry, IHXRegistry ); -#endif
>> +#include "hxcomptr.h"
>> +DEFINE_SMART_PTR( IHXViewSourceCommand );
DEFINE_SMART_PTR(
>> +IHXClientViewRights );
>> #include "exit_hx_headers.h"
>>
>> #include "HXClientConstants.h"
>> Index: src/CHXClientRequest.cpp
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientRequest.cpp,v
>> retrieving revision 1.10
>> diff -u -w -r1.10 CHXClientRequest.cpp
>> --- src/CHXClientRequest.cpp 4 Apr 2005 22:05:49
-0000 1.10
>> +++ src/CHXClientRequest.cpp 7 Feb 2007 01:27:45
-0000
>>  -54,10 +54,6 
>> #include "hxccf.h"
>> #include "ihxpckts.h" // IHXValues
>>
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXBuffer, IHXBuffer );
>> -HX_SMART_POINTER_INLINE( SPIHXValues, IHXValues );
>> -HX_SMART_POINTER_INLINE( SPIHXRequestContext,
IHXRequestContext );
>> #include "exit_hx_headers.h"
>>
>> #include "hlxclib/string.h"
>> Index: src/CHXClientSink.cpp
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientSink.cpp,v
>> retrieving revision 1.31
>> diff -u -w -r1.31 CHXClientSink.cpp
>> --- src/CHXClientSink.cpp 22 Apr 2005 19:06:36
-0000 1.31
>> +++ src/CHXClientSink.cpp 7 Feb 2007 01:27:45
-0000
>>  -56,26 +56,13 
>> #include "hxcore.h"
>> #include "ihxpckts.h"
>>
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXBuffer, IHXBuffer );
>> -HX_SMART_POINTER_INLINE( SPIHXValues, IHXValues );
>> -HX_SMART_POINTER_INLINE(
SPIHXPersistentComponentManager,
>> IHXPersistentComponentManager );
-HX_SMART_POINTER_INLINE(
>> SPIHXPersistentComponent, IHXPersistentComponent );
>> -HX_SMART_POINTER_INLINE( SPIHXAudioPlayer,
IHXAudioPlayer );
>> -HX_SMART_POINTER_INLINE( SPIHXAudioHookManager,
>> IHXAudioHookManager ); -HX_SMART_POINTER_INLINE(
>> SPIHXAudioDeviceManager, IHXAudioDeviceManager );
>> -HX_SMART_POINTER_INLINE( SPIHXErrorSinkControl,
>> IHXErrorSinkControl ); -HX_SMART_POINTER_INLINE(
>> SPIHXErrorMessages, IHXErrorMessages );
>> -HX_SMART_POINTER_INLINE( SPIHXScheduler,
IHXScheduler );
>> -
>> #ifdef HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS
>> -HX_SMART_POINTER_INLINE( SPIHXPDStatusMgr,
IHXPDStatusMgr );
>> +DEFINE_SMART_PTR( IHXPDStatusMgr );
>> #endif
>> #ifdef HELIX_FEATURE_REGISTRY
>> #include "hxcomm.h" // IHXRegistryID
>> #include "hxmon.h" // IHXRegistry
>> -HX_SMART_POINTER_INLINE( SPIHXRegistry,
IHXRegistry );
>> -HX_SMART_POINTER_INLINE( SPIHXRegistryID,
IHXRegistryID );
>> +DEFINE_SMART_PTR( IHXRegistryID );
>> #endif
>>
>> #include "exit_hx_headers.h"
>> Index: src/CHXClientSink.h
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientSink.h,v
>> retrieving revision 1.20
>> diff -u -w -r1.20 CHXClientSink.h
>> --- src/CHXClientSink.h 22 Apr 2005 19:06:36
-0000 1.20
>> +++ src/CHXClientSink.h 7 Feb 2007 01:27:45 -0000
>>  -64,8 +64,6 
>> #endif
>> #ifdef HELIX_FEATURE_REGISTRY
>> #include "hxmon.h" // IHXPropWatch,
IHXPropWatchResponse
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXPropWatch,
IHXPropWatch );
>> #endif
>>
>> #include "exit_hx_headers.h"
>> Index: src/CHXClientSite.cpp
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientSite.cpp,v
>> retrieving revision 1.12
>> diff -u -w -r1.12 CHXClientSite.cpp
>> --- src/CHXClientSite.cpp 23 Mar 2005 00:07:55
-0000 1.12
>> +++ src/CHXClientSite.cpp 7 Feb 2007 01:27:45
-0000
>>  -56,14 +56,6 
>> #include "hxwin.h" // IHXStatusMessage
>> #include "ihxpckts.h"
>>
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXSiteWindowed,
IHXSiteWindowed
>> ); -HX_SMART_POINTER_INLINE( SPIHXSite2, IHXSite2
);
>> -HX_SMART_POINTER_INLINE( SPIHXSiteTreeNavigation,
>> IHXSiteTreeNavigation ); -HX_SMART_POINTER_INLINE(
>> SPIHXBuffer, IHXBuffer ); -HX_SMART_POINTER_INLINE(
>> SPIHXValues, IHXValues ); -HX_SMART_POINTER_INLINE(
>> SPIHXCommonClassFactory, IHXCommonClassFactory );
>> -HX_SMART_POINTER_INLINE( SPIHXStatusMessage,
IHXStatusMessage );
>> #include "exit_hx_headers.h"
>>
>> #include "CHXClientSiteSupplier.h"
>> Index: src/CHXClientSite.h
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientSite.h,v
>> retrieving revision 1.7
>> diff -u -w -r1.7 CHXClientSite.h
>> --- src/CHXClientSite.h 23 Mar 2005 00:07:55
-0000 1.7
>> +++ src/CHXClientSite.h 7 Feb 2007 01:27:45 -0000
>>  -56,9 +56,6 
>> #include "hxwintyp.h"
>> #include "hxwin.h" // IHXSite,
IHXSiteManager, IHXSiteWatcher
>>
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXSiteManager,
IHXSiteManager );
>> -HX_SMART_POINTER_INLINE( SPIHXSite, IHXSite );
>> #include "exit_hx_headers.h"
>>
>> class CHXClientSiteSupplier;
>> Index: src/CHXClientSiteSupplier.h
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXClientSiteSupplier.h,v
>> retrieving revision 1.11
>> diff -u -w -r1.11 CHXClientSiteSupplier.h
>> --- src/CHXClientSiteSupplier.h 21 Jun 2006
21:02:33
>> -0000 1.11
>> +++ src/CHXClientSiteSupplier.h 7 Feb 2007 01:27:45
-0000
>>  -57,8 +57,6 
>> #include "hxwin.h" // IHXSiteSupplier
>> #include "hxvctrl.h"
>>
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXVideoControl,
IHXVideoControl );
>> #include "exit_hx_headers.h"
>>
>> #include "HXClientCallbacks.h"
>> Index: src/CHXStatisticTracker.cpp
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/CHXStatisticTracker.cpp,v
>> retrieving revision 1.12
>> diff -u -w -r1.12 CHXStatisticTracker.cpp
>> --- src/CHXStatisticTracker.cpp 23 Mar 2005
00:07:55
>> -0000 1.12
>> +++ src/CHXStatisticTracker.cpp 7 Feb 2007 01:27:45
-0000
>>  -58,11 +58,7 
>> #include "hxmon.h" // IHXRegistry
>> #include "hxcomm.h" // IHXRegistryID
>>
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXRegistry,
IHXRegistry );
>> -HX_SMART_POINTER_INLINE( SPIHXRegistryID,
IHXRegistryID );
>> -HX_SMART_POINTER_INLINE( SPIHXBuffer, IHXBuffer );
>> -HX_SMART_POINTER_INLINE( SPIHXValues, IHXValues
);
>> +DEFINE_SMART_PTR( IHXRegistryID );
>> #include "exit_hx_headers.h"
>>
>> #include "hlxclib/string.h"
>> Index: src/HXClientCFuncs.cpp
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/HXClientCFuncs.cpp,v
>> retrieving revision 1.24
>> diff -u -w -r1.24 HXClientCFuncs.cpp
>> --- src/HXClientCFuncs.cpp 15 Jul 2005 22:16:03
-0000 1.24
>> +++ src/HXClientCFuncs.cpp 7 Feb 2007 01:27:45
-0000
>>  -59,9 +59,6 
>> #include "hxcom.h"
>> #include "hxcore.h"
>>
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXClientEngine,
IHXClientEngine
>> ); -HX_SMART_POINTER_INLINE( SPIHXPlayer, IHXPlayer
);
>> #include "exit_hx_headers.h"
>>
>> #ifdef _MAC_MACHO
>> Index: src/HXClientCOMAccess.cpp
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/HXClientCOMAccess.cpp,v
>> retrieving revision 1.6
>> diff -u -w -r1.6 HXClientCOMAccess.cpp
>> --- src/HXClientCOMAccess.cpp 9 Jul 2004 18:25:23
-0000 1.6
>> +++ src/HXClientCOMAccess.cpp 7 Feb 2007 01:27:45
-0000
>>  -53,9 +53,6 
>>
>> #include "enter_hx_headers.h"
>> #include "hxcore.h"
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXClientEngine,
IHXClientEngine
>> ); -HX_SMART_POINTER_INLINE( SPIHXPlayer, IHXPlayer
);
>> #include "exit_hx_headers.h"
>>
>> /*!
>> Index: src/HXClientGuidIncludes.h
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/HXClientGuidIncludes.h,v
>> retrieving revision 1.6
>> diff -u -w -r1.6 HXClientGuidIncludes.h
>> --- src/HXClientGuidIncludes.h 22 Apr 2005 19:06:36
>> -0000 1.6
>> +++ src/HXClientGuidIncludes.h 7 Feb 2007 01:27:45
-0000
>>  -63,6 +63,9 
>> #include "hxauth.h" //
IHXAuthenticationManager/2
>> #include "hxvsrc.h" //
IHXViewSourceCommand, IHXClientViewRights
>>
>> +//Include the platform
>> +#include "ihxmedpltfm.h"
>> +
>> #ifdef HELIX_FEATURE_VIDEO
>> #include "hxsite2.h" // IHXSite2
>> #include "hxvctrl.h" //
IHXVideoControl
>> Index: src/IHXClientRecordService.h
>>
============================================================
=======
>> RCS file:
/cvsroot/player/hxclientkit/src/IHXClientRecordService.h,v
>> retrieving revision 1.3
>> diff -u -w -r1.3 IHXClientRecordService.h
>> --- src/IHXClientRecordService.h 25 Mar 2005
00:24:47
>> -0000 1.3
>> +++ src/IHXClientRecordService.h 7 Feb 2007
01:27:45 -0000
>>  -125,8 +125,8 
>> };
>>
>> #include "enter_hx_headers.h"
>> -#include "hxsmartptr.h"
>> -HX_SMART_POINTER_INLINE( SPIHXClientRecordService,
>> IHXClientRecordService );
>> +#include "hxcomptr.h"
>> +DEFINE_SMART_PTR( IHXClientRecordService );
>> #include "exit_hx_headers.h"
>>
>> #endif /* _IHX_CLIENT_RECORD_SERVICE_H */
>> Index: src/platform/unix/CHXClientEngineUnix.cpp
>>
============================================================
=======
>> RCS file:
>>
/cvsroot/player/hxclientkit/src/platform/unix/CHXClientEngin
eU
>> nix.cpp,v
>> retrieving revision 1.18
>> diff -u -w -r1.18 CHXClientEngineUnix.cpp
>> --- src/platform/unix/CHXClientEngineUnix.cpp 9 Jul
2004
>> 18:25:16 -0000 1.18
>> +++ src/platform/unix/CHXClientEngineUnix.cpp 7 Feb
2007
>> 01:27:45 -0000
>>  -50,6 +50,8 
>> #include "CHXClientEngineUnix.h"
>> #include "hxassert.h"
>> #include "safestring.h"
>> +#include "ihxmedpltfm.h"
>> +#include "hxcore.h"
>> #include "dllpath.h"
>> #include "hxwintyp.h"
>> #include <X11/Xlib.h>
>>  -71,10 +73,10 
>> const char* const kCloseEngine =
"CloseEngine";
>>
>> /*!
>> - const kClientCoreDll
>> - abstract the name of the helix client core shared
library on unix
>> + const kHelixPlatform
>> + abstract the name of the helix platform shared
library on unix
>> */
>> -const char* const kClientCoreDll =
"clntcore.so";
>> +const char* const kHelixPlatform =
"hxmedpltfm.so";
>>
>> /*!
>> const kSetDll
>>  -97,7 +99,7 
>> */
>> const char* const kDllDirs[] =
>> {
>> - "common", "plugins",
"codecs"
>> + ".", ".", "."
>> };
>>
>> /*!
>>  -129,7 +131,7 
>> */
>> CHXClientEngineUnix::~CHXClientEngineUnix(void)
>> {
>> - UnloadClientCore();
>> + UnloadPlatform();
>> }
>>
>>
>>  -138,17 +140,21 
>> abstract constructor
>> */
>> CHXClientEngineUnix::CHXClientEngineUnix(void)
>> - : m_pICoreEngine(NULL)
>> + : m_pICoreEngine(NULL),
>> + m_pIEventHandler(NULL),
>> + m_pIPlatformKicker(NULL),
>> + m_pIMediaPlatform(NULL)
>> {
>> }
>>
>>
>> /*!
>> - function LoadClientCore
>> + function LoadPlatform
>> abstract load and initialize the helix
client engine
>> */
>> +
>> HX_RESULT
>> -CHXClientEngineUnix::LoadClientCore(void)
>> +CHXClientEngineUnix::LoadPlatform(void)
>> {
>> HX_RESULT res = HXR_OK;
>>
>>  -161,34 +167,15 
>> SafeStrCpy(dllhome, pszHelixLibs,
MAX_PATH);
>>
>> char dllpath[MAX_PATH];
>> - SafeSprintf(dllpath, MAX_PATH,
"%s/common/%s",
>> dllhome, kClientCoreDll);
>> + SafeSprintf(dllpath, MAX_PATH,
"%s/%s", dllhome,
>> + kHelixPlatform);
>>
>> if (m_dllHXCore.open(dllpath) != DLLAccess: LL_OK)
>> {
>> res = HXR_FAIL;
>> - }
>> - }
>> -
>> return res;
>> }
>>
>> -
>> -/*!
>> - function InitDLLAccessPaths
>> - abstract initialize DLLAccess paths
>> - discussion DLLAccess is a class used in Helix to
easily
>> load dlls and
>> - access their symbols. The client engine
typically expects
>> to find certain
>> - types of dlls (eg: codecs, plugins) in certain
locations. The
>> - SetDLLAccessPath function is called to set these
locations.
>> - InitDLLAccessPaths sets these locations to some
reasonable
>> defaults.
>> -*/
>> -HX_RESULT
>> -CHXClientEngineUnix::InitDLLAccessPaths(void)
>> -{
>> - HX_RESULT res = LoadClientCore();
>> -
>> - if (SUCCEEDED(res))
>> - {
>> + //Set the DLL paths on hxmedpltfm.so
>> FPSETDLLACCESSPATH pfnSetDll;
>> pfnSetDll =
(FPSETDLLACCESSPATH)m_dllHXCore.getSymbol(kSetDll);
>> if (pfnSetDll)
>>  -204,8 +191,7 
>> char* pPath = paths;
>> for (unsigned int i = 0; i != kNumDllTypes;
++i)
>> {
>> - int nSize = SafeSprintf(pPath, nLen,
"%s=%s/%s",
>> -
kDllTypes[i],
>> dllhome, kDllDirs[i]);
>> + int nSize = SafeSprintf(pPath,
nLen, "%s=./",
>> + kDllTypes[i] );
>>
>> nSize++; // Skip over the ' '
>> pPath += nSize;
>>  -214,10 +200,102 
>> HX_ASSERT(nLen >= 0);
>> }
>> *pPath = 0;
>> -
>> pfnSetDll(paths);
>> }
>> +
>> + FPHXMEDIAPLATFORMOPEN fpPlatOpen =
>> +
>>
(FPHXMEDIAPLATFORMOPEN)m_dllHXCore.getSymbol("HXMediaPl
atformOpen");
>> + FPHXCREATEMEDIAPLATFORM fpPlatCreate =
>> + (FPHXCREATEMEDIAPLATFORM)
>> +
m_dllHXCore.getSymbol("HXCreateMediaPlatform");
>> +
>> + res = HXR_FAIL;
>> + if( HXR_OK == fpPlatOpen() )
>> + {
>> + if( HXR_OK ==
>>
fpPlatCreate((IHXMediaPlatform**)&m_pIMediaPlatform) )
>> + {
>> + res =
>> +
m_pIMediaPlatform->AddPluginPath("HXClientKitFramewo
rk", dllhome);
>> +
>> + if( HXR_OK ==
m_pIMediaPlatform->Init(NULL) )
>> + {
>> +
HX_RELEASE(m_pIPlatformKicker);
>> + res =
>>
m_pIMediaPlatform->QueryInterface(IID_IHXMediaPlatformKic
ker,
>> +
>> (void**)&m_pIPlatformKicker);
>> +
HX_ASSERT(m_pIPlatformKicker);
>> + HX_RELEASE(m_pIEventHandler);
>> + res =
>>
m_pIMediaPlatform->QueryInterface(IID_IHXSiteEventHandler
,
>> +
>> (void**)&m_pIEventHandler );
>> + HX_ASSERT(m_pIEventHandler);
>> + }
>> + }
>> }
>> + }
>> + else
>> + {
>> + res = HXR_ALREADY_OPEN;
>> + }
>> +
>> + return res;
>> +}
>> +
>> +
>> +/*!
>> + function InitDLLAccessPaths
>> + abstract initialize DLLAccess paths
>> + discussion DLLAccess is a class used in Helix to
easily load dlls
>> +and
>> + access their symbols. The client engine
typically expects to find
>> +certain
>> + types of dlls (eg: codecs, plugins) in certain
locations. The
>> + SetDLLAccessPath function is called to set these
locations.
>> + InitDLLAccessPaths sets these locations to some
reasonable
>> defaults.
>> +*/
>> +HX_RESULT
>> +CHXClientEngineUnix::InitDLLAccessPaths(void)
>> +{
>> + HX_RESULT res = LoadPlatform();
>> +
>> + //XXXgfw leaving this code here for now until
a final
>> clean up is done of
>> + //hxclient kit in support of Atlas and the
player. The
>> SetDll stuff was
>> + //moved into LoadPlatform() because it has to
be done
>> right after we load
>> + //hxmedpltfm.so but before we open and create
the
>> platform. If you don't the
>> + //DLL paths will get messed up. Reasearch is
needed to
>> determine if that is
>> + //a bug or not.
>> +
>> +// if( SUCCEEDED(res) || HXR_ALREADY_OPEN==res
)
>> +// {
>> +// FPSETDLLACCESSPATH pfnSetDll;
>> +// pfnSetDll =
>>
(FPSETDLLACCESSPATH)m_dllHXCore.getSymbol(kSetDll);
>> +// if (pfnSetDll)
>> +// {
>> +// // See if the user has set their
HELIX_LIBS env var
>> +// char dllhome[MAX_PATH] =
".";
>> +// const char* pszHelixLibs =
getenv("HELIX_LIBS");
>> +// if (pszHelixLibs)
>> +// SafeStrCpy(dllhome,
pszHelixLibs, MAX_PATH);
>> +
>> +// char paths[MAX_PATH *
kNumDllTypes];
>> +// int nLen = sizeof(paths) /
sizeof(char);
>> +// char* pPath = paths;
>> +// for (unsigned int i = 0; i !=
kNumDllTypes; ++i)
>> +// {
>> +// // int nSize =
SafeSprintf(pPath, nLen,
>> "%s=%s/%s",
>> +// //
kDllTypes[i],
>> dllhome, kDllDirs[i]);
>> +// int nSize = SafeSprintf(pPath,
nLen,
>> "%s=./", kDllTypes[i] );
>> +
>> +// nSize++; // Skip over the ' '
>> +// pPath += nSize;
>> +// nLen -= nSize;
>> +
>> +// HX_ASSERT(nLen >= 0);
>> +// }
>> +// *pPath = 0;
>> +// pfnSetDll(paths);
>> +// }
>> +// }
>> +
>> + if( !SUCCEEDED(res) )
>> + {
>> + UnloadPlatform();
>> + }
>> +
>> return res;
>> }
>>
>>  -235,18 +313,17 
>> *pResult = InitDLLAccessPaths();
>> if (SUCCEEDED(*pResult))
>> {
>> - FPRMCREATEENGINE pCreateEngine =
>>
- (FPRMCREATEENGINE)m_dllHXCore.getSymbol(kCreateEngine);
>> - if (pCreateEngine)
>> - {
>> - *pResult = pCreateEngine(&m_pICoreEngine);
>> - // If engine was not created, we should receive
>> a reason.
>> - HX_ASSERT((NULL != m_pICoreEngine) ||
>> (FAILED(*pResult)));
>> - }
>> - else
>> + IHXCommonClassFactory* pCCF = NULL;
>> + *pResult =
>>
m_pIMediaPlatform->QueryInterface(IID_IHXCommonClassFacto
ry,
>> +
>> (void**)&pCCF);
>> + if( SUCCEEDED(*pResult) )
>> {
>> - *pResult = HXR_COULDNOTINITCORE;
>> +
>> + *pResult =
>> pCCF->CreateInstance(CLSID_IHXClientEngine,
>> + (void**)&m_pICoreEngine);
>> +
>> }
>> + HX_ASSERT(m_pICoreEngine);
>> + HX_RELEASE(pCCF);
>> }
>> }
>> return m_pICoreEngine;
>>  -264,6 +341,7 
>> }
>>
>>
>> +
>> /*!
>> function OnCloseClientEngine
>> abstract destroy the IHXClientEngine and
unload the
>> client core  -274,28 +352,50 
>> if (m_pICoreEngine)
>> {
>> HX_ASSERT(m_dllHXCore.isOpen());
>> - FPRMCLOSEENGINE pCloseEngine =
>> -
(FPRMCLOSEENGINE)m_dllHXCore.getSymbol(kCloseEngine);
>> - if (pCloseEngine)
>> +
>> + IHXClientEngine2* pEngine2 = NULL;
>> + IHXClientEngine* pEngine =
GetClientEngine();
>> + if (HXR_OK ==
pEngine->QueryInterface(IID_IHXClientEngine2,
>> +
(void**)&pEngine2))
>> {
>> - pCloseEngine(m_pICoreEngine);
>> + pEngine2->Close();
>> }
>> - m_pICoreEngine = NULL;
>> + HX_RELEASE(pEngine2);
>> + HX_RELEASE(m_pICoreEngine);
>> }
>> }
>>
>>
>> /*!
>> - function UnloadClientCore
>> + function UnloadPlatform
>> abstract shutdown the engine and unload
the client core dll
>> */
>> void
>> -CHXClientEngineUnix::UnloadClientCore(void)
>> +CHXClientEngineUnix::UnloadPlatform(void)
>> {
>> +
>> if (m_dllHXCore.isOpen())
>> {
>> +
>> OnCloseClientEngine();
>>
>> + HX_RELEASE(m_pIPlatformKicker);
>> + HX_RELEASE(m_pIEventHandler);
>> +
>> + if( m_pIMediaPlatform )
>> + {
>> + m_pIMediaPlatform->Close();
>> + HX_RELEASE(m_pIMediaPlatform);
>> + }
>> +
>> + FPHXMEDIAPLATFORMCLOSE fpPlatClose =
>> + (FPHXMEDIAPLATFORMCLOSE)
>> +
m_dllHXCore.getSymbol("HXMediaPlatformClose");
>> +
>> + if( fpPlatClose )
>> + {
>> + fpPlatClose();
>> + }
>> +
>> m_dllHXCore.close();
>> }
>> }
>>  -385,6 +485,18 
>> #endif
>>
>> pIClientEngine->EventOccurred(pEvent);
>> +
>> + //XXXgfw instead of the above call to
>> EventOccurred() we really need to
>> + //be using the new platform Kick() method
and the
>> SiteEventHandler's
>> + //HandleEvent calls. I am leaving like the
above for
>> now because
>> + //changing it would require changes up
stream to the
>> player (for things
>> + //like returning suggested sleep time,
etc. Below is
>> *something* like
>> + //what we want. I have added and
initialized the
>> below member variables
>> + //that hold the kick and event handler, so
they are
>> ready to use.
>> +
>> +//
m_pIPlatformKicker->Kick(HXGetCurrentThreadID(),
>> &ulSleepSuggested);
>> +//
m_pIEventHandler->HandleEvent(pEvent);
>> +
>> HX_RELEASE(pIClientEngine);
>>
>> return TRUE;
>> Index: src/platform/unix/CHXClientEngineUnix.h
>>
============================================================
=======
>> RCS file:
>>
/cvsroot/player/hxclientkit/src/platform/unix/CHXClientEngin
eUnix.h,v
>> retrieving revision 1.4
>> diff -u -w -r1.4 CHXClientEngineUnix.h
>> --- src/platform/unix/CHXClientEngineUnix.h 9 Jul
2004
>> 18:25:16 -0000 1.4
>> +++ src/platform/unix/CHXClientEngineUnix.h 7 Feb
2007
>> 01:27:45 -0000
>>  -47,10 +47,11 
>> *
>> * ***** END LICENSE BLOCK ***** */
>>
>> -#ifndef _CHXCLIENT_ENGINE_MAC_H_
>> -#define _CHXCLIENT_ENGINE_MAC_H_
>> +#ifndef _CHXCLIENT_ENGINE_UNIX_H_
>> +#define _CHXCLIENT_ENGINE_UNIX_H_
>>
>> #include "CHXClientEngine.h"
>> +#include "ihxmedpltfm.h"
>> #include "dllacces.h"
>>
>> /*!
>>  -65,10 +66,13 
>> private:
>> DLLAccess m_dllHXCore;
>> IHXClientEngine* m_pICoreEngine;
>> + IHXSiteEventHandler* m_pIEventHandler;
>> + IHXMediaPlatformKicker* m_pIPlatformKicker;
>> + IHXMediaPlatform* m_pIMediaPlatform;
>>
>> - HX_RESULT LoadClientCore( void );
>> + HX_RESULT LoadPlatform( void );
>> HX_RESULT InitDLLAccessPaths( void );
>> - void UnloadClientCore( void );
>> + void UnloadPlatform( void );
>>
>> protected:
>>
>>  -83,4 +87,4 
>>
>> };
>>
>> -#endif
>> +#endif // _CHXCLIENT_ENGINE_UNIX_H_
>>
>>
>> _______________________________________________
>> Player-dev mailing list
>> Player-dev helixcommunity.org
>> http://lists.helixcommunity.org/mailman/listinfo/play
er-dev
>
_______________________________________________
Player-dev mailing list
Player-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/play
er-dev
|