Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: remoting/proto/video.proto

Issue 10382184: [Chromoting] Initial plumbing for cursor shape. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment for CaptureCursor Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Protocol for video messages. 5 // Protocol for video messages.
6 6
7 syntax = "proto2"; 7 syntax = "proto2";
8 8
9 option optimize_for = LITE_RUNTIME; 9 option optimize_for = LITE_RUNTIME;
10 10
(...skipping 17 matching lines...) Expand all
28 optional int32 height = 4; 28 optional int32 height = 4;
29 29
30 // The encoding used for this image update. 30 // The encoding used for this image update.
31 optional Encoding encoding = 5 [default = ENCODING_INVALID]; 31 optional Encoding encoding = 5 [default = ENCODING_INVALID];
32 32
33 // Width and height of the whole screen. 33 // Width and height of the whole screen.
34 optional int32 screen_width = 6; 34 optional int32 screen_width = 6;
35 optional int32 screen_height = 7; 35 optional int32 screen_height = 7;
36 } 36 }
37 37
38 message CursorShapeInfo {
Sergey Ulanov 2012/05/15 23:51:34 Why is this in video.proto? wouldn't it be better
Wez 2012/05/16 00:20:04 We discussed this and agreed the video channel was
Sergey Ulanov 2012/05/16 20:39:12 As we discussed yesterday: It may be better to use
garykac 2012/05/22 00:42:03 Done.
39 // Width, height (in screen pixels) of the cursor (and mask).
40 optional int32 width = 1;
41 optional int32 height = 2;
42
43 // X,Y coordinates (in screen pixels) of the cursor hotspot.
44 optional int32 hotspot_x = 3;
45 optional int32 hotspot_y = 4;
46
47 // Cursor pixmap data is stored in VideoPacket |data| field.
48 }
49
38 // TODO(hclam): Remove this message once we can obtain dirty rects from libvpx. 50 // TODO(hclam): Remove this message once we can obtain dirty rects from libvpx.
39 message Rect { 51 message Rect {
40 optional int32 x = 1; 52 optional int32 x = 1;
41 optional int32 y = 2; 53 optional int32 y = 2;
42 optional int32 width = 3; 54 optional int32 width = 3;
43 optional int32 height = 4; 55 optional int32 height = 4;
44 } 56 }
45 57
46 message VideoPacket { 58 message VideoPacket {
47 // Bitmasks for use in the flags field below. 59 // Bitmasks for use in the flags field below.
48 // 60 //
49 // The encoder may fragment one update into multiple partitions. 61 // The encoder may fragment one update into multiple partitions.
50 // Each partition may be divided into multiple packets depending on 62 // Each partition may be divided into multiple packets depending on
51 // how the encoder outputs data. Thus, one update can logically 63 // how the encoder outputs data. Thus, one update can logically
52 // consist of multiple packets. The FIRST_PACKET and LAST_PACKET 64 // consist of multiple packets. The FIRST_PACKET and LAST_PACKET
53 // flags are used to indicate the start and end of a partition. The 65 // flags are used to indicate the start and end of a partition. The
54 // LAST_PARTITION flag is set for the last packet in the last 66 // LAST_PARTITION flag is set for the last packet in the last
55 // partition. Here are notable consequences: 67 // partition. Here are notable consequences:
56 // * Both FIRST_PACKET and LAST_PACKET may be set if an update is only 68 // * Both FIRST_PACKET and LAST_PACKET may be set if an update is only
57 // one packet long. 69 // one packet long.
58 // * The VideoPacketFormat is only supplied in a FIRST_PACKET. 70 // * The VideoPacketFormat is only supplied in a FIRST_PACKET.
59 // * LAST_PARTITION can be set only in packet that has LAST_PACKET set. 71 // * LAST_PARTITION can be set only in packet that has LAST_PACKET set.
60 // * An local update cannot change format between a FIRST_PACKET and 72 // * An local update cannot change format between a FIRST_PACKET and
61 // a LAST_PACKET. 73 // a LAST_PACKET.
62 // * All packets in one logical update must be processed in order, and 74 // * All packets in one logical update must be processed in order, and
63 // packets may not be skipped. 75 // packets may not be skipped.
76 // CURSOR_SHAPE specifies a standalone cursor shape packet. These packets
77 // are not combined with any other video packet.
64 enum Flags { 78 enum Flags {
65 FIRST_PACKET = 1; 79 FIRST_PACKET = 1;
66 LAST_PACKET = 2; 80 LAST_PACKET = 2;
67 LAST_PARTITION = 4; 81 LAST_PARTITION = 4;
82 CURSOR_SHAPE = 8;
Sergey Ulanov 2012/05/15 23:51:34 Do we really need a flag for this? We can just use
garykac 2012/05/22 00:42:03 Done.
68 } 83 }
69 optional int32 flags = 1 [default = 0]; 84 optional int32 flags = 1 [default = 0];
70 85
71 // The sequence number of the partial data for updating a rectangle. 86 // The sequence number of the partial data for updating a rectangle.
72 optional int32 sequence_number = 2 [default = 0]; 87 optional int32 sequence_number = 2 [default = 0];
73 88
74 optional int32 timestamp = 3 [default = 0]; 89 optional int32 timestamp = 3 [default = 0];
75 90
76 // This is provided on the first packet of the rectangle data, when 91 // This is provided on the first packet of the rectangle data, when
77 // the flags has FIRST_PACKET set. 92 // the flags has FIRST_PACKET set.
78 optional VideoPacketFormat format = 4; 93 optional VideoPacketFormat format = 4;
79 94
80 optional bytes data = 5; 95 optional bytes data = 5;
81 96
82 // This field is only for VP8 to provide out-of-band information of dirty 97 // This field is only for VP8 to provide out-of-band information of dirty
83 // rects. 98 // rects.
84 // TODO(hclam): Remove this field when we can obtain this information from 99 // TODO(hclam): Remove this field when we can obtain this information from
85 // libvpx. 100 // libvpx.
86 repeated Rect dirty_rects = 6; 101 repeated Rect dirty_rects = 6;
87 102
88 // Time in milliseconds spent in capturing this video frame. 103 // Time in milliseconds spent in capturing this video frame.
89 optional int32 capture_time_ms = 7; 104 optional int32 capture_time_ms = 7;
90 105
91 // Time in milliseconds spent in encoding this video frame. 106 // Time in milliseconds spent in encoding this video frame.
92 optional int32 encode_time_ms = 8; 107 optional int32 encode_time_ms = 8;
93 108
94 // The most recent sequence number received from the client on the event 109 // The most recent sequence number received from the client on the event
95 // channel. 110 // channel.
96 optional int64 client_sequence_number = 9; 111 optional int64 client_sequence_number = 9;
112
113 // Description of the current cursor shape.
114 optional CursorShapeInfo cursor_shape = 10;
97 } 115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698