OLD | NEW |
(Empty) | |
| 1 syntax = "proto2"; |
| 2 option optimize_for = LITE_RUNTIME; |
| 3 package webrtc.rtclog; |
| 4 |
| 5 |
| 6 enum MediaType { |
| 7 ANY = 0; |
| 8 AUDIO = 1; |
| 9 VIDEO = 2; |
| 10 DATA = 3; |
| 11 } |
| 12 |
| 13 |
| 14 // This is the main message to dump to a file, it can contain multiple event |
| 15 // messages, but it is possible to append multiple EventStreams (each with a |
| 16 // single event) to a file. |
| 17 // This has the benefit that there's no need to keep all data in memory. |
| 18 message EventStream { |
| 19 repeated Event stream = 1; |
| 20 } |
| 21 |
| 22 |
| 23 message Event { |
| 24 // required - Elapsed wallclock time in us since the start of the log. |
| 25 optional int64 timestamp_us = 1; |
| 26 |
| 27 // The different types of events that can occur, the UNKNOWN_EVENT entry |
| 28 // is added in case future EventTypes are added, in that case old code will |
| 29 // receive the new events as UNKNOWN_EVENT. |
| 30 enum EventType { |
| 31 UNKNOWN_EVENT = 0; |
| 32 RTP_EVENT = 1; |
| 33 RTCP_EVENT = 2; |
| 34 DEBUG_EVENT = 3; |
| 35 VIDEO_RECEIVER_CONFIG_EVENT = 4; |
| 36 VIDEO_SENDER_CONFIG_EVENT = 5; |
| 37 AUDIO_RECEIVER_CONFIG_EVENT = 6; |
| 38 AUDIO_SENDER_CONFIG_EVENT = 7; |
| 39 } |
| 40 |
| 41 // required - Indicates the type of this event |
| 42 optional EventType type = 2; |
| 43 |
| 44 // optional - but required if type == RTP_EVENT |
| 45 optional RtpPacket rtp_packet = 3; |
| 46 |
| 47 // optional - but required if type == RTCP_EVENT |
| 48 optional RtcpPacket rtcp_packet = 4; |
| 49 |
| 50 // optional - but required if type == DEBUG_EVENT |
| 51 optional DebugEvent debug_event = 5; |
| 52 |
| 53 // optional - but required if type == VIDEO_RECEIVER_CONFIG_EVENT |
| 54 optional VideoReceiveConfig video_receiver_config = 6; |
| 55 |
| 56 // optional - but required if type == VIDEO_SENDER_CONFIG_EVENT |
| 57 optional VideoSendConfig video_sender_config = 7; |
| 58 |
| 59 // optional - but required if type == AUDIO_RECEIVER_CONFIG_EVENT |
| 60 optional AudioReceiveConfig audio_receiver_config = 8; |
| 61 |
| 62 // optional - but required if type == AUDIO_SENDER_CONFIG_EVENT |
| 63 optional AudioSendConfig audio_sender_config = 9; |
| 64 } |
| 65 |
| 66 |
| 67 message RtpPacket { |
| 68 // required - True if the packet is incoming w.r.t. the user logging the data |
| 69 optional bool incoming = 1; |
| 70 |
| 71 // required |
| 72 optional MediaType type = 2; |
| 73 |
| 74 // required - The size of the packet including both payload and header. |
| 75 optional uint32 packet_length = 3; |
| 76 |
| 77 // required - The RTP header only. |
| 78 optional bytes header = 4; |
| 79 |
| 80 // Do not add code to log user payload data without a privacy review! |
| 81 } |
| 82 |
| 83 |
| 84 message RtcpPacket { |
| 85 // required - True if the packet is incoming w.r.t. the user logging the data |
| 86 optional bool incoming = 1; |
| 87 |
| 88 // required |
| 89 optional MediaType type = 2; |
| 90 |
| 91 // required - The whole packet including both payload and header. |
| 92 optional bytes packet_data = 3; |
| 93 } |
| 94 |
| 95 |
| 96 message DebugEvent { |
| 97 // Indicates the type of the debug event. |
| 98 // LOG_START and LOG_END indicate the start and end of the log respectively. |
| 99 // AUDIO_PLAYOUT indicates a call to the PlayoutData10Ms() function in ACM. |
| 100 enum EventType { |
| 101 UNKNOWN_EVENT = 0; |
| 102 LOG_START = 1; |
| 103 LOG_END = 2; |
| 104 AUDIO_PLAYOUT = 3; |
| 105 } |
| 106 |
| 107 // required |
| 108 optional EventType type = 1; |
| 109 } |
| 110 |
| 111 |
| 112 // TODO(terelius): Video and audio streams could in principle share SSRC, |
| 113 // so identifying a stream based only on SSRC might not work. |
| 114 // It might be better to use a combination of SSRC and media type |
| 115 // or SSRC and port number, but for now we will rely on SSRC only. |
| 116 message VideoReceiveConfig { |
| 117 // required - Synchronization source (stream identifier) to be received. |
| 118 optional uint32 remote_ssrc = 1; |
| 119 // required - Sender SSRC used for sending RTCP (such as receiver reports). |
| 120 optional uint32 local_ssrc = 2; |
| 121 |
| 122 // Compound mode is described by RFC 4585 and reduced-size |
| 123 // RTCP mode is described by RFC 5506. |
| 124 enum RtcpMode { |
| 125 RTCP_COMPOUND = 1; |
| 126 RTCP_REDUCEDSIZE = 2; |
| 127 } |
| 128 // required - RTCP mode to use. |
| 129 optional RtcpMode rtcp_mode = 3; |
| 130 |
| 131 // required - Extended RTCP settings. |
| 132 optional bool receiver_reference_time_report = 4; |
| 133 |
| 134 // required - Receiver estimated maximum bandwidth. |
| 135 optional bool remb = 5; |
| 136 |
| 137 // Map from video RTP payload type -> RTX config. |
| 138 repeated RtxMap rtx_map = 6; |
| 139 |
| 140 // RTP header extensions used for the received stream. |
| 141 repeated RtpHeaderExtension header_extensions = 7; |
| 142 |
| 143 // List of decoders associated with the stream. |
| 144 repeated DecoderConfig decoders = 8; |
| 145 } |
| 146 |
| 147 |
| 148 // Maps decoder names to payload types. |
| 149 message DecoderConfig { |
| 150 // required |
| 151 optional string name = 1; |
| 152 |
| 153 // required |
| 154 optional sint32 payload_type = 2; |
| 155 } |
| 156 |
| 157 |
| 158 // Maps RTP header extension names to numerical IDs. |
| 159 message RtpHeaderExtension { |
| 160 // required |
| 161 optional string name = 1; |
| 162 |
| 163 // required |
| 164 optional sint32 id = 2; |
| 165 } |
| 166 |
| 167 |
| 168 // RTX settings for incoming video payloads that may be received. |
| 169 // RTX is disabled if there's no config present. |
| 170 message RtxConfig { |
| 171 // required - SSRC to use for the RTX stream. |
| 172 optional uint32 rtx_ssrc = 1; |
| 173 |
| 174 // required - Payload type to use for the RTX stream. |
| 175 optional sint32 rtx_payload_type = 2; |
| 176 } |
| 177 |
| 178 |
| 179 message RtxMap { |
| 180 // required |
| 181 optional sint32 payload_type = 1; |
| 182 |
| 183 // required |
| 184 optional RtxConfig config = 2; |
| 185 } |
| 186 |
| 187 |
| 188 message VideoSendConfig { |
| 189 // Synchronization source (stream identifier) for outgoing stream. |
| 190 // One stream can have several ssrcs for e.g. simulcast. |
| 191 // At least one ssrc is required. |
| 192 repeated uint32 ssrcs = 1; |
| 193 |
| 194 // RTP header extensions used for the outgoing stream. |
| 195 repeated RtpHeaderExtension header_extensions = 2; |
| 196 |
| 197 // List of SSRCs for retransmitted packets. |
| 198 repeated uint32 rtx_ssrcs = 3; |
| 199 |
| 200 // required if rtx_ssrcs is used - Payload type for retransmitted packets. |
| 201 optional sint32 rtx_payload_type = 4; |
| 202 |
| 203 // required - Canonical end-point identifier. |
| 204 optional string c_name = 5; |
| 205 |
| 206 // required - Encoder associated with the stream. |
| 207 optional EncoderConfig encoder = 6; |
| 208 } |
| 209 |
| 210 |
| 211 // Maps encoder names to payload types. |
| 212 message EncoderConfig { |
| 213 // required |
| 214 optional string name = 1; |
| 215 |
| 216 // required |
| 217 optional sint32 payload_type = 2; |
| 218 } |
| 219 |
| 220 |
| 221 message AudioReceiveConfig { |
| 222 // TODO(terelius): Add audio-receive config. |
| 223 } |
| 224 |
| 225 |
| 226 message AudioSendConfig { |
| 227 // TODO(terelius): Add audio-receive config. |
| 228 } |
OLD | NEW |