Merge lp:~phablet-team/media-hub/gst-1.5 into lp:media-hub

Proposed by Jim Hodapp
Status: Merged
Approved by: Jim Hodapp
Approved revision: 147
Merged at revision: 149
Proposed branch: lp:~phablet-team/media-hub/gst-1.5
Merge into: lp:media-hub
Prerequisite: lp:~phablet-team/media-hub/fix-black-video-bugs
Diff against target: 62 lines (+19/-5)
2 files modified
debian/changelog (+7/-0)
src/core/media/gstreamer/playbin.cpp (+12/-5)
To merge this branch: bzr merge lp:~phablet-team/media-hub/gst-1.5
Reviewer Review Type Date Requested Status
Jim Hodapp (community) code Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+265413@code.launchpad.net

This proposal supersedes a proposal from 2015-07-21.

Commit message

Set gstreamer context directly instead of using gobject to communicate with the video sink.

Description of the change

Set gstreamer context directly instead of using gobject to communicate with the video sink.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

Just one thing to fix.

review: Needs Fixing (code)
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

See comment below.

Revision history for this message
Jim Hodapp (jhodapp) :
review: Approve (code)

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 2015-06-04 14:18:22 +0000
3+++ debian/changelog 2015-07-21 16:26:24 +0000
4@@ -1,3 +1,10 @@
5+media-hub (3.1.0+15.10.20150720-0ubuntu1) UNRELEASED; urgency=medium
6+
7+ * Set gstreamer context directly instead of using gobject to communicate
8+ with the video sink.
9+
10+ -- Alfonso Sanchez-Beato (email Canonical) <alfonso.sanchez-beato@canonical.com> Mon, 20 Jul 2015 18:46:25 +0200
11+
12 media-hub (3.1.0+15.10.20150604-0ubuntu1) wily; urgency=medium
13
14 [ CI Train Bot ]
15
16=== modified file 'src/core/media/gstreamer/playbin.cpp'
17--- src/core/media/gstreamer/playbin.cpp 2015-06-01 21:34:46 +0000
18+++ src/core/media/gstreamer/playbin.cpp 2015-07-21 16:26:24 +0000
19@@ -28,15 +28,22 @@
20
21 namespace
22 {
23-void setup_video_sink_for_buffer_streaming(GstElement* video_sink)
24+void setup_video_sink_for_buffer_streaming(GstElement* pipeline)
25 {
26 // Get the service-side BufferQueue (IGraphicBufferProducer) and associate it with
27 // the SurfaceTextureClientHybris instance
28 IGBPWrapperHybris igbp = decoding_service_get_igraphicbufferproducer();
29 SurfaceTextureClientHybris stc = surface_texture_client_create_by_igbp(igbp);
30+
31 // Because mirsink is being loaded, we are definitely doing * hardware rendering.
32- surface_texture_client_set_hardware_rendering (stc, TRUE);
33- g_object_set (G_OBJECT (video_sink), "surface", static_cast<gpointer>(stc), static_cast<char*>(NULL));
34+ surface_texture_client_set_hardware_rendering(stc, TRUE);
35+
36+ GstContext *context = gst_context_new("gst.mir.MirContext", TRUE);
37+ GstStructure *structure = gst_context_writable_structure(context);
38+ gst_structure_set(structure, "gst_mir_context", G_TYPE_POINTER, stc, NULL);
39+
40+ /* Propagate context in pipeline (needed by amchybris and mirsink) */
41+ gst_element_set_context(pipeline, context);
42 }
43 }
44 #else // MEDIA_HUB_HAVE_HYBRIS_MEDIA_COMPAT_LAYER
45@@ -44,7 +51,7 @@
46 {
47 void setup_video_sink_for_buffer_streaming(GstElement*)
48 {
49- throw core::ubuntu::media::Player::Error::OutOfProcessBufferStreamingNotSupported{};
50+ throw core::ubuntu::media::Player::Errors::OutOfProcessBufferStreamingNotSupported{};
51 }
52 }
53 #endif // MEDIA_HUB_HAVE_HYBRIS_MEDIA_COMPAT_LAYER
54@@ -267,7 +274,7 @@
55 "No video sink configured for the current pipeline"
56 };
57
58- setup_video_sink_for_buffer_streaming(video_sink);
59+ setup_video_sink_for_buffer_streaming(pipeline);
60 }
61
62 void gstreamer::Playbin::set_volume(double new_volume)

Subscribers

People subscribed via source and target branches

to all changes: