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 @@
#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 {
......
......@@ -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;
}
......
......@@ -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:
......
......@@ -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
......
......@@ -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();
......
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