[SCM] gmtk/master: Drop patches from upstream
sramacher at users.alioth.debian.org
sramacher at users.alioth.debian.org
Thu Jun 12 16:16:51 UTC 2014
The following commit has been merged in the master branch:
commit c492af517ff9af3c4d89f609e4dc2a5d4f7cf25f
Author: Sebastian Ramacher <sramacher at debian.org>
Date: Thu Jun 12 17:54:32 2014 +0200
Drop patches from upstream
diff --git a/debian/patches/metadata-handling.patch b/debian/patches/metadata-handling.patch
deleted file mode 100644
index 31c5ec4..0000000
--- a/debian/patches/metadata-handling.patch
+++ /dev/null
@@ -1,260 +0,0 @@
-Description: Use case inspecific parsing of metadata attributes fixes
-Origin: upstream,
- https://code.google.com/p/gmtk/source/detail?r=212
-Last-Update: 2013-05-06
-
---- a/src/gmtk_media_player.c
-+++ b/src/gmtk_media_player.c
-@@ -477,6 +477,12 @@
- player->album = NULL;
- player->disposed = FALSE;
- player->player_lock = g_mutex_new();
-+ player->name_regex = g_regex_new(".*name\\s*:\\s*(.*)\n", G_REGEX_CASELESS, 0, NULL);
-+ player->genre_regex = g_regex_new(".*genre\\s*:\\s*(.*)\n", G_REGEX_CASELESS, 0, NULL);
-+ player->title_regex = g_regex_new(".*title\\s*:\\s*(.*)\n", G_REGEX_CASELESS, 0, NULL);
-+ player->artist_regex = g_regex_new(".*artist\\s*:\\s*(.*)\n", G_REGEX_CASELESS, 0, NULL);
-+ player->album_regex = g_regex_new(".*album\\s*:\\s*(.*)\n", G_REGEX_CASELESS, 0, NULL);
-+
- gmtk_media_player_log_state(player, "after init");
- }
-
-@@ -1775,6 +1781,14 @@
- }
- break;
-
-+ case ATTRIBUTE_GENRE:
-+ if (player->genre == NULL || strlen(player->genre) == 0) {
-+ value = NULL;
-+ } else {
-+ value = player->genre;
-+ }
-+ break;
-+
- case ATTRIBUTE_PROFILE:
- value = player->profile;
- break;
-@@ -3161,6 +3175,8 @@
- GmtkMediaPlayerAudioTrack *audio_track = NULL;
- GList *iter;
- GtkWidget *dialog;
-+ gchar **split;
-+ gint index;
-
- if (player == NULL) {
- gm_log(player->debug, G_LOG_LEVEL_MESSAGE, "player is NULL");
-@@ -3635,94 +3651,119 @@
- gtk_widget_destroy(dialog);
- }
-
-- if (strstr(mplayer_output->str, "Name : ") != 0) {
-- buf = strstr(mplayer_output->str, "Name : ");
-- buf = strstr(mplayer_output->str, "Name : ") + strlen("Name : ");
-- buf = g_strchomp(buf);
-- if (player->title != NULL) {
-- g_free(player->title);
-- player->title = NULL;
-- }
-+ if (g_regex_match(player->name_regex, mplayer_output->str, 0, NULL)) {
-+ split = g_regex_split(player->name_regex, mplayer_output->str, 0);
-+ index = 0;
-+ while (split[index]) {
-+ if (strlen(split[index]) > 0) {
-+ if (player->title != NULL) {
-+ g_free(player->title);
-+ player->title = NULL;
-+ }
-
-- player->title = g_locale_to_utf8(buf, -1, NULL, NULL, NULL);
-- if (player->title == NULL) {
-- player->title = g_strdup(buf);
-- gm_str_strip_unicode(player->title, strlen(player->title));
-+ player->title = g_locale_to_utf8(split[index], -1, NULL, NULL, NULL);
-+ if (player->title == NULL) {
-+ player->title = g_strdup(split[index]);
-+ gm_str_strip_unicode(player->title, strlen(player->title));
-+ }
-+ player->has_metadata = TRUE;
-+ create_event_int(player, "attribute-changed", ATTRIBUTE_TITLE);
-+ }
-+ index++;
- }
-- player->has_metadata = TRUE;
-- create_event_int(player, "attribute-changed", ATTRIBUTE_TITLE);
-+ g_strfreev(split);
- }
-
-- if (strstr(mplayer_output->str, "Genre : ") != 0) {
-- buf = strstr(mplayer_output->str, "Genre : ");
-- buf = strstr(mplayer_output->str, "Genre : ") + strlen("Genre : ");
-- buf = g_strchomp(buf);
-- if (player->artist != NULL) {
-- g_free(player->artist);
-- player->artist = NULL;
-- }
-+ if (g_regex_match(player->genre_regex, mplayer_output->str, 0, NULL)) {
-+ split = g_regex_split(player->genre_regex, mplayer_output->str, 0);
-+ index = 0;
-+ while (split[index]) {
-+ if (strlen(split[index]) > 0) {
-+ if (player->title != NULL) {
-+ g_free(player->genre);
-+ player->title = NULL;
-+ }
-
-- player->artist = g_locale_to_utf8(buf, -1, NULL, NULL, NULL);
-- if (player->artist == NULL) {
-- player->artist = g_strdup(buf);
-- gm_str_strip_unicode(player->artist, strlen(player->artist));
-+ player->genre = g_locale_to_utf8(split[index], -1, NULL, NULL, NULL);
-+ if (player->genre == NULL) {
-+ player->genre = g_strdup(split[index]);
-+ gm_str_strip_unicode(player->genre, strlen(player->genre));
-+ }
-+ player->has_metadata = TRUE;
-+ create_event_int(player, "attribute-changed", ATTRIBUTE_GENRE);
-+ }
-+ index++;
- }
-- player->has_metadata = TRUE;
-- create_event_int(player, "attribute-changed", ATTRIBUTE_ARTIST);
-+ g_strfreev(split);
- }
-
-- if (strstr(mplayer_output->str, "Title: ") != 0) {
-- buf = strstr(mplayer_output->str, "Title:");
-- buf = strstr(mplayer_output->str, "Title: ") + strlen("Title: ");
-- buf = g_strchomp(buf);
-- if (player->title != NULL) {
-- g_free(player->title);
-- player->title = NULL;
-- }
-+ if (g_regex_match(player->title_regex, mplayer_output->str, 0, NULL)) {
-+ split = g_regex_split(player->title_regex, mplayer_output->str, 0);
-+ index = 0;
-+ while (split[index]) {
-+ if (strlen(split[index]) > 0) {
-+ if (player->title != NULL) {
-+ g_free(player->title);
-+ player->title = NULL;
-+ }
-
-- player->title = g_locale_to_utf8(buf, -1, NULL, NULL, NULL);
-- if (player->title == NULL) {
-- player->title = g_strdup(buf);
-- gm_str_strip_unicode(player->title, strlen(player->title));
-+ player->title = g_locale_to_utf8(split[index], -1, NULL, NULL, NULL);
-+ if (player->title == NULL) {
-+ player->title = g_strdup(split[index]);
-+ gm_str_strip_unicode(player->title, strlen(player->title));
-+ }
-+ player->has_metadata = TRUE;
-+ create_event_int(player, "attribute-changed", ATTRIBUTE_TITLE);
-+ }
-+ index++;
- }
-- player->has_metadata = TRUE;
-- create_event_int(player, "attribute-changed", ATTRIBUTE_TITLE);
-+ g_strfreev(split);
- }
-
-- if (strstr(mplayer_output->str, "Artist: ") != 0) {
-- buf = strstr(mplayer_output->str, "Artist:");
-- buf = strstr(mplayer_output->str, "Artist: ") + strlen("Artist: ");
-- buf = g_strchomp(buf);
-- if (player->artist != NULL) {
-- g_free(player->artist);
-- player->artist = NULL;
-- }
-+ if (g_regex_match(player->artist_regex, mplayer_output->str, 0, NULL)) {
-+ split = g_regex_split(player->artist_regex, mplayer_output->str, 0);
-+ index = 0;
-+ while (split[index]) {
-+ if (strlen(split[index]) > 0) {
-+ if (player->artist != NULL) {
-+ g_free(player->artist);
-+ player->artist = NULL;
-+ }
-
-- player->artist = g_locale_to_utf8(buf, -1, NULL, NULL, NULL);
-- if (player->artist == NULL) {
-- player->artist = g_strdup(buf);
-- gm_str_strip_unicode(player->artist, strlen(player->artist));
-+ player->artist = g_locale_to_utf8(split[index], -1, NULL, NULL, NULL);
-+ if (player->artist == NULL) {
-+ player->artist = g_strdup(split[index]);
-+ gm_str_strip_unicode(player->artist, strlen(player->artist));
-+ }
-+ player->has_metadata = TRUE;
-+ create_event_int(player, "attribute-changed", ATTRIBUTE_ARTIST);
-+ }
-+ index++;
- }
-- player->has_metadata = TRUE;
-- create_event_int(player, "attribute-changed", ATTRIBUTE_ARTIST);
-+ g_strfreev(split);
- }
-
-- if (strstr(mplayer_output->str, "Album: ") != 0) {
-- buf = strstr(mplayer_output->str, "Album:");
-- buf = strstr(mplayer_output->str, "Album: ") + strlen("Album: ");
-- buf = g_strchomp(buf);
-- if (player->album != NULL) {
-- g_free(player->album);
-- player->album = NULL;
-- }
-+ if (g_regex_match(player->album_regex, mplayer_output->str, 0, NULL)) {
-+ split = g_regex_split(player->album_regex, mplayer_output->str, 0);
-+ index = 0;
-+ while (split[index]) {
-+ if (strlen(split[index]) > 0) {
-+ if (player->album != NULL) {
-+ g_free(player->album);
-+ player->album = NULL;
-+ }
-
-- player->album = g_locale_to_utf8(buf, -1, NULL, NULL, NULL);
-- if (player->album == NULL) {
-- player->album = g_strdup(buf);
-- gm_str_strip_unicode(player->album, strlen(player->album));
-+ player->album = g_locale_to_utf8(split[index], -1, NULL, NULL, NULL);
-+ if (player->album == NULL) {
-+ player->album = g_strdup(split[index]);
-+ gm_str_strip_unicode(player->album, strlen(player->album));
-+ }
-+ player->has_metadata = TRUE;
-+ create_event_int(player, "attribute-changed", ATTRIBUTE_ALBUM);
-+ }
-+ index++;
- }
-- player->has_metadata = TRUE;
-- create_event_int(player, "attribute-changed", ATTRIBUTE_ALBUM);
-+ g_strfreev(split);
- }
-
- if (player->minimum_mplayer == FALSE) {
---- a/src/gmtk_media_player.h
-+++ b/src/gmtk_media_player.h
-@@ -182,7 +182,8 @@
- ATTRIBUTE_PROFILE,
- ATTRIBUTE_PREFERRED_AUDIO_LANGUAGE,
- ATTRIBUTE_PREFERRED_SUBTITLE_LANGUAGE,
-- ATTRIBUTE_SPEED_SET
-+ ATTRIBUTE_SPEED_SET,
-+ ATTRIBUTE_GENRE
- } GmtkMediaPlayerMediaAttributes;
-
- typedef enum {
-@@ -398,6 +399,13 @@
-
- gboolean disposed;
- GMutex *player_lock;
-+ gchar *genre;
-+ GRegex *name_regex;
-+ GRegex *genre_regex;
-+ GRegex *title_regex;
-+ GRegex *artist_regex;
-+ GRegex *album_regex;
-+
- };
-
- struct _GmtkMediaPlayerClass {
diff --git a/debian/patches/series b/debian/patches/series
index 01bdf0d..fe04dc8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
0002-hide-private-symbols.patch
0003-use-soname-as-domain.patch
-metadata-handling.patch
--
gmtk packaging
More information about the pkg-multimedia-commits
mailing list