Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / media / cast / logging / proto / raw_events.proto
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.
4
5 // Protocol for audio messages.
6
7 syntax = "proto2";
8
9 option optimize_for = LITE_RUNTIME;
10
11 package media.cast.proto;
12
13 // Keep in sync with media/cast/logging/logging_defines.h.
14 // For compatibility reasons, existing values in this enum must not be changed.
15 enum EventType {
16   // Generic events.
17   UNKNOWN = 0;
18   RTT_MS = 1;
19   PACKET_LOSS = 2;
20   JITTER_MS = 3;
21   VIDEO_ACK_RECEIVED = 4;
22   REMB_BITRATE = 5;
23   AUDIO_ACK_SENT = 6;
24   VIDEO_ACK_SENT = 7;
25   // Audio sender.
26   AUDIO_FRAME_RECEIVED = 8;
27   AUDIO_FRAME_CAPTURED = 9;
28   AUDIO_FRAME_ENCODED = 10;
29   // Audio receiver.
30   AUDIO_PLAYOUT_DELAY = 11;
31   AUDIO_FRAME_DECODED = 12;
32   // Video sender.
33   VIDEO_FRAME_CAPTURED = 13;
34   VIEDO_FRAME_RECEIVED = 14;
35   VIDEO_FRAME_SENT_TO_ENCODER = 15;
36   VIDEO_FRAME_ENCODED = 16;
37   // Video receiver.
38   VIDEO_FRAME_DECODED = 17;
39   VIDEO_RENDER_DELAY = 18;
40   // Send-side packet events.
41   PACKET_SENT_TO_PACER = 19;
42   PACKET_SENT_TO_NETWORK = 20;
43   PACKET_RETRANSMITTED = 21;
44   // Receiver-side packet events.
45   AUDIO_PACKET_RECEIVED = 22;
46   VIDEO_PACKET_RECEIVED = 23;
47   DUPLICATE_AUDIO_PACKET_RECEIVED = 24;
48   DUPLICATE_VIDEO_PACKET_RECEIVED = 25;
49 }
50
51 message AggregatedFrameEvent {
52   optional uint32 rtp_timestamp = 1;
53
54   repeated EventType event_type = 2 [packed = true];
55   repeated int64 event_timestamp_micros = 3 [packed = true];
56
57   // Size is set only for kAudioFrameEncoded and kVideoFrameEncoded.
58   optional int32 encoded_frame_size = 4;
59
60   // Delay is only set for kAudioPlayoutDelay and kVideoRenderDelay.
61   optional int32 delay_millis = 5;
62 };
63
64 message BasePacketEvent {
65   optional int32 packet_id = 1;
66   repeated EventType event_type = 2 [packed = true];
67   repeated int64 event_timestamp_micros = 3 [packed = true];
68 }
69
70 message AggregatedPacketEvent {
71   optional uint32 rtp_timestamp = 1;
72   repeated BasePacketEvent base_packet_event = 2;
73 };
74
75 message AggregatedGenericEvent {
76   optional EventType event_type = 1;
77   repeated int64 event_timestamp_micros = 2 [packed = true];
78   repeated int32 value = 3 [packed = true];
79 };