From cf8a3ca85acf493baf39650dc1b1bb70c1341948 Mon Sep 17 00:00:00 2001 From: "scherkus@chromium.org" Date: Wed, 27 Apr 2011 18:28:06 +0000 Subject: Refactor PTS processing logic from FFmpegVideoDecoder::FindPtsAndDuration() into PtsStream. This simplifies its reuse in other video decoders. An instance of this class is added to OmxVideoDecoder filter. The PTS processing is mostly left intact. The only difference is addition of PtsStream::Seek() method, which resets the current PTS. Without this method seeking brakes AV synchronization if the video decoder relies on last known PTS and frame rate to calculate timestamps for decoded frames. Patch by ostrovsm@gmail.com: http://codereview.chromium.org/6902032/ BUG=none TEST=The easiest way I found to reproduce the problem is to use an .avi file. It doesn't happen all the time but sometimes AVI demuxer reports invalid timestamps for video packets, and the decoder heavily relies on the PTS estimation logic (last PTS + frame rate). A sample file that triggers the behavior can be downloaded from [1]. The FFmpeg library has to be reconfigured to support MPEG4 decoding and AVI demuxing. Also to simplify the experiment "video/x-msvideo" has to be added to the list of supported media types in net/base/mime_util.cc. [1] http://www.dvdloc8.com/clip.php?movieid=284&clipid=1 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83180 0039d316-1c4b-4281-b951-d872f2087c98 --- media/media.gyp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'media/media.gyp') diff --git a/media/media.gyp b/media/media.gyp index 31961e8..a72afde 100644 --- a/media/media.gyp +++ b/media/media.gyp @@ -116,6 +116,8 @@ 'base/pipeline_status.h', 'base/pts_heap.cc', 'base/pts_heap.h', + 'base/pts_stream.cc', + 'base/pts_stream.h', 'base/seekable_buffer.cc', 'base/seekable_buffer.h', 'base/state_matrix.cc', @@ -375,6 +377,7 @@ 'base/mock_task.h', 'base/pipeline_impl_unittest.cc', 'base/pts_heap_unittest.cc', + 'base/pts_stream_unittest.cc', 'base/run_all_unittests.cc', 'base/seekable_buffer_unittest.cc', 'base/state_matrix_unittest.cc', -- cgit v1.1