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

Unified Diff: media/filters/ffmpeg_video_decoder.cc

Issue 17408005: Refactored DecoderBuffer to use unix_hacker_style naming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@localrefactor
Patch Set: Rebased against origin/master Created 7 years, 5 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_video_decoder.cc
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index 8131d07c075ea86f643f7196cb589eeef5e3d216..dc31f69bd87b5dbcd1466eeea4b3d9c5eebb4468 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -288,7 +288,7 @@ void FFmpegVideoDecoder::DecodeBuffer(
// These are the possible state transitions.
//
// kNormal -> kFlushCodec:
- // When buffer->IsEndOfStream() is first true.
+ // When buffer->end_of_stream() is first true.
// kNormal -> kError:
// A decoding error occurs and decoding needs to stop.
// kFlushCodec -> kDecodeFinished:
@@ -299,7 +299,7 @@ void FFmpegVideoDecoder::DecodeBuffer(
// Any time Reset() is called.
// Transition to kFlushCodec on the first end of stream buffer.
- if (state_ == kNormal && buffer->IsEndOfStream()) {
+ if (state_ == kNormal && buffer->end_of_stream()) {
state_ = kFlushCodec;
}
@@ -311,15 +311,15 @@ void FFmpegVideoDecoder::DecodeBuffer(
}
// Any successful decode counts!
- if (!buffer->IsEndOfStream() && buffer->GetDataSize() > 0) {
+ if (!buffer->end_of_stream() && buffer->data_size() > 0) {
PipelineStatistics statistics;
- statistics.video_bytes_decoded = buffer->GetDataSize();
+ statistics.video_bytes_decoded = buffer->data_size();
statistics_cb_.Run(statistics);
}
if (!video_frame.get()) {
if (state_ == kFlushCodec) {
- DCHECK(buffer->IsEndOfStream());
+ DCHECK(buffer->end_of_stream());
state_ = kDecodeFinished;
base::ResetAndReturn(&read_cb_).Run(kOk, VideoFrame::CreateEmptyFrame());
return;
@@ -344,15 +344,15 @@ bool FFmpegVideoDecoder::Decode(
// Due to FFmpeg API changes we no longer have const read-only pointers.
AVPacket packet;
av_init_packet(&packet);
- if (buffer->IsEndOfStream()) {
+ if (buffer->end_of_stream()) {
packet.data = NULL;
packet.size = 0;
} else {
- packet.data = const_cast<uint8*>(buffer->GetData());
- packet.size = buffer->GetDataSize();
+ packet.data = const_cast<uint8*>(buffer->data());
+ packet.size = buffer->data_size();
// Let FFmpeg handle presentation timestamp reordering.
- codec_context_->reordered_opaque = buffer->GetTimestamp().InMicroseconds();
+ codec_context_->reordered_opaque = buffer->timestamp().InMicroseconds();
// This is for codecs not using get_buffer to initialize
// |av_frame_->reordered_opaque|

Powered by Google App Engine
This is Rietveld 408576698