Пример #1
0
void video_uninit(struct dec_video *d_video)
{
    mp_image_unrefp(&d_video->waiting_decoded_mpi);
    mp_image_unrefp(&d_video->cover_art_mpi);
    if (d_video->vd_driver) {
        MP_VERBOSE(d_video, "Uninit video.\n");
        d_video->vd_driver->uninit(d_video);
    }
    vf_destroy(d_video->vfilter);
    talloc_free(d_video);
}
Пример #2
0
void video_uninit(struct dec_video *d_video)
{
    mp_image_unrefp(&d_video->waiting_decoded_mpi);
    if (d_video->vd_driver) {
        mp_msg(MSGT_DECVIDEO, MSGL_V, "Uninit video.\n");
        d_video->vd_driver->uninit(d_video);
    }
    talloc_free(d_video->priv);
    vf_destroy(d_video->vfilter);
    talloc_free(d_video);
}
Пример #3
0
static void recreate_video_filters(struct MPContext *mpctx)
{
    struct MPOpts *opts = mpctx->opts;
    struct dec_video *d_video = mpctx->d_video;
    assert(d_video);

    vf_destroy(d_video->vfilter);
    d_video->vfilter = vf_new(mpctx->global);
    d_video->vfilter->hwdec = &d_video->hwdec_info;

    vf_append_filter_list(d_video->vfilter, opts->vf_settings);

    // for vf_sub
    vf_control_any(d_video->vfilter, VFCTRL_SET_OSD_OBJ, mpctx->osd);
    osd_set_render_subs_in_filter(mpctx->osd,
                                  vf_control_any(d_video->vfilter, VFCTRL_INIT_OSD, NULL) == CONTROL_OK);

    set_allowed_vo_formats(d_video->vfilter, mpctx->video_out);
}
Пример #4
0
static void recreate_video_filters(struct MPContext *mpctx)
{
    struct MPOpts *opts = mpctx->opts;
    struct dec_video *d_video = mpctx->d_video;
    assert(d_video);

    vf_destroy(d_video->vfilter);
    d_video->vfilter = vf_new(mpctx->global);
    d_video->vfilter->hwdec = d_video->hwdec_info;
    d_video->vfilter->wakeup_callback = wakeup_playloop;
    d_video->vfilter->wakeup_callback_ctx = mpctx;
    d_video->vfilter->container_fps = d_video->fps;
    vo_control(mpctx->video_out, VOCTRL_GET_DISPLAY_FPS,
        &d_video->vfilter->display_fps);

    vf_append_filter_list(d_video->vfilter, opts->vf_settings);

    // for vf_sub
    osd_set_render_subs_in_filter(mpctx->osd,
        vf_control_any(d_video->vfilter, VFCTRL_INIT_OSD, mpctx->osd) > 0);

    set_allowed_vo_formats(d_video->vfilter, mpctx->video_out);
}