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

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, 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
« no previous file with comments | « media/filters/ffmpeg_glue_unittest.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_video_decoder.cc
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index 54c6cc118a180e32ceb0f5b42b4f6623f00b2c20..82891db128518376786852d7d5adbe3c958aa196 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -246,7 +246,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:
@@ -257,7 +257,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;
}
@@ -270,7 +270,7 @@ void FFmpegVideoDecoder::DecodeBuffer(
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;
@@ -295,15 +295,15 @@ bool FFmpegVideoDecoder::FFmpegDecode(
// 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|
« no previous file with comments | « media/filters/ffmpeg_glue_unittest.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698