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 optional VideoPacketFormat format = 4; 46 47 optional bytes data = 5; 48 49 // List of rectangles updated by this frame. 50 repeated Rect dirty_rects = 6; 51 52 // Time in milliseconds spent in capturing this video frame. 53 optional int32 capture_time_ms = 7; 54 55 // Time in milliseconds spent in encoding this video frame. 56 optional int32 encode_time_ms = 8; 57 58 // The most recent sequence number received from the client on the event 59 // channel. 60 optional int64 client_sequence_number = 9; 61 62 repeated Rect desktop_shape_rects = 10; 63 64 // True when |desktop_shape_rects| should be used. 65 optional bool use_desktop_shape = 11; 66 67 // Optional frame timestamp. Used in tests to estimate frame latency. 68 optional int64 timestamp = 12; 69} 70