vo_opengl_cb: add a "block" framedrop mode and make it default

(I have no idea why there are different modes.)

Instead of risking to drop frames too early, give it some margin. Since
there are situations this could deadlock, wait with a timeout. This can
happen if e.g. the API user is refusing to render anything, or if
uninitialization is happening.
This commit is contained in:
wm4
2015-05-12 22:16:19 +02:00
parent 4d9255a5e1
commit ee3de1a063
2 changed files with 31 additions and 7 deletions

View File

@@ -898,13 +898,15 @@ Available video output drivers are:
``frame-queue-size=<1..100>``
The maximum count of frames which the frame queue can hold (default: 1)
``frame-drop-mode=<pop|clear>``
``frame-drop-mode=<pop|clear|block>``
Select the behavior when the frame queue is full.
pop
Drop the oldest frame in the frame queue. (default)
Drop the oldest frame in the frame queue.
clear
Drop all frames in the frame queue.
block
Wait for a short time, behave like ``clear`` on timeout. (default)
This also supports many of the suboptions the ``opengl`` VO has. Run
``mpv --vo=opengl-cb:help`` for a list.