diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-12-01 19:53:57 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-12-09 04:31:07 +0200 |
commit | 02efad79a28345e5814af1b60e0bb3c40cb5a941 (patch) | |
tree | 83c164e897ed46b24701f8190412d2883f085ba2 /libmpcodecs/dec_video.c | |
parent | 95f35c4d205daafe4797f28d7ec79f3ebb1952a1 (diff) | |
download | mpv-02efad79a28345e5814af1b60e0bb3c40cb5a941.tar.bz2 mpv-02efad79a28345e5814af1b60e0bb3c40cb5a941.tar.xz |
Update OSD while paused
When OSD contents change while paused, try to change the OSD drawn in
the currently visible frame. If such OSD updates are not supported
then advance by one frame and draw the OSD normally. Add some support
for OSD redrawing to vo xv.
The new xv code makes a copy of the original frame contents before
drawing the OSD if MPlayer is already paused when the frame is drawn.
If such a copy of the current frame exists then the frame contents can
be restored and a different OSD drawn on top of the same frame.
Diffstat (limited to 'libmpcodecs/dec_video.c')
-rw-r--r-- | libmpcodecs/dec_video.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 291859abb2..8cdc3e7b1d 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -6,6 +6,7 @@ #include <malloc.h> #endif #include <stdlib.h> +#include <stdbool.h> #include <unistd.h> #include "mp_msg.h" @@ -138,6 +139,14 @@ int set_rectangle(sh_video_t *sh_video, int param, int value) return 0; } +int redraw_osd(struct sh_video *sh_video, struct osd_state *osd) +{ + struct vf_instance *vf = sh_video->vfilter; + if (vf->control(vf, VFCTRL_REDRAW_OSD, osd) == true) + return 0; + return -1; +} + void resync_video_stream(sh_video_t *sh_video) { const struct vd_functions *vd = sh_video->vd_driver; |