~ubuntu-branches/ubuntu/trusty/mir/trusty-proposed

« back to all changes in this revision

Viewing changes to src/client/mir_screencast.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Kevin Gunn
  • Date: 2014-02-12 18:29:29 UTC
  • mfrom: (1.1.56)
  • Revision ID: package-import@ubuntu.com-20140212182929-ru6hzd1hqdf98tub
Tags: 0.1.5+14.04.20140212-0ubuntu1
[ Kevin Gunn ]
* Cherry-picked from future release 0.1.6:
  - frontend, shell: provide the client process ID in the shell::Session
    interface (LP: #1276704)
* New upstream release 0.1.5 (https://launchpad.net/mir/+milestone/0.1.5)
  - mirclient ABI bumped to 7
  - mirserver ABI bumped to 15
  - Refactoring to support client-controled RPC.
  - Add an translucent server example (use sparingly, this will kill
    performance!)
  - Add workaround for Qualcomm Snapdragon 8960 driver bug.
  - android-input: Improve debug output
  - Screen rotation support half done (rotation of the screen works but input
    rotation not implemented yet).
  - Add groundwork for overlay support to take better advantage of mobile
    hardware features and optimize composition in future.
  - Add support for HWC 1.2 (Android 4.4)
  - Add groundwork for screencasting (screen recording).
  - Optimized surface resizing, significantly reducing event flooding for
    some input configurations like touch.
  - Bugs fixed:
    . Surfaces no longer visible at all on Nexus 10 (LP: #1271853)
    . mir nested server failure: what(): error binding buffer to texture
      (LP: #1272041)
    . Unity does not process events from evdev device created before unity is
      restarted (autopilot tests) (LP: #1238417)
    . mir_unit_tests can't run on touch images any more (missing
      libumockdev.so.0) (LP: #1271434)
    . chmod 777 /tmp/mir_socket is no longer sufficient for non-root clients
      to connect to a root server (LP: #1272143)
    . Nexus7(2013) flo framerate maxes out at 30fps (LP: #1274189)
    . libmirserver user is unable to #include
       <mir/frontend/template_protobuf_message_processor.h> (LP: #1276162)
    . libmirclient user cannot "#include <mir/client/private.h>"
      (LP: #1276565)
    . AndroidInternalClient.internal_client_creation_and_use hangs on Nexus
      10 (LP: #1270685)
    . Tests that use the InProcessServer bind the default socket file
      (LP: #1271604)
    . BasicConnector threads exit immediately (LP: #1271655)
    . Integration tests TestClientIPCRender.test_accelerated_render fails on
      Galaxy Nexus and Nexus4 (LP: #1272597)
    . Android backend unit-tests FTBS on amd64 (LP: #1276621)
    . Erroneous use of last_consumed in SwitchingBundle::compositor_acquire
      (LP: #1270964)

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
      egl_native_window_factory{egl_native_window_factory},
99
99
      buffer_depository{factory, mir::frontend::client_buffer_cache_size}
100
100
{
 
101
    protobuf_screencast.set_error("Not initialized");
 
102
 
101
103
    mir::protobuf::ScreencastParameters parameters;
102
104
    parameters.set_output_id(output_id);
103
105
    parameters.set_width(output_size.width.as_uint32_t());
117
119
    return &create_screencast_wait_handle;
118
120
}
119
121
 
 
122
bool MirScreencast::valid()
 
123
{
 
124
    return !protobuf_screencast.has_error();
 
125
}
 
126
 
120
127
MirSurfaceParameters MirScreencast::get_parameters() const
121
128
{
122
129
    return MirSurfaceParameters{
188
195
    try
189
196
    {
190
197
        buffer_depository.deposit_package(buffer_package,
191
 
                                          protobuf_buffer.buffer_id(),
 
198
                                          buffer.buffer_id(),
192
199
                                          output_size, output_format);
193
200
    }
194
201
    catch (const std::runtime_error& err)
200
207
void MirScreencast::screencast_created(
201
208
    mir_screencast_callback callback, void* context)
202
209
{
203
 
    egl_native_window_ = egl_native_window_factory->create_egl_native_window(this);
204
 
    process_buffer(protobuf_screencast.buffer());
 
210
    if (!protobuf_screencast.has_error())
 
211
    {
 
212
        egl_native_window_ = egl_native_window_factory->create_egl_native_window(this);
 
213
        process_buffer(protobuf_screencast.buffer());
 
214
    }
205
215
 
206
216
    callback(this, context);
207
217
    create_screencast_wait_handle.result_received();