[vlc-devel] commit: Fix building of phonon-vlc (Martin T. H. Sandsmark )

git version control git at videolan.org
Tue Dec 29 16:14:39 CET 2009


vlc | branch: master | Martin T. H. Sandsmark <sandsmark at samfundet.no> | Tue Dec 29 16:13:32 2009 +0100| [865ab4eda8a6b21a7ba99443e3193bb91e739dae] | committer: Jean-Baptiste Kempf 

Fix building of phonon-vlc

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

 .gitignore                             |    1 -
 bindings/phonon/vlc-kde/CMakeLists.txt |   40 ++++++++++++++++++++++++++++++++
 bindings/phonon/vlc/vlcloader.cpp      |    2 +-
 bindings/phonon/vlc/vlcmediaobject.cpp |   28 +++++++++++-----------
 4 files changed, 55 insertions(+), 16 deletions(-)

diff --git a/.gitignore b/.gitignore
index 88ba9ce..8ae2d0e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,7 +44,6 @@ vlc_install_dir/*
 # Ignore CMake Stuff
 cmake
 CMakeFiles
-CMakeLists.txt
 CTestTestfile.cmake
 cmake_install.cmake
 cmake_uninstall.cmake
diff --git a/bindings/phonon/vlc-kde/CMakeLists.txt b/bindings/phonon/vlc-kde/CMakeLists.txt
new file mode 100644
index 0000000..24b986a
--- /dev/null
+++ b/bindings/phonon/vlc-kde/CMakeLists.txt
@@ -0,0 +1,40 @@
+project(phonon-vlc)
+include_directories(${QT_INCLUDES} 
+                    ${VLC_INCLUDE_DIRS} 
+                    ${CMAKE_CURRENT_SOURCE_DIR})
+
+add_definitions(-D_PHONON_BACKEND_VERSION_4_2)
+
+set(phonon_vlc_SRCS
+    audiooutput.cpp
+    backend.cpp
+    devicemanager.cpp
+    effect.cpp
+    effectmanager.cpp
+    mediacontroller.cpp
+    mediaobject.cpp
+    seekstack.cpp
+    sinknode.cpp
+    videowidget.cpp
+    vlcloader.cpp
+    vlcmediacontroller.cpp
+    vlcmediaobject.cpp
+    vlcvideowidget.cpp
+    widgetnopaintevent.cpp)
+
+automoc4(phonon_vlc phonon_vlc_SRCS)
+add_library(phonon_vlc MODULE ${phonon_vlc_SRCS})
+
+set_target_properties(phonon_vlc PROPERTIES PREFIX "")
+target_link_libraries(phonon_vlc ${PHONON_LIBS} ${VLC_LIBRARIES})
+
+if(WIN32)
+    install(TARGETS phonon_vlc DESTINATION bin/phonon_backend)
+else(WIN32)
+    install(TARGETS phonon_vlc DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/phonon_backend)
+endif(WIN32)
+install(FILES vlc.desktop DESTINATION ${SERVICES_INSTALL_DIR}/phononbackends)
+
+if(BUILD_TESTS)
+    add_subdirectory(tests)
+endif(BUILD_TESTS)
diff --git a/bindings/phonon/vlc/vlcloader.cpp b/bindings/phonon/vlc/vlcloader.cpp
index 9350d69..c85fff0 100644
--- a/bindings/phonon/vlc/vlcloader.cpp
+++ b/bindings/phonon/vlc/vlcloader.cpp
@@ -93,7 +93,7 @@ void vlcRelease()
 void vlcExceptionRaised()
 {
     if (libvlc_exception_raised(vlc_exception)) {
-        qDebug() << "libvlc exception:" << libvlc_exception_get_message(vlc_exception);
+        qDebug() << "libvlc exception:" << libvlc_errmsg();
         libvlc_exception_clear(vlc_exception);
     }
 }
diff --git a/bindings/phonon/vlc/vlcmediaobject.cpp b/bindings/phonon/vlc/vlcmediaobject.cpp
index 3c2286f..ca9760f 100644
--- a/bindings/phonon/vlc/vlcmediaobject.cpp
+++ b/bindings/phonon/vlc/vlcmediaobject.cpp
@@ -172,7 +172,7 @@ void VLCMediaObject::seekInternal(qint64 milliseconds)
 
 QString VLCMediaObject::errorString() const
 {
-    return libvlc_exception_get_message(vlc_exception);
+    return libvlc_errmsg();
 }
 
 bool VLCMediaObject::hasVideo() const
@@ -210,7 +210,7 @@ void VLCMediaObject::connectToAllVLCEvents()
 
 
     // Get event manager from media descriptor object
-    p_vlc_media_event_manager = libvlc_media_event_manager(p_vlc_media, vlc_exception);
+    p_vlc_media_event_manager = libvlc_media_event_manager(p_vlc_media);
     libvlc_event_type_t eventsMedia[] = {
         libvlc_MediaMetaChanged,
         libvlc_MediaSubItemAdded,
@@ -379,40 +379,40 @@ void VLCMediaObject::updateMetaData()
     QMultiMap<QString, QString> metaDataMap;
 
     metaDataMap.insert(QLatin1String("ARTIST"),
-                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Artist, vlc_exception)));
+                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Artist)));
     vlcExceptionRaised();
     metaDataMap.insert(QLatin1String("ALBUM"),
-                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Album, vlc_exception)));
+                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Album)));
     vlcExceptionRaised();
     metaDataMap.insert(QLatin1String("TITLE"),
-                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Title, vlc_exception)));
+                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Title)));
     vlcExceptionRaised();
     metaDataMap.insert(QLatin1String("DATE"),
-                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Date, vlc_exception)));
+                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Date)));
     vlcExceptionRaised();
     metaDataMap.insert(QLatin1String("GENRE"),
-                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Genre, vlc_exception)));
+                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Genre)));
     vlcExceptionRaised();
     metaDataMap.insert(QLatin1String("TRACKNUMBER"),
-                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_TrackNumber, vlc_exception)));
+                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_TrackNumber)));
     vlcExceptionRaised();
     metaDataMap.insert(QLatin1String("DESCRIPTION"),
-                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Description, vlc_exception)));
+                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_Description)));
     vlcExceptionRaised();
     metaDataMap.insert(QLatin1String("COPYRIGHT"),
-                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_TrackNumber, vlc_exception)));
+                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_TrackNumber)));
     vlcExceptionRaised();
     metaDataMap.insert(QLatin1String("URL"),
-                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_URL, vlc_exception)));
+                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_URL)));
     vlcExceptionRaised();
     metaDataMap.insert(QLatin1String("ENCODEDBY"),
-                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_EncodedBy, vlc_exception)));
+                       QString::fromUtf8(libvlc_media_get_meta(p_vlc_media, libvlc_meta_EncodedBy)));
 
     qDebug() << "updateMetaData(): artist:"
-    << libvlc_media_get_meta(p_vlc_media, libvlc_meta_Artist, vlc_exception);
+    << libvlc_media_get_meta(p_vlc_media, libvlc_meta_Artist);
     vlcExceptionRaised();
     qDebug() << "updateMetaData(): title:"
-    << libvlc_media_get_meta(p_vlc_media, libvlc_meta_Title, vlc_exception);
+    << libvlc_media_get_meta(p_vlc_media, libvlc_meta_Title);
     vlcExceptionRaised();
 
     emit metaDataChanged(metaDataMap);




More information about the vlc-devel mailing list