Skip to content
Snippets Groups Projects

Draft: picture flags cleanup

Open Steve Lhomme requested to merge robUx4/vlc:vout-force-flag into master
2 unresolved threads

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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 */
  • Steve Lhomme mentioned in merge request !1808 (merged)

    mentioned in merge request !1808 (merged)

  • Steve Lhomme added 3120 commits

    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

    Compare with previous version

  • Steve Lhomme added 36 commits

    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

    Compare with previous version

  • Steve Lhomme mentioned in merge request !4039

    mentioned in merge request !4039

  • Steve Lhomme mentioned in merge request !5810 (merged)

    mentioned in merge request !5810 (merged)

      • avoids forcing the first decoded picture

      This will cause seek to not display the first picture, thus make the seek feel slow for a lot of users.

    • Author Developer

      We can do all we want with the pictures ready to display. But it's not up to the decoder to force the display to show the first frame that was decoded.

      That display policy should be the exclusive responsibility of the vout thread. Including what to do after a seek.

    • I very much tend to disagree as in my paradigm, the "policy" is actually the usage made by users of the vout, which is exactly the decoder. There's no reason to have such policy in the video output and have it infect other users like visualization.

    • Author Developer

      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.

    • Author Developer

      Another use-case: ultra-low latency. You my not care at all if some pictures are late or not, you just display them ASAP.

    • I know about this. I find that it's pretty unrelated to the current thread.

    • Please register or sign in to reply
  • Please register or sign in to reply
    Loading