Posts: 6,810
Joined: Jul 2010
Reputation:
198
Decoder can drop any frame in the queue but it should report the correct pts when player calls GetCodecStats. Assume player request a drop and decoder drops the 10th frame in the queue. It will take a while for this action to be visible at render stage. Player does account for this delay but need to know the correct pts to do so.
If DVD_CODEC_CTRL_DROP is set on iFlags, decoder should either drop this particular frame or set DVP_FLAG_DROPPED on this frame. This is primarily used for accurate seeks.
Posts: 5,952
Joined: Sep 2008
Reputation:
201
Koying
Retired Team-Kodi Member
Posts: 5,952
2016-10-26, 12:51
(This post was last modified: 2016-10-26, 12:59 by Koying.)
Mmm... DVD_CODEC_CTRL_DROP *is* new, isn't it?
As a matter of fact, looks like ffmpeg is the only one implementing it.
What the relation between DVD_CODEC_CTRL_DROP and SetDropState?
PS: At first sight, they do the same.
And SetDropState would do what you describe in the codec BUT the pts would be wrong. Will fix...
Posts: 6,810
Joined: Jul 2010
Reputation:
198
DVD_CODEC_CTRL_DROP is mandatory, this frame must not be rendered. Hence drop or set dropped flag. Assume we want to seek to a frame somewhere past next i-frame. We need to decode to this frame but don't want to show any frame prior to the desired one.
SetDropState is a request if possible. There are codecs that don't support dropping of non-ref frames. In this case output stage will skip frames. Less efficient than dropping in decoder.