<div dir="ltr"><div><div>I would like to contribute to the VLMC project as a beta tester. I have old 15 years experience editing video. I have used Final Cut Pro. Adobe Premiere, Media 100 & Avid.<br><br></div>I can test VLMC on Linux. I am using Elementary OS Luna (Ubuntu).<br>
<br></div>Best wishes, Tony<br>--<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 8 February 2014 17:48, Hugo Beauzée-Luyssen <span dir="ltr"><<a href="mailto:git@videolan.org" target="_blank">git@videolan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">vlmc | branch: master | Hugo Beauzée-Luyssen <<a href="mailto:hugo@beauzee.fr">hugo@beauzee.fr</a>> | Sat Feb  8 15:51:07 2014 +0200| [00b286e02115523887904b3b43072119058734b2] | committer: Hugo Beauzée-Luyssen<br>

<br>
Use named media players<br>
<br>
> <a href="http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=00b286e02115523887904b3b43072119058734b2" target="_blank">http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=00b286e02115523887904b3b43072119058734b2</a><br>

---<br>
<br>
 src/LibVLCpp/VLCMediaPlayer.cpp  |   28 ++++++++++++++++++++++++----<br>
 src/LibVLCpp/VLCMediaPlayer.h    |    6 +++++-<br>
 src/Media/Transcoder.cpp         |    2 +-<br>
 src/Metadata/MetaDataManager.cpp |    2 +-<br>
 src/Renderer/GenericRenderer.cpp |    2 +-<br>
 src/Settings/SettingValue.cpp    |    2 +-<br>
 src/Workflow/ClipWorkflow.cpp    |    2 ++<br>
 7 files changed, 35 insertions(+), 9 deletions(-)<br>
<br>
diff --git a/src/LibVLCpp/VLCMediaPlayer.cpp b/src/LibVLCpp/VLCMediaPlayer.cpp<br>
index c0b8520..580746d 100644<br>
--- a/src/LibVLCpp/VLCMediaPlayer.cpp<br>
+++ b/src/LibVLCpp/VLCMediaPlayer.cpp<br>
@@ -29,7 +29,8 @@<br>
<br>
 using namespace LibVLCpp;<br>
<br>
-MediaPlayer::MediaPlayer() : m_media( NULL )<br>
+MediaPlayer::MediaPlayer()<br>
+    : m_media( NULL )<br>
 {<br>
     m_internalPtr = libvlc_media_player_new( LibVLCpp::Instance::getInstance()->getInternalPtr() );<br>
     // Initialize the event manager<br>
@@ -37,7 +38,19 @@ MediaPlayer::MediaPlayer() : m_media( NULL )<br>
     registerEvents();<br>
 }<br>
