Merge lp:~jerico-dev/rhythmbox/rb-ipod-support-video-podcast into lp:~ubuntu-desktop/rhythmbox/lucid

Proposed by jerico
Status: Rejected
Rejected by: Robert Ancell
Proposed branch: lp:~jerico-dev/rhythmbox/rb-ipod-support-video-podcast
Merge into: lp:~ubuntu-desktop/rhythmbox/lucid
Diff against target: 159 lines (+147/-0)
2 files modified
debian/changelog (+7/-0)
debian/patches/95_rb_ipod_support_video_podcast.patch (+140/-0)
To merge this branch: bzr merge lp:~jerico-dev/rhythmbox/rb-ipod-support-video-podcast
Reviewer Review Type Date Requested Status
Robert Ancell Needs Information
Javier Jardón Pending
Review via email: mp+29183@code.launchpad.net

Description of the change

Introduces video podcast support for iPods, e.g. Nano 5G. The patch has also been posted upstream, see https://bugzilla.gnome.org/show_bug.cgi?id=412841#c3. It would be great, though, to have this in Ubuntu already until it's integrated upstream.

To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Does this patch affect the Rhythmbox on-disk database? I ask because if upstream does not take this patch or modifies it will there be compatibility issues with the database on upgrade?

review: Needs Information
Revision history for this message
jerico (jerico-dev) wrote :

Hi Robert, this patch introduces the new field RHYTHMDB_PROP_HAS_VIDEO. I had a quick email exchange with upstream maintainer Jonathan Matthew about the patch. He thinks that yes, there might be upgrade problems. He says: "This feature involves some changes that we need to be very careful with, so we really need to do this upstream first." And I agree with him.

Jonathan promised to get back to me with a more detailed review of the patch at the time I submitted the merge request. But I guess he didn't have time yet. BTW: It seems I'm not the only one interested in this change coming out: https://bugzilla.gnome.org/show_bug.cgi?id=363822.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Ok, rejecting this patch due to the upgrade problems. I look forward to seeing this feature in 11.04!

Unmerged revisions

3. By Florian Grandel <fgrandel@laptop-fg>

* debian/patches/95_rb_ipod_support_video_podcast.patch:
  - added support for video podcasts

2. By Florian Grandel <fgrandel@laptop-fg>

