| Index: media/filters/ffmpeg_video_decoder.cc
|
| diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
|
| index 6fcbdffce40fa669fc04d4453aa44a906ee3b9eb..c6409ba33106474f2bf04dd2e8c431d5479126a6 100644
|
| --- a/media/filters/ffmpeg_video_decoder.cc
|
| +++ b/media/filters/ffmpeg_video_decoder.cc
|
| @@ -12,7 +12,6 @@
|
| #include "media/base/filters.h"
|
| #include "media/base/filter_host.h"
|
| #include "media/base/limits.h"
|
| -#include "media/base/media_format.h"
|
| #include "media/base/video_frame.h"
|
| #include "media/ffmpeg/ffmpeg_common.h"
|
| #include "media/video/ffmpeg_video_decode_engine.h"
|
| @@ -95,13 +94,6 @@ void FFmpegVideoDecoder::OnInitializeComplete(const VideoCodecInfo& info) {
|
| AutoCallbackRunner done_runner(initialize_callback_.release());
|
|
|
| if (info.success) {
|
| - media_format_.SetAsInteger(MediaFormat::kWidth,
|
| - info.stream_info.surface_width);
|
| - media_format_.SetAsInteger(MediaFormat::kHeight,
|
| - info.stream_info.surface_height);
|
| - media_format_.SetAsInteger(
|
| - MediaFormat::kSurfaceFormat,
|
| - static_cast<int>(info.stream_info.surface_format));
|
| state_ = kNormal;
|
| } else {
|
| host()->SetError(PIPELINE_ERROR_DECODE);
|
| @@ -272,10 +264,6 @@ void FFmpegVideoDecoder::OnReadCompleteTask(scoped_refptr<Buffer> buffer) {
|
| decode_engine_->ConsumeVideoSample(buffer);
|
| }
|
|
|
| -const MediaFormat& FFmpegVideoDecoder::media_format() {
|
| - return media_format_;
|
| -}
|
| -
|
| void FFmpegVideoDecoder::ProduceVideoFrame(
|
| scoped_refptr<VideoFrame> video_frame) {
|
| if (MessageLoop::current() != message_loop_) {
|
| @@ -352,6 +340,16 @@ bool FFmpegVideoDecoder::ProvidesBuffer() {
|
| return info_.provides_buffers;
|
| }
|
|
|
| +int FFmpegVideoDecoder::width() {
|
| + DCHECK(info_.success);
|
| + return info_.stream_info.surface_width;
|
| +}
|
| +
|
| +int FFmpegVideoDecoder::height() {
|
| + DCHECK(info_.success);
|
| + return info_.stream_info.surface_height;
|
| +}
|
| +
|
| void FFmpegVideoDecoder::FlushBuffers() {
|
| while (!frame_queue_flushed_.empty()) {
|
| scoped_refptr<VideoFrame> video_frame;
|
|
|