1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Protocol for video messages.
9 option optimize_for = LITE_RUNTIME;
13 message VideoPacketFormat {
14 // Identifies how the image was encoded.
16 ENCODING_INVALID = -1;
17 ENCODING_VERBATIM = 0;
23 // The encoding used for this image update.
24 optional Encoding encoding = 5 [default = ENCODING_INVALID];
26 // Width and height of the whole screen.
27 optional int32 screen_width = 6;
28 optional int32 screen_height = 7;
30 // Horizontal and vertical DPI of the screen. If either of these is zero or
31 // unset, the corresponding DPI should be assumed to be 96 (Windows' default)
32 optional int32 x_dpi = 8;
33 optional int32 y_dpi = 9;
36 // TODO(hclam): Remove this message once we can obtain dirty rects from libvpx.
40 optional int32 width = 3;
41 optional int32 height = 4;
45 optional VideoPacketFormat format = 4;
47 optional bytes data = 5;
49 // List of rectangles updated by this frame.
50 repeated Rect dirty_rects = 6;
52 // Time in milliseconds spent in capturing this video frame.
53 optional int64 capture_time_ms = 7;
55 // Time in milliseconds spent in encoding this video frame.
56 optional int64 encode_time_ms = 8;
58 // The client's timestamp of the latest event received by the host before
59 // starting to capture this video frame.
60 optional int64 latest_event_timestamp = 9;
62 repeated Rect desktop_shape_rects = 10;
64 // True when |desktop_shape_rects| should be used.
65 optional bool use_desktop_shape = 11;
67 // Optional frame timestamp. Used in tests to estimate frame latency.
68 optional int64 timestamp = 12;