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
1=== modified file 'configure.ac'
2--- configure.ac 2012-10-19 15:38:25 +0000
3+++ configure.ac 2012-11-14 14:57:26 +0000
4@@ -16,7 +16,7 @@
5 # Init the other things we depend on
6 #####################################################
7 AM_MAINTAINER_MODE
8-AM_PROG_VALAC([0.16.0])
9+AM_PROG_VALAC([0.18.0])
10 AS_IF([test -z "$VALAC"], [AC_MSG_ERROR(["No valac compiler found."])])
11 AC_PROG_CC
12 AM_PROG_CC_C_O
13@@ -72,8 +72,8 @@
14 glib-2.0 >= $GLIB_REQUIRED
15 gobject-2.0 >= $GLIB_REQUIRED
16 gio-2.0 >= $GLIB_REQUIRED
17- gstreamer-0.10 >= 0.10.36
18- gstreamer-pbutils-0.10 >= 0.10.36
19+ gstreamer-1.0
20+ gstreamer-pbutils-1.0
21 )
22
23 AC_SUBST(LENS_DAEMON_CFLAGS)
24
25=== modified file 'debian/changelog'
26--- debian/changelog 2012-11-08 22:38:28 +0000
27+++ debian/changelog 2012-11-14 14:57:26 +0000
28@@ -1,5 +1,6 @@
29 unity-lens-music (6.8.1-0ubuntu2) UNRELEASED; urgency=low
30
31+ [ Michael Terry ]
32 * Install daemons into pkglibexecdir, not libexecdir
33 * debian/control:
34 - Update Vcs-Bzr
35@@ -8,6 +9,11 @@
36 - Use dh_autoreconf
37 - Use --fail-missing
38
39+ [ Iain Lane ]
40+ * Switch BDs for gstreamer1.0 port
41+ - gstreamer 0.10 to gstreamer 1.0
42+ - vala to vala-0.18 - this version has the gstreamer-1.0 vala bindings
43+
44 -- Michael Terry <mterry@ubuntu.com> Tue, 06 Nov 2012 10:37:44 -0500
45
46 unity-lens-music (6.8.1-0ubuntu1) quantal-proposed; urgency=low
47
48=== modified file 'debian/control'
49--- debian/control 2012-11-06 17:01:41 +0000
50+++ debian/control 2012-11-14 14:57:26 +0000
51@@ -7,7 +7,7 @@
52 gnome-common,
53 pkg-config,
54 dh-translations,
55- valac (>= 0.16),
56+ valac-0.18,
57 libglib2.0-dev (>= 2.27),
58 libgee-dev,
59 libjson-glib-dev,
60@@ -15,8 +15,8 @@
61 libsqlite3-dev (>= 3.7.7),
62 libunity-dev (>= 6.8.0),
63 libtdb-dev (>= 1.2.6),
64- libgstreamer0.10-dev (>= 0.10.36),
65- libgstreamer-plugins-base0.10-dev (>= 0.10.36),
66+ libgstreamer1.0-dev,
67+ libgstreamer-plugins-base1.0-dev
68 Standards-Version: 3.9.3
69 Homepage: https://launchpad.net/unity-lens-music
70 # If you aren't a member of ~unity-team but need to upload packaging changes,
71
72=== modified file 'src/Makefile.am'
73--- src/Makefile.am 2012-11-08 22:38:28 +0000
74+++ src/Makefile.am 2012-11-14 14:57:26 +0000
75@@ -117,8 +117,8 @@
76
77 music_preview_player_VALAFLAGS = \
78 -C \
79- --pkg gstreamer-0.10 \
80- --pkg gstreamer-pbutils-0.10 \
81+ --pkg gstreamer-1.0 \
82+ --pkg gstreamer-pbutils-1.0 \
83 --pkg gio-2.0 \
84 $(MAINTAINER_VALAFLAGS)
85
86
87=== modified file 'src/player.vala'
88--- src/player.vala 2012-09-07 12:03:01 +0000
89+++ src/player.vala 2012-11-14 14:57:26 +0000
90@@ -17,6 +17,7 @@
91 */
92
93 using Gst;
94+using Gst.PbUtils;
95
96 namespace PreviewPlayer
97 {
98@@ -38,7 +39,7 @@
99 private static uint GST_NETWORK_TIMEOUT_SECS = 10; //gstreamer network timeout (in seconds)
100 private static uint64 GST_STATE_QUERY_TIMEOUT = 1000000;
101
102- // gstreamer - playbin plugin flags; run 'gst-inspect-0.10 playbin2' for more flags & description
103+ // gstreamer - playbin plugin flags; run 'gst-inspect1.0 playbin' for more flags & description
104 private static int GST_PLAYBIN_AUDIO = 0x02;
105 private static int GST_PLAYBIN_SOFT_VOLUME = 0x10;
106
107@@ -62,7 +63,7 @@
108 internal void init_gst () throws PreviewPlayerError
109 {
110 gst_pipeline = new Gst.Pipeline ("preview-player-pipeline");
111- gst_playbin = Gst.ElementFactory.make ("playbin2", "playbin2");
112+ gst_playbin = Gst.ElementFactory.make ("playbin", "playbin");
113 gst_sink = Gst.ElementFactory.make ("pulsesink", "sink");
114 if (gst_sink == null)
115 {
116@@ -79,12 +80,12 @@
117 gst_pipeline.add (gst_playbin);
118
119 gst_bus = gst_pipeline.get_bus ();
120- gst_bus.add_watch_full (GLib.Priority.DEFAULT, gst_bus_message_cb);
121+ gst_bus.add_watch (GLib.Priority.DEFAULT, gst_bus_message_cb);
122 }
123
124 internal void playbin_setup (GLib.Object source, GLib.ParamSpec spec)
125 {
126- Gst.Value source_element = GLib.Value (GLib.Type.from_name("GstElement"));
127+ GLib.Value source_element = GLib.Value (GLib.Type.from_name("GstElement"));
128 gst_playbin.get_property ("source", ref source_element);
129 Gst.Element obj = (Gst.Element)source_element.get_object();
130
131@@ -108,7 +109,7 @@
132 error = true;
133 break;
134 case Gst.MessageType.ELEMENT:
135- if (Gst.is_missing_plugin_message (message))
136+ if (Gst.PbUtils.is_missing_plugin_message (message))
137 {
138 handle_missing_plugin (message);
139 }
140@@ -122,13 +123,14 @@
141
142 private void handle_missing_plugin (Gst.Message message)
143 {
144- var detail = Gst.missing_plugin_message_get_installer_detail (message);
145- var descr = Gst.missing_plugin_message_get_description (message);
146+ var detail = Gst.PbUtils.missing_plugin_message_get_installer_detail (message);
147+ var descr = Gst.PbUtils.missing_plugin_message_get_description (message);
148 warning ("Missing plugin: '%s': %s\n", descr, detail);
149
150 string[] details = {detail};
151- var status = Gst.install_plugins_async (details, null, codec_install_finished);
152- if (status == Gst.InstallPluginsReturn.STARTED_OK)
153+
154+ var status = Gst.PbUtils.install_plugins_async (details, null, codec_install_finished);
155+ if (status == Gst.PbUtils.InstallPluginsReturn.STARTED_OK)
156 {
157 var dash_proxy = new DashProxy ();
158 try
159@@ -146,11 +148,11 @@
160 }
161 }
162
163- private void codec_install_finished (Gst.InstallPluginsReturn result)
164+ private void codec_install_finished (Gst.PbUtils.InstallPluginsReturn result)
165 {
166 debug ("Codec install returned: %d\n", result);
167
168- if (result == Gst.InstallPluginsReturn.SUCCESS)
169+ if (result == Gst.PbUtils.InstallPluginsReturn.SUCCESS)
170 {
171 /* In theory we should get here after codec installation successfully finished and then calling Gst.update_registry() would
172 pick the changes. It turns out we get SUCCESS before apt actually finishes installation... As a workaround set a flag
173@@ -201,9 +203,9 @@
174 int64 dur;
175
176 var fmt = Gst.Format.TIME;
177- if (gst_pipeline.query_position (ref fmt, out pos))
178+ if (gst_pipeline.query_position (fmt, out pos))
179 {
180- if (gst_pipeline.query_duration (ref fmt, out dur))
181+ if (gst_pipeline.query_duration (fmt, out dur))
182 {
183 if (dur > 0)
184 {
185@@ -342,17 +344,17 @@
186
187 try
188 {
189- var discoverer = new Gst.Discoverer (2 * 1000000000); //2 seconds
190+ var discoverer = new Gst.PbUtils.Discoverer (2 * 1000000000); //2 seconds
191 var discoverer_info = discoverer.discover_uri (uri);
192 var video_streams = discoverer_info.get_video_streams ();
193
194 // note: the container may have multiple video and audio streams, we just get properties of the first one
195 if (video_streams != null && video_streams.length () > 0)
196 {
197- var vstream = video_streams.nth_data (0);
198+ var vstream = video_streams.nth_data (0) as Gst.PbUtils.DiscovererVideoInfo;
199 props.insert ("width", new GLib.Variant.uint32 (vstream.get_width ()));
200 props.insert ("height", new GLib.Variant.uint32 (vstream.get_height ()));
201- props.insert ("codec", new GLib.Variant.string (Gst.pb_utils_get_codec_description (vstream.get_caps ())));
202+ props.insert ("codec", new GLib.Variant.string (Gst.PbUtils.get_codec_description (vstream.get_caps ())));
203 }
204 }
205 catch (GLib.Error e)
206@@ -363,4 +365,4 @@
207 return props;
208 }
209 }
210-}
211\ No newline at end of file
212+}

Subscribers

People subscribed via source and target branches

to all changes: