Merge lp:~ballogy/gloobus-preview/drop-taglib into lp:gloobus-preview

Proposed by Balló György
Status: Merged
Merged at revision: 300
Proposed branch: lp:~ballogy/gloobus-preview/drop-taglib
Merge into: lp:gloobus-preview
Diff against target: 106 lines (+11/-13)
4 files modified
configure.ac (+1/-1)
src/plugin-gstreamer-audio/Makefile.am (+2/-2)
src/plugin-gstreamer-audio/plugin-gstreamer-audio.cpp (+6/-8)
src/plugin-gstreamer-audio/plugin-gstreamer-audio.h (+2/-2)
To merge this branch: bzr merge lp:~ballogy/gloobus-preview/drop-taglib
Reviewer Review Type Date Requested Status
Gloobus Developers Pending
Review via email: mp+245317@code.launchpad.net

Description of the change

Use GStreamer to parse tags

It works reliably now, there is no reason to use taglib. Comment out the code, and remove taglib dependency.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure.ac'
--- configure.ac 2012-05-13 19:48:02 +0000
+++ configure.ac 2014-12-22 19:21:10 +0000
@@ -51,7 +51,7 @@
51PKG_CHECK_MODULES(POPPLER, poppler-glib)51PKG_CHECK_MODULES(POPPLER, poppler-glib)
52PKG_CHECK_MODULES(SPECTRE, libspectre >= 0.2.2)52PKG_CHECK_MODULES(SPECTRE, libspectre >= 0.2.2)
53PKG_CHECK_MODULES(DJVU, ddjvuapi)53PKG_CHECK_MODULES(DJVU, ddjvuapi)
54PKG_CHECK_MODULES(TAGLIB, taglib)54#PKG_CHECK_MODULES(TAGLIB, taglib)
55PKG_CHECK_MODULES(FREETYPE,freetype2)55PKG_CHECK_MODULES(FREETYPE,freetype2)
56PKG_CHECK_MODULES(GLIB, glib-2.0)56PKG_CHECK_MODULES(GLIB, glib-2.0)
57PKG_CHECK_MODULES(DBUS, dbus-glib-1)57PKG_CHECK_MODULES(DBUS, dbus-glib-1)
5858
=== modified file 'src/plugin-gstreamer-audio/Makefile.am'
--- src/plugin-gstreamer-audio/Makefile.am 2010-04-19 18:00:37 +0000
+++ src/plugin-gstreamer-audio/Makefile.am 2014-12-22 19:21:10 +0000
@@ -1,7 +1,7 @@
1plugindir = $(prefix)/lib/gloobus/1plugindir = $(prefix)/lib/gloobus/
22
3AM_CPPFLAGS += $(GTK_CFLAGS) $(GSTREAMER_CFLAGS) $(GDK_CFLAGS) $(TAGLIB_CFLAGS)3AM_CPPFLAGS += $(GTK_CFLAGS) $(GSTREAMER_CFLAGS) $(GDK_CFLAGS) #$(TAGLIB_CFLAGS)
4AM_LDFLAGS = $(GTK_LIBS) $(GSTREAMER_LIBS) $(GDK_LIBS) $(TAGLIB_LIBS)4AM_LDFLAGS = $(GTK_LIBS) $(GSTREAMER_LIBS) $(GDK_LIBS) #$(TAGLIB_LIBS)
55
6plugin_LTLIBRARIES = audio.la 6plugin_LTLIBRARIES = audio.la
7audio_la_SOURCES = plugin-gstreamer-audio.cpp 7audio_la_SOURCES = plugin-gstreamer-audio.cpp
88
=== modified file 'src/plugin-gstreamer-audio/plugin-gstreamer-audio.cpp'
--- src/plugin-gstreamer-audio/plugin-gstreamer-audio.cpp 2012-04-06 10:42:24 +0000
+++ src/plugin-gstreamer-audio/plugin-gstreamer-audio.cpp 2014-12-22 19:21:10 +0000
@@ -38,12 +38,12 @@
38 pix_reflection = ui->pixbuf_reflect(pix_cover);38 pix_reflection = ui->pixbuf_reflect(pix_cover);
39 g_object_unref(temp);39 g_object_unref(temp);
4040
41 load_info();41 //load_info(); // Use GStreamer instead of taglib
42 42
43 return true;43 return true;
44}44}
4545
46void iAudio::load_info( void )46/*void iAudio::load_info( void )
47{47{
48 TagLib::FileRef file(m_filename.c_str());48 TagLib::FileRef file(m_filename.c_str());
49 49
@@ -54,7 +54,7 @@
54 this->title = title.toCString(true);54 this->title = title.toCString(true);
55 this->artist = artist.toCString(true);55 this->artist = artist.toCString(true);
56 this->album = album.toCString(true);56 this->album = album.toCString(true);
57}57}*/
5858
59void iAudio::end( void )59void iAudio::end( void )
60{60{
@@ -166,7 +166,7 @@
166{166{
167 GdkPixbuf *temp = NULL;167 GdkPixbuf *temp = NULL;
168168
169 TagLib::MPEG::File file(m_filename.c_str());169/* TagLib::MPEG::File file(m_filename.c_str());
170 TagLib::ID3v2::Tag *tagv2 = file.ID3v2Tag();170 TagLib::ID3v2::Tag *tagv2 = file.ID3v2Tag();
171 if(tagv2) {171 if(tagv2) {
172 TagLib::ID3v2::FrameListMap tags = tagv2->frameListMap();172 TagLib::ID3v2::FrameListMap tags = tagv2->frameListMap();
@@ -187,7 +187,7 @@
187 if(temp)187 if(temp)
188 return temp;188 return temp;
189 }189 }
190 }190 }*/
191 191
192 // If there is no cover attached, load cover.jpg, then if there is not cover.jpg, try to load192 // If there is no cover attached, load cover.jpg, then if there is not cover.jpg, try to load
193 // cover.png, and there is not cover.png, then, load the default theme icon for audio/mpeg using the193 // cover.png, and there is not cover.png, then, load the default theme icon for audio/mpeg using the
@@ -261,7 +261,7 @@
261 case GST_MESSAGE_TAG: {261 case GST_MESSAGE_TAG: {
262 GstTagList *tags = NULL;262 GstTagList *tags = NULL;
263 gst_message_parse_tag (message, &tags);263 gst_message_parse_tag (message, &tags);
264 //audio->handle_tags (tags); // FIXME: uncomment when handle_tags() works well264 audio->handle_tags (tags);
265 gst_tag_list_free (tags);265 gst_tag_list_free (tags);
266 break;266 break;
267 }267 }
@@ -271,8 +271,6 @@
271271
272void iAudio::handle_tags( GstTagList *tags )272void iAudio::handle_tags( GstTagList *tags )
273{273{
274 // FIXME: this works very bad for now, so we still have to use TagLib
275
276 gchar *title, *artist, *album, *info;274 gchar *title, *artist, *album, *info;
277 275
278 if( !gst_tag_list_get_string_index (tags, GST_TAG_TITLE, 0, &title) )276 if( !gst_tag_list_get_string_index (tags, GST_TAG_TITLE, 0, &title) )
279277
=== modified file 'src/plugin-gstreamer-audio/plugin-gstreamer-audio.h'
--- src/plugin-gstreamer-audio/plugin-gstreamer-audio.h 2012-04-13 12:53:01 +0000
+++ src/plugin-gstreamer-audio/plugin-gstreamer-audio.h 2014-12-22 19:21:10 +0000
@@ -3,10 +3,10 @@
33
4#ifndef PLUGIN_LOADER4#ifndef PLUGIN_LOADER
55
6#include <taglib/fileref.h>6/*#include <taglib/fileref.h>
7#include <taglib/mpegfile.h>7#include <taglib/mpegfile.h>
8#include <taglib/attachedpictureframe.h>8#include <taglib/attachedpictureframe.h>
9#include <taglib/id3v2tag.h>9#include <taglib/id3v2tag.h>*/
10#include <config.h>10#include <config.h>
11#include <string>11#include <string>
1212

Subscribers

People subscribed via source and target branches