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
1=== modified file 'configure.ac'
2--- configure.ac 2012-05-13 19:48:02 +0000
3+++ configure.ac 2014-12-22 19:21:10 +0000
4@@ -51,7 +51,7 @@
5 PKG_CHECK_MODULES(POPPLER, poppler-glib)
6 PKG_CHECK_MODULES(SPECTRE, libspectre >= 0.2.2)
7 PKG_CHECK_MODULES(DJVU, ddjvuapi)
8-PKG_CHECK_MODULES(TAGLIB, taglib)
9+#PKG_CHECK_MODULES(TAGLIB, taglib)
10 PKG_CHECK_MODULES(FREETYPE,freetype2)
11 PKG_CHECK_MODULES(GLIB, glib-2.0)
12 PKG_CHECK_MODULES(DBUS, dbus-glib-1)
13
14=== modified file 'src/plugin-gstreamer-audio/Makefile.am'
15--- src/plugin-gstreamer-audio/Makefile.am 2010-04-19 18:00:37 +0000
16+++ src/plugin-gstreamer-audio/Makefile.am 2014-12-22 19:21:10 +0000
17@@ -1,7 +1,7 @@
18 plugindir = $(prefix)/lib/gloobus/
19
20-AM_CPPFLAGS += $(GTK_CFLAGS) $(GSTREAMER_CFLAGS) $(GDK_CFLAGS) $(TAGLIB_CFLAGS)
21-AM_LDFLAGS = $(GTK_LIBS) $(GSTREAMER_LIBS) $(GDK_LIBS) $(TAGLIB_LIBS)
22+AM_CPPFLAGS += $(GTK_CFLAGS) $(GSTREAMER_CFLAGS) $(GDK_CFLAGS) #$(TAGLIB_CFLAGS)
23+AM_LDFLAGS = $(GTK_LIBS) $(GSTREAMER_LIBS) $(GDK_LIBS) #$(TAGLIB_LIBS)
24
25 plugin_LTLIBRARIES = audio.la
26 audio_la_SOURCES = plugin-gstreamer-audio.cpp
27
28=== modified file 'src/plugin-gstreamer-audio/plugin-gstreamer-audio.cpp'
29--- src/plugin-gstreamer-audio/plugin-gstreamer-audio.cpp 2012-04-06 10:42:24 +0000
30+++ src/plugin-gstreamer-audio/plugin-gstreamer-audio.cpp 2014-12-22 19:21:10 +0000
31@@ -38,12 +38,12 @@
32 pix_reflection = ui->pixbuf_reflect(pix_cover);
33 g_object_unref(temp);
34
35- load_info();
36+ //load_info(); // Use GStreamer instead of taglib
37
38 return true;
39 }
40
41-void iAudio::load_info( void )
42+/*void iAudio::load_info( void )
43 {
44 TagLib::FileRef file(m_filename.c_str());
45
46@@ -54,7 +54,7 @@
47 this->title = title.toCString(true);
48 this->artist = artist.toCString(true);
49 this->album = album.toCString(true);
50-}
51+}*/
52
53 void iAudio::end( void )
54 {
55@@ -166,7 +166,7 @@
56 {
57 GdkPixbuf *temp = NULL;
58
59- TagLib::MPEG::File file(m_filename.c_str());
60+/* TagLib::MPEG::File file(m_filename.c_str());
61 TagLib::ID3v2::Tag *tagv2 = file.ID3v2Tag();
62 if(tagv2) {
63 TagLib::ID3v2::FrameListMap tags = tagv2->frameListMap();
64@@ -187,7 +187,7 @@
65 if(temp)
66 return temp;
67 }
68- }
69+ }*/
70
71 // If there is no cover attached, load cover.jpg, then if there is not cover.jpg, try to load
72 // cover.png, and there is not cover.png, then, load the default theme icon for audio/mpeg using the
73@@ -261,7 +261,7 @@
74 case GST_MESSAGE_TAG: {
75 GstTagList *tags = NULL;
76 gst_message_parse_tag (message, &tags);
77- //audio->handle_tags (tags); // FIXME: uncomment when handle_tags() works well
78+ audio->handle_tags (tags);
79 gst_tag_list_free (tags);
80 break;
81 }
82@@ -271,8 +271,6 @@
83
84 void iAudio::handle_tags( GstTagList *tags )
85 {
86- // FIXME: this works very bad for now, so we still have to use TagLib
87-
88 gchar *title, *artist, *album, *info;
89
90 if( !gst_tag_list_get_string_index (tags, GST_TAG_TITLE, 0, &title) )
91
92=== modified file 'src/plugin-gstreamer-audio/plugin-gstreamer-audio.h'
93--- src/plugin-gstreamer-audio/plugin-gstreamer-audio.h 2012-04-13 12:53:01 +0000
94+++ src/plugin-gstreamer-audio/plugin-gstreamer-audio.h 2014-12-22 19:21:10 +0000
95@@ -3,10 +3,10 @@
96
97 #ifndef PLUGIN_LOADER
98
99-#include <taglib/fileref.h>
100+/*#include <taglib/fileref.h>
101 #include <taglib/mpegfile.h>
102 #include <taglib/attachedpictureframe.h>
103-#include <taglib/id3v2tag.h>
104+#include <taglib/id3v2tag.h>*/
105 #include <config.h>
106 #include <string>
107

Subscribers

People subscribed via source and target branches