diff options
| author | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-10-15 14:38:38 +0000 |
|---|---|---|
| committer | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-10-15 14:38:38 +0000 |
| commit | c69bb079fef352b7b34eac8739b0dc051629cb7b (patch) | |
| tree | d599ef4903aa7b3e8bfe0b55794e39a5332e8e3e /lib/service/servicemp3.cpp | |
| parent | 0c2185a46606c2ac3e41205fe92e6d5ba4ead1b9 (diff) | |
| download | enigma2-c69bb079fef352b7b34eac8739b0dc051629cb7b.tar.gz enigma2-c69bb079fef352b7b34eac8739b0dc051629cb7b.zip | |
allow gstreamer to signalize missing plugins to the gui (requires reconfiguring enigma2) and add support for flac files (requires
libflac7, gst-plugin-flac)
Diffstat (limited to 'lib/service/servicemp3.cpp')
| -rw-r--r-- | lib/service/servicemp3.cpp | 18 |
1 files changed, 18 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; } |
