diff options
Diffstat (limited to 'lib/service')
| -rw-r--r-- | lib/service/servicemp3.cpp | 18 | ||||
| -rw-r--r-- | lib/service/servicemp3.h | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp index 4e56496a..e435863c 100644 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -12,6 +12,7 @@ #include <lib/base/init_num.h> #include <lib/base/init.h> #include <gst/gst.h> +#include <gst/pbutils/missing-plugins.h>find #include <sys/stat.h> /* for subtitles */ #include <lib/gui/esubtitle.h> @@ -35,6 +36,7 @@ eServiceFactoryMP3::eServiceFactoryMP3() extensions.push_back("mkv"); extensions.push_back("avi"); extensions.push_back("dat"); + extensions.push_back("flac"); sc->addServiceFactory(eServiceFactoryMP3::id, this, extensions); } @@ -679,6 +681,7 @@ int eServiceMP3::getInfo(int w) case sTracknumber: case sGenre: case sVideoType: + case sUser+12: return resIsString; case sCurrentTitle: tag = GST_TAG_TRACK_NUMBER; @@ -727,6 +730,8 @@ std::string eServiceMP3::getInfoString(int w) case sVideoType: tag = GST_TAG_VIDEO_CODEC; break; + case sUser+12: + return m_error_message; default: return ""; } @@ -947,6 +952,19 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) } } } + case GST_MESSAGE_ELEMENT: + { + if ( gst_is_missing_plugin_message(msg) ) + { + gchar *description = gst_missing_plugin_message_get_description(msg); + if ( description ) + { + m_error_message = description; + g_free(description); + m_event((iPlayableService*)this, evUser+12); + } + } + } default: break; } diff --git a/lib/service/servicemp3.h b/lib/service/servicemp3.h index fc3c85ff..823fb799 100644 --- a/lib/service/servicemp3.h +++ b/lib/service/servicemp3.h @@ -153,6 +153,7 @@ private: GstElement *m_gst_pipeline; GstTagList *m_stream_tags; eFixedMessagePump<int> m_pump; + std::string m_error_message; audiotype_t gstCheckAudioPad(GstStructure* structure); void gstBusCall(GstBus *bus, GstMessage *msg); |