- Added a RhythmDB entry property "has-video" that will be true when a file contains a video track
- The "has-video" property will be queried when adding podcasts to an iPod. The file's media type will be set to "video podcast" if true. This is required to support iPod video podcasts, e.g. on iPod Nano 5G.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-06-22 07:22:14 +0000
3+++ debian/changelog 2010-07-05 01:50:37 +0000
4@@ -1,3 +1,10 @@
5+rhythmbox (0.12.8-0ubuntu7.ppa1) lucid; urgency=low
6+
7+ * debian/patches/95_rb_ipod_support_video_podcast.patch:
8+ - added support for video podcasts
9+
10+ -- Florian Grandel <jerico.dev@gmail.com> Sun, 04 Jul 2010 21:49:25 -0300
11+
12 rhythmbox (0.12.8-0ubuntu7) lucid-proposed; urgency=low
13
14 * debian/control:
15
16=== added file 'debian/patches/95_rb_ipod_support_video_podcast.patch'
17--- debian/patches/95_rb_ipod_support_video_podcast.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/95_rb_ipod_support_video_podcast.patch 2010-07-05 01:50:37 +0000
19@@ -0,0 +1,140 @@
20+diff -Nur -x '*.orig' -x '*~' rhythmbox-0.12.8/plugins/ipod/rb-ipod-source.c rhythmbox-0.12.8.new/plugins/ipod/rb-ipod-source.c
21+--- rhythmbox-0.12.8/plugins/ipod/rb-ipod-source.c 2010-07-04 21:13:24.737138097 -0300
22++++ rhythmbox-0.12.8.new/plugins/ipod/rb-ipod-source.c 2010-07-04 21:13:25.387133090 -0300
23+@@ -536,6 +536,7 @@
24+ /* FIXME: these should go away once we compile against new-enough libgpod */
25+ #define MEDIATYPE_AUDIO 0x0001
26+ #define MEDIATYPE_PODCAST 0x0004
27++#define MEDIATYPE_VIDEO_PODCAST 0x0006
28+
29+ static Itdb_Track *
30+ create_ipod_song_from_entry (RhythmDBEntry *entry, guint64 filesize, const char *mimetype)
31+@@ -568,7 +569,11 @@
32+ track->playcount = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_PLAY_COUNT);
33+
34+ if (rhythmdb_entry_get_pointer (entry, RHYTHMDB_PROP_TYPE) == RHYTHMDB_ENTRY_TYPE_PODCAST_POST) {
35+- track->mediatype = MEDIATYPE_PODCAST;
36++ if (rhythmdb_entry_get_boolean (entry, RHYTHMDB_PROP_HAS_VIDEO)) {
37++ track->mediatype = MEDIATYPE_VIDEO_PODCAST;
38++ } else {
39++ track->mediatype = MEDIATYPE_PODCAST;
40++ }
41+ track->time_released = rhythmdb_entry_get_ulong (entry, RHYTHMDB_PROP_POST_TIME);
42+ } else {
43+ track->mediatype = MEDIATYPE_AUDIO;
44+@@ -1332,7 +1337,7 @@
45+ filename);
46+ g_free (filename);
47+
48+- if (song->mediatype == MEDIATYPE_PODCAST) {
49++ if (song->mediatype == MEDIATYPE_PODCAST || song->mediatype == MEDIATYPE_VIDEO_PODCAST) {
50+ add_to_podcasts (isource, song);
51+ }
52+ device = rb_ipod_db_get_device (priv->ipod_db);
53+@@ -1753,7 +1758,7 @@
54+ g_hash_table_iter_init (&iter, priv->entry_map);
55+ while (g_hash_table_iter_next (&iter, &key, &value)) {
56+ Itdb_Track *track = value;
57+- if (track->mediatype == MEDIATYPE_PODCAST) {
58++ if (track->mediatype == MEDIATYPE_PODCAST || track->mediatype == MEDIATYPE_VIDEO_PODCAST) {
59+ num_podcasts++;
60+ }
61+ }
62+diff -Nur -x '*.orig' -x '*~' rhythmbox-0.12.8/podcast/rb-podcast-manager.c rhythmbox-0.12.8.new/podcast/rb-podcast-manager.c
63+--- rhythmbox-0.12.8/podcast/rb-podcast-manager.c 2010-07-04 21:13:24.067132790 -0300
64++++ rhythmbox-0.12.8.new/podcast/rb-podcast-manager.c 2010-07-04 21:14:46.757761062 -0300
65+@@ -1353,6 +1353,16 @@
66+ g_value_unset (&val);
67+ }
68+
69++ if (rb_metadata_has_video (md)) {
70++ rb_debug("Found video!");
71++ } else {
72++ rb_debug("No video found!");
73++ }
74++ g_value_init (&val, G_TYPE_BOOLEAN);
75++ g_value_set_boolean (&val, rb_metadata_has_video (md));
76++ rhythmdb_entry_set (pd->priv->db, entry, RHYTHMDB_PROP_HAS_VIDEO, &val);
77++ g_value_unset (&val);
78++
79+ rhythmdb_commit (pd->priv->db);
80+
81+ g_object_unref (md);
82+diff -Nur -x '*.orig' -x '*~' rhythmbox-0.12.8/rhythmdb/rhythmdb.c rhythmbox-0.12.8.new/rhythmdb/rhythmdb.c
83+--- rhythmbox-0.12.8/rhythmdb/rhythmdb.c 2010-07-04 21:13:22.049008675 -0300
84++++ rhythmbox-0.12.8.new/rhythmdb/rhythmdb.c 2010-07-04 21:13:25.387133090 -0300
85+@@ -1972,6 +1972,12 @@
86+ g_value_unset (&val);
87+ }
88+
89++ /* video flag */
90++ g_value_init (&val, G_TYPE_BOOLEAN);
91++ g_value_set_boolean (&val, rb_metadata_has_video (metadata));
92++ rhythmdb_entry_set_internal (db, entry, TRUE, RHYTHMDB_PROP_HAS_VIDEO, &val);
93++ g_value_unset (&val);
94++
95+ /* musicbrainz trackid */
96+ set_metadata_string_with_default (db, metadata, entry,
97+ RB_METADATA_FIELD_MUSICBRAINZ_TRACKID,
98+@@ -3546,6 +3552,9 @@
99+ g_date_clear (&entry->date, 1);
100+ break;
101+ }
102++ case RHYTHMDB_PROP_HAS_VIDEO:
103++ entry->has_video = g_value_get_boolean (value);
104++ break;
105+ case RHYTHMDB_PROP_TRACK_GAIN:
106+ g_warning ("RHYTHMDB_PROP_TRACK_GAIN no longer supported");
107+ break;
108+@@ -4404,6 +4413,7 @@
109+ ENUM_ENTRY (RHYTHMDB_PROP_LAST_PLAYED, "Last Played (gulong) [last-played]"),
110+ ENUM_ENTRY (RHYTHMDB_PROP_BITRATE, "Bitrate (gulong) [bitrate]"),
111+ ENUM_ENTRY (RHYTHMDB_PROP_DATE, "Date of release (gulong) [date]"),
112++ ENUM_ENTRY (RHYTHMDB_PROP_HAS_VIDEO, "Whether the file contains a video track (gboolean) [has-video]"),
113+ ENUM_ENTRY (RHYTHMDB_PROP_TRACK_GAIN, "Replaygain track gain (gdouble) [replaygain-track-gain]"),
114+ ENUM_ENTRY (RHYTHMDB_PROP_TRACK_PEAK, "Replaygain track peak (gdouble) [replaygain-track-peak]"),
115+ ENUM_ENTRY (RHYTHMDB_PROP_ALBUM_GAIN, "Replaygain album pain (gdouble) [replaygain-album-gain]"),
116+@@ -5366,6 +5376,8 @@
117+ switch (propid) {
118+ case RHYTHMDB_PROP_HIDDEN:
119+ return ((entry->flags & RHYTHMDB_ENTRY_HIDDEN) != 0);
120++ case RHYTHMDB_PROP_HAS_VIDEO:
121++ return (entry->has_video);
122+ default:
123+ g_assert_not_reached ();
124+ return FALSE;
125+diff -Nur -x '*.orig' -x '*~' rhythmbox-0.12.8/rhythmdb/rhythmdb.h rhythmbox-0.12.8.new/rhythmdb/rhythmdb.h
126+--- rhythmbox-0.12.8/rhythmdb/rhythmdb.h 2010-07-04 21:13:22.049008675 -0300
127++++ rhythmbox-0.12.8.new/rhythmdb/rhythmdb.h 2010-07-04 21:13:25.387133090 -0300
128+@@ -170,6 +170,7 @@
129+ RHYTHMDB_PROP_LAST_PLAYED,
130+ RHYTHMDB_PROP_BITRATE,
131+ RHYTHMDB_PROP_DATE,
132++ RHYTHMDB_PROP_HAS_VIDEO,
133+ RHYTHMDB_PROP_TRACK_GAIN, /* obsolete */
134+ RHYTHMDB_PROP_TRACK_PEAK, /* obsolete */
135+ RHYTHMDB_PROP_ALBUM_GAIN, /* obsolete */
136+diff -Nur -x '*.orig' -x '*~' rhythmbox-0.12.8/rhythmdb/rhythmdb-private.h rhythmbox-0.12.8.new/rhythmdb/rhythmdb-private.h
137+--- rhythmbox-0.12.8/rhythmdb/rhythmdb-private.h 2010-07-04 21:13:22.049008675 -0300
138++++ rhythmbox-0.12.8.new/rhythmdb/rhythmdb-private.h 2010-07-04 21:13:25.387133090 -0300
139+@@ -88,6 +88,7 @@
140+ gulong duration;
141+ gulong bitrate;
142+ GDate date;
143++ gboolean has_video;
144+
145+ /* filesystem */
146+ RBRefString *location;
147+diff -Nur -x '*.orig' -x '*~' rhythmbox-0.12.8/rhythmdb/rhythmdb-tree.c rhythmbox-0.12.8.new/rhythmdb/rhythmdb-tree.c
148+--- rhythmbox-0.12.8/rhythmdb/rhythmdb-tree.c 2010-07-04 21:13:24.747134577 -0300
149++++ rhythmbox-0.12.8.new/rhythmdb/rhythmdb-tree.c 2010-07-04 21:13:25.387133090 -0300
150+@@ -1006,6 +1006,9 @@
151+ else
152+ save_entry_ulong (ctx, elt_name, 0, TRUE);
153+ break;
154++ case RHYTHMDB_PROP_HAS_VIDEO:
155++ save_entry_boolean(ctx, elt_name, entry->has_video);
156++ break;
157+ case RHYTHMDB_PROP_DURATION:
158+ save_entry_ulong (ctx, elt_name, entry->duration, FALSE);
159+ break;

Subscribers

People subscribed via source and target branches

to all changes: