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
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-02-08 14:53:57 +0000
3+++ debian/changelog 2017-02-08 20:31:43 +0000
4@@ -42,6 +42,7 @@
5 . Mir graphics platform ABI broke in series 0.26 but sonames never
6 changed (LP: #1662455)
7 . Fixes for 0.26 changelog.
8+ . [regression] mirscreencast hangs during screencast creation (LP: #1662997)
9
10 -- Cemil Azizoglu <cemil.azizoglu@canonical.com> Thu, 02 Feb 2017 17:34:17 -0600
11
12
13=== modified file 'src/client/mir_screencast.cpp'
14--- src/client/mir_screencast.cpp 2017-01-24 07:37:03 +0000
15+++ src/client/mir_screencast.cpp 2017-02-08 20:31:43 +0000
16@@ -183,8 +183,17 @@
17 if (!protobuf_screencast->has_error() && connection)
18 {
19 std::lock_guard<decltype(mutex)> lock(mutex);
20- buffer_stream = connection->make_consumer_stream(
21- protobuf_screencast->buffer_stream());
22+ try
23+ {
24+ buffer_stream = connection->make_consumer_stream(
25+ protobuf_screencast->buffer_stream());
26+ }
27+ catch (...)
28+ {
29+ callback(nullptr, context);
30+ create_screencast_wait_handle.result_received();
31+ return;
32+ }
33 }
34
35 callback(this, context);
36
37=== modified file 'src/server/frontend/session_mediator.cpp'
38--- src/server/frontend/session_mediator.cpp 2017-02-03 16:39:16 +0000
39+++ src/server/frontend/session_mediator.cpp 2017-02-08 20:31:43 +0000
40@@ -832,6 +832,7 @@
41
42 protobuf_screencast->mutable_screencast_id()->set_value(
43 screencast_session_id.as_value());
44+ protobuf_screencast->mutable_buffer_stream()->set_pixel_format(pixel_format);
45 protobuf_screencast->mutable_buffer_stream()->mutable_id()->set_value(
46 screencast_session_id.as_value());
47
48
49=== modified file 'tests/unit-tests/frontend/test_session_mediator.cpp'
50--- tests/unit-tests/frontend/test_session_mediator.cpp 2017-02-02 18:25:05 +0000
51+++ tests/unit-tests/frontend/test_session_mediator.cpp 2017-02-08 20:31:43 +0000
52@@ -569,6 +569,7 @@
53 mp::ScreencastParameters screencast_parameters;
54 mp::Screencast screencast;
55 auto const& stub_buffer = stub_screencast->stub_buffer;
56+ screencast_parameters.set_pixel_format(stub_buffer.pixel_format());
57
58 EXPECT_CALL(mock_ipc_operations, pack_buffer(_, Ref(stub_buffer), mg::BufferIpcMsgType::full_msg));
59
60@@ -576,6 +577,8 @@
61 &screencast, null_callback.get());
62 EXPECT_EQ(static_cast<int>(stub_buffer.id().as_value()),
63 screencast.buffer_stream().buffer().buffer_id());
64+ //LP: #1662997
65+ EXPECT_THAT(screencast.buffer_stream().pixel_format(), Eq(stub_buffer.pixel_format()));
66 }
67
68 TEST_F(SessionMediator, eventually_partially_packs_screencast_buffer)

Subscribers

People subscribed via source and target branches