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;
39 optional int32 width = 3;
40 optional int32 height = 4;
44 optional VideoPacketFormat format = 4;
46 optional bytes data = 5;
48 // List of rectangles updated by this frame.
49 repeated Rect dirty_rects = 6;
51 // Time in milliseconds spent in capturing this video frame.
52 optional int64 capture_time_ms = 7;
54 // Time in milliseconds spent in encoding this video frame.
55 optional int64 encode_time_ms = 8;
57 // The client's timestamp of the latest event received by the host before
58 // starting to capture this video frame.
59 optional int64 latest_event_timestamp = 9;
61 // Provides the new shape for this frame, iff |use_desktop_shape| is true.
62 repeated Rect desktop_shape_rects = 10;
64 // True when |desktop_shape_rects| should be used, false to indicate that
65 // the frame is un-shaped. If the shape has not changed since the preceding
66 // frame then this field should be omitted.
67 optional bool use_desktop_shape = 11;
69 // Optional frame timestamp. Used in tests to estimate frame latency.
70 optional int64 timestamp = 12;
72 // Frame identifier used to match VideoFrame and VideoAck.
73 optional int32 frame_id = 13;
76 // VideoAck acknowledges that the frame in the VideoPacket with the same
77 // frame_id has been rendered. VideoAck messages must be sent only for frames
78 // that have frame_id field set. They must be sent the same order in which
79 // the corresponding VideoPackets were received.
82 optional int32 frame_id = 1;