| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
| 6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "media/base/factory.h" | 10 #include "media/base/factory.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 virtual void OnSeek(base::TimeDelta time); | 32 virtual void OnSeek(base::TimeDelta time); |
| 33 | 33 |
| 34 virtual void OnDecode(Buffer* buffer); | 34 virtual void OnDecode(Buffer* buffer); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 friend class FilterFactoryImpl0<FFmpegVideoDecoder>; | 37 friend class FilterFactoryImpl0<FFmpegVideoDecoder>; |
| 38 friend class DecoderPrivateMock; | 38 friend class DecoderPrivateMock; |
| 39 friend class FFmpegVideoDecoderTest; | 39 friend class FFmpegVideoDecoderTest; |
| 40 FRIEND_TEST(FFmpegVideoDecoderTest, DecodeFrame_0ByteFrame); | 40 FRIEND_TEST(FFmpegVideoDecoderTest, DecodeFrame_0ByteFrame); |
| 41 FRIEND_TEST(FFmpegVideoDecoderTest, DecodeFrame_DecodeError); | 41 FRIEND_TEST(FFmpegVideoDecoderTest, DecodeFrame_DecodeError); |
| 42 FRIEND_TEST(FFmpegVideoDecoderTest, DecodeFrame_DiscontinuousBuffer); | |
| 43 FRIEND_TEST(FFmpegVideoDecoderTest, DecodeFrame_Normal); | 42 FRIEND_TEST(FFmpegVideoDecoderTest, DecodeFrame_Normal); |
| 44 FRIEND_TEST(FFmpegVideoDecoderTest, FindPtsAndDuration); | 43 FRIEND_TEST(FFmpegVideoDecoderTest, FindPtsAndDuration); |
| 45 FRIEND_TEST(FFmpegVideoDecoderTest, GetSurfaceFormat); | 44 FRIEND_TEST(FFmpegVideoDecoderTest, GetSurfaceFormat); |
| 46 FRIEND_TEST(FFmpegVideoDecoderTest, OnDecode_EnqueueVideoFrameError); | 45 FRIEND_TEST(FFmpegVideoDecoderTest, OnDecode_EnqueueVideoFrameError); |
| 47 FRIEND_TEST(FFmpegVideoDecoderTest, OnDecode_FinishEnqueuesEmptyFrames); | 46 FRIEND_TEST(FFmpegVideoDecoderTest, OnDecode_FinishEnqueuesEmptyFrames); |
| 48 FRIEND_TEST(FFmpegVideoDecoderTest, OnDecode_TestStateTransition); | 47 FRIEND_TEST(FFmpegVideoDecoderTest, OnDecode_TestStateTransition); |
| 48 FRIEND_TEST(FFmpegVideoDecoderTest, OnSeek); |
| 49 FRIEND_TEST(FFmpegVideoDecoderTest, TimeQueue_Ordering); | 49 FRIEND_TEST(FFmpegVideoDecoderTest, TimeQueue_Ordering); |
| 50 | 50 |
| 51 // FFmpeg outputs packets in decode timestamp (dts) order, which may not | 51 // FFmpeg outputs packets in decode timestamp (dts) order, which may not |
| 52 // always be in presentation timestamp (pts) order. Therefore, when Process | 52 // always be in presentation timestamp (pts) order. Therefore, when Process |
| 53 // is called we cannot assume that the pts of the input |buffer| passed to the | 53 // is called we cannot assume that the pts of the input |buffer| passed to the |
| 54 // OnDecode() method is necessarily the pts of video frame. For example: | 54 // OnDecode() method is necessarily the pts of video frame. For example: |
| 55 // | 55 // |
| 56 // Process() Timestamp Timestamp | 56 // Process() Timestamp Timestamp |
| 57 // Call # Buffer In Buffer Out | 57 // Call # Buffer In Buffer Out |
| 58 // 1 1 1 | 58 // 1 1 1 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 DecoderState state_; | 134 DecoderState state_; |
| 135 | 135 |
| 136 AVCodecContext* codec_context_; | 136 AVCodecContext* codec_context_; |
| 137 | 137 |
| 138 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); | 138 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 } // namespace media | 141 } // namespace media |
| 142 | 142 |
| 143 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ | 143 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ |
| OLD | NEW |