Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Side by Side Diff: webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h

Issue 1967503002: Audio codec usage statistics (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 EncodedInfo EncodeImpl(uint32_t rtp_timestamp, 48 EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
49 rtc::ArrayView<const int16_t> audio, 49 rtc::ArrayView<const int16_t> audio,
50 rtc::Buffer* encoded) override; 50 rtc::Buffer* encoded) override;
51 51
52 virtual size_t EncodeCall(const int16_t* audio, 52 virtual size_t EncodeCall(const int16_t* audio,
53 size_t input_len, 53 size_t input_len,
54 uint8_t* encoded) = 0; 54 uint8_t* encoded) = 0;
55 55
56 virtual size_t BytesPerSample() const = 0; 56 virtual size_t BytesPerSample() const = 0;
57 57
58 const char* GetCodecName() const override;
kwiberg-webrtc 2016/05/11 00:47:00 AudioEncoderPcm is also base class for the 16-bit
aleloi 2016/05/11 11:16:13 Acknowledged.
59
58 private: 60 private:
59 const int sample_rate_hz_; 61 const int sample_rate_hz_;
60 const size_t num_channels_; 62 const size_t num_channels_;
61 const int payload_type_; 63 const int payload_type_;
62 const size_t num_10ms_frames_per_packet_; 64 const size_t num_10ms_frames_per_packet_;
63 const size_t full_frame_samples_; 65 const size_t full_frame_samples_;
64 std::vector<int16_t> speech_buffer_; 66 std::vector<int16_t> speech_buffer_;
65 uint32_t first_timestamp_in_buffer_; 67 uint32_t first_timestamp_in_buffer_;
66 }; 68 };
67 69
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 size_t BytesPerSample() const override; 109 size_t BytesPerSample() const override;
108 110
109 private: 111 private:
110 static const int kSampleRateHz = 8000; 112 static const int kSampleRateHz = 8000;
111 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderPcmU); 113 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderPcmU);
112 }; 114 };
113 115
114 } // namespace webrtc 116 } // namespace webrtc
115 117
116 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_G711_AUDIO_ENCODER_PCM_H_ 118 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_G711_AUDIO_ENCODER_PCM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698