[Libreoffice-commits] core.git: Branch 'feature/vlc' - 2 commits - avmedia/source

Minh Ngo nlminhtl at gmail.com
Thu Jul 18 13:00:10 PDT 2013


 avmedia/source/vlc/vlcmanager.cxx |    9 ++++++---
 avmedia/source/vlc/vlcmanager.hxx |    2 +-
 avmedia/source/vlc/vlcplayer.cxx  |    2 +-
 avmedia/source/vlc/vlcwindow.cxx  |    1 -
 4 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 470ff77a473c0c0c1455553ca4e0d5ed7dd130bc
Author: Minh Ngo <nlminhtl at gmail.com>
Date:   Thu Jul 18 22:59:30 2013 +0300

    Fixing a manager class
    
    Change-Id: Icaaa3e33ebb0e2ca650a279a8b094fbddbff2a4d

diff --git a/avmedia/source/vlc/vlcmanager.cxx b/avmedia/source/vlc/vlcmanager.cxx
index 1ded627..0b2ad6a 100644
--- a/avmedia/source/vlc/vlcmanager.cxx
+++ b/avmedia/source/vlc/vlcmanager.cxx
@@ -7,6 +7,7 @@ namespace avmedia {
 namespace vlc {
 
 const rtl::OUString VLC_IMPLEMENTATION_NAME = "com.sun.star.comp.avmedia.Manager_VLC";
+const ::rtl::OUString VLC_SERVICENAME = "com.sun.star.media.Manager_VLC";
 
 Manager::Manager( const uno::Reference< lang::XMultiServiceFactory >& rxMgr )
     : mxMgr( rxMgr )
@@ -32,16 +33,18 @@ rtl::OUString SAL_CALL Manager::getImplementationName()
     return VLC_IMPLEMENTATION_NAME;
 }
 
-sal_Bool SAL_CALL Manager::supportsService( const rtl::OUString& ServiceName )
+sal_Bool SAL_CALL Manager::supportsService( const rtl::OUString& serviceName )
     throw (uno::RuntimeException)
 {
-    return false;
+    return serviceName == VLC_SERVICENAME;
 }
 
 uno::Sequence< rtl::OUString > SAL_CALL Manager::getSupportedServiceNames()
     throw (uno::RuntimeException)
 {
-    return uno::Sequence< rtl::OUString >();
+    ::uno::Sequence< OUString > aRet(1);
+    aRet[0] = VLC_SERVICENAME;
+    return aRet;
 }
 
 } // end namespace vlc
diff --git a/avmedia/source/vlc/vlcmanager.hxx b/avmedia/source/vlc/vlcmanager.hxx
index 2632161..2e81a35 100644
--- a/avmedia/source/vlc/vlcmanager.hxx
+++ b/avmedia/source/vlc/vlcmanager.hxx
@@ -37,7 +37,7 @@ public:
     ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > SAL_CALL createPlayer( const rtl::OUString& aURL ) throw (::com::sun::star::uno::RuntimeException);
 
     rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
-    sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+    sal_Bool SAL_CALL supportsService( const rtl::OUString& serviceName ) throw (::com::sun::star::uno::RuntimeException);
     ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
 
 private:
diff --git a/avmedia/source/vlc/vlcwindow.cxx b/avmedia/source/vlc/vlcwindow.cxx
index 72f0572..39cb26b 100644
--- a/avmedia/source/vlc/vlcwindow.cxx
+++ b/avmedia/source/vlc/vlcwindow.cxx
@@ -82,7 +82,6 @@ void SAL_CALL VLCWindow::setVisible( sal_Bool Visible )
 void SAL_CALL VLCWindow::setEnable( sal_Bool Enable )
     throw (uno::RuntimeException)
 {
-    std::cout << __PRETTY_FUNCTION__ << " " << Enable << std::endl;
 }
 
 void SAL_CALL VLCWindow::setFocus()
commit 1f7b633a5a5099ef0ef2380eaef6955b6abbfb4e
Author: Minh Ngo <nlminhtl at gmail.com>
Date:   Thu Jul 18 22:43:01 2013 +0300

    Removing a code for WIN32 that doesn't work
    
    Change-Id: I0ef71e696774648d5155dfc2f35e77bce3f91227

diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index 3c74bb3..e65f135 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -170,7 +170,7 @@ uno::Reference< css::media::XPlayerWindow > SAL_CALL VLCPlayer::createPlayerWind
 #if defined(WIN32) && !defined(UNIX)
         libvlc_media_player_set_hwnd( mPlayer.get(), winID );
 #else
-        libvlc_media_player_set_xwindow( mPlayer.get(), winID );
+        //TODO: Not works, will be crashed
 #endif
     }
 


More information about the Libreoffice-commits mailing list