Merge lp:~laney/unity-lens-music/gstreamer1.0 into lp:unity-lens-music

Proposed by Iain Lane
Status: Rejected
Rejected by: Michael Terry
Proposed branch: lp:~laney/unity-lens-music/gstreamer1.0
Merge into: lp:unity-lens-music
Diff against target: 212 lines (+33/-25)
5 files modified
configure.ac (+3/-3)
debian/changelog (+6/-0)
debian/control (+3/-3)
src/Makefile.am (+2/-2)
src/player.vala (+19/-17)
To merge this branch: bzr merge lp:~laney/unity-lens-music/gstreamer1.0
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Michael Terry Approve
Review via email: mp+134310@code.launchpad.net

Commit message

Port from gstreamer 0.10 to gstreamer 1.0

Description of the change

For Raring, we want to port everything in main from gstreamer-0.10 to gstreamer-1.0.

unity-lens-music is on that list. This branch implements the port.

I'm sure there are still gremlins ("soft" 0.10/1.0 changes) that will need to be ironed out, but in my testing this performed as well before the port as after. (That is, not spectacularly - previews still frequently fail to play - but it at least works).

To post a comment you must log in.
Revision history for this message
Iain Lane (laney) wrote :

BTW if you want to test you should manually install gstreamer1.0-{pulseaudio,alsa} and the plugins they need, otherwise you won't get any sound. :-)

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Please, do not merge until Laney gives the green light, meaning gstreamer 1.0 in main :)

Revision history for this message
Michael Terry (mterry) wrote :

Looks fine to me, and it does seem to work as well in my quick testing (it only uses it for preview mode music playing, right?).

review: Approve
Revision history for this message
Michael Terry (mterry) wrote :

Oh wait. Is there not a bug for this? Can you open one and link it please before it gets approved for a proper debian/changelog entry?

Revision history for this message
Michael Terry (mterry) wrote :

Laney is on holiday, whoops. I went ahead and made a bug and linked it. Approving.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

To resolve the merge conflict, since laney is on vacation, I made: https://code.launchpad.net/~mterry/unity-lens-music/gst1/+merge/139031

