NetBSD Problem Report #48373

From www@NetBSD.org  Sat Nov  9 08:51:43 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C427CA619D
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  9 Nov 2013 08:51:43 +0000 (UTC)
Message-Id: <20131109085141.0FFC5A619D@mollari.NetBSD.org>
Date: Sat,  9 Nov 2013 08:51:41 +0000 (UTC)
From: nathanialsloss@yahoo.com.au
Reply-To: nathanialsloss@yahoo.com.au
To: gnats-bugs@NetBSD.org
Subject: multimedia/phonon-backend-vlc problems with pulseaudio and audio cds
X-Send-Pr-Version: www-1.0

>Number:         48373
>Category:       pkg
>Synopsis:       multimedia/phonon-backend-vlc problems with pulseaudio and audio cds
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    markd
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 09 08:55:01 +0000 2013
>Last-Modified:  Tue Nov 12 06:35:00 +0000 2013
>Originator:     Nat Sloss
>Release:        NetBSD 6.1.1
>Organization:
>Environment:
NetBSD beast 6.1.1_PATCH NetBSD 6.1.1_PATCH (PCIPAE) #13: Sat Nov  2 18:07:05 EST 2013  build@test:/usr/src/sys/arch/i386/compile/obj/PCIPAE i386
>Description:
No audio from phonon vlc backend when using pulseaudio.
Audio cds don't play in kscd or amarok when using vlc backend.
>How-To-Repeat:
Attempt to playback an audio cd using the phonon vlc backend in kscd or amarok and it wont work (no audio.)

Attempt to use phonon vlc backend with pulseaudio and it wont work (no audio.)
>Fix:
Apply these patches:

