author | Rob Clark <rob@ti.com> | |
Sun, 4 Dec 2011 06:57:12 +0000 (00:57 -0600) | ||
committer | Rob Clark <rob@ti.com> | |
Sun, 11 Dec 2011 23:51:04 +0000 (17:51 -0600) | ||
commit | d60cae73f2ea7c0d07ee5951801da97595ed5dd1 | |
tree | a2a5a48d30da444afc2701a263cdd002f781bfde | tree | snapshot (tar.xz tar.gz zip) |
parent | fdd74ac27deeefff2b4ff2a3588f8f2e90b6e24d | commit | diff |
ducatimpeg4dec/ducatividdec: implement DTS queue
When packed frames are used, the timestamps we get from demuxer are
actually PTS, not DTS. Detect this and fix up the timestamps on
the outgoing buffers.
This commit implements detection of packed frames (PB-frames) in
ducatimpeg4dec, and a DTS queue in the base ducatividdec (which
could be used by other decoders). When packed frames are detected,
we assume the demuxer doesn't properly understand B-frames, and
therefore timestamps from demuxer must actually be PTS timestamps.
Because the codec is unaware of this, and re-ordering frames to
display order, if we preserve the original timestamps the video
sink ends up seeing timestamps out of order. To work around this
we pop the DTS from the demuxer out of a queue and use that
instead.
When packed frames are used, the timestamps we get from demuxer are
actually PTS, not DTS. Detect this and fix up the timestamps on
the outgoing buffers.
This commit implements detection of packed frames (PB-frames) in
ducatimpeg4dec, and a DTS queue in the base ducatividdec (which
could be used by other decoders). When packed frames are detected,
we assume the demuxer doesn't properly understand B-frames, and
therefore timestamps from demuxer must actually be PTS timestamps.
Because the codec is unaware of this, and re-ordering frames to
display order, if we preserve the original timestamps the video
sink ends up seeing timestamps out of order. To work around this
we pop the DTS from the demuxer out of a queue and use that
instead.
src/gstducatimpeg4dec.c | diff | blob | history | |
src/gstducatividdec.c | diff | blob | history | |
src/gstducatividdec.h | diff | blob | history |