<br>
-MediaPlayer::MediaPlayer( Media* media ) : m_media( media )<br>
+MediaPlayer::MediaPlayer( const QString& name )<br>
+    : m_name( name )<br>
+    , m_media( NULL )<br>
+{<br>
+    m_internalPtr = libvlc_media_player_new( LibVLCpp::Instance::getInstance()->getInternalPtr() );<br>
+    // Initialize the event manager<br>
+    p_em = libvlc_media_player_event_manager( m_internalPtr );<br>
+    registerEvents();<br>
+}<br>
+<br>
+MediaPlayer::MediaPlayer( const QString& name, Media* media )<br>
+    : m_name( name )<br>
+    , m_media( media )<br>
 {<br>
     m_internalPtr = libvlc_media_player_new_from_media( media->getInternalPtr() );<br>
<br>
@@ -120,12 +133,14 @@ MediaPlayer::callbacks( const libvlc_event_t* event, void* ptr )<br>
 {<br>
     Q_ASSERT_X( event->type >= libvlc_MediaPlayerMediaChanged &&<br>
                 event->type < libvlc_MediaListItemAdded, "event callback", "Only libvlc_MediaPlayer* events are supported" );<br>
+<br>
+    MediaPlayer* self = reinterpret_cast<MediaPlayer*>( ptr );<br>
+<br>
     if (event->type != libvlc_MediaPlayerPositionChanged &&<br>
             event->type != libvlc_MediaPlayerTimeChanged)<br>
     {<br>
-        qDebug() << ptr << libvlc_event_type_name(event->type);<br>
+        qDebug() << self->m_name << "Event received:" << libvlc_event_type_name(event->type);<br>
     }<br>
-    MediaPlayer* self = reinterpret_cast<MediaPlayer*>( ptr );<br>
<br>
     self->checkForWaitedEvents( event );<br>
<br>
@@ -384,3 +399,8 @@ MediaPlayer::waitForEvent( unsigned long timeoutDuration )<br>
         return Timeout;<br>
     return ( found ? Success : Canceled );<br>
 }<br>
+<br>
+void MediaPlayer::setName(const QString &name)<br>
+{<br>
+    m_name = name;<br>
+}<br>
diff --git a/src/LibVLCpp/VLCMediaPlayer.h b/src/LibVLCpp/VLCMediaPlayer.h<br>
index 8f6c442..9004d50 100644<br>
--- a/src/LibVLCpp/VLCMediaPlayer.h<br>
+++ b/src/LibVLCpp/VLCMediaPlayer.h<br>
@@ -51,7 +51,8 @@ namespace   LibVLCpp<br>
         typedef bool (*CheckEventCallback)(const MediaPlayer*, const libvlc_event_t*);<br>
<br>
         MediaPlayer();<br>
-        MediaPlayer( Media* media );<br>
+        MediaPlayer(const QString &name);<br>
+        MediaPlayer(const QString &name, Media* media );<br>
         ~MediaPlayer();<br>
         void                                play();<br>
         void                                pause();<br>
@@ -133,12 +134,15 @@ namespace   LibVLCpp<br>
          */<br>
         MediaPlayer::EventWaitResult        waitForEvent( unsigned long timeout = ULONG_MAX );<br>
<br>
+        void                                setName( const QString& name );<br>
+<br>
     private:<br>
         static void                         callbacks( const libvlc_event_t* event, void* self );<br>
         void                                registerEvents();<br>
         void                                checkForWaitedEvents( const libvlc_event_t* event );<br>
<br>
     private:<br>
+        QString                             m_name;<br>
         libvlc_event_manager_t*             p_em;<br>
         Media*                              m_media;<br>
<br>
diff --git a/src/Media/Transcoder.cpp b/src/Media/Transcoder.cpp<br>
index 21e08cd..e46de35 100644<br>
--- a/src/Media/Transcoder.cpp<br>
+++ b/src/Media/Transcoder.cpp<br>
@@ -51,7 +51,7 @@ Transcoder::transcodeToPs()<br>
     m_destinationFile = outputDir + '/' + m_media->fileInfo()->baseName() + ".ps";<br>
     QString         option = ":sout=file://" + m_destinationFile;<br>
     media->addOption( option.toUtf8().constData() );<br>
-    LibVLCpp::MediaPlayer   *mp = new LibVLCpp::MediaPlayer( media );<br>
+    LibVLCpp::MediaPlayer   *mp = new LibVLCpp::MediaPlayer( "Transcoder", media );<br>
     connect( mp, SIGNAL( positionChanged( float ) ), this, SIGNAL( progress( float ) ) );<br>
     connect( mp, SIGNAL( endReached() ), this, SLOT( transcodeFinished() ) );<br>
     emit notify( "Transcoding " + m_media->fileInfo()->absoluteFilePath() + " to " + m_destinationFile );<br>
diff --git a/src/Metadata/MetaDataManager.cpp b/src/Metadata/MetaDataManager.cpp<br>
index 2adbbb2..156fd20 100644<br>
--- a/src/Metadata/MetaDataManager.cpp<br>
+++ b/src/Metadata/MetaDataManager.cpp<br>
@@ -46,7 +46,7 @@ MetaDataManager::launchComputing( Media *media )<br>
 {<br>
     emit startingComputing( media );<br>
     m_computeInProgress = true;<br>
-    m_mediaPlayer = new LibVLCpp::MediaPlayer;<br>
+    m_mediaPlayer = new LibVLCpp::MediaPlayer( "MetaDataManager" );<br>
     MetaDataWorker* worker = new MetaDataWorker( m_mediaPlayer, media );<br>
     connect( worker, SIGNAL( computed() ),<br>
              this, SLOT( computingCompleted() ),<br>
diff --git a/src/Renderer/GenericRenderer.cpp b/src/Renderer/GenericRenderer.cpp<br>
index 3cc5799..583d240 100644<br>
--- a/src/Renderer/GenericRenderer.cpp<br>
+++ b/src/Renderer/GenericRenderer.cpp<br>
@@ -28,7 +28,7 @@<br>
 GenericRenderer::GenericRenderer() :<br>
         m_paused( false )<br>
 {<br>
-    m_mediaPlayer = new LibVLCpp::MediaPlayer();<br>
+    m_mediaPlayer = new LibVLCpp::MediaPlayer( "Renderer" );<br>
     m_mediaPlayer->disableTitle();<br>
 }<br>
<br>
diff --git a/src/Settings/SettingValue.cpp b/src/Settings/SettingValue.cpp<br>
index ff9c230..36ac70a 100644<br>
--- a/src/Settings/SettingValue.cpp<br>
+++ b/src/Settings/SettingValue.cpp<br>
@@ -93,7 +93,7 @@ SettingValue::flags() const<br>
 void<br>
 SettingValue::setLimits( const QVariant& min, const QVariant& max )<br>
 {<br>
-    Q_ASSERT_X( ( ( m_flags & Clamped ) != 0 ), "SettingVaklue", "Setting limits to a non-clamped value" );<br>
+    Q_ASSERT_X( ( ( m_flags & Clamped ) != 0 ), "SettingValue", "Setting limits to a non-clamped value" );<br>
     if ( min.isValid() == true )<br>
         m_min = min;<br>
     if ( max.isValid() == true )<br>
diff --git a/src/Workflow/ClipWorkflow.cpp b/src/Workflow/ClipWorkflow.cpp<br>
index 15dd794..6758fbb 100644<br>
--- a/src/Workflow/ClipWorkflow.cpp<br>
+++ b/src/Workflow/ClipWorkflow.cpp<br>
@@ -31,6 +31,7 @@<br>
 #include "VLCMediaPlayer.h"<br>
<br>
 #include <QReadWriteLock><br>
+#include <QStringBuilder><br>
 #include <QWaitCondition><br>
 #include <QtDebug><br>
<br>
@@ -65,6 +66,7 @@ ClipWorkflow::initialize()<br>
     initializeVlcOutput();<br>
     m_vlcMedia->addOption( createSoutChain() );<br>
     m_mediaPlayer = MemoryPool<LibVLCpp::MediaPlayer>::getInstance()->get();<br>
+    m_mediaPlayer->setName( "ClipWorkflow " % m_clipHelper->uuid().toString() );<br>
     m_mediaPlayer->setMedia( m_vlcMedia );<br>
     m_mediaPlayer->disableTitle();<br>
<br>
<br>
_______________________________________________<br>
Vlmc-devel mailing list<br>
<a href="mailto:Vlmc-devel@videolan.org">Vlmc-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/vlmc-devel" target="_blank">https://mailman.videolan.org/listinfo/vlmc-devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><font size="1">--</font><font style="color:rgb(102,102,102)" size="1"><br>Tony Walker<br>Tony Walker Arts<br>--<br><a href="http://www.tonywalkerarts.org.uk/" target="_blank">www.tonywalkerarts.org.uk</a><br>
<a href="http://www.facebook.com/tonywalkerarts" target="_blank">www.facebook.com/tonywalkerarts</a><br>--<br><br><br><br></font>
</div>