summaryrefslogtreecommitdiffstats
path: root/remoting/proto/video.proto
blob: 95998be4770f68bb659bb7b16fa4b8c1bbeaa29a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Protocol for video messages.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package remoting;

message VideoPacketFormat {
  // Identifies how the image was encoded.
  enum Encoding {
    ENCODING_INVALID = -1;
    ENCODING_VERBATIM = 0;
    ENCODING_ZLIB = 1;
    ENCODING_VP8 = 2;
    ENCODING_VP9 = 3;
  };

  // The encoding used for this image update.
  optional Encoding encoding = 5 [default = ENCODING_INVALID];

  // Width and height of the whole screen.
  optional int32 screen_width = 6;
  optional int32 screen_height = 7;

  // Horizontal and vertical DPI of the screen. If either of these is zero or
  // unset, the corresponding DPI should be assumed to be 96 (Windows' default)
  optional int32 x_dpi = 8;
  optional int32 y_dpi = 9;
}

// TODO(hclam): Remove this message once we can obtain dirty rects from libvpx.
message Rect {
  optional int32 x = 1;
  optional int32 y = 2;
  optional int32 width = 3;
  optional int32 height = 4;
}

message VideoPacket {
  // Deprecated. Must be set to 7 for backward compatibility.
  optional int32 deprecated_flags = 1 [default = 7];

  optional VideoPacketFormat format = 4;

  optional bytes data = 5;

  // List of rectangles updated by this frame.
  repeated Rect dirty_rects = 6;

  // Time in milliseconds spent in capturing this video frame.
  optional int32 capture_time_ms = 7;

  // Time in milliseconds spent in encoding this video frame.
  optional int32 encode_time_ms = 8;

  // The most recent sequence number received from the client on the event
  // channel.
  optional int64 client_sequence_number = 9;

  repeated Rect desktop_shape_rects = 10;

  // True when |desktop_shape_rects| should be used.
  optional bool use_desktop_shape = 11;
}