--- /dev/null	2013-11-09 19:25:13.000000000 +1100
+++ pkgsrc/multimedia/phonon-backend-vlc/patches/patch-src_media.cpp	2013-11-09 19:08:00.000000000 +1100
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- src/media.cpp.orig	2013-01-31 23:39:46.000000000 +0000
++++ src/media.cpp
+@@ -29,7 +29,8 @@ namespace VLC {
+ 
+ Media::Media(const QByteArray &mrl, QObject *parent) :
+     QObject(parent),
+-    m_media(libvlc_media_new_location(libvlc, mrl.constData()))
++    m_media(libvlc_media_new_location(libvlc, mrl.constData())),
++    m_mrl(mrl)
+ {
+     Q_ASSERT(m_media);
+ 
+@@ -95,5 +96,13 @@ void Media::event_cb(const libvlc_event_
+     }
+ }
+ 
++void Media::setCdTrack(int track)
++{
++    libvlc_media_release(m_media);
++    m_media = libvlc_media_new_location(libvlc, m_mrl.constData());
++    addOption(QLatin1String(":cdda-track="), QVariant(track));
++}
++
++
+ } // namespace VLC
+ } // namespace Phonon
--- /dev/null	2013-11-09 19:25:13.000000000 +1100
+++ pkgsrc/multimedia/phonon-backend-vlc/patches/patch-src_media.h	2013-11-09 19:08:00.000000000 +1100
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- src/media.h.orig	2013-01-31 23:39:46.000000000 +0000
++++ src/media.h
+@@ -57,6 +57,8 @@ public:
+ 
+     QString meta(libvlc_meta_t meta);
+ 
++    void setCdTrack(int track);
++
+ signals:
+     void durationChanged(qint64 duration);
+     void metaDataChanged();
+@@ -66,6 +68,7 @@ private:
+ 
+     libvlc_media_t *m_media;
+     libvlc_state_t m_state;
++    QByteArray m_mrl;
+ };
+ 
+ } // namespace VLC
--- /dev/null	2013-11-09 19:25:13.000000000 +1100
+++ pkgsrc/multimedia/phonon-backend-vlc/patches/patch-src_mediacontroller.cpp	2013-11-09 19:08:00.000000000 +1100
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/mediacontroller.cpp.orig	2013-01-31 23:39:46.000000000 +0000
++++ src/mediacontroller.cpp
+@@ -188,7 +188,7 @@ void MediaController::resetMembers()
+     m_currentChapter = 0;
+     m_availableChapters = 0;
+ 
+-    m_currentTitle = 0;
++    m_currentTitle = 1;
+     m_availableTitles = 0;
+ 
+     m_autoPlayTitles = false;
+@@ -319,7 +319,7 @@ void MediaController::setCurrentTitle(in
+ #ifdef __GNUC__
+ #warning use media subitem to set track of audiocd
+ #endif
+-        // Leave for MediaObject to handle.
++        m_player->setCdTrack(title);
+         return;
+     case Dvd:
+     case Vcd:
--- /dev/null	2013-11-09 19:25:13.000000000 +1100
+++ pkgsrc/multimedia/phonon-backend-vlc/patches/patch-src_mediaobject.cpp	2013-11-09 19:08:00.000000000 +1100
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/mediaobject.cpp.orig	2013-01-31 23:39:46.000000000 +0000
++++ src/mediaobject.cpp
+@@ -528,7 +528,7 @@ void MediaObject::setupMedia()
+ 
+     if (source().discType() == Cd && m_currentTitle > 0) {
+         debug() << "setting CDDA track";
+-        m_media->addOption(QLatin1String("cdda-track="), QVariant(m_currentTitle));
++        m_media->addOption(QLatin1String(":cdda-track="), QVariant(m_currentTitle));
+     }
+ 
+     if (m_streamReader)
--- /dev/null	2013-11-09 19:25:13.000000000 +1100
+++ pkgsrc/multimedia/phonon-backend-vlc/patches/patch-src_mediaplayer.cpp	2013-11-09 19:08:00.000000000 +1100
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- src/mediaplayer.cpp.orig	2013-01-31 23:39:46.000000000 +0000
++++ src/mediaplayer.cpp
+@@ -304,5 +304,13 @@ QDebug operator<<(QDebug dbg, const Medi
+     return dbg.space();
+ }
+ 
++void MediaPlayer::setCdTrack(int track)
++{
++    libvlc_media_player_stop(m_player);
++    m_media->setCdTrack(track);
++    libvlc_media_player_set_media(m_player, *m_media);
++    libvlc_media_player_play(m_player);
++}
++
+ } // namespace VLC
+ } // namespace Phonon
--- /dev/null	2013-11-09 19:25:13.000000000 +1100
+++ pkgsrc/multimedia/phonon-backend-vlc/patches/patch-src_mediaplayer.h	2013-11-09 19:08:00.000000000 +1100
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/mediaplayer.h.orig	2013-01-31 23:39:46.000000000 +0000
++++ src/mediaplayer.h
+@@ -155,6 +155,8 @@ public:
+ 
+     bool setAudioTrack(int track);
+ 
++    void setCdTrack(int track);
++   
+ signals:
+     void lengthChanged(qint64 length);
+     void seekableChanged(bool seekable);
--- /dev/null	2013-11-09 19:25:13.000000000 +1100
+++ pkgsrc/multimedia/phonon-backend-vlc/patches/patch-src_utils_libvlc.cpp	2013-11-09 19:08:00.000000000 +1100
@@ -0,0 +1,297 @@
+$NetBSD$
+
+--- src/utils/libvlc.cpp.orig	2013-01-31 23:39:46.000000000 +0000
++++ src/utils/libvlc.cpp
+@@ -21,7 +21,6 @@
+ #include <QtCore/QCoreApplication>
+ #include <QtCore/QDebug>
+ #include <QtCore/QDir>
+-#include <QtCore/QLibrary>
+ #include <QtCore/QSettings>
+ #include <QtCore/QString>
+ #include <QtCore/QStringBuilder>
+@@ -35,8 +34,7 @@
+ LibVLC *LibVLC::self;
+ 
+ LibVLC::LibVLC()
+-    : m_vlcLibrary(0)
+-    , m_vlcInstance(0)
++    : m_vlcInstance(0)
+ {
+ }
+ 
+@@ -44,7 +42,6 @@ LibVLC::~LibVLC()
+ {
+     if (m_vlcInstance)
+         libvlc_release(m_vlcInstance);
+-    vlcUnload();
+     self = 0;
+ }
+ 
+@@ -53,90 +50,78 @@ bool LibVLC::init()
+     Q_ASSERT_X(!self, "LibVLC", "there should be only one LibVLC object");
+     LibVLC::self = new LibVLC;
+ 
+-    QString path = self->vlcPath();
+-    if (!path.isEmpty()) {
+-        QList<QByteArray> args;
++    QList<QByteArray> args;
+ 
+-        QString pluginsPath = QDir::toNativeSeparators(QFileInfo(self->vlcPath()).dir().path());
+-#if defined(Q_OS_UNIX)
+-        pluginsPath.append("/vlc");
+-#elif defined(Q_OS_WIN)
+-        pluginsPath.append("\\plugins");
+-#endif
+-
+-        QByteArray encodedPluginPath = QFile::encodeName(pluginsPath);
+-        qputenv("VLC_PLUGIN_PATH", encodedPluginPath);
+-
+-        // Ends up as something like $HOME/.config/Phonon/vlc.conf
+-        const QString configFileName = QSettings("Phonon", "vlc").fileName();
+-        if (QFile::exists(configFileName)) {
+-            args << QByteArray("--config=").append(QFile::encodeName(configFileName));
+-            args << "--no-ignore-config";
+-        }
++    // Ends up as something like $HOME/.config/Phonon/vlc.conf
++    const QString configFileName = QSettings("Phonon", "vlc").fileName();
++    if (QFile::exists(configFileName)) {
++        args << QByteArray("--config=").append(QFile::encodeName(configFileName));
++        args << "--no-ignore-config";
++    }
+ 
+-        int debugLevel = qgetenv("PHONON_SUBSYSTEM_DEBUG").toInt();
+-        if (debugLevel > 0) {
+-            args << QByteArray("--verbose=").append(QString::number(debugLevel));
+-            args << QByteArray("--extraintf=logger");
++    int debugLevel = qgetenv("PHONON_SUBSYSTEM_DEBUG").toInt();
++    if (debugLevel > 0) {
++        args << QByteArray("--verbose=").append(QString::number(debugLevel));
++        args << QByteArray("--extraintf=logger");
+ #ifdef Q_WS_WIN
+-            QDir logFilePath(QString(qgetenv("APPDATA")).append("/vlc"));
++        QDir logFilePath(QString(qgetenv("APPDATA")).append("/vlc"));
+ #else
+-            QDir logFilePath(QDir::homePath().append("/.vlc"));
++        QDir logFilePath(QDir::homePath().append("/.vlc"));
+ #endif //Q_WS_WIN
+-            logFilePath.mkdir("log");
+-            const QString logFile = logFilePath.path()
+-                    .append("/log/vlc-log-")
+-                    .append(QString::number(qApp->applicationPid()))
+-                    .append(".txt");
+-            args << QByteArray("--logfile=").append(QFile::encodeName(QDir::toNativeSeparators(logFile)));
+-        }
+-
+-        args << "--no-media-library";
+-        args << "--no-osd";
+-        args << "--no-stats";
+-        args << "--no-video-title-show";
+-        args << "--album-art=0";
+-        // By default VLC will put a picture-in-picture when making a snapshot.
+-        // This is unexpected behaviour for us, so we force it off.
+-        args << "--no-snapshot-preview";
+-        // Do not load xlib dependent modules as we cannot ensure proper init
+-        // order as expected by xlib thus leading to crashes.
+-        // KDE BUG: 240001
+-        args << "--no-xlib";
+-        // By default do neither use a vout nor an aout. Since our medianodes
+-        // represent VLC outputs only when one of those is attached to a MO an
+-        // appropriate output should be loaded. This is to prevent cases where
+-        // one has only an AudioOutput but plays a video, in which case libvlc
+-        // would open a separate window for the video.
+-        args << "--vout=vdummy";
+-        args << "--aout=adummy";
+-        // Do not preload services discovery modules, we don't use them.
+-        args << "--services-discovery=''";
+-        // Allow multiple starts (one gets to wonder whether that makes a difference.
+-        args << "--no-one-instance";
+-        // This causes leaky abstraction. VLC by default will create a default vout/aout
+-        // when none was defined/requested. i.e. when you have a VideoWidget but
+-        // no AudioOutput you will still get audio if there is an audio stream,
+-        // equally if you have only an AudioOutput and play a video VLC will pop
+-        // up a Video window.
+-        args << "--aout=dummy";
+-        args << "--vout=dummy";
+-
+-        // Build const char* array
+-        QVarLengthArray<const char *, 64> vlcArgs(args.size());
+-        for (int i = 0; i < args.size(); ++i) {
+-            vlcArgs[i] = args.at(i).constData();
+-        }
+-
+-        // Create and initialize a libvlc instance (it should be done only once)
+-        self->m_vlcInstance = libvlc_new(vlcArgs.size(), vlcArgs.constData());
+-        if (!self->m_vlcInstance) {
+-            fatal() << "libVLC:" << LibVLC::errorMessage();
+-            return false;
+-        }
+-        return true;
++        logFilePath.mkdir("log");
++        const QString logFile = logFilePath.path()
++                .append("/log/vlc-log-")
++                .append(QString::number(qApp->applicationPid()))
++                .append(".txt");
++        args << QByteArray("--logfile=").append(QFile::encodeName(QDir::toNativeSeparators(logFile)));
++    }
++
++    args << "--no-media-library";
++    args << "--no-osd";
++    args << "--no-stats";
++    args << "--no-video-title-show";
++    args << "--album-art=0";
++    // By default VLC will put a picture-in-picture when making a snapshot.
++    // This is unexpected behaviour for us, so we force it off.
++    args << "--no-snapshot-preview";
++    // Do not load xlib dependent modules as we cannot ensure proper init
++    // order as expected by xlib thus leading to crashes.
++    // KDE BUG: 240001
++    args << "--no-xlib";
++    // By default do neither use a vout nor an aout. Since our medianodes
++    // represent VLC outputs only when one of those is attached to a MO an
++    // appropriate output should be loaded. This is to prevent cases where
++    // one has only an AudioOutput but plays a video, in which case libvlc
++    // would open a separate window for the video.
++    args << "--vout=vdummy";
++    args << "--aout=adummy";
++    // Do not preload services discovery modules, we don't use them.
++    args << "--services-discovery=''";
++    // Allow multiple starts (one gets to wonder whether that makes a difference).
++#if (LIBVLC_VERSION_INT > LIBVLC_VERSION(2, 1, 0, 0) && defined(Q_OS_MAC)) || defined( Q_OS_WIN) || !defined(PHONON_NO_DBUS)
++    args << "--no-one-instance";
++#endif
++    // This causes leaky abstraction. VLC by default will create a default vout/aout
++    // when none was defined/requested. i.e. when you have a VideoWidget but
++    // no AudioOutput you will still get audio if there is an audio stream,
++    // equally if you have only an AudioOutput and play a video VLC will pop
++    // up a Video window.
++    args << "--aout=dummy";
++    args << "--vout=dummy";
++
++    // Build const char* array
++    QVarLengthArray<const char *, 64> vlcArgs(args.size());
++    for (int i = 0; i < args.size(); ++i) {
++        vlcArgs[i] = args.at(i).constData();
++    }
++
++    // Create and initialize a libvlc instance (it should be done only once)
++    self->m_vlcInstance = libvlc_new(vlcArgs.size(), vlcArgs.constData());
++    if (!self->m_vlcInstance) {
++        fatal() << "libVLC: could not initialize";
++        return false;
+     }
+-    return false;
++    return true;
+ }
+ 
+ const char *LibVLC::errorMessage()
+@@ -183,109 +168,3 @@ bool LibVLC::libGreaterThan(const QStrin
+     return true;
+ }
+ #endif
+-
+-QStringList LibVLC::findAllLibVlcPaths()
+-{
+-    QStringList paths;
+-
+-#ifdef Q_OS_UNIX
+-#if defined(Q_WS_MAC)
+-    paths   << QCoreApplication::applicationDirPath()
+-            << QCoreApplication::applicationDirPath() % QLatin1Literal("/../Frameworks")
+-            << QCoreApplication::applicationDirPath() % QLatin1Literal("/../PlugIns")
+-            << QCoreApplication::applicationDirPath() % QLatin1Literal("/lib");
+-#endif
+-    paths << QString::fromLatin1(qgetenv("LD_LIBRARY_PATH"))
+-            .split(QLatin1Char(':'), QString::SkipEmptyParts);
+-    paths << QLatin1String(PHONON_LIB_INSTALL_DIR) << QLatin1String("/usr/lib") << QLatin1String("/usr/local/lib");
+-    paths << QLatin1String("/usr/lib64") << QLatin1String("/usr/local/lib64");
+-
+-    QStringList foundVlcs;
+-    foreach (const QString & path, paths) {
+-        QDir dir = QDir(path);
+-        QStringList entryList = dir.entryList(QStringList() << QLatin1String("libvlc.*"), QDir::Files);
+-
+-        qSort(entryList.begin(), entryList.end(), LibVLC::libGreaterThan);
+-        foreach(const QString & entry, entryList) {
+-            if (entry.contains(".debug")) {
+-                continue;
+-            }
+-            foundVlcs << path % QLatin1Char('/') % entry;
+-        }
+-    }
+-
+-    return foundVlcs;
+-#elif defined(Q_OS_WIN)
+-    // Current application path has highest priority.
+-    // Application could be delivered with own copy of qt, phonon, LibVLC, vlc and vlc plugins.
+-    QString appDirVlc =
+-            QDir::toNativeSeparators(QCoreApplication::applicationDirPath()
+-                                     % QLatin1Char('\\')
+-                                     % QLatin1Literal("libvlc.dll"));
+-    if (QFile::exists(appDirVlc)) {
+-        paths << appDirVlc;
+-    }
+-
+-    // Read VLC version and installation directory from Windows registry
+-    QSettings settings(QSettings::SystemScope, "VideoLAN", "VLC");
+-    QString vlcVersion = settings.value("Version").toString();
+-    QString vlcInstallDir = settings.value("InstallDir").toString();
+-    if (vlcVersion.startsWith(QLatin1String("1.1")) && !vlcInstallDir.isEmpty()) {
+-        paths << vlcInstallDir % QLatin1Char('\\') % QLatin1Literal("libvlc.dll");
+-        return paths;
+-    } else {
+-        //If nothing is found in the registry try %PATH%
+-        QStringList searchPaths = QString::fromLatin1(qgetenv("PATH"))
+-                                  .split(QLatin1Char(';'), QString::SkipEmptyParts);
+-
+-        QStringList foundVlcs;
+-        foreach(const QString & sp, searchPaths) {
+-            QDir dir = QDir(sp);
+-            QStringList entryList = dir.entryList(QStringList() << QLatin1String("libvlc.dll"), QDir::Files);
+-            foreach(const QString & entry, entryList){
+-                foundVlcs << sp % QLatin1Char('\\') % entry;
+-            }
+-        }
+-        paths << foundVlcs;
+-        return paths;
+-    }
+-#endif
+-}
+-
+-QString LibVLC::vlcPath()
+-{
+-    static QString path;
+-    if (!path.isEmpty()) {
+-        return path;
+-    }
+-
+-    m_vlcLibrary = new QLibrary();
+-    QStringList paths = LibVLC::findAllLibVlcPaths();
+-#ifdef __GNUC__
+-#warning why is this using a local static qstring?! :O
+-#endif
+-    foreach(path, paths) {
+-        m_vlcLibrary->setFileName(path);
+-
+-        if (!m_vlcLibrary->resolve("libvlc_exception_init")) { //"libvlc_exception_init" not contained in 1.1+
+-            return path;
+-        } else {
+-            warning() << "Cannot resolve the symbol or load VLC library";
+-        }
+-        warning() << m_vlcLibrary->errorString();
+-    }
+-
+-    vlcUnload();
+-
+-    return QString();
+-}
+-
+-void LibVLC::vlcUnload()
+-{
+-    if (!m_vlcLibrary)
+-        return;
+-    if (m_vlcLibrary->isLoaded())
+-        m_vlcLibrary->unload();
+-    delete m_vlcLibrary;
+-    m_vlcLibrary = 0;
+-}
--- /dev/null	2013-11-09 19:25:13.000000000 +1100
+++ pkgsrc/multimedia/phonon-backend-vlc/patches/patch-src_utils_libvlc.h	2013-11-09 19:08:00.000000000 +1100
@@ -0,0 +1,39 @@
+$NetBSD$
+
+--- src/utils/libvlc.h.orig	2013-01-31 23:39:46.000000000 +0000
++++ src/utils/libvlc.h
+@@ -23,8 +23,6 @@
+ 
+ #include <vlc/libvlc_version.h>
+ 
+-class QLibrary;
+-
+ struct libvlc_instance_t;
+ 
+ /**
+@@ -136,25 +134,10 @@ private:
+      */
+     LibVLC();
+ 
+-    /**
+-     * Get VLC path.
+-     *
+-     * @return the VLC path
+-     */
+-    QString vlcPath();
+-
+-    /**
+-     * Unload VLC library.
+-     */
+-    void vlcUnload();
+-
+ #if defined(Q_OS_UNIX)
+      static bool libGreaterThan(const QString &lhs, const QString &rhs);
+ #endif // defined(Q_OS_UNIX)
+ 
+-     static QStringList findAllLibVlcPaths();
+-
+-     QLibrary *m_vlcLibrary;
+      libvlc_instance_t *m_vlcInstance;
+ };
+ 

