summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-09-19 00:28:17 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-09-19 00:28:17 +0300
commit3f215c9f8e4d5d95ac9b45376460391669906236 (patch)
tree1f675ef31908400c3411ace5182ca015c57000aa /libmpcodecs
parent82bbf1a1ab1affc675e9b69b93e33accfa2ed0b8 (diff)
parentc2d0a9c8a78b20ed8e96ff5a7d3e8c936b82cae1 (diff)
downloadmpv-3f215c9f8e4d5d95ac9b45376460391669906236.tar.bz2
mpv-3f215c9f8e4d5d95ac9b45376460391669906236.tar.xz
Merge branch 'vdpau' into build
* vdpau: (22 commits) VO: Prefer vo_vdpau over vo_xv again vo_vdpau: Fix X event handling bugs vo_vdpau: Fix memory corruption bug with MP_IMGTYPE_NUMBERED core/VO: Allow VO drivers to add/modify frames video_out.h: Cosmetics VO interface: Remove obsolete draw_frame() from new interface vo_vdpau: Support recovering from VDPAU display preemption vo_vdpau: Support updating OSD while paused vo_vdpau.c: Reindent control() switch statement vo_vdpau: Allocate one large surface for EOSD content vo_vdpau.c: cosmetics vo_vdpau: reindent after GUI code removal vo_vpdau: Clean up uninit logic vo_vdpau: Make CHECK_ST macro safer vo_vdpau: Move all remaining static/global variables to context vo_vdpau: Move things to context struct vo_vdpau: Make info struct const vo_vdpau: Replace global function table with context variable vo_vdpau: Move VDPAU interface pointers into one struct vo_vdpau: Add template file for VDPAU functions ...
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf.h1
-rw-r--r--libmpcodecs/vf_vo.c16
2 files changed, 6 insertions, 11 deletions
diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h
index 99321b3afa..099135c5da 100644
--- a/libmpcodecs/vf.h
+++ b/libmpcodecs/vf.h
@@ -88,7 +88,6 @@ typedef struct vf_seteq_s
#define VFCTRL_SCREENSHOT 14 /* Make a screenshot */
#define VFCTRL_INIT_EOSD 15 /* Select EOSD renderer */
#define VFCTRL_DRAW_EOSD 16 /* Render EOSD */
-#define VFCTRL_GET_PTS 17 /* Return last pts value that reached vf_vo*/
#define VFCTRL_SET_DEINTERLACE 18 /* Set deinterlacing status */
#define VFCTRL_GET_DEINTERLACE 19 /* Get deinterlacing status */
/* Hack to make the OSD state object available to vf_expand which accesses
diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c
index 7b3e16224f..c782a5517b 100644
--- a/libmpcodecs/vf_vo.c
+++ b/libmpcodecs/vf_vo.c
@@ -22,7 +22,6 @@ extern int sub_visibility;
extern float sub_delay;
struct vf_priv_s {
- double pts;
struct vo *vo;
#ifdef CONFIG_ASS
ASS_Renderer *ass_priv;
@@ -127,7 +126,7 @@ static int control(struct vf_instance* vf, int request, void* data)
case VFCTRL_DRAW_EOSD:
{
mp_eosd_images_t images = {NULL, 2};
- double pts = vf->priv->pts;
+ double pts = video_out->next_pts;
if (!video_out->config_ok || !vf->priv->ass_priv) return CONTROL_FALSE;
if (sub_visibility && vf->priv->ass_priv && ass_track && (pts != MP_NOPTS_VALUE)) {
mp_eosd_res_t res;
@@ -148,11 +147,6 @@ static int control(struct vf_instance* vf, int request, void* data)
return vo_control(video_out, VOCTRL_DRAW_EOSD, &images) == VO_TRUE;
}
#endif
- case VFCTRL_GET_PTS:
- {
- *(double *)data = vf->priv->pts;
- return CONTROL_TRUE;
- }
}
return CONTROL_UNKNOWN;
}
@@ -179,10 +173,9 @@ static void get_image(struct vf_instance* vf,
static int put_image(struct vf_instance* vf,
mp_image_t *mpi, double pts){
if(!video_out->config_ok) return 0; // vo not configured?
- // record pts (potentially modified by filters) for main loop
- vf->priv->pts = pts;
// first check, maybe the vo/vf plugin implements draw_image using mpi:
- if (vo_control(video_out, VOCTRL_DRAW_IMAGE,mpi)==VO_TRUE) return 1; // done.
+ if (vo_draw_image(video_out, mpi, pts) >= 0)
+ return 1;
// nope, fallback to old draw_frame/draw_slice:
if(!(mpi->flags&(MP_IMGFLAG_DIRECT|MP_IMGFLAG_DRAW_CALLBACK))){
// blit frame:
@@ -210,6 +203,9 @@ static void draw_slice(struct vf_instance* vf,
static void uninit(struct vf_instance* vf)
{
if (vf->priv) {
+ /* Allow VO (which may live on to work with another instance of vf_vo)
+ * to get rid of numbered-mpi references that will now be invalid. */
+ vo_control(video_out, VOCTRL_RESET, NULL);
#ifdef CONFIG_ASS
if (vf->priv->ass_priv)
ass_renderer_done(vf->priv->ass_priv);