Further steps towards media control support in WinCE (Ryan Norton)

- not yet working


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-01-27 23:32:12 +00:00
parent ca1514b304
commit be96ed8c5d
3 changed files with 39 additions and 23 deletions

View File

@@ -40,10 +40,6 @@
#undef wxUSE_ON_FATAL_EXCEPTION
#define wxUSE_ON_FATAL_EXCEPTION 0
// media stuff not supported under CE
#undef wxUSE_MEDIACTRL
#define wxUSE_MEDIACTRL 0
#undef wxUSE_WXHTML_HELP
#define wxUSE_WXHTML_HELP 0

View File

@@ -470,7 +470,7 @@
// Default is 1.
//
// Recommended setting: 1
#define wxUSE_MEDIACTRL 1
#define wxUSE_MEDIACTRL 0
// Use GStreamer for Unix (req a lot of dependancies)
//

View File

@@ -1661,25 +1661,45 @@ bool wxAMMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent,
}
#endif
// determine which (if any) media player interface
// is available - IMediaPlayer or IActiveMovie
if ( ::CoCreateInstance(CLSID_MediaPlayer, NULL,
CLSCTX_INPROC_SERVER,
IID_IMediaPlayer, (void**)&m_pMP) != 0 )
{
if ( ::CoCreateInstance(CLSID_ActiveMovie, NULL,
CLSCTX_INPROC_SERVER,
IID_IActiveMovie, (void**)&m_pAM) != 0 )
{
return false;
}
#ifdef __WXWINCE__
CLSID clsid;
if (CLSIDFromProgID(wxT("WPCEOCX.WMP"), &clsid) != S_OK &&
CLSIDFromProgID(wxT("MediaPlayer.MediaPlayer.1"), &clsid) != S_OK)
return false;
m_pAM->QueryInterface(IID_IMediaPlayer, (void**)&m_pMP);
}
else
{
m_pMP->QueryInterface(IID_IActiveMovie, (void**)&m_pAM);
}
// determine which (if any) media player interface
// is available - IMediaPlayer or IActiveMovie
if ( ::CoCreateInstance(clsid, NULL,
CLSCTX_INPROC_SERVER,
IID_IMediaPlayer, (void**)&m_pMP) != 0 )
{
return false;
}
else
{
m_pMP->QueryInterface(IID_IActiveMovie, (void**)&m_pAM);
}
#else
// determine which (if any) media player interface
// is available - IMediaPlayer or IActiveMovie
if ( ::CoCreateInstance(CLSID_MediaPlayer, NULL,
CLSCTX_INPROC_SERVER,
IID_IMediaPlayer, (void**)&m_pMP) != 0 )
{
if ( ::CoCreateInstance(CLSID_ActiveMovie, NULL,
CLSCTX_INPROC_SERVER,
IID_IActiveMovie, (void**)&m_pAM) != 0 )
{
return false;
}
m_pAM->QueryInterface(IID_IMediaPlayer, (void**)&m_pMP);
}
else
{
m_pMP->QueryInterface(IID_IActiveMovie, (void**)&m_pAM);
}
#endif
// Create window
// By default wxWindow(s) is created with a border -