Commit 86425972 authored by Emanuele Aina's avatar Emanuele Aina

Reintroduce thumbnailing of audio files with cover arts

Import the upstreamed, not-yet-released patch landing the improvements
submitted by the Apertis team.
Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent 60e01496
tumbler (0.2.3-1co2) apertis; urgency=medium
* d/p/0002-Add-more-media-types-for-audio-cover-thumbnails-Bug-.patch:
import the upstreamed, not-yet-released patch landing the improvements
submitted by the Apertis team.
-- Emanuele Aina <emanuele.aina@collabora.com> Sun, 07 Apr 2019 20:21:19 +0000
tumbler (0.2.3-1co1) apertis; urgency=medium
* Disable ffmpegtumbnailer.
......
From 4a5191bb18d7d3ee3c39ac0a95da2f43e1e14b2d Mon Sep 17 00:00:00 2001
From: ToZ <tony.paulic@gmail.com>
Date: Thu, 7 Mar 2019 20:55:09 -0300
Subject: [PATCH] Add more media types for audio cover thumbnails (Bug #12041)
---
.../gst-thumbnailer-provider.c | 49 +++++++++++++++++++
plugins/gst-thumbnailer/gst-thumbnailer.c | 18 +++----
2 files changed, 58 insertions(+), 9 deletions(-)
diff --git a/plugins/gst-thumbnailer/gst-thumbnailer-provider.c b/plugins/gst-thumbnailer/gst-thumbnailer-provider.c
index 9e077c7f2f48..f658110b04b1 100644
--- a/plugins/gst-thumbnailer/gst-thumbnailer-provider.c
+++ b/plugins/gst-thumbnailer/gst-thumbnailer-provider.c
@@ -126,6 +126,55 @@ gst_thumbnailer_provider_get_thumbnailers (TumblerThumbnailerProvider *provider)
"application/x-shorten",
"application/x-smil",
"application/xspf+xml",
+ "audio/3gpp",
+ "audio/ac3",
+ "audio/AMR",
+ "audio/AMR-WB",
+ "audio/basic",
+ "audio/flac",
+ "audio/midi",
+ "audio/mp2",
+ "audio/mp4",
+ "audio/mpeg",
+ "audio/mpegurl",
+ "audio/ogg",
+ "audio/prs.sid",
+ "audio/vnd.rn-realaudio",
+ "audio/x-aiff",
+ "audio/x-ape",
+ "audio/x-flac",
+ "audio/x-gsm",
+ "audio/x-it",
+ "audio/x-m4a",
+ "audio/x-matroska",
+ "audio/x-mod",
+ "audio/x-mp3",
+ "audio/x-mpeg",
+ "audio/x-mpegurl",
+ "audio/x-ms-asf",
+ "audio/x-ms-asx",
+ "audio/x-ms-wax",
+ "audio/x-ms-wma",
+ "audio/x-musepack",
+ "audio/x-pn-aiff",
+ "audio/x-pn-au",
+ "audio/x-pn-realaudio",
+ "audio/x-pn-realaudio-plugin",
+ "audio/x-pn-wav",
+ "audio/x-pn-windows-acm",
+ "audio/x-realaudio",
+ "audio/x-real-audio",
+ "audio/x-s3m",
+ "audio/x-sbc",
+ "audio/x-scpls",
+ "audio/x-speex",
+ "audio/x-stm",
+ "audio/x-tta",
+ "audio/x-wav",
+ "audio/x-wavpack",
+ "audio/x-vorbis",
+ "audio/x-vorbis+ogg",
+ "audio/x-xm",
"image/vnd.rn-realpix",
"image/x-pict",
"misc/ultravox",
diff --git a/plugins/gst-thumbnailer/gst-thumbnailer.c b/plugins/gst-thumbnailer/gst-thumbnailer.c
index 73f884b6117f..d080403d98e3 100644
--- a/plugins/gst-thumbnailer/gst-thumbnailer.c
+++ b/plugins/gst-thumbnailer/gst-thumbnailer.c
@@ -138,15 +138,16 @@ gst_thumbnailer_cover_from_tags (GstTagList *tags,
{
GstSample *cover = NULL;
guint i;
- GstSample *sample;
GstCaps *caps;
const GstStructure *caps_struct;
- gint type;
+ gint type = GST_TAG_IMAGE_TYPE_UNDEFINED;
GstBuffer *buffer;
GdkPixbuf *pixbuf = NULL;
for (i = 0; ; i++)
{
+ GstSample *sample;
+
if (g_cancellable_is_cancelled (cancellable))
break;
@@ -161,14 +162,13 @@ gst_thumbnailer_cover_from_tags (GstTagList *tags,
GST_TYPE_TAG_IMAGE_TYPE,
&type);
- if (type == GST_TAG_IMAGE_TYPE_FRONT_COVER)
- {
- /* found the cover */
- cover = sample;
- break;
- }
+ if (cover != NULL)
+ gst_sample_unref (cover);
+ cover = sample;
- gst_sample_unref (sample);
+ /* prefer the from cover image if specified */
+ if (type == GST_TAG_IMAGE_TYPE_FRONT_COVER)
+ break;
}
if (cover == NULL
--
2.21.0
0001-multithread-using-the-number-of-processors-on-the-sy.patch
0002-Add-more-media-types-for-audio-cover-thumbnails-Bug-.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment