Draft: picture flags cleanup
The b_still
and b_force
picture flags are confusing (to me). The names and the (none) documentation don't really explain what they do.
They are used actually used for
- still pictures
- pictures that way not have a frame after (EOS)
- "first" pictures the decoder wants to display (not its choice to decide)
This patchset
- adds some doc for each flag
- avoids forcing the first decoded picture
- does not flush the vout+filter+clock on EOS (!)
- merge the 2 flags which end up having exactly the same consequences
In the end it's a flag that signals there might not be a picture following this picture, at least for a while (EOS or still pictures). The vout can decide how to best handle them (less likely to drop).
Also simplify the vout flush calls which now all mean the same (there's a suspicious call at the end of preroll but it's unrelated to this patch).
draft: branch on top of !629 and !630 (merged).
Merge request reports
Activity
changed milestone to %4.0
added Component::Core: Video output label
134 134 * but should never be written directly */ 135 135 /**@{*/ 136 136 vlc_tick_t date; /**< display date */ 137 bool b_force; 138 bool b_still; 137 bool b_eos; /**< end of stream / displayed for a while */ changed this line in version 6 of the diff
mentioned in merge request !1808 (merged)
added 3120 commits
-
56e002af...dd8c8e03 - 3098 commits from branch
videolan:master
- fa5eb601 - video_output: copy the redisplay handling in the if/else branch
- bc02ddae - video_output: simplify the return value when redisplaying the first pic
- f4da2bdd - video_output: remove tautoligical tests
- 6eadcaab - video_output: copy the redisplay return value in displayed.date code
- 6fab44a6 - video_output: remove tautological tests
- d42f19cc - video_output: set render_now on late redisplay explictly
- 05a821fd - video_output: don't set render_now at all on late redisplay
- afb2f730 - video_output: only use the forced flag when render_now was not true
- 5e7effe1 - video_output: copy the redisplay return value in next != NULL code
- 28957e81 - video_output: remove global return redisplay test
- b6fa8316 - video_output: remove tautological always false test
- ccc5a364 - video_output: copy the RenderPicture code in displayed.date code
- cd953afd - video_output: move remaining RenderPicture in the only code that get there
- 899af979 - video_output: make render_now local
- 0b7a6e27 - video_output: move return VLC_TICK_INVALID in the only place it's used
- 86dc564a - video_output: remove unused date_refresh in next picture handling
- 4475e7b7 - video_output: make date_refresh local in the only block it's used
- 083c9ae4 - video_output: make refresh local in the only block it's used
- 527c7668 - video_output: remove local refresh variable
- 1436972b - video_output: inverse the return logic in the next picture code
- 43641754 - video_output: fallback to a common return value
- dbf70409 - video_output: remove special case to return on first picture
Toggle commit list-
56e002af...dd8c8e03 - 3098 commits from branch
added 36 commits
- 834d6efa - video_output: copy the redisplay handling in the if/else branch
- 48500c4a - video_output: simplify the return value when redisplaying the first pic
- bf3733f7 - video_output: remove tautoligical tests
- 1cdd2414 - video_output: copy the redisplay return value in displayed.date code
- ad3b2831 - video_output: remove tautological tests
- bf59f29c - video_output: set render_now on late redisplay explictly
- 80572b33 - video_output: don't set render_now at all on late redisplay
- 0457cd6e - video_output: only use the forced flag when render_now was not true
- d3b5ce7d - video_output: copy the redisplay return value in next != NULL code
- e3500d59 - video_output: remove global return redisplay test
- 85471c7e - video_output: remove tautological always false test
- 09004fff - video_output: copy the RenderPicture code in displayed.date code
- a8ea2c27 - video_output: move remaining RenderPicture in the only code that get there
- 73930116 - video_output: make render_now local
- acd614ef - video_output: move return VLC_TICK_INVALID in the only place it's used
- cf8e9ab5 - video_output: remove unused date_refresh in next picture handling
- 7275f61d - video_output: make date_refresh local in the only block it's used
- 5f01226a - video_output: make refresh local in the only block it's used
- c459a856 - video_output: remove local refresh variable
- 43574c45 - video_output: inverse the return logic in the next picture code
- 77f20a4a - video_output: fallback to a common return value
- 74114bfc - video_output: remove special case to return on first picture
- 1637870b - video_output: never drop the first frame
- 0b63ddbd - video_output: always render the first frame immediately
- 2fb20f7b - video_output: don't drop still frames if they are late
- bfcc55dd - decoder: don't mark the "first" picture as b_force
- 934291e8 - avcodec: don't mark the first picture as b_force
- 0d6bff07 - avcodec: don't mark End Of Stream pictures as forced
- f26818a6 - picture: document b_force and b_still flags
- 3c53bdcc - video_output: don't display replace_by_next pictures right away
- 97c6c911 - decoder: don't flush the video output before pushing a b_still picture
- ce801759 - picture: merge b_still and b_force flags
- 168eb795 - vout: merge vout_Flush and vout_FlushAll
- d6b2f5b1 - video_output: rename the parameter allowing dropping frames in PreparePicture()
- 5a8993cd - video_output: rename date_refesh to system_prepare_deadline
- 501c08ea - video_output: get rid of the render_now variable
Toggle commit listmentioned in merge request !4039
mentioned in merge request !5810 (merged)
The late frame displaying is one example of such policy and I don't think it's not up to the decoder or the visualizer to decide what to do.
And by the way the same kind of policy should also apply to encoders (which IMO are just a kind of "video output") but we can talk about that later.