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

Unified Diff: media/cast/audio_sender/audio_encoder.cc

Issue 25544003: Fix code style and gyp files in cast to build cast_unittest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed gyp files Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/audio_sender/audio_encoder.h ('k') | media/cast/audio_sender/audio_encoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/audio_sender/audio_encoder.cc
diff --git a/media/cast/audio_sender/audio_encoder.cc b/media/cast/audio_sender/audio_encoder.cc
index 15517fac20dd297beffe0e6cb39f3ca33aa9a072..8853e2a118cbf2ad2a80e55756f852cb739694f8 100644
--- a/media/cast/audio_sender/audio_encoder.cc
+++ b/media/cast/audio_sender/audio_encoder.cc
@@ -35,7 +35,7 @@ class WebrtEncodedDataCallback : public webrtc::AudioPacketizationCallback {
uint32 timestamp,
const uint8* payload_data,
uint16 payload_size,
- const webrtc::RTPFragmentationHeader* /*fragmentation*/) {
+ const webrtc::RTPFragmentationHeader* /*fragmentation*/) OVERRIDE {
scoped_ptr<EncodedAudioFrame> audio_frame(new EncodedAudioFrame());
audio_frame->codec = codec_;
audio_frame->samples = timestamp - last_timestamp_;
@@ -110,7 +110,6 @@ AudioEncoder::AudioEncoder(scoped_refptr<CastThread> cast_thread,
}
AudioEncoder::~AudioEncoder() {
- webrtc::AudioCodingModule::Destroy(audio_encoder_);
}
// Called from main cast thread.
@@ -132,12 +131,12 @@ void AudioEncoder::EncodeAudioFrameThread(
const base::Closure release_callback) {
DCHECK(cast_thread_->CurrentlyOn(CastThread::AUDIO_ENCODER));
int samples_per_10ms = audio_frame->frequency / 100;
- int number_of_10ms_blocks = audio_frame->samples.size() /
+ size_t number_of_10ms_blocks = audio_frame->samples.size() /
(samples_per_10ms * audio_frame->channels);
DCHECK(webrtc::AudioFrame::kMaxDataSizeSamples > samples_per_10ms)
<< "webrtc sanity check failed";
- for (int i = 0; i < number_of_10ms_blocks; ++i) {
+ for (size_t i = 0; i < number_of_10ms_blocks; ++i) {
webrtc::AudioFrame webrtc_audio_frame;
webrtc_audio_frame.timestamp_ = timestamp_;
@@ -163,7 +162,7 @@ void AudioEncoder::EncodeAudioFrameThread(
// Not all insert of 10 ms will generate a callback with encoded data.
webrtc_encoder_callback_->SetEncodedCallbackInfo(recorded_time,
&frame_encoded_callback);
- for (int i = 0; i < number_of_10ms_blocks; ++i) {
+ for (size_t i = 0; i < number_of_10ms_blocks; ++i) {
audio_encoder_->Process();
}
}
« no previous file with comments | « media/cast/audio_sender/audio_encoder.h ('k') | media/cast/audio_sender/audio_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698