OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 class RtpFeedback | 235 class RtpFeedback |
236 { | 236 { |
237 public: | 237 public: |
238 virtual ~RtpFeedback() {} | 238 virtual ~RtpFeedback() {} |
239 | 239 |
240 // Receiving payload change or SSRC change. (return success!) | 240 // Receiving payload change or SSRC change. (return success!) |
241 /* | 241 /* |
242 * channels - number of channels in codec (1 = mono, 2 = stereo) | 242 * channels - number of channels in codec (1 = mono, 2 = stereo) |
243 */ | 243 */ |
244 virtual int32_t OnInitializeDecoder( | 244 virtual int32_t OnInitializeDecoder( |
245 const int32_t id, | |
246 const int8_t payloadType, | 245 const int8_t payloadType, |
247 const char payloadName[RTP_PAYLOAD_NAME_SIZE], | 246 const char payloadName[RTP_PAYLOAD_NAME_SIZE], |
248 const int frequency, | 247 const int frequency, |
249 const uint8_t channels, | 248 const uint8_t channels, |
250 const uint32_t rate) = 0; | 249 const uint32_t rate) = 0; |
251 | 250 |
252 virtual void OnIncomingSSRCChanged( const int32_t id, | 251 virtual void OnIncomingSSRCChanged(const uint32_t ssrc) = 0; |
253 const uint32_t ssrc) = 0; | |
254 | 252 |
255 virtual void OnIncomingCSRCChanged( const int32_t id, | 253 virtual void OnIncomingCSRCChanged(const uint32_t CSRC, |
256 const uint32_t CSRC, | 254 const bool added) = 0; |
257 const bool added) = 0; | |
258 }; | 255 }; |
259 | 256 |
260 class RtpAudioFeedback { | 257 class RtpAudioFeedback { |
261 public: | 258 public: |
262 | 259 virtual void OnPlayTelephoneEvent(const uint8_t event, |
263 virtual void OnPlayTelephoneEvent(const int32_t id, | |
264 const uint8_t event, | |
265 const uint16_t lengthMs, | 260 const uint16_t lengthMs, |
266 const uint8_t volume) = 0; | 261 const uint8_t volume) = 0; |
| 262 |
267 protected: | 263 protected: |
268 virtual ~RtpAudioFeedback() {} | 264 virtual ~RtpAudioFeedback() {} |
269 }; | 265 }; |
270 | 266 |
271 class RtcpIntraFrameObserver { | 267 class RtcpIntraFrameObserver { |
272 public: | 268 public: |
273 virtual void OnReceivedIntraFrameRequest(uint32_t ssrc) = 0; | 269 virtual void OnReceivedIntraFrameRequest(uint32_t ssrc) = 0; |
274 | 270 |
275 virtual void OnReceivedSLI(uint32_t ssrc, | 271 virtual void OnReceivedSLI(uint32_t ssrc, |
276 uint8_t picture_id) = 0; | 272 uint8_t picture_id) = 0; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 virtual int64_t LastProcessedRtt() const = 0; | 337 virtual int64_t LastProcessedRtt() const = 0; |
342 | 338 |
343 virtual ~RtcpRttStats() {}; | 339 virtual ~RtcpRttStats() {}; |
344 }; | 340 }; |
345 | 341 |
346 // Null object version of RtpFeedback. | 342 // Null object version of RtpFeedback. |
347 class NullRtpFeedback : public RtpFeedback { | 343 class NullRtpFeedback : public RtpFeedback { |
348 public: | 344 public: |
349 virtual ~NullRtpFeedback() {} | 345 virtual ~NullRtpFeedback() {} |
350 | 346 |
351 int32_t OnInitializeDecoder(const int32_t id, | 347 int32_t OnInitializeDecoder(const int8_t payloadType, |
352 const int8_t payloadType, | |
353 const char payloadName[RTP_PAYLOAD_NAME_SIZE], | 348 const char payloadName[RTP_PAYLOAD_NAME_SIZE], |
354 const int frequency, | 349 const int frequency, |
355 const uint8_t channels, | 350 const uint8_t channels, |
356 const uint32_t rate) override { | 351 const uint32_t rate) override { |
357 return 0; | 352 return 0; |
358 } | 353 } |
359 | 354 |
360 void OnIncomingSSRCChanged(const int32_t id, const uint32_t ssrc) override {} | 355 void OnIncomingSSRCChanged(const uint32_t ssrc) override {} |
361 | 356 void OnIncomingCSRCChanged(const uint32_t CSRC, const bool added) override {} |
362 void OnIncomingCSRCChanged(const int32_t id, | |
363 const uint32_t CSRC, | |
364 const bool added) override {} | |
365 }; | 357 }; |
366 | 358 |
367 // Null object version of RtpData. | 359 // Null object version of RtpData. |
368 class NullRtpData : public RtpData { | 360 class NullRtpData : public RtpData { |
369 public: | 361 public: |
370 virtual ~NullRtpData() {} | 362 virtual ~NullRtpData() {} |
371 | 363 |
372 int32_t OnReceivedPayloadData(const uint8_t* payloadData, | 364 int32_t OnReceivedPayloadData(const uint8_t* payloadData, |
373 const size_t payloadSize, | 365 const size_t payloadSize, |
374 const WebRtcRTPHeader* rtpHeader) override { | 366 const WebRtcRTPHeader* rtpHeader) override { |
375 return 0; | 367 return 0; |
376 } | 368 } |
377 | 369 |
378 bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override { | 370 bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override { |
379 return true; | 371 return true; |
380 } | 372 } |
381 }; | 373 }; |
382 | 374 |
383 // Null object version of RtpAudioFeedback. | 375 // Null object version of RtpAudioFeedback. |
384 class NullRtpAudioFeedback : public RtpAudioFeedback { | 376 class NullRtpAudioFeedback : public RtpAudioFeedback { |
385 public: | 377 public: |
386 virtual ~NullRtpAudioFeedback() {} | 378 virtual ~NullRtpAudioFeedback() {} |
387 | 379 |
388 void OnPlayTelephoneEvent(const int32_t id, | 380 void OnPlayTelephoneEvent(const uint8_t event, |
389 const uint8_t event, | |
390 const uint16_t lengthMs, | 381 const uint16_t lengthMs, |
391 const uint8_t volume) override {} | 382 const uint8_t volume) override {} |
392 }; | 383 }; |
393 | 384 |
394 // Statistics about packet loss for a single directional connection. All values | 385 // Statistics about packet loss for a single directional connection. All values |
395 // are totals since the connection initiated. | 386 // are totals since the connection initiated. |
396 struct RtpPacketLossStats { | 387 struct RtpPacketLossStats { |
397 // The number of packets lost in events where no adjacent packets were also | 388 // The number of packets lost in events where no adjacent packets were also |
398 // lost. | 389 // lost. |
399 uint64_t single_packet_loss_count; | 390 uint64_t single_packet_loss_count; |
400 // The number of events in which more than one adjacent packet was lost. | 391 // The number of events in which more than one adjacent packet was lost. |
401 uint64_t multiple_packet_loss_event_count; | 392 uint64_t multiple_packet_loss_event_count; |
402 // The number of packets lost in events where more than one adjacent packet | 393 // The number of packets lost in events where more than one adjacent packet |
403 // was lost. | 394 // was lost. |
404 uint64_t multiple_packet_loss_packet_count; | 395 uint64_t multiple_packet_loss_packet_count; |
405 }; | 396 }; |
406 | 397 |
407 } // namespace webrtc | 398 } // namespace webrtc |
408 #endif // WEBRTC_MODULES_RTP_RTCP_INTERFACE_RTP_RTCP_DEFINES_H_ | 399 #endif // WEBRTC_MODULES_RTP_RTCP_INTERFACE_RTP_RTCP_DEFINES_H_ |
OLD | NEW |