aboutsummaryrefslogtreecommitdiff
path: root/lib/service/servicemp3.cpp
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2008-11-20 12:17:28 +0100
committerFraxinas <andreas.frisch@multimedia-labs.de>2008-11-20 12:17:28 +0100
commit5a626462406c008da1c81cf304a448d9abd19576 (patch)
tree90b3df295fa9da4b526fb4bc6e389bfca54f87b6 /lib/service/servicemp3.cpp
parent5474861f9be0b88428d490b45625d1a65575c020 (diff)
downloadenigma2-5a626462406c008da1c81cf304a448d9abd19576.tar.gz
enigma2-5a626462406c008da1c81cf304a448d9abd19576.zip
decode id3 cover art images embedded into mp3 files and show them in mediaplayer
Diffstat (limited to 'lib/service/servicemp3.cpp')
-rw-r--r--lib/service/servicemp3.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp
index 19b7735b..017c58f0 100644
--- a/lib/service/servicemp3.cpp
+++ b/lib/service/servicemp3.cpp
@@ -16,6 +16,7 @@
#include <sys/stat.h>
/* for subtitles */
#include <lib/gui/esubtitle.h>
+#include <errno.h>
// eServiceFactoryMP3
@@ -944,6 +945,17 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg)
m_audioStreams.push_back(audio);
}
+ GValue *gv_image = gst_tag_list_get_value_index(tags, GST_TAG_IMAGE, 0);
+ if ( gv_image )
+ {
+ GstBuffer *buf_image;
+ buf_image = gst_value_get_buffer (gv_image);
+ int fd = open("/tmp/.id3coverart", O_CREAT|O_WRONLY|O_TRUNC, 0644);
+ int ret = write(fd, GST_BUFFER_DATA(buf_image), GST_BUFFER_SIZE(buf_image));
+ close(fd);
+ m_event((iPlayableService*)this, evUser+13);
+ }
+
gst_tag_list_free(tags);
m_event((iPlayableService*)this, evUpdatedInfo);
break;
@@ -984,7 +996,7 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg)
{
if ( gst_is_missing_plugin_message(msg) )
{
- gchar *description = gst_missing_plugin_message_get_description(msg);
+ gchar *description = gst_missing_plugin_message_get_description(msg);
if ( description )
{
m_error_message = "GStreamer plugin " + (std::string)description + " not available!\n";