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

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: 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_video_decoder.cc
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index 14852fff22ebb1b8362de58038356f7fcbeb5371..8fd36b206bb0e5ad4e3385780043d8072ed3f0a8 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -284,7 +284,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:
@@ -295,7 +295,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;
}
@@ -307,15 +307,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;
@@ -340,15 +340,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