diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-09-03 13:23:40 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-09-03 13:24:43 +0200 |
commit | 6cb1ddb7cc351f33673d846fedef0962ac49606f (patch) | |
tree | 09418717dffcb3103896dc46ec2728438328404e /avmedia | |
parent | 29875a8d05dd3200775b987f25ed6277a15104fa (diff) |
Make --enable-vlc at least compile on Windows
...no idea whether the changes are actually any good, though.
Change-Id: I43965f6c10b572ee098bfacfa0995414a53af45f
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/vlc/vlcframegrabber.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/vlc/vlcframegrabber.hxx | 4 | ||||
-rw-r--r-- | avmedia/source/vlc/vlcplayer.cxx | 5 | ||||
-rw-r--r-- | avmedia/source/vlc/vlcwindow.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/vlc/vlcwindow.hxx | 2 | ||||
-rw-r--r-- | avmedia/source/vlc/wrapper/Player.cxx | 12 | ||||
-rw-r--r-- | avmedia/source/vlc/wrapper/SymbolLoader.hxx | 6 |
7 files changed, 26 insertions, 7 deletions
diff --git a/avmedia/source/vlc/vlcframegrabber.cxx b/avmedia/source/vlc/vlcframegrabber.cxx index a90a90803566..6a25d396614c 100644 --- a/avmedia/source/vlc/vlcframegrabber.cxx +++ b/avmedia/source/vlc/vlcframegrabber.cxx @@ -24,7 +24,7 @@ const ::rtl::OUString AVMEDIA_VLC_GRABBER_IMPLEMENTATIONNAME = "com.sun.star.com const ::rtl::OUString AVMEDIA_VLC_GRABBER_SERVICENAME = "com.sun.star.media.VLCFrameGrabber_VLC"; const int MSEC_IN_SEC = 1000; -SAL_CALL VLCFrameGrabber::VLCFrameGrabber( VLC::Player& player, boost::shared_ptr<VLC::EventHandler> eh, const rtl::OUString& url ) +VLCFrameGrabber::VLCFrameGrabber( VLC::Player& player, boost::shared_ptr<VLC::EventHandler> eh, const rtl::OUString& url ) : FrameGrabber_BASE() , mPlayer( player ) , mUrl( url ) diff --git a/avmedia/source/vlc/vlcframegrabber.hxx b/avmedia/source/vlc/vlcframegrabber.hxx index afc02d044041..8dc7b56c76c5 100644 --- a/avmedia/source/vlc/vlcframegrabber.hxx +++ b/avmedia/source/vlc/vlcframegrabber.hxx @@ -43,7 +43,7 @@ class VLCFrameGrabber : public FrameGrabber_BASE const rtl::OUString& mUrl; boost::shared_ptr<VLC::EventHandler> mEventHandler; public: - SAL_CALL VLCFrameGrabber( VLC::Player& player, boost::shared_ptr<VLC::EventHandler> eh, const rtl::OUString& url ); + VLCFrameGrabber( VLC::Player& player, boost::shared_ptr<VLC::EventHandler> eh, const rtl::OUString& url ); ::com::sun::star::uno::Reference< css::graphic::XGraphic > SAL_CALL grabFrame( double fMediaTime ) throw ( ::com::sun::star::uno::RuntimeException ); @@ -55,4 +55,4 @@ public: } } -#endif // _VLCFRAMEGRABBER_HXX
\ No newline at end of file +#endif // _VLCFRAMEGRABBER_HXX diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx index 247b0ef36b98..267157136eaa 100644 --- a/avmedia/source/vlc/vlcplayer.cxx +++ b/avmedia/source/vlc/vlcplayer.cxx @@ -167,8 +167,13 @@ namespace if (pEnvData == NULL) return -1; +#if defined WNT + // Explicit converts from HWND to int + const int id = reinterpret_cast<int>( pEnvData->hWnd ); +#else // Explicit converts from long to int const int id = static_cast<int>( pEnvData->aWindow ); +#endif return id; } diff --git a/avmedia/source/vlc/vlcwindow.cxx b/avmedia/source/vlc/vlcwindow.cxx index 9d74fc202059..930639251bae 100644 --- a/avmedia/source/vlc/vlcwindow.cxx +++ b/avmedia/source/vlc/vlcwindow.cxx @@ -9,7 +9,7 @@ namespace vlc { const ::rtl::OUString AVMEDIA_VLC_WINDOW_IMPLEMENTATIONNAME = "com.sun.star.comp.avmedia.Window_VLC"; const ::rtl::OUString AVMEDIA_VLC_WINDOW_SERVICENAME = "com.sun.star.media.Window_VLC"; -SAL_CALL VLCWindow::VLCWindow(VLCPlayer& player) +VLCWindow::VLCWindow(VLCPlayer& player) : mPlayer( player ) { } diff --git a/avmedia/source/vlc/vlcwindow.hxx b/avmedia/source/vlc/vlcwindow.hxx index bc0568cb13c7..17a8c88db5cc 100644 --- a/avmedia/source/vlc/vlcwindow.hxx +++ b/avmedia/source/vlc/vlcwindow.hxx @@ -30,7 +30,7 @@ class VLCWindow : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XPla { VLCPlayer& mPlayer; public: - SAL_CALL VLCWindow(VLCPlayer& player); + VLCWindow(VLCPlayer& player); void SAL_CALL update() throw (css::uno::RuntimeException); ::sal_Bool SAL_CALL setZoomLevel( css::media::ZoomLevel ZoomLevel ) throw (css::uno::RuntimeException); diff --git a/avmedia/source/vlc/wrapper/Player.cxx b/avmedia/source/vlc/wrapper/Player.cxx index a36a15d929ab..763e5c9f7d1c 100644 --- a/avmedia/source/vlc/wrapper/Player.cxx +++ b/avmedia/source/vlc/wrapper/Player.cxx @@ -18,7 +18,11 @@ namespace VLC { namespace { +#if defined WNT + typedef __int64 libvlc_time_t; +#else typedef int64_t libvlc_time_t; +#endif void ( *libvlc_media_player_retain ) ( libvlc_media_player_t *p_mi ); libvlc_media_player_t * ( *libvlc_media_player_new_from_media ) ( libvlc_media_t *p_md ); @@ -38,7 +42,11 @@ namespace VLC int ( *libvlc_video_take_snapshot ) ( libvlc_media_player_t *p_mi, unsigned num, const char *psz_filepath, unsigned int i_width, unsigned int i_height ); +#if defined WNT + void ( *libvlc_media_player_set_hwnd ) ( libvlc_media_player_t *p_mi, void *drawable ); +#else void ( *libvlc_media_player_set_xwindow ) ( libvlc_media_player_t *p_mi, uint32_t drawable ); +#endif unsigned ( *libvlc_media_player_has_vout ) ( libvlc_media_player_t *p_mi ); void ( *libvlc_video_set_mouse_input ) ( libvlc_media_player_t *p_mi, unsigned on); } @@ -62,7 +70,11 @@ namespace VLC SYM_MAP( libvlc_audio_set_mute ), SYM_MAP( libvlc_audio_get_mute ), SYM_MAP( libvlc_video_take_snapshot ), +#if defined WNT + SYM_MAP( libvlc_media_player_set_hwnd ), +#else SYM_MAP( libvlc_media_player_set_xwindow ), +#endif SYM_MAP( libvlc_media_player_has_vout ), SYM_MAP( libvlc_video_set_mouse_input ), SYM_MAP( libvlc_media_player_retain ) diff --git a/avmedia/source/vlc/wrapper/SymbolLoader.hxx b/avmedia/source/vlc/wrapper/SymbolLoader.hxx index ae4cf668d740..bf75ac57d0e8 100644 --- a/avmedia/source/vlc/wrapper/SymbolLoader.hxx +++ b/avmedia/source/vlc/wrapper/SymbolLoader.hxx @@ -10,6 +10,7 @@ #ifndef _SYMBOL_LOADER_HXX #define _SYMBOL_LOADER_HXX #if defined( WNT ) +# include <tchar.h> # include <windows.h> # include <winreg.h> #endif @@ -48,11 +49,12 @@ namespace if ( ::RegQueryValueEx( hKey, _T( "InstallDir" ), NULL, &dwType, ( LPBYTE )arCurrent, &dwCurrentSize ) == ERROR_SUCCESS ) { ::RegCloseKey( hKey ); - return OUString( arCurrent, MAX_PATH, rtl_TextEncoding, RTL_TEXTENCODING_UTF8 ) + "/"; + return OUString( arCurrent, strlen(arCurrent), RTL_TEXTENCODING_UTF8 ) + "/"; } ::RegCloseKey( hKey ); } + return OUString(); } #endif @@ -60,7 +62,7 @@ namespace template<size_t N> bool tryLink( oslModule &aModule, const ApiMap ( &pMap )[N] ) { - for (uint i = 0; i < N; ++i) + for (size_t i = 0; i < N; ++i) { SymbolFunc aMethod = ( SymbolFunc )osl_getFunctionSymbol ( aModule, OUString::createFromAscii( pMap[ i ].symName ).pData ); |