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 472 matching lines...) Loading... |
483 // the sampling frequency in Hertz. | 483 // the sampling frequency in Hertz. |
484 // | 484 // |
485 virtual int32_t PlayoutFrequency() const = 0; | 485 virtual int32_t PlayoutFrequency() const = 0; |
486 | 486 |
487 // Registers a decoder for the given payload type. Returns true iff | 487 // Registers a decoder for the given payload type. Returns true iff |
488 // successful. | 488 // successful. |
489 virtual bool RegisterReceiveCodec(int rtp_payload_type, | 489 virtual bool RegisterReceiveCodec(int rtp_payload_type, |
490 const SdpAudioFormat& audio_format) = 0; | 490 const SdpAudioFormat& audio_format) = 0; |
491 | 491 |
492 /////////////////////////////////////////////////////////////////////////// | 492 /////////////////////////////////////////////////////////////////////////// |
493 // int32_t RegisterReceiveCodec() | |
494 // Register possible decoders, can be called multiple times for | |
495 // codecs, CNG-NB, CNG-WB, CNG-SWB, AVT and RED. | |
496 // | |
497 // Input: | |
498 // -receive_codec : parameters of the codec to be registered, c.f. | |
499 // common_types.h for the definition of | |
500 // CodecInst. | |
501 // | |
502 // Return value: | |
503 // -1 if failed to register the codec | |
504 // 0 if the codec registered successfully. | |
505 // | |
506 virtual int RegisterReceiveCodec(const CodecInst& receive_codec) = 0; | |
507 | |
508 // Register a decoder; call repeatedly to register multiple decoders. |df| is | |
509 // a decoder factory that returns an iSAC decoder; it will be called once if | |
510 // the decoder being registered is iSAC. | |
511 virtual int RegisterReceiveCodec( | |
512 const CodecInst& receive_codec, | |
513 rtc::FunctionView<std::unique_ptr<AudioDecoder>()> isac_factory) = 0; | |
514 | |
515 // Registers an external decoder. The name is only used to provide information | |
516 // back to the caller about the decoder. Hence, the name is arbitrary, and may | |
517 // be empty. | |
518 virtual int RegisterExternalReceiveCodec(int rtp_payload_type, | |
519 AudioDecoder* external_decoder, | |
520 int sample_rate_hz, | |
521 int num_channels, | |
522 const std::string& name) = 0; | |
523 | |
524 /////////////////////////////////////////////////////////////////////////// | |
525 // int32_t UnregisterReceiveCodec() | 493 // int32_t UnregisterReceiveCodec() |
526 // Unregister the codec currently registered with a specific payload type | 494 // Unregister the codec currently registered with a specific payload type |
527 // from the list of possible receive codecs. | 495 // from the list of possible receive codecs. |
528 // | 496 // |
529 // Input: | 497 // Input: |
530 // -payload_type : The number representing the payload type to | 498 // -payload_type : The number representing the payload type to |
531 // unregister. | 499 // unregister. |
532 // | 500 // |
533 // Output: | 501 // Output: |
534 // -1 if fails to unregister. | 502 // -1 if fails to unregister. |
(...skipping 280 matching lines...) Loading... |
815 virtual std::vector<uint16_t> GetNackList( | 783 virtual std::vector<uint16_t> GetNackList( |
816 int64_t round_trip_time_ms) const = 0; | 784 int64_t round_trip_time_ms) const = 0; |
817 | 785 |
818 virtual void GetDecodingCallStatistics( | 786 virtual void GetDecodingCallStatistics( |
819 AudioDecodingCallStats* call_stats) const = 0; | 787 AudioDecodingCallStats* call_stats) const = 0; |
820 }; | 788 }; |
821 | 789 |
822 } // namespace webrtc | 790 } // namespace webrtc |
823 | 791 |
824 #endif // WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_ | 792 #endif // WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_ |
OLD | NEW |