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;
71 // Each log will contain one |LogMetadata|.
73 // |true| if the events are related to audio. |false| if they are related to
75 optional bool is_audio = 1;
77 // Used as a reference for all event entries.
78 // i.e. the original RTP timestamp for each event will be
79 // |first_rtp_timestamp| + |relative_rtp_timestamp|.
80 optional uint32 first_rtp_timestamp = 2;
82 // Number of AggregatedFrameEvent's.
83 optional int32 num_frame_events = 3;
85 // Number of AggregatedPacketEvent's.
86 optional int32 num_packet_events = 4;
88 // The internal timestamp value in milliseconds that represents the time
89 // of the Unix epoch. This is used for relating the timestamps in the events
90 // to a real time and date.
91 optional int64 reference_timestamp_ms_at_unix_epoch = 5;
94 message AggregatedFrameEvent {
95 optional uint32 relative_rtp_timestamp = 1;
97 repeated EventType event_type = 2 [packed = true];
99 // The internal timestamp value in milliseconds. Use
100 // LogMetadata.reference_timestamp_ms_at_unix_epoch to relate to a real time
102 repeated int64 event_timestamp_ms = 3 [packed = true];
104 // Only set if there is a frame encoded event.
105 optional int32 encoded_frame_size = 4;
107 // Only set if there is a frame playout event.
108 optional int32 delay_millis = 5;
110 // Only set if there is a video frame encoded event.
111 optional bool key_frame = 6;
113 // Only set if there is a video frame encoded event.
114 optional int32 target_bitrate = 7;
117 message BasePacketEvent {
118 optional int32 packet_id = 1;
119 repeated EventType event_type = 2 [packed = true];
121 // The internal timestamp value in milliseconds. Use
122 // LogMetadata.reference_timestamp_ms_at_unix_epoch to relate to a real time
124 repeated int64 event_timestamp_ms = 3 [packed = true];
126 // Size of the packet.
127 optional int32 size = 4;
130 message AggregatedPacketEvent {
131 optional uint32 relative_rtp_timestamp = 1;
132 repeated BasePacketEvent base_packet_event = 2;