• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4
5// Protocol for video messages.
6
7syntax = "proto2";
8
9option optimize_for = LITE_RUNTIME;
10
11package remoting;
12
13message VideoPacketFormat {
14  // Identifies how the image was encoded.
15  enum Encoding {
16    ENCODING_INVALID = -1;
17    ENCODING_VERBATIM = 0;
18    ENCODING_ZLIB = 1;
19    ENCODING_VP8 = 2;
20    ENCODING_VP9 = 3;
21  };
22
23  // The encoding used for this image update.
24  optional Encoding encoding = 5 [default = ENCODING_INVALID];
25
26  // Width and height of the whole screen.
27  optional int32 screen_width = 6;
28  optional int32 screen_height = 7;
29
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;
34}
35
36// TODO(hclam): Remove this message once we can obtain dirty rects from libvpx.
37message Rect {
38  optional int32 x = 1;
39  optional int32 y = 2;
40  optional int32 width = 3;
41  optional int32 height = 4;
42}
43
44message VideoPacket {
45  // Deprecated. Must be set to 7 for backward compatibility.
46  optional int32 deprecated_flags = 1 [default = 7];
47
48  optional VideoPacketFormat format = 4;
49
50  optional bytes data = 5;
51
52  // List of rectangles updated by this frame.
53  repeated Rect dirty_rects = 6;
54
55  // Time in milliseconds spent in capturing this video frame.
56  optional int32 capture_time_ms = 7;
57
58  // Time in milliseconds spent in encoding this video frame.
59  optional int32 encode_time_ms = 8;
60
61  // The most recent sequence number received from the client on the event
62  // channel.
63  optional int64 client_sequence_number = 9;
64
65  repeated Rect desktop_shape_rects = 10;
66
67  // True when |desktop_shape_rects| should be used.
68  optional bool use_desktop_shape = 11;
69}
70