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

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

Issue 25546003: Revert 226264 "Be able to build cast_unittest and related target..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
Index: trunk/src/media/cast/audio_sender/audio_encoder.cc
===================================================================
--- trunk/src/media/cast/audio_sender/audio_encoder.cc (revision 226266)
+++ trunk/src/media/cast/audio_sender/audio_encoder.cc (working copy)
@@ -35,7 +35,7 @@
uint32 timestamp,
const uint8* payload_data,
uint16 payload_size,
- const webrtc::RTPFragmentationHeader* /*fragmentation*/) OVERRIDE {
+ const webrtc::RTPFragmentationHeader* /*fragmentation*/) {
scoped_ptr<EncodedAudioFrame> audio_frame(new EncodedAudioFrame());
audio_frame->codec = codec_;
audio_frame->samples = timestamp - last_timestamp_;
@@ -110,6 +110,7 @@
}
AudioEncoder::~AudioEncoder() {
+ webrtc::AudioCodingModule::Destroy(audio_encoder_);
}
// Called from main cast thread.
@@ -131,12 +132,12 @@
const base::Closure release_callback) {
DCHECK(cast_thread_->CurrentlyOn(CastThread::AUDIO_ENCODER));
int samples_per_10ms = audio_frame->frequency / 100;
- size_t number_of_10ms_blocks = audio_frame->samples.size() /
+ int 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 (size_t i = 0; i < number_of_10ms_blocks; ++i) {
+ for (int i = 0; i < number_of_10ms_blocks; ++i) {
webrtc::AudioFrame webrtc_audio_frame;
webrtc_audio_frame.timestamp_ = timestamp_;
@@ -162,7 +163,7 @@
// Not all insert of 10 ms will generate a callback with encoded data.
webrtc_encoder_callback_->SetEncodedCallbackInfo(recorded_time,
&frame_encoded_callback);
- for (size_t i = 0; i < number_of_10ms_blocks; ++i) {
+ for (int i = 0; i < number_of_10ms_blocks; ++i) {
audio_encoder_->Process();
}
}
« no previous file with comments | « trunk/src/media/cast/audio_sender/audio_encoder.h ('k') | trunk/src/media/cast/audio_sender/audio_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698