So I'll mark this branch as rejected.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure.ac'
--- configure.ac 2012-10-19 15:38:25 +0000
+++ configure.ac 2012-11-14 14:57:26 +0000
@@ -16,7 +16,7 @@
16# Init the other things we depend on16# Init the other things we depend on
17#####################################################17#####################################################
18AM_MAINTAINER_MODE18AM_MAINTAINER_MODE
19AM_PROG_VALAC([0.16.0])19AM_PROG_VALAC([0.18.0])
20AS_IF([test -z "$VALAC"], [AC_MSG_ERROR(["No valac compiler found."])])20AS_IF([test -z "$VALAC"], [AC_MSG_ERROR(["No valac compiler found."])])
21AC_PROG_CC21AC_PROG_CC
22AM_PROG_CC_C_O22AM_PROG_CC_C_O
@@ -72,8 +72,8 @@
72 glib-2.0 >= $GLIB_REQUIRED72 glib-2.0 >= $GLIB_REQUIRED
73 gobject-2.0 >= $GLIB_REQUIRED73 gobject-2.0 >= $GLIB_REQUIRED
74 gio-2.0 >= $GLIB_REQUIRED74 gio-2.0 >= $GLIB_REQUIRED
75 gstreamer-0.10 >= 0.10.3675 gstreamer-1.0
76 gstreamer-pbutils-0.10 >= 0.10.3676 gstreamer-pbutils-1.0
77 )77 )
7878
79AC_SUBST(LENS_DAEMON_CFLAGS)79AC_SUBST(LENS_DAEMON_CFLAGS)
8080
=== modified file 'debian/changelog'
--- debian/changelog 2012-11-08 22:38:28 +0000
+++ debian/changelog 2012-11-14 14:57:26 +0000
@@ -1,5 +1,6 @@
1unity-lens-music (6.8.1-0ubuntu2) UNRELEASED; urgency=low1unity-lens-music (6.8.1-0ubuntu2) UNRELEASED; urgency=low
22
3 [ Michael Terry ]
3 * Install daemons into pkglibexecdir, not libexecdir4 * Install daemons into pkglibexecdir, not libexecdir
4 * debian/control:5 * debian/control:
5 - Update Vcs-Bzr6 - Update Vcs-Bzr
@@ -8,6 +9,11 @@
8 - Use dh_autoreconf9 - Use dh_autoreconf
9 - Use --fail-missing10 - Use --fail-missing
1011
12 [ Iain Lane ]
13 * Switch BDs for gstreamer1.0 port
14 - gstreamer 0.10 to gstreamer 1.0
15 - vala to vala-0.18 - this version has the gstreamer-1.0 vala bindings
16
11 -- Michael Terry <mterry@ubuntu.com> Tue, 06 Nov 2012 10:37:44 -050017 -- Michael Terry <mterry@ubuntu.com> Tue, 06 Nov 2012 10:37:44 -0500
1218
13unity-lens-music (6.8.1-0ubuntu1) quantal-proposed; urgency=low19unity-lens-music (6.8.1-0ubuntu1) quantal-proposed; urgency=low
1420
=== modified file 'debian/control'
--- debian/control 2012-11-06 17:01:41 +0000
+++ debian/control 2012-11-14 14:57:26 +0000
@@ -7,7 +7,7 @@
7 gnome-common,7 gnome-common,
8 pkg-config,8 pkg-config,
9 dh-translations,9 dh-translations,
10 valac (>= 0.16),10 valac-0.18,
11 libglib2.0-dev (>= 2.27),11 libglib2.0-dev (>= 2.27),
12 libgee-dev,12 libgee-dev,
13 libjson-glib-dev,13 libjson-glib-dev,
@@ -15,8 +15,8 @@
15 libsqlite3-dev (>= 3.7.7),15 libsqlite3-dev (>= 3.7.7),
16 libunity-dev (>= 6.8.0),16 libunity-dev (>= 6.8.0),
17 libtdb-dev (>= 1.2.6),17 libtdb-dev (>= 1.2.6),
18 libgstreamer0.10-dev (>= 0.10.36),18 libgstreamer1.0-dev,
19 libgstreamer-plugins-base0.10-dev (>= 0.10.36),19 libgstreamer-plugins-base1.0-dev
20Standards-Version: 3.9.320Standards-Version: 3.9.3
21Homepage: https://launchpad.net/unity-lens-music21Homepage: https://launchpad.net/unity-lens-music
22# If you aren't a member of ~unity-team but need to upload packaging changes,22# If you aren't a member of ~unity-team but need to upload packaging changes,
2323
=== modified file 'src/Makefile.am'
--- src/Makefile.am 2012-11-08 22:38:28 +0000
+++ src/Makefile.am 2012-11-14 14:57:26 +0000
@@ -117,8 +117,8 @@
117117
118music_preview_player_VALAFLAGS = \118music_preview_player_VALAFLAGS = \
119 -C \119 -C \
120 --pkg gstreamer-0.10 \120 --pkg gstreamer-1.0 \
121 --pkg gstreamer-pbutils-0.10 \121 --pkg gstreamer-pbutils-1.0 \
122 --pkg gio-2.0 \122 --pkg gio-2.0 \
123 $(MAINTAINER_VALAFLAGS)123 $(MAINTAINER_VALAFLAGS)
124124
125125
=== modified file 'src/player.vala'
--- src/player.vala 2012-09-07 12:03:01 +0000
+++ src/player.vala 2012-11-14 14:57:26 +0000
@@ -17,6 +17,7 @@
17 */17 */
1818
19using Gst;19using Gst;
20using Gst.PbUtils;
2021
21namespace PreviewPlayer22namespace PreviewPlayer
22{23{
@@ -38,7 +39,7 @@
38 private static uint GST_NETWORK_TIMEOUT_SECS = 10; //gstreamer network timeout (in seconds)39 private static uint GST_NETWORK_TIMEOUT_SECS = 10; //gstreamer network timeout (in seconds)
39 private static uint64 GST_STATE_QUERY_TIMEOUT = 1000000;40 private static uint64 GST_STATE_QUERY_TIMEOUT = 1000000;
4041
41 // gstreamer - playbin plugin flags; run 'gst-inspect-0.10 playbin2' for more flags & description42 // gstreamer - playbin plugin flags; run 'gst-inspect1.0 playbin' for more flags & description
42 private static int GST_PLAYBIN_AUDIO = 0x02;43 private static int GST_PLAYBIN_AUDIO = 0x02;
43 private static int GST_PLAYBIN_SOFT_VOLUME = 0x10;44 private static int GST_PLAYBIN_SOFT_VOLUME = 0x10;
4445
@@ -62,7 +63,7 @@
62 internal void init_gst () throws PreviewPlayerError63 internal void init_gst () throws PreviewPlayerError
63 {64 {
64 gst_pipeline = new Gst.Pipeline ("preview-player-pipeline");65 gst_pipeline = new Gst.Pipeline ("preview-player-pipeline");
65 gst_playbin = Gst.ElementFactory.make ("playbin2", "playbin2");66 gst_playbin = Gst.ElementFactory.make ("playbin", "playbin");
66 gst_sink = Gst.ElementFactory.make ("pulsesink", "sink");67 gst_sink = Gst.ElementFactory.make ("pulsesink", "sink");
67 if (gst_sink == null)68 if (gst_sink == null)
68 {69 {
@@ -79,12 +80,12 @@
79 gst_pipeline.add (gst_playbin);80 gst_pipeline.add (gst_playbin);
8081
81 gst_bus = gst_pipeline.get_bus ();82 gst_bus = gst_pipeline.get_bus ();
82 gst_bus.add_watch_full (GLib.Priority.DEFAULT, gst_bus_message_cb);83 gst_bus.add_watch (GLib.Priority.DEFAULT, gst_bus_message_cb);
83 }84 }
8485
85 internal void playbin_setup (GLib.Object source, GLib.ParamSpec spec)86 internal void playbin_setup (GLib.Object source, GLib.ParamSpec spec)
86 {87 {
87 Gst.Value source_element = GLib.Value (GLib.Type.from_name("GstElement"));88 GLib.Value source_element = GLib.Value (GLib.Type.from_name("GstElement"));
88 gst_playbin.get_property ("source", ref source_element);89 gst_playbin.get_property ("source", ref source_element);
89 Gst.Element obj = (Gst.Element)source_element.get_object();90 Gst.Element obj = (Gst.Element)source_element.get_object();
9091
@@ -108,7 +109,7 @@
108 error = true;109 error = true;
109 break;110 break;
110 case Gst.MessageType.ELEMENT:111 case Gst.MessageType.ELEMENT:
111 if (Gst.is_missing_plugin_message (message))112 if (Gst.PbUtils.is_missing_plugin_message (message))
112 {113 {
113 handle_missing_plugin (message);114 handle_missing_plugin (message);
114 }115 }
@@ -122,13 +123,14 @@
122123
123 private void handle_missing_plugin (Gst.Message message)124 private void handle_missing_plugin (Gst.Message message)
124 {125 {
125 var detail = Gst.missing_plugin_message_get_installer_detail (message);126 var detail = Gst.PbUtils.missing_plugin_message_get_installer_detail (message);
126 var descr = Gst.missing_plugin_message_get_description (message);127 var descr = Gst.PbUtils.missing_plugin_message_get_description (message);
127 warning ("Missing plugin: '%s': %s\n", descr, detail);128 warning ("Missing plugin: '%s': %s\n", descr, detail);
128129
129 string[] details = {detail};130 string[] details = {detail};
130 var status = Gst.install_plugins_async (details, null, codec_install_finished);131
131 if (status == Gst.InstallPluginsReturn.STARTED_OK)132 var status = Gst.PbUtils.install_plugins_async (details, null, codec_install_finished);
133 if (status == Gst.PbUtils.InstallPluginsReturn.STARTED_OK)
132 {134 {
133 var dash_proxy = new DashProxy ();135 var dash_proxy = new DashProxy ();
134 try136 try
@@ -146,11 +148,11 @@
146 }148 }
147 }149 }
148150
149 private void codec_install_finished (Gst.InstallPluginsReturn result)151 private void codec_install_finished (Gst.PbUtils.InstallPluginsReturn result)
150 {152 {
151 debug ("Codec install returned: %d\n", result);153 debug ("Codec install returned: %d\n", result);
152154
153 if (result == Gst.InstallPluginsReturn.SUCCESS)155 if (result == Gst.PbUtils.InstallPluginsReturn.SUCCESS)
154 {156 {
155 /* In theory we should get here after codec installation successfully finished and then calling Gst.update_registry() would157 /* In theory we should get here after codec installation successfully finished and then calling Gst.update_registry() would
156 pick the changes. It turns out we get SUCCESS before apt actually finishes installation... As a workaround set a flag158 pick the changes. It turns out we get SUCCESS before apt actually finishes installation... As a workaround set a flag
@@ -201,9 +203,9 @@
201 int64 dur;203 int64 dur;
202204
203 var fmt = Gst.Format.TIME;205 var fmt = Gst.Format.TIME;
204 if (gst_pipeline.query_position (ref fmt, out pos))206 if (gst_pipeline.query_position (fmt, out pos))
205 {207 {
206 if (gst_pipeline.query_duration (ref fmt, out dur))208 if (gst_pipeline.query_duration (fmt, out dur))
207 {209 {
208 if (dur > 0)210 if (dur > 0)
209 {211 {
@@ -342,17 +344,17 @@
342344
343 try345 try
344 {346 {
345 var discoverer = new Gst.Discoverer (2 * 1000000000); //2 seconds347 var discoverer = new Gst.PbUtils.Discoverer (2 * 1000000000); //2 seconds
346 var discoverer_info = discoverer.discover_uri (uri);348 var discoverer_info = discoverer.discover_uri (uri);
347 var video_streams = discoverer_info.get_video_streams ();349 var video_streams = discoverer_info.get_video_streams ();
348350
349 // note: the container may have multiple video and audio streams, we just get properties of the first one351 // note: the container may have multiple video and audio streams, we just get properties of the first one
350 if (video_streams != null && video_streams.length () > 0)352 if (video_streams != null && video_streams.length () > 0)
351 {353 {
352 var vstream = video_streams.nth_data (0);354 var vstream = video_streams.nth_data (0) as Gst.PbUtils.DiscovererVideoInfo;
353 props.insert ("width", new GLib.Variant.uint32 (vstream.get_width ()));355 props.insert ("width", new GLib.Variant.uint32 (vstream.get_width ()));
354 props.insert ("height", new GLib.Variant.uint32 (vstream.get_height ()));356 props.insert ("height", new GLib.Variant.uint32 (vstream.get_height ()));
355 props.insert ("codec", new GLib.Variant.string (Gst.pb_utils_get_codec_description (vstream.get_caps ())));357 props.insert ("codec", new GLib.Variant.string (Gst.PbUtils.get_codec_description (vstream.get_caps ())));
356 }358 }
357 }359 }
358 catch (GLib.Error e)360 catch (GLib.Error e)
@@ -363,4 +365,4 @@
363 return props;365 return props;
364 }366 }
365 }367 }
366}
367\ No newline at end of file368\ No newline at end of file
369}

Subscribers

People subscribed via source and target branches

to all changes: