tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

rtc_event_log2.proto (24235B)


      1 // THIS FILE IS EXPERIMENTAL. BREAKING CHANGES MAY BE MADE AT ANY TIME
      2 // WITHOUT PRIOR WARNING. THIS FILE SHOULD NOT BE USED IN PRODUCTION CODE.
      3 
      4 syntax = "proto2";
      5 option optimize_for = LITE_RUNTIME;
      6 package webrtc.rtclog2;
      7 
      8 // At the top level, a WebRTC event log is just an EventStream object. Note that
      9 // concatenating multiple EventStreams in the same file is equivalent to a
     10 // single EventStream object containing the same events. Hence, it is not
     11 // necessary to wait for the entire log to be complete before beginning to
     12 // write it to a file.
     13 // Note: For all X_deltas fields, we rely on the default value being an
     14 // empty string.
     15 message EventStream {
     16  // Deprecated - Maintained for compatibility with the old event log.
     17  repeated Event stream = 1 [deprecated = true];
     18  repeated IncomingRtpPackets incoming_rtp_packets = 2;
     19  repeated OutgoingRtpPackets outgoing_rtp_packets = 3;
     20  repeated IncomingRtcpPackets incoming_rtcp_packets = 4;
     21  repeated OutgoingRtcpPackets outgoing_rtcp_packets = 5;
     22  repeated AudioPlayoutEvents audio_playout_events = 6;
     23  repeated FrameDecodedEvents frame_decoded_events = 7;
     24  // The field tags 8-15 are reserved for the most common events.
     25  repeated BeginLogEvent begin_log_events = 16;
     26  repeated EndLogEvent end_log_events = 17;
     27  repeated LossBasedBweUpdates loss_based_bwe_updates = 18;
     28  repeated DelayBasedBweUpdates delay_based_bwe_updates = 19;
     29  repeated AudioNetworkAdaptations audio_network_adaptations = 20;
     30  repeated BweProbeCluster probe_clusters = 21;
     31  repeated BweProbeResultSuccess probe_success = 22;
     32  repeated BweProbeResultFailure probe_failure = 23;
     33  repeated AlrState alr_states = 24;
     34  repeated IceCandidatePairConfig ice_candidate_configs = 25;
     35  repeated IceCandidatePairEvent ice_candidate_events = 26;
     36  repeated DtlsTransportStateEvent dtls_transport_state_events = 27;
     37  repeated DtlsWritableState dtls_writable_states = 28;
     38  repeated GenericPacketSent generic_packets_sent = 29;
     39  repeated GenericPacketReceived generic_packets_received = 30;
     40  repeated GenericAckReceived generic_acks_received = 31 [deprecated = true];
     41  repeated RouteChange route_changes = 32;
     42  repeated RemoteEstimates remote_estimates = 33;
     43  repeated NetEqSetMinimumDelay neteq_set_minimum_delay = 34;
     44 
     45  repeated AudioRecvStreamConfig audio_recv_stream_configs = 101;
     46  repeated AudioSendStreamConfig audio_send_stream_configs = 102;
     47  repeated VideoRecvStreamConfig video_recv_stream_configs = 103;
     48  repeated VideoSendStreamConfig video_send_stream_configs = 104;
     49 }
     50 
     51 // DEPRECATED.
     52 message Event {
     53  // TODO(terelius): Do we want to preserve the old Event definition here?
     54 }
     55 
     56 message GenericPacketReceived {
     57  // All fields are required.
     58  optional int64 timestamp_ms = 1;
     59  optional int64 packet_number = 2;
     60  // Length of the packet in bytes.
     61  optional int32 packet_length = 3;
     62 
     63  // Provided if there are deltas in the batch.
     64  optional uint32 number_of_deltas = 16;
     65  optional bytes timestamp_ms_deltas = 17;
     66  optional bytes packet_number_deltas = 18;
     67  optional bytes packet_length_deltas = 19;
     68 }
     69 
     70 message GenericPacketSent {
     71  // All fields are required. All lengths in bytes.
     72  optional int64 timestamp_ms = 1;
     73  optional int64 packet_number = 2;
     74  // overhead+payload+padding length = packet_length in bytes.
     75  optional int32 overhead_length = 3;
     76  optional int32 payload_length = 4;
     77  optional int32 padding_length = 5;
     78 
     79  optional uint32 number_of_deltas = 16;
     80  optional bytes timestamp_ms_deltas = 17;
     81  optional bytes packet_number_deltas = 18;
     82  optional bytes overhead_length_deltas = 19;
     83  optional bytes payload_length_deltas = 20;
     84  optional bytes padding_length_deltas = 21;
     85 }
     86 
     87 message GenericAckReceived {
     88  optional int64 timestamp_ms = 1;
     89 
     90  // ID of the received packet.
     91  optional int64 packet_number = 2;
     92 
     93  // ID of the packet that was acked.
     94  optional int64 acked_packet_number = 3;
     95 
     96  // Timestamp in ms when the packet was received by the other side.
     97  optional int64 receive_acked_packet_time_ms = 4;
     98 
     99  optional uint32 number_of_deltas = 16;
    100  optional bytes timestamp_ms_deltas = 17;
    101  optional bytes packet_number_deltas = 18;
    102  optional bytes acked_packet_number_deltas = 19;
    103  optional bytes receive_acked_packet_time_ms_deltas = 20;
    104 }
    105 
    106 message DependencyDescriptorsWireInfo {
    107  // required
    108  // Base and delta encoded B and E bits represented as two bit numbers.
    109  optional uint32 start_end_bit = 1;
    110  optional bytes start_end_bit_deltas = 2;
    111 
    112  // required
    113  // Base and delta encoded template IDs, represented as six bit numbers.
    114  optional uint32 template_id = 3;
    115  optional bytes template_id_deltas = 4;
    116 
    117  // required
    118  // Base and delta compressed frame IDs.
    119  optional uint32 frame_id = 5;
    120  optional bytes frame_id_deltas = 6;
    121 
    122  // optional - set if any DD contains extended information.
    123  // The extended info encoded as optional blobs.
    124  optional bytes extended_infos = 7;
    125 }
    126 
    127 message IncomingRtpPackets {
    128  // required
    129  optional int64 timestamp_ms = 1;
    130 
    131  // required - RTP marker bit, used to label boundaries between video frames.
    132  optional bool marker = 2;
    133 
    134  // required - RTP payload type.
    135  optional uint32 payload_type = 3;
    136 
    137  // required - RTP sequence number.
    138  optional uint32 sequence_number = 4;
    139 
    140  // required - RTP monotonic clock timestamp (not actual time).
    141  optional fixed32 rtp_timestamp = 5;
    142 
    143  // required - Synchronization source of this packet's RTP stream.
    144  optional fixed32 ssrc = 6;
    145 
    146  // TODO(terelius/dinor): Add CSRCs. Field number 7 reserved for this purpose.
    147 
    148  // required - The size (in bytes) of the media payload, not including
    149  // RTP header or padding. The packet size is the sum of payload, header and
    150  // padding.
    151  optional uint32 payload_size = 8;
    152 
    153  // required - The size (in bytes) of the RTP header.
    154  optional uint32 header_size = 9;
    155 
    156  // required - The size (in bytes) of the padding.
    157  optional uint32 padding_size = 10;
    158 
    159  // optional - required if the batch contains delta encoded events.
    160  optional uint32 number_of_deltas = 11;
    161 
    162  // Field numbers 12-14 reserved for future use.
    163 
    164  // Optional header extensions.
    165  optional uint32 transport_sequence_number = 15;
    166  optional int32 transmission_time_offset = 16;
    167  optional uint32 absolute_send_time = 17;
    168  optional uint32 video_rotation = 18;
    169  // `audio_level` and `voice_activity` are always used in conjunction.
    170  optional uint32 audio_level = 19;
    171  optional bool voice_activity = 20;
    172  // Encodes all DD information in the batch, not just the base event.
    173  optional DependencyDescriptorsWireInfo dependency_descriptor = 21;
    174  // TODO(terelius): Add other header extensions like playout delay?
    175 
    176  // Delta encodings.
    177  optional bytes timestamp_ms_deltas = 101;
    178  optional bytes marker_deltas = 102;
    179  optional bytes payload_type_deltas = 103;
    180  optional bytes sequence_number_deltas = 104;
    181  optional bytes rtp_timestamp_deltas = 105;
    182  // Field number 107 reserved for CSRC.
    183  optional bytes ssrc_deltas = 106;
    184  optional bytes payload_size_deltas = 108;
    185  optional bytes header_size_deltas = 109;
    186  optional bytes padding_size_deltas = 110;
    187  // Field number 111-114 reserved for future use.
    188  optional bytes transport_sequence_number_deltas = 115;
    189  optional bytes transmission_time_offset_deltas = 116;
    190  optional bytes absolute_send_time_deltas = 117;
    191  optional bytes video_rotation_deltas = 118;
    192  // `audio_level` and `voice_activity` are always used in conjunction.
    193  optional bytes audio_level_deltas = 119;
    194  optional bytes voice_activity_deltas = 120;
    195 }
    196 
    197 message OutgoingRtpPackets {
    198  // required
    199  optional int64 timestamp_ms = 1;
    200 
    201  // required - RTP marker bit, used to label boundaries between video frames.
    202  optional bool marker = 2;
    203 
    204  // required - RTP payload type.
    205  optional uint32 payload_type = 3;
    206 
    207  // required - RTP sequence number.
    208  optional uint32 sequence_number = 4;
    209 
    210  // required - RTP monotonic clock timestamp (not actual time).
    211  optional fixed32 rtp_timestamp = 5;
    212 
    213  // required - Synchronization source of this packet's RTP stream.
    214  optional fixed32 ssrc = 6;
    215 
    216  // TODO(terelius/dinor): Add CSRCs. Field number 7 reserved for this purpose.
    217 
    218  // required - The size (in bytes) of the media payload, not including
    219  // RTP header or padding. The packet size is the sum of payload, header and
    220  // padding.
    221  optional uint32 payload_size = 8;
    222 
    223  // required - The size (in bytes) of the RTP header.
    224  optional uint32 header_size = 9;
    225 
    226  // required - The size (in bytes) of the padding.
    227  optional uint32 padding_size = 10;
    228 
    229  // optional - required if the batch contains delta encoded events.
    230  optional uint32 number_of_deltas = 11;
    231 
    232  // Field numbers 12-14 reserved for future use.
    233 
    234  // Optional header extensions.
    235  optional uint32 transport_sequence_number = 15;
    236  optional int32 transmission_time_offset = 16;
    237  optional uint32 absolute_send_time = 17;
    238  optional uint32 video_rotation = 18;
    239  // `audio_level` and `voice_activity` are always used in conjunction.
    240  optional uint32 audio_level = 19;
    241  optional bool voice_activity = 20;
    242  // TODO(terelius): Add other header extensions like playout delay?
    243  // Encodes all DD information in the batch, not just the base event.
    244  optional DependencyDescriptorsWireInfo dependency_descriptor = 21;
    245 
    246  // Delta encodings.
    247  optional bytes timestamp_ms_deltas = 101;
    248  optional bytes marker_deltas = 102;
    249  optional bytes payload_type_deltas = 103;
    250  optional bytes sequence_number_deltas = 104;
    251  optional bytes rtp_timestamp_deltas = 105;
    252  optional bytes ssrc_deltas = 106;
    253  // Field number 107 reserved for CSRC.
    254  optional bytes payload_size_deltas = 108;
    255  optional bytes header_size_deltas = 109;
    256  optional bytes padding_size_deltas = 110;
    257  // Field number 111-114 reserved for future use.
    258  optional bytes transport_sequence_number_deltas = 115;
    259  optional bytes transmission_time_offset_deltas = 116;
    260  optional bytes absolute_send_time_deltas = 117;
    261  optional bytes video_rotation_deltas = 118;
    262  // `audio_level` and `voice_activity` are always used in conjunction.
    263  optional bytes audio_level_deltas = 119;
    264  optional bytes voice_activity_deltas = 120;
    265 }
    266 
    267 message IncomingRtcpPackets {
    268  // required
    269  optional int64 timestamp_ms = 1;
    270 
    271  // required - The whole packet including both payload and header.
    272  optional bytes raw_packet = 2;
    273  // TODO(terelius): Feasible to log parsed RTCP instead?
    274 
    275  // optional - required if the batch contains delta encoded events.
    276  optional uint32 number_of_deltas = 3;
    277 
    278  // Delta/blob encodings.
    279  optional bytes timestamp_ms_deltas = 101;
    280  optional bytes raw_packet_blobs = 102;
    281 }
    282 
    283 message OutgoingRtcpPackets {
    284  // required
    285  optional int64 timestamp_ms = 1;
    286 
    287  // required - The whole packet including both payload and header.
    288  optional bytes raw_packet = 2;
    289  // TODO(terelius): Feasible to log parsed RTCP instead?
    290 
    291  // optional - required if the batch contains delta encoded events.
    292  optional uint32 number_of_deltas = 3;
    293 
    294  // Delta/blob encodings.
    295  optional bytes timestamp_ms_deltas = 101;
    296  optional bytes raw_packet_blobs = 102;
    297 }
    298 
    299 message AudioPlayoutEvents {
    300  // required
    301  optional int64 timestamp_ms = 1;
    302 
    303  // required - The SSRC of the audio stream associated with the playout event.
    304  optional uint32 local_ssrc = 2;
    305 
    306  // optional - required if the batch contains delta encoded events.
    307  optional uint32 number_of_deltas = 3;
    308 
    309  // Delta encodings.
    310  optional bytes timestamp_ms_deltas = 101;
    311  optional bytes local_ssrc_deltas = 102;
    312 }
    313 
    314 message NetEqSetMinimumDelay {
    315  // required
    316  optional int64 timestamp_ms = 1;
    317 
    318  // required - The SSRC of the remote stream associated with the MinimumDelay
    319  // event.
    320  optional fixed32 remote_ssrc = 2;
    321 
    322  // required - minimum delay passed to SetBaseMinimumDelay.
    323  optional int32 minimum_delay_ms = 3;
    324 
    325  // optional - required if the batch contains delta encoded events.
    326  optional uint32 number_of_deltas = 4;
    327 
    328  // Delta encodings.
    329  optional bytes timestamp_ms_deltas = 101;
    330  optional bytes remote_ssrc_deltas = 102;
    331  optional bytes minimum_delay_ms_deltas = 103;
    332 }
    333 
    334 message FrameDecodedEvents {
    335  enum Codec {
    336    CODEC_UNKNOWN = 0;
    337    CODEC_GENERIC = 1;
    338    CODEC_VP8 = 2;
    339    CODEC_VP9 = 3;
    340    CODEC_AV1 = 4;
    341    CODEC_H264 = 5;
    342    CODEC_H265 = 6;
    343  }
    344 
    345  // required
    346  optional int64 timestamp_ms = 1;
    347 
    348  // required - The SSRC of the video stream that the frame belongs to.
    349  optional fixed32 ssrc = 2;
    350 
    351  // required - The predicted render time of the frame.
    352  optional int64 render_time_ms = 3;
    353 
    354  // required - The width (in pixels) of the frame.
    355  optional int32 width = 4;
    356 
    357  // required - The height (in pixels) of the frame.
    358  optional int32 height = 5;
    359 
    360  // required - The codec type of the frame.
    361  optional Codec codec = 6;
    362 
    363  // required - The QP (quantization parameter) of the frame. Range [0,255].
    364  optional uint32 qp = 7;
    365 
    366  // optional - required if the batch contains delta encoded events.
    367  optional uint32 number_of_deltas = 15;
    368 
    369  // Delta encodings.
    370  optional bytes timestamp_ms_deltas = 101;
    371  optional bytes ssrc_deltas = 102;
    372  optional bytes render_time_ms_deltas = 103;
    373  optional bytes width_deltas = 104;
    374  optional bytes height_deltas = 105;
    375  optional bytes codec_deltas = 106;
    376  optional bytes qp_deltas = 107;
    377 }
    378 
    379 message BeginLogEvent {
    380  // required
    381  optional int64 timestamp_ms = 1;
    382 
    383  // required
    384  optional uint32 version = 2;
    385 
    386  // required
    387  optional int64 utc_time_ms = 3;
    388 }
    389 
    390 message EndLogEvent {
    391  // required
    392  optional int64 timestamp_ms = 1;
    393 }
    394 
    395 message LossBasedBweUpdates {
    396  // required
    397  optional int64 timestamp_ms = 1;
    398 
    399  // TODO(terelius): Update log interface to unsigned.
    400  // required - Bandwidth estimate (in bps) after the update.
    401  optional uint32 bitrate_bps = 2;
    402 
    403  // required - Fraction of lost packets since last receiver report
    404  // computed as floor( 256 * (#lost_packets / #total_packets) ).
    405  // The possible values range from 0 to 255.
    406  optional uint32 fraction_loss = 3;
    407 
    408  // TODO(terelius): Is this really needed? Remove or make optional?
    409  // TODO(terelius): Update log interface to unsigned.
    410  // required - Total number of packets that the BWE update is based on.
    411  optional uint32 total_packets = 4;
    412 
    413  // optional - required if the batch contains delta encoded events.
    414  optional uint32 number_of_deltas = 5;
    415 
    416  // Delta encodings.
    417  optional bytes timestamp_ms_deltas = 101;
    418  optional bytes bitrate_bps_deltas = 102;
    419  optional bytes fraction_loss_deltas = 103;
    420  optional bytes total_packets_deltas = 104;
    421 }
    422 
    423 message DelayBasedBweUpdates {
    424  // required
    425  optional int64 timestamp_ms = 1;
    426 
    427  // required - Bandwidth estimate (in bps) after the update.
    428  optional uint32 bitrate_bps = 2;
    429 
    430  enum DetectorState {
    431    BWE_UNKNOWN_STATE = 0;
    432    BWE_NORMAL = 1;
    433    BWE_UNDERUSING = 2;
    434    BWE_OVERUSING = 3;
    435  }
    436  optional DetectorState detector_state = 3;
    437 
    438  // optional - required if the batch contains delta encoded events.
    439  optional uint32 number_of_deltas = 4;
    440 
    441  // Delta encodings.
    442  optional bytes timestamp_ms_deltas = 101;
    443  optional bytes bitrate_bps_deltas = 102;
    444  optional bytes detector_state_deltas = 103;
    445 }
    446 
    447 // Maps RTP header extension names to numerical IDs.
    448 message RtpHeaderExtensionConfig {
    449  // Optional IDs for the header extensions. Each ID is a 4-bit number that is
    450  // only set if that extension is configured.
    451  // TODO: Can we skip audio level?
    452  optional int32 transmission_time_offset_id = 1;
    453  optional int32 absolute_send_time_id = 2;
    454  optional int32 transport_sequence_number_id = 3;
    455  optional int32 video_rotation_id = 4;
    456  optional int32 audio_level_id = 5;
    457  optional int32 dependency_descriptor_id = 6;
    458  // TODO(terelius): Add other header extensions like playout delay?
    459 }
    460 
    461 message VideoRecvStreamConfig {
    462  // required
    463  optional int64 timestamp_ms = 1;
    464 
    465  // required - Synchronization source (stream identifier) to be received.
    466  optional uint32 remote_ssrc = 2;
    467 
    468  // required - Sender SSRC used for sending RTCP (such as receiver reports).
    469  optional uint32 local_ssrc = 3;
    470 
    471  // optional - required if RTX is configured. SSRC for the RTX stream.
    472  optional uint32 rtx_ssrc = 4;
    473 
    474  // IDs for the header extension we care about. Only required if there are
    475  // header extensions configured.
    476  optional RtpHeaderExtensionConfig header_extensions = 5;
    477 
    478  // TODO(terelius): Do we need codec-payload mapping? If so and rtx_ssrc is
    479  // used, we also need a map between RTP payload type and RTX payload type.
    480 }
    481 
    482 message VideoSendStreamConfig {
    483  // required
    484  optional int64 timestamp_ms = 1;
    485 
    486  // required - Synchronization source (stream identifier) for outgoing stream.
    487  // When using simulcast, a separate config should be logged for each stream.
    488  optional uint32 ssrc = 2;
    489 
    490  // optional - required if RTX is configured. SSRC for the RTX stream.
    491  optional uint32 rtx_ssrc = 3;
    492 
    493  // IDs for the header extension we care about. Only required if there are
    494  // header extensions configured.
    495  optional RtpHeaderExtensionConfig header_extensions = 4;
    496 
    497  // TODO(terelius): Do we need codec-payload mapping? If so and rtx_ssrc is
    498  // used, we also need a map between RTP payload type and RTX payload type.
    499 }
    500 
    501 message AudioRecvStreamConfig {
    502  // required
    503  optional int64 timestamp_ms = 1;
    504 
    505  // required - Synchronization source (stream identifier) to be received.
    506  optional uint32 remote_ssrc = 2;
    507 
    508  // required - Sender SSRC used for sending RTCP (such as receiver reports).
    509  optional uint32 local_ssrc = 3;
    510 
    511  // Field number 4 reserved for RTX SSRC.
    512 
    513  // IDs for the header extension we care about. Only required if there are
    514  // header extensions configured.
    515  optional RtpHeaderExtensionConfig header_extensions = 5;
    516 
    517  // TODO(terelius): Do we need codec-payload mapping? If so and rtx_ssrc is
    518  // used, we also need a map between RTP payload type and RTX payload type.
    519 }
    520 
    521 message AudioSendStreamConfig {
    522  // required
    523  optional int64 timestamp_ms = 1;
    524 
    525  // required - Synchronization source (stream identifier) for outgoing stream.
    526  optional uint32 ssrc = 2;
    527 
    528  // Field number 3 reserved for RTX SSRC.
    529 
    530  // IDs for the header extension we care about. Only required if there are
    531  // header extensions configured.
    532  optional RtpHeaderExtensionConfig header_extensions = 4;
    533 
    534  // TODO(terelius): Do we need codec-payload mapping? If so and rtx_ssrc is
    535  // used, we also need a map between RTP payload type and RTX payload type.
    536 }
    537 
    538 message AudioNetworkAdaptations {
    539  // required
    540  optional int64 timestamp_ms = 1;
    541 
    542  // Bit rate that the audio encoder is operating at.
    543  // TODO(terelius): Signed vs unsigned?
    544  optional int32 bitrate_bps = 2;
    545 
    546  // Frame length that each encoded audio packet consists of.
    547  // TODO(terelius): Signed vs unsigned?
    548  optional int32 frame_length_ms = 3;
    549 
    550  // Packet loss fraction that the encoder's forward error correction (FEC) is
    551  // optimized for.
    552  // Instead of encoding a float, we encode a value between 0 and 16383, which
    553  // if divided by 16383, will give a value close to the original float.
    554  // The value 16383 (2^14 - 1) was chosen so that it would give good precision
    555  // on the one hand, and would be encodable with two bytes in varint form
    556  // on the other hand.
    557  optional uint32 uplink_packet_loss_fraction = 4;
    558 
    559  // Whether forward error correction (FEC) is turned on or off.
    560  optional bool enable_fec = 5;
    561 
    562  // Whether discontinuous transmission (DTX) is turned on or off.
    563  optional bool enable_dtx = 6;
    564 
    565  // Number of audio channels that each encoded packet consists of.
    566  optional uint32 num_channels = 7;
    567 
    568  // optional - required if the batch contains delta encoded events.
    569  optional uint32 number_of_deltas = 8;
    570 
    571  // Delta encodings.
    572  optional bytes timestamp_ms_deltas = 101;
    573  optional bytes bitrate_bps_deltas = 102;
    574  optional bytes frame_length_ms_deltas = 103;
    575  optional bytes uplink_packet_loss_fraction_deltas = 104;
    576  optional bytes enable_fec_deltas = 105;
    577  optional bytes enable_dtx_deltas = 106;
    578  optional bytes num_channels_deltas = 107;
    579 }
    580 
    581 message BweProbeCluster {
    582  // required
    583  optional int64 timestamp_ms = 1;
    584 
    585  // required - The id of this probe cluster.
    586  optional uint32 id = 2;
    587 
    588  // required - The bitrate in bps that this probe cluster is meant to probe.
    589  optional uint32 bitrate_bps = 3;
    590 
    591  // required - The minimum number of packets used to probe the given bitrate.
    592  optional uint32 min_packets = 4;
    593 
    594  // required - The minimum number of bytes used to probe the given bitrate.
    595  optional uint32 min_bytes = 5;
    596 }
    597 
    598 message BweProbeResultSuccess {
    599  // required
    600  optional int64 timestamp_ms = 1;
    601 
    602  // required - The id of this probe cluster.
    603  optional uint32 id = 2;
    604 
    605  // required - The resulting bitrate in bps.
    606  optional uint32 bitrate_bps = 3;
    607 }
    608 
    609 message BweProbeResultFailure {
    610  // required
    611  optional int64 timestamp_ms = 1;
    612 
    613  // required - The id of this probe cluster.
    614  optional uint32 id = 2;
    615 
    616  enum FailureReason {
    617    UNKNOWN = 0;
    618    INVALID_SEND_RECEIVE_INTERVAL = 1;
    619    INVALID_SEND_RECEIVE_RATIO = 2;
    620    TIMEOUT = 3;
    621  }
    622 
    623  // required
    624  optional FailureReason failure = 3;
    625 }
    626 
    627 message AlrState {
    628  // required
    629  optional int64 timestamp_ms = 1;
    630 
    631  // required - True if the send rate is application limited.
    632  optional bool in_alr = 2;
    633 }
    634 
    635 message IceCandidatePairConfig {
    636  enum IceCandidatePairConfigType {
    637    UNKNOWN_CONFIG_TYPE = 0;
    638    ADDED = 1;
    639    UPDATED = 2;
    640    DESTROYED = 3;
    641    SELECTED = 4;
    642  }
    643 
    644  enum IceCandidateType {
    645    UNKNOWN_CANDIDATE_TYPE = 0;
    646    LOCAL = 1;
    647    STUN = 2;
    648    PRFLX = 3;
    649    RELAY = 4;
    650  }
    651 
    652  enum Protocol {
    653    UNKNOWN_PROTOCOL = 0;
    654    UDP = 1;
    655    TCP = 2;
    656    SSLTCP = 3;
    657    TLS = 4;
    658  }
    659 
    660  enum AddressFamily {
    661    UNKNOWN_ADDRESS_FAMILY = 0;
    662    IPV4 = 1;
    663    IPV6 = 2;
    664  }
    665 
    666  enum NetworkType {
    667    UNKNOWN_NETWORK_TYPE = 0;
    668    ETHERNET = 1;
    669    WIFI = 2;
    670    CELLULAR = 3;
    671    VPN = 4;
    672    LOOPBACK = 5;
    673  }
    674 
    675  // required
    676  optional int64 timestamp_ms = 1;
    677 
    678  // required
    679  optional IceCandidatePairConfigType config_type = 2;
    680 
    681  // required
    682  optional uint32 candidate_pair_id = 3;
    683 
    684  // required
    685  optional IceCandidateType local_candidate_type = 4;
    686 
    687  // required
    688  optional Protocol local_relay_protocol = 5;
    689 
    690  // required
    691  optional NetworkType local_network_type = 6;
    692 
    693  // required
    694  optional AddressFamily local_address_family = 7;
    695 
    696  // required
    697  optional IceCandidateType remote_candidate_type = 8;
    698 
    699  // required
    700  optional AddressFamily remote_address_family = 9;
    701 
    702  // required
    703  optional Protocol candidate_pair_protocol = 10;
    704 }
    705 
    706 message IceCandidatePairEvent {
    707  enum IceCandidatePairEventType {
    708    UNKNOWN_CHECK_TYPE = 0;
    709    CHECK_SENT = 1;
    710    CHECK_RECEIVED = 2;
    711    CHECK_RESPONSE_SENT = 3;
    712    CHECK_RESPONSE_RECEIVED = 4;
    713  }
    714 
    715  // required
    716  optional int64 timestamp_ms = 1;
    717 
    718  // required
    719  optional IceCandidatePairEventType event_type = 2;
    720 
    721  // required
    722  optional uint32 candidate_pair_id = 3;
    723 
    724  // required
    725  optional uint32 transaction_id = 4;
    726 }
    727 
    728 message DtlsTransportStateEvent {
    729  enum DtlsTransportState {
    730    UNKNOWN_DTLS_TRANSPORT_STATE = 0;
    731    DTLS_TRANSPORT_NEW = 1;
    732    DTLS_TRANSPORT_CONNECTING = 2;
    733    DTLS_TRANSPORT_CONNECTED = 3;
    734    DTLS_TRANSPORT_CLOSED = 4;
    735    DTLS_TRANSPORT_FAILED = 5;
    736  }
    737 
    738  // required
    739  optional int64 timestamp_ms = 1;
    740 
    741  // required
    742  optional DtlsTransportState dtls_transport_state = 2;
    743 }
    744 
    745 message DtlsWritableState {
    746  // required
    747  optional int64 timestamp_ms = 1;
    748 
    749  // required
    750  optional bool writable = 2;
    751 }
    752 
    753 message RouteChange {
    754  // required
    755  optional int64 timestamp_ms = 1;
    756  // required - True if the route is ready for sending packets.
    757  optional bool connected = 2;
    758  // required - The per packet data overhead for this route.
    759  optional uint32 overhead = 3;
    760 }
    761 
    762 message RemoteEstimates {
    763  // required
    764  optional int64 timestamp_ms = 1;
    765  // optional - value used as a safe measure of available capacity.
    766  optional uint32 link_capacity_lower_kbps = 2;
    767  // optional - value used as limit for increasing bitrate.
    768  optional uint32 link_capacity_upper_kbps = 3;
    769 
    770  // optional - required if the batch contains delta encoded events.
    771  optional uint32 number_of_deltas = 4;
    772 
    773  // Delta encodings.
    774  optional bytes timestamp_ms_deltas = 101;
    775  optional bytes link_capacity_lower_kbps_deltas = 102;
    776  optional bytes link_capacity_upper_kbps_deltas = 103;
    777 }