Commit 865ab4ed authored by Martin T. H. Sandsmark's avatar Martin T. H. Sandsmark Committed by Jean-Baptiste Kempf

Fix building of phonon-vlc

parent 31e8f235
......@@ -44,7 +44,6 @@ vlc_install_dir/*
# Ignore CMake Stuff
cmake
CMakeFiles
CMakeLists.txt
CTestTestfile.cmake
cmake_install.cmake
cmake_uninstall.cmake
......
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)
......@@ -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);
}
}
......
......@@ -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);
......
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