Commit 1ab428a9 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Phonon: synchronise with KDE HEAD, part 1

parent 6455935a
...@@ -32,12 +32,6 @@ ...@@ -32,12 +32,6 @@
#include <QtCore/QPointer> #include <QtCore/QPointer>
#include <QtCore/QStringList> #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 Phonon
{ {
namespace VLC { namespace VLC {
......
...@@ -61,7 +61,7 @@ MediaObject::~MediaObject() ...@@ -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; i_video_widget_id = i_widget_id;
} }
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <phonon/mediaobjectinterface.h> #include <phonon/mediaobjectinterface.h>
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtGui/QWidget>
namespace Phonon namespace Phonon
{ {
...@@ -45,7 +46,7 @@ public: ...@@ -45,7 +46,7 @@ public:
/** /**
* Widget Id where VLC will show the videos. * Widget Id where VLC will show the videos.
*/ */
void setVideoWidgetId(int i_widget_id); void setVideoWidgetId(WId i_widget_id);
void play(); void play();
void seek(qint64 milliseconds); void seek(qint64 milliseconds);
...@@ -69,8 +70,8 @@ public: ...@@ -69,8 +70,8 @@ public:
signals: signals:
void aboutToFinish(); void aboutToFinish();
// void bufferStatus( int i_percent_filled ); void bufferStatus( int i_percent_filled );
// void currentSourceChanged( const MediaSource & newSource ); void currentSourceChanged( const MediaSource & newSource );
void finished(); void finished();
void hasVideoChanged(bool b_has_video); void hasVideoChanged(bool b_has_video);
void metaDataChanged(const QMultiMap<QString, QString> & metaData); void metaDataChanged(const QMultiMap<QString, QString> & metaData);
...@@ -93,7 +94,7 @@ protected: ...@@ -93,7 +94,7 @@ protected:
virtual qint64 currentTimeInternal() const = 0; virtual qint64 currentTimeInternal() const = 0;
int i_video_widget_id; WId i_video_widget_id;
private slots: private slots:
......
...@@ -61,7 +61,7 @@ void VideoWidget::connectToMediaObject(PrivateMediaObject *mediaObject) ...@@ -61,7 +61,7 @@ void VideoWidget::connectToMediaObject(PrivateMediaObject *mediaObject)
connect(mediaObject, SIGNAL(videoWidgetSizeChanged(int, int)), connect(mediaObject, SIGNAL(videoWidgetSizeChanged(int, int)),
SLOT(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 Phonon::VideoWidget::AspectRatio VideoWidget::aspectRatio() const
......
...@@ -45,16 +45,18 @@ bool vlcInit() ...@@ -45,16 +45,18 @@ bool vlcInit()
QString path = vlcPath(); QString path = vlcPath();
if (!path.isEmpty()) { if (!path.isEmpty()) {
QString pluginsPath = path; QString pluginsPath = QString("--plugin-path=") + QDir::toNativeSeparators(QFileInfo(vlcPath()).dir().path());
#if defined(Q_OS_UNIX) #if defined(Q_OS_UNIX)
pluginsPath.append("/vlc"); pluginsPath.append("/vlc");
#elif defined(Q_OS_WIN) #elif defined(Q_OS_WIN)
pluginsPath.append("\\plugins"); pluginsPath.append("\\plugins");
#endif #endif
QByteArray p = path.toLatin1();
QByteArray pp = pluginsPath.toLatin1();
// VLC command line options. See vlc --full-help // VLC command line options. See vlc --full-help
const char *vlcArgs[] = { const char *vlcArgs[] = {
path.toLatin1().constData(), p.constData(),
"--plugin-path=", pluginsPath.toAscii().constData(), pp.constData(),
"--verbose=2", "--verbose=2",
"--intf=dummy", "--intf=dummy",
"--extraintf=logger", "--extraintf=logger",
...@@ -157,7 +159,7 @@ static QStringList findAllLibVlc() ...@@ -157,7 +159,7 @@ static QStringList findAllLibVlc()
QString vlcVersion = settings.value("Version").toString(); QString vlcVersion = settings.value("Version").toString();
QString vlcInstallDir = settings.value("InstallDir").toString(); QString vlcInstallDir = settings.value("InstallDir").toString();
if (vlcVersion.startsWith("1.0") && !vlcInstallDir.isEmpty()) { if (vlcVersion.startsWith("1.0") && !vlcInstallDir.isEmpty()) {
paths << vlcInstallDir + QLatin1Char('\\') + "libvlc"; paths << vlcInstallDir + QLatin1Char('\\') + "libvlc.dll";
return paths; return paths;
} else { } else {
return QString(); return QString();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment