Lines Matching refs:vo

15 mpv --hwdec=rkmpp --vd-lavc-software-fallback=no --vo=xv test.mp4
79 @@ -177,6 +197,144 @@ static int xv_find_atom(struct vo *vo, uint32_t xv_port, const char *name,
83 +static int xv_check_dma_client(struct vo *vo)
85 + struct xvctx *ctx = vo->priv;
92 + atom = XInternAtom(vo->x11->display, XV_DMA_CLIENT_PROP, True);
94 + XvGetPortAttribute(vo->x11->display, ctx->xv_port, atom, &xv_value);
103 +static void xv_flush_dma_client(struct vo *vo)
105 + struct xvctx *ctx = vo->priv;
111 + atom = XInternAtom(vo->x11->display, XV_DMA_CLIENT_PROP, True);
113 + XvSetPortAttribute(vo->x11->display, ctx->xv_port,
115 + XvGetPortAttribute(vo->x11->display, ctx->xv_port, atom,
120 +static void xv_disable_dma_client(struct vo *vo)
122 + struct xvctx *ctx = vo->priv;
128 + atom = XInternAtom(vo->x11->display, XV_DMA_CLIENT_PROP, True);
130 + XvSetPortAttribute(vo->x11->display, ctx->xv_port, atom, 0);
135 +static void xv_send_dma_params(struct vo *vo, int hor_stride, int ver_stride)
137 + struct xvctx *ctx = vo->priv;
143 + atom = XInternAtom(vo->x11->display, XV_DMA_HOR_STRIDE_PROP, True);
147 + XvSetPortAttribute(vo->x11->display, ctx->xv_port, atom, hor_stride);
149 + atom = XInternAtom(vo->x11->display, XV_DMA_VER_STRIDE_PROP, True);
153 + XvSetPortAttribute(vo->x11->display, ctx->xv_port, atom, ver_stride);
158 + xv_disable_dma_client(vo);
162 +static void xv_send_dma_fd(struct vo *vo, int dma_fd)
164 + struct xvctx *ctx = vo->priv;
175 + xv_flush_dma_client(vo);
215 + xv_disable_dma_client(vo);
221 static int xv_set_eq(struct vo *vo, uint32_t xv_port, const char *name,
224 @@ -508,8 +666,10 @@ static int reconfig(struct vo *vo, struct mp_image_params *params)
225 MP_VERBOSE(vo, "using Xvideo port %d for hw scaling\n", ctx->xv_port);
230 deallocate_xvimage(vo, i);
236 @@ -683,6 +843,14 @@ static void wait_for_completion(struct vo *vo, int max_outstanding)
237 static void flip_page(struct vo *vo)
239 struct xvctx *ctx = vo->priv;
243 + xv_send_dma_fd(vo, dma_desc->dma_fd);
244 + xv_send_dma_params(vo, dma_desc->hor_stride, dma_desc->ver_stride);
248 put_xvimage(vo, ctx->xvimage[ctx->current_buf]);
251 @@ -701,6 +869,26 @@ static void draw_image(struct vo *vo, mp_image_t *mpi)
253 struct mp_image xv_buffer = get_xv_buffer(vo, ctx->current_buf);
255 + if (mpi->hwctx && !xv_check_dma_client(vo)) {
278 @@ -709,6 +897,7 @@ static void draw_image(struct vo *vo, mp_image_t *mpi)
279 struct mp_osd_res res = osd_res_from_image_params(vo->params);
280 osd_draw_on_image(vo->osd, res, mpi ? mpi->pts : 0, 0, &xv_buffer);
286 @@ -847,6 +1036,9 @@ static int preinit(struct vo *vo)
291 + xv_flush_dma_client(vo);
293 MP_WARN(vo, "Warning: this legacy VO has bad quality and performance, "