Chromium Code Reviews| Index: media/filters/ffmpeg_video_decoder.h |
| diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h |
| index 07cf2be2475eca53e6b2add3fdbaa8b4574a1731..014c206d173517fccb48c35c514e7549c5549ab1 100644 |
| --- a/media/filters/ffmpeg_video_decoder.h |
| +++ b/media/filters/ffmpeg_video_decoder.h |
| @@ -29,8 +29,21 @@ class ScopedPtrAVFreeFrame; |
| class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder { |
| public: |
| - explicit FFmpegVideoDecoder( |
| - const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| + // Threading mode determines how frames should be distributed between |
| + // decoding threads. |
| + enum ThreadingMode { |
| + // Each thread decode a single frame and multiple frames may be decoded in |
|
Ami GONE FROM CHROMIUM
2014/01/28 07:17:10
s/decode/decodes/
|
| + // parallel. In this mode FFmpeg will delay N-1 frames when using N threads. |
| + THREADING_FRAME, |
| + |
| + // Each frame is distributed between decode threads. If the video contains |
| + // only one slice per frame then only one thread will be used for decoding. |
| + THREADING_SLICE, |
| + }; |
| + |
| + FFmpegVideoDecoder( |
| + const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
| + ThreadingMode threading_mode); |
| virtual ~FFmpegVideoDecoder(); |
| // VideoDecoder implementation. |
| @@ -72,6 +85,8 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder { |
| void DoReset(); |
| scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| + ThreadingMode threading_mode_; |
| + |
| base::WeakPtrFactory<FFmpegVideoDecoder> weak_factory_; |
| base::WeakPtr<FFmpegVideoDecoder> weak_this_; |