Mir

Merge lp:~kdub/mir/fix-1662997-0.26.1 into lp:~mir-team/mir/0.26-old

Proposed by Kevin DuBois
Status: Merged
Approved by: Cemil Azizoglu
Approved revision: no longer in the source branch.
Merged at revision: 4020
Proposed branch: lp:~kdub/mir/fix-1662997-0.26.1
Merge into: lp:~mir-team/mir/0.26-old
Diff against target: 68 lines (+16/-2)
4 files modified
debian/changelog (+1/-0)
src/client/mir_screencast.cpp (+11/-2)
src/server/frontend/session_mediator.cpp (+1/-0)
tests/unit-tests/frontend/test_session_mediator.cpp (+3/-0)
To merge this branch: bzr merge lp:~kdub/mir/fix-1662997-0.26.1
Reviewer Review Type Date Requested Status
Cemil Azizoglu (community) Approve
Review via email: mp+316769@code.launchpad.net

Commit message

fix mirscreencast by making sure it knows enough about pixel format to create its buffers.

fixes: LP: #1662997

Description of the change

fix mirscreencast by making sure it knows enough about pixel format to create its buffers.

fixes: LP: #1662997

To post a comment you must log in.
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

Ok

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2017-02-08 14:53:57 +0000
+++ debian/changelog 2017-02-08 20:31:43 +0000
@@ -42,6 +42,7 @@
42 . Mir graphics platform ABI broke in series 0.26 but sonames never42 . Mir graphics platform ABI broke in series 0.26 but sonames never
43 changed (LP: #1662455)43 changed (LP: #1662455)
44 . Fixes for 0.26 changelog.44 . Fixes for 0.26 changelog.
45 . [regression] mirscreencast hangs during screencast creation (LP: #1662997)
4546
46 -- Cemil Azizoglu <cemil.azizoglu@canonical.com> Thu, 02 Feb 2017 17:34:17 -060047 -- Cemil Azizoglu <cemil.azizoglu@canonical.com> Thu, 02 Feb 2017 17:34:17 -0600
4748
4849
=== modified file 'src/client/mir_screencast.cpp'
--- src/client/mir_screencast.cpp 2017-01-24 07:37:03 +0000
+++ src/client/mir_screencast.cpp 2017-02-08 20:31:43 +0000
@@ -183,8 +183,17 @@
183 if (!protobuf_screencast->has_error() && connection)183 if (!protobuf_screencast->has_error() && connection)
184 {184 {
185 std::lock_guard<decltype(mutex)> lock(mutex);185 std::lock_guard<decltype(mutex)> lock(mutex);
186 buffer_stream = connection->make_consumer_stream(186 try
187 protobuf_screencast->buffer_stream());187 {
188 buffer_stream = connection->make_consumer_stream(
189 protobuf_screencast->buffer_stream());
190 }
191 catch (...)
192 {
193 callback(nullptr, context);
194 create_screencast_wait_handle.result_received();
195 return;
196 }
188 }197 }
189198
190 callback(this, context);199 callback(this, context);
191200
=== modified file 'src/server/frontend/session_mediator.cpp'
--- src/server/frontend/session_mediator.cpp 2017-02-03 16:39:16 +0000
+++ src/server/frontend/session_mediator.cpp 2017-02-08 20:31:43 +0000
@@ -832,6 +832,7 @@
832832
833 protobuf_screencast->mutable_screencast_id()->set_value(833 protobuf_screencast->mutable_screencast_id()->set_value(
834 screencast_session_id.as_value());834 screencast_session_id.as_value());
835 protobuf_screencast->mutable_buffer_stream()->set_pixel_format(pixel_format);
835 protobuf_screencast->mutable_buffer_stream()->mutable_id()->set_value(836 protobuf_screencast->mutable_buffer_stream()->mutable_id()->set_value(
836 screencast_session_id.as_value());837 screencast_session_id.as_value());
837838
838839
=== modified file 'tests/unit-tests/frontend/test_session_mediator.cpp'
--- tests/unit-tests/frontend/test_session_mediator.cpp 2017-02-02 18:25:05 +0000
+++ tests/unit-tests/frontend/test_session_mediator.cpp 2017-02-08 20:31:43 +0000
@@ -569,6 +569,7 @@
569 mp::ScreencastParameters screencast_parameters;569 mp::ScreencastParameters screencast_parameters;
570 mp::Screencast screencast;570 mp::Screencast screencast;
571 auto const& stub_buffer = stub_screencast->stub_buffer;571 auto const& stub_buffer = stub_screencast->stub_buffer;
572 screencast_parameters.set_pixel_format(stub_buffer.pixel_format());
572573
573 EXPECT_CALL(mock_ipc_operations, pack_buffer(_, Ref(stub_buffer), mg::BufferIpcMsgType::full_msg));574 EXPECT_CALL(mock_ipc_operations, pack_buffer(_, Ref(stub_buffer), mg::BufferIpcMsgType::full_msg));
574575
@@ -576,6 +577,8 @@
576 &screencast, null_callback.get());577 &screencast, null_callback.get());
577 EXPECT_EQ(static_cast<int>(stub_buffer.id().as_value()),578 EXPECT_EQ(static_cast<int>(stub_buffer.id().as_value()),
578 screencast.buffer_stream().buffer().buffer_id());579 screencast.buffer_stream().buffer().buffer_id());
580 //LP: #1662997
581 EXPECT_THAT(screencast.buffer_stream().pixel_format(), Eq(stub_buffer.pixel_format()));
579}582}
580583
581TEST_F(SessionMediator, eventually_partially_packs_screencast_buffer)584TEST_F(SessionMediator, eventually_partially_packs_screencast_buffer)

Subscribers

People subscribed via source and target branches