1 // Copyright 2014 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 audio messages.
9 option optimize_for = LITE_RUNTIME;
11 package media.cast.proto;
13 // Keep in sync with media/cast/logging/logging_defines.h.
14 // For compatibility reasons, existing values in this enum must not be changed.
18 // Note: 1-28 are deprecated in favor of unified event types. Do not use.
19 // Generic events. No longer used.
23 VIDEO_ACK_RECEIVED = 4; // Sender side frame event.
24 REMB_BITRATE = 5; // Generic event. No longer used.
30 AUDIO_FRAME_CAPTURE_END = 8;
31 AUDIO_FRAME_CAPTURE_BEGIN = 9;
32 AUDIO_FRAME_ENCODED = 10;
34 AUDIO_PLAYOUT_DELAY = 11;
35 AUDIO_FRAME_DECODED = 12;
37 VIDEO_FRAME_CAPTURE_BEGIN = 13;
38 VIDEO_FRAME_CAPTURE_END = 14;
39 VIDEO_FRAME_SENT_TO_ENCODER = 15; // Deprecated
40 VIDEO_FRAME_ENCODED = 16;
42 VIDEO_FRAME_DECODED = 17;
43 VIDEO_RENDER_DELAY = 18;
44 // Send-side packet events.
45 // AUDIO_PACKET_SENT_TO_PACER = 19; // Deprecated
46 // VIDEO_PACKET_SENT_TO_PACER = 20; // Deprecated
47 AUDIO_PACKET_SENT_TO_NETWORK = 21;
48 VIDEO_PACKET_SENT_TO_NETWORK = 22;
49 AUDIO_PACKET_RETRANSMITTED = 23;
50 VIDEO_PACKET_RETRANSMITTED = 24;
51 // Receiver-side packet events.
52 AUDIO_PACKET_RECEIVED = 25;
53 VIDEO_PACKET_RECEIVED = 26;
54 DUPLICATE_AUDIO_PACKET_RECEIVED = 27;
55 DUPLICATE_VIDEO_PACKET_RECEIVED = 28;
58 // New, unified event types.
59 FRAME_CAPTURE_BEGIN = 29;
60 FRAME_CAPTURE_END = 30;
62 FRAME_ACK_RECEIVED = 32;
66 PACKET_SENT_TO_NETWORK = 36;
67 PACKET_RETRANSMITTED = 37;
69 PACKET_RTX_REJECTED = 39;
72 // Contains information independent of the stream that describes the system
73 // setup, e.g. OS and hardware info.
74 message GeneralDescription {
75 optional string product = 1;
76 optional string product_version = 2;
77 optional string os = 3;
80 // Each log will contain one |LogMetadata|.
82 // |true| if the events are related to audio. |false| if they are related to
84 optional bool is_audio = 1;
86 // Used as a reference for all event entries.
87 // i.e. the original RTP timestamp for each event will be
88 // |first_rtp_timestamp| + |relative_rtp_timestamp|.
89 optional uint32 first_rtp_timestamp = 2;
91 // Number of AggregatedFrameEvent's.
92 optional int32 num_frame_events = 3;
94 // Number of AggregatedPacketEvent's.
95 optional int32 num_packet_events = 4;
97 // The internal timestamp value in milliseconds that represents the time
98 // of the Unix epoch. This is used for relating the timestamps in the events
99 // to a real time and date.
100 optional int64 reference_timestamp_ms_at_unix_epoch = 5;
102 // Extra data to attach to the log, e.g. experiment tags,
103 // in key-value JSON string format. The data is supplied by the application.
104 optional string extra_data = 6;
106 optional GeneralDescription general_description = 7;
109 message AggregatedFrameEvent {
110 optional uint32 relative_rtp_timestamp = 1;
112 repeated EventType event_type = 2 [packed = true];
114 // The internal timestamp value in milliseconds. Use
115 // LogMetadata.reference_timestamp_ms_at_unix_epoch to relate to a real time
117 repeated int64 event_timestamp_ms = 3 [packed = true];
119 // Only set if there is a frame encoded event.
120 optional int32 encoded_frame_size = 4;
122 // Only set if there is a frame playout event.
123 optional int64 delay_millis = 5;
125 // Only set if there is a video frame encoded event.
126 optional bool key_frame = 6;
128 // Only set if there is a video frame encoded event.
129 optional int32 target_bitrate = 7;
131 // Only set if there is a frame capture event.
132 optional int32 width = 8;
133 optional int32 height = 9;
135 // Only set if there is a frame encoded event.
136 optional int32 encoder_cpu_percent_utilized = 10;
137 optional int32 idealized_bitrate_percent_utilized = 11;
140 message BasePacketEvent {
141 optional int32 packet_id = 1;
142 repeated EventType event_type = 2 [packed = true];
144 // The internal timestamp value in milliseconds. Use
145 // LogMetadata.reference_timestamp_ms_at_unix_epoch to relate to a real time
147 repeated int64 event_timestamp_ms = 3 [packed = true];
149 // Size of the packet.
150 optional int32 size = 4;
153 message AggregatedPacketEvent {
154 optional uint32 relative_rtp_timestamp = 1;
155 repeated BasePacketEvent base_packet_event = 2;