OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 17 matching lines...) Expand all Loading... |
28 size_t num_channels; | 28 size_t num_channels; |
29 int payload_type; | 29 int payload_type; |
30 | 30 |
31 protected: | 31 protected: |
32 explicit Config(int pt) | 32 explicit Config(int pt) |
33 : frame_size_ms(20), num_channels(1), payload_type(pt) {} | 33 : frame_size_ms(20), num_channels(1), payload_type(pt) {} |
34 }; | 34 }; |
35 | 35 |
36 ~AudioEncoderPcm() override; | 36 ~AudioEncoderPcm() override; |
37 | 37 |
38 size_t MaxEncodedBytes() const override; | |
39 int SampleRateHz() const override; | 38 int SampleRateHz() const override; |
40 size_t NumChannels() const override; | 39 size_t NumChannels() const override; |
41 size_t Num10MsFramesInNextPacket() const override; | 40 size_t Num10MsFramesInNextPacket() const override; |
42 size_t Max10MsFramesInAPacket() const override; | 41 size_t Max10MsFramesInAPacket() const override; |
43 int GetTargetBitrate() const override; | 42 int GetTargetBitrate() const override; |
44 void Reset() override; | 43 void Reset() override; |
45 | 44 |
46 protected: | 45 protected: |
47 AudioEncoderPcm(const Config& config, int sample_rate_hz); | 46 AudioEncoderPcm(const Config& config, int sample_rate_hz); |
48 | 47 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 size_t BytesPerSample() const override; | 107 size_t BytesPerSample() const override; |
109 | 108 |
110 private: | 109 private: |
111 static const int kSampleRateHz = 8000; | 110 static const int kSampleRateHz = 8000; |
112 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderPcmU); | 111 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderPcmU); |
113 }; | 112 }; |
114 | 113 |
115 } // namespace webrtc | 114 } // namespace webrtc |
116 | 115 |
117 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_G711_AUDIO_ENCODER_PCM_H_ | 116 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_G711_AUDIO_ENCODER_PCM_H_ |
OLD | NEW |