| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/filters/ffmpeg_video_decoder.h" | 5 #include "media/filters/ffmpeg_video_decoder.h" |
| 6 | 6 |
| 7 #include "media/base/media_format.h" | 7 #include "media/base/media_format.h" |
| 8 #include "media/filters/ffmpeg_common.h" // For kFFmpegVideo. | 8 #include "media/ffmpeg/ffmpeg_common.h" // For kFFmpegVideo. |
| 9 #include "media/filters/ffmpeg_video_decode_engine.h" | 9 #include "media/filters/ffmpeg_video_decode_engine.h" |
| 10 | 10 |
| 11 namespace media { | 11 namespace media { |
| 12 | 12 |
| 13 FFmpegVideoDecoder::FFmpegVideoDecoder(FFmpegVideoDecodeEngine* engine) | 13 FFmpegVideoDecoder::FFmpegVideoDecoder(FFmpegVideoDecodeEngine* engine) |
| 14 : VideoDecoderImpl(engine) { | 14 : VideoDecoderImpl(engine) { |
| 15 } | 15 } |
| 16 | 16 |
| 17 FFmpegVideoDecoder::~FFmpegVideoDecoder() { | 17 FFmpegVideoDecoder::~FFmpegVideoDecoder() { |
| 18 } | 18 } |
| 19 | 19 |
| 20 // static | 20 // static |
| 21 FilterFactory* FFmpegVideoDecoder::CreateFactory() { | 21 FilterFactory* FFmpegVideoDecoder::CreateFactory() { |
| 22 return new FilterFactoryImpl1<FFmpegVideoDecoder, FFmpegVideoDecodeEngine*>( | 22 return new FilterFactoryImpl1<FFmpegVideoDecoder, FFmpegVideoDecodeEngine*>( |
| 23 new FFmpegVideoDecodeEngine()); | 23 new FFmpegVideoDecodeEngine()); |
| 24 } | 24 } |
| 25 | 25 |
| 26 // static | 26 // static |
| 27 bool FFmpegVideoDecoder::IsMediaFormatSupported(const MediaFormat& format) { | 27 bool FFmpegVideoDecoder::IsMediaFormatSupported(const MediaFormat& format) { |
| 28 std::string mime_type; | 28 std::string mime_type; |
| 29 return format.GetAsString(MediaFormat::kMimeType, &mime_type) && | 29 return format.GetAsString(MediaFormat::kMimeType, &mime_type) && |
| 30 mime_type::kFFmpegVideo == mime_type; | 30 mime_type::kFFmpegVideo == mime_type; |
| 31 } | 31 } |
| 32 | 32 |
| 33 } // namespace media | 33 } // namespace media |
| OLD | NEW |