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

Unified Diff: media/filters/ffmpeg_audio_decoder.cc

Issue 17315021: Refactored DataBuffer to use unix_hacker style methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor DataBuffer Created 7 years, 6 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: media/filters/ffmpeg_audio_decoder.cc
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index f8cea3888a75ddd132f1349051a198954c1c4621..66544c31b51aff5351b05b3aa4ebe29528971182 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -470,25 +470,25 @@ void FFmpegAudioDecoder::RunDecodeLoop(
}
output = new DataBuffer(decoded_audio_size);
- output->SetDataSize(decoded_audio_size);
+ output->set_data_size(decoded_audio_size);
DCHECK_EQ(frames_to_interleave, converter_bus_->frames() - skip_frames);
converter_bus_->ToInterleavedPartial(
skip_frames, frames_to_interleave, bits_per_channel_ / 8,
- output->GetWritableData());
+ output->get_writable_data());
} else {
- output = DataBuffer::CopyFrom(
+ output = DataBuffer::copy_from(
av_frame_->extended_data[0] + start_sample * bytes_per_frame_,
decoded_audio_size);
}
- output->SetTimestamp(output_timestamp_helper_->GetTimestamp());
- output->SetDuration(
+ output->set_timestamp(output_timestamp_helper_->GetTimestamp());
+ output->set_duration(
output_timestamp_helper_->GetDuration(decoded_audio_size));
output_timestamp_helper_->AddBytes(decoded_audio_size);
} else if (IsEndOfStream(result, decoded_audio_size, input) &&
!skip_eos_append) {
DCHECK_EQ(packet.size, 0);
- output = DataBuffer::CreateEOSBuffer();
+ output = DataBuffer::create_eos_buffer();
}
if (output.get()) {

Powered by Google App Engine
This is Rietveld 408576698