[vlc-devel] commit: Phonon: synchronise with KDE HEAD, part 1 (Jean-Baptiste Kempf )

git version control git at videolan.org
Wed Dec 16 00:58:51 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Dec 16 00:54:31 2009 +0100| [1ab428a94e4538832e16d6f338c7569efc1a643f] | committer: Jean-Baptiste Kempf 

Phonon: synchronise with KDE HEAD, part 1

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1ab428a94e4538832e16d6f338c7569efc1a643f
---

 bindings/phonon/vlc/backend.h       |    6 ------
 bindings/phonon/vlc/mediaobject.cpp |    2 +-
 bindings/phonon/vlc/mediaobject.h   |    9 +++++----
 bindings/phonon/vlc/videowidget.cpp |    2 +-
 bindings/phonon/vlc/vlcloader.cpp   |   10 ++++++----
 5 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/bindings/phonon/vlc/backend.h b/bindings/phonon/vlc/backend.h
index 4cb5c91..00dfe94 100644
--- a/bindings/phonon/vlc/backend.h
+++ b/bindings/phonon/vlc/backend.h
@@ -32,12 +32,6 @@
 #include <QtCore/QPointer>
 #include <QtCore/QStringList>
 
-#ifdef MAKE_PHONON_VLC_LIB // We are building this library
-# define PHONON_VLC_EXPORT Q_DECL_EXPORT
-#else // We are using this library
-# define PHONON_VLC_EXPORT Q_DECL_IMPORT
-#endif
-
 namespace Phonon
 {
 namespace VLC {
diff --git a/bindings/phonon/vlc/mediaobject.cpp b/bindings/phonon/vlc/mediaobject.cpp
index aad5103..9e5ccd5 100644
--- a/bindings/phonon/vlc/mediaobject.cpp
+++ b/bindings/phonon/vlc/mediaobject.cpp
@@ -61,7 +61,7 @@ MediaObject::~MediaObject()
 {
 }
 
-void MediaObject::setVideoWidgetId(int i_widget_id)
+void MediaObject::setVideoWidgetId(WId i_widget_id)
 {
     i_video_widget_id = i_widget_id;
 }
diff --git a/bindings/phonon/vlc/mediaobject.h b/bindings/phonon/vlc/mediaobject.h
index 01fdc6f..23eca49 100644
--- a/bindings/phonon/vlc/mediaobject.h
+++ b/bindings/phonon/vlc/mediaobject.h
@@ -25,6 +25,7 @@
 #include <phonon/mediaobjectinterface.h>
 
 #include <QtCore/QObject>
+#include <QtGui/QWidget>
 
 namespace Phonon
 {
@@ -45,7 +46,7 @@ public:
     /**
      * Widget Id where VLC will show the videos.
      */
-    void setVideoWidgetId(int i_widget_id);
+    void setVideoWidgetId(WId i_widget_id);
 
     void play();
     void seek(qint64 milliseconds);
@@ -69,8 +70,8 @@ public:
 signals:
 
     void aboutToFinish();
-//    void bufferStatus( int i_percent_filled );
-//    void currentSourceChanged( const MediaSource & newSource );
+    void bufferStatus( int i_percent_filled );
+    void currentSourceChanged( const MediaSource & newSource );
     void finished();
     void hasVideoChanged(bool b_has_video);
     void metaDataChanged(const QMultiMap<QString, QString> & metaData);
@@ -93,7 +94,7 @@ protected:
 
     virtual qint64 currentTimeInternal() const = 0;
 
-    int i_video_widget_id;
+    WId i_video_widget_id;
 
 private slots:
 
diff --git a/bindings/phonon/vlc/videowidget.cpp b/bindings/phonon/vlc/videowidget.cpp
index 2afef53..8902112 100644
--- a/bindings/phonon/vlc/videowidget.cpp
+++ b/bindings/phonon/vlc/videowidget.cpp
@@ -61,7 +61,7 @@ void VideoWidget::connectToMediaObject(PrivateMediaObject *mediaObject)
     connect(mediaObject, SIGNAL(videoWidgetSizeChanged(int, int)),
             SLOT(videoWidgetSizeChanged(int, int)));
 
-    mediaObject->setVideoWidgetId((int) p_video_widget->winId());
+    mediaObject->setVideoWidgetId(p_video_widget->winId());
 }
 
 Phonon::VideoWidget::AspectRatio VideoWidget::aspectRatio() const
diff --git a/bindings/phonon/vlc/vlcloader.cpp b/bindings/phonon/vlc/vlcloader.cpp
index 73e42da..9350d69 100644
--- a/bindings/phonon/vlc/vlcloader.cpp
+++ b/bindings/phonon/vlc/vlcloader.cpp
@@ -45,16 +45,18 @@ bool vlcInit()
 
     QString path = vlcPath();
     if (!path.isEmpty()) {
-        QString pluginsPath = path;
+        QString pluginsPath = QString("--plugin-path=") + QDir::toNativeSeparators(QFileInfo(vlcPath()).dir().path());
 #if defined(Q_OS_UNIX)
         pluginsPath.append("/vlc");
 #elif defined(Q_OS_WIN)
         pluginsPath.append("\\plugins");
 #endif
+        QByteArray p = path.toLatin1();
+        QByteArray pp = pluginsPath.toLatin1();
         // VLC command line options. See vlc --full-help
         const char *vlcArgs[] = {
-            path.toLatin1().constData(),
-            "--plugin-path=", pluginsPath.toAscii().constData(),
+            p.constData(),
+            pp.constData(),
             "--verbose=2",
             "--intf=dummy",
             "--extraintf=logger",
@@ -157,7 +159,7 @@ static QStringList findAllLibVlc()
     QString vlcVersion = settings.value("Version").toString();
     QString vlcInstallDir = settings.value("InstallDir").toString();
     if (vlcVersion.startsWith("1.0") && !vlcInstallDir.isEmpty()) {
-        paths << vlcInstallDir + QLatin1Char('\\') + "libvlc";
+        paths << vlcInstallDir + QLatin1Char('\\') + "libvlc.dll";
         return paths;
     } else {
         return QString();




More information about the vlc-devel mailing list