Note these patches are not my work they are from kde developers, and as such they would be under different licenses.  They are commits to the kde source tree.

I think these problems with phonon-backend-vlc may also be solved by updating the package.

Regards,

Nat.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->markd
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Sat, 09 Nov 2013 10:46:41 +0000
Responsible-Changed-Why:
Over to maintainer.


From: Mark Davies <mark@ecs.vuw.ac.nz>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/48373: multimedia/phonon-backend-vlc problems with pulseaudio and audio cds
Date: Sun, 10 Nov 2013 14:51:49 +1300

 On Saturday 09 November 2013 21:55:01 you wrote:
 > I think these problems with phonon-backend-vlc may also be solved by
 > updating the package.

 Package has been updated to version 0.7.0.  Has that solved the problems?

 cheers
 mark

From: Nat Sloss <nathanialsloss@yahoo.com.au>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/48373: multimedia/phonon-backend-vlc problems with pulseaudio and audio cds
Date: Sun, 10 Nov 2013 20:31:58 +1100

 Hi
 > 
 >  Package has been updated to version 0.7.0.  Has that solved the problems?
 > 
 >  cheers
 >  mark

 I've tested the package and it works well although I've since found two 
 problems and I'm not sure if they are with kscd or phonon-backend-vlc.

 The fisrst is that if you load an audio cd and start kscd, without pressing 
 play press skip/cue to go to the next track and kscd will crash the same thing 
 happens if you select a track from the track list.  It works if you press play 
 first then you can select tracks from the track list and they will also play.

 The second problem is that you cannot stop playback, lets say your playing 
 track five and press stop wait one second and it will start playing track one.

 I can provide backtraces from gdb if required,  I'm also using vlc from pkgsrc 
 2013Q2.

 Regards,

 Nat.

From: Nat Sloss <nathanialsloss@yahoo.com.au>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/48373: multimedia/phonon-backend-vlc problems with pulseaudio and audio cds
Date: Tue, 12 Nov 2013 17:35:51 +1100

 Hi,

 I have patched phonon-backend-vlc these patches solve my problems mentioned 
 earlier in this PR.  However at this time I am not able to eject a cd using 
 kscd (did not work from the start) and I have to restart hald after changing 
 discs, so I am unable to test fully.

 Here are the patches:

 $NetBSD$

 # Fixes initial track selectoin before track has started.
 # Remembers track position when track is selected from list.
 # Fixes crash between hald restarts.

 --- src/mediaobject.cpp.orig	2013-11-04 16:49:24.000000000 +0000
 +++ src/mediaobject.cpp
 @@ -404,6 +404,7 @@ void MediaObject::setSource(const MediaS
          break;
      }

 +	    setupMedia();
      debug() << "Sending currentSourceChanged";
      emit currentSourceChanged(m_mediaSource);
  }
 @@ -513,7 +514,7 @@ void MediaObject::setupMedia()
      DEBUG_BLOCK;

      unloadMedia();
 -    resetMembers();
 +    //resetMembers();

      // Create a media with the given MRL
      m_media = new Media(m_mrl, this);
 @@ -796,8 +797,8 @@ qint64 MediaObject::totalTime() const

  void MediaObject::addSink(SinkNode *node)
  {
 -    Q_ASSERT(!m_sinks.contains(node));
 -    m_sinks.append(node);
 +    if (!m_sinks.contains(node))
 +        m_sinks.append(node);
  }

  void MediaObject::removeSink(SinkNode *node)
 $NetBSD$

 #Stops recurring play when user has stopped audio cd.

 --- src/mediaplayer.cpp.orig	2013-11-04 16:49:24.000000000 +0000
 +++ src/mediaplayer.cpp
 @@ -332,10 +332,12 @@ void MediaPlayer::setVolumeInternal()

  void MediaPlayer::setCdTrack(int track)
  {
 +    libvlc_state_t currentVLCstate = libvlc_media_player_get_state(m_player);
      libvlc_media_player_stop(m_player);
      m_media->setCdTrack(track);
      libvlc_media_player_set_media(m_player, *m_media);
 -    libvlc_media_player_play(m_player);
 +    if (currentVLCstate != libvlc_Stopped)
 +        libvlc_media_player_play(m_player);
  }

  #if (LIBVLC_VERSION_INT >= LIBVLC_VERSION(2, 2, 0, 0))
 $NetBSD$

 #Required for NetBSD as vlc2 does not work with dbus.

 --- src/utils/libvlc.cpp.orig	2013-11-04 16:49:24.000000000 +0000
 +++ src/utils/libvlc.cpp
 @@ -94,9 +94,11 @@ bool LibVLC::init()
      // Do not preload services discovery modules, we don't use them.
      args << "--services-discovery=''";
      // Allow multiple starts (one gets to wonder whether that makes a 
 difference).
 +#if 0
  #if (LIBVLC_VERSION_INT > LIBVLC_VERSION(2, 1, 0, 0) && defined(Q_OS_MAC)) || 
 defined( Q_OS_WIN) || !defined(PHONON_NO_DBUS)
      args << "--no-one-instance";
  #endif
 +#endif
      args << "--no-audio";
      args << "--no-video";


 Regards

 Nat.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.