Esempio n. 1
0
static int
tc_anop_update(const opengl_tex_converter_t *tc, const GLuint *textures,
               unsigned width, unsigned height,
               const picture_t *pic, const size_t *plane_offset)
{
    (void) width; (void) height; (void) plane_offset;

    if (plane_offset != NULL)
        return VLC_EGENERIC;

    if (!pic->p_sys->b_locked)
        return VLC_SUCCESS;

    struct priv *priv = tc->priv;

    AndroidOpaquePicture_Release(pic->p_sys, true);

    if (SurfaceTexture_waitAndUpdateTexImage(priv->stex, &priv->transform_mtx)
        != VLC_SUCCESS)
    {
        priv->transform_mtx = NULL;
        return VLC_EGENERIC;
    }

    glActiveTexture(GL_TEXTURE0);
    glBindTexture(tc->tex_target, textures[0]);

    return VLC_SUCCESS;
}
Esempio n. 2
0
static void
pool_unlock_pic(picture_t *p_pic)
{
    picture_sys_t *p_picsys = p_pic->p_sys;
    if (p_picsys->b_locked)
    {
        AndroidOpaquePicture_Release(p_picsys, false);
        p_picsys->b_locked  = false;
    }
}
Esempio n. 3
0
static void UnlockPicture(picture_t *p_pic, bool b_render)
{
    picture_sys_t *p_picsys = p_pic->p_sys;
    vout_display_sys_t *sys = p_picsys->p_vd_sys;

    if (p_picsys->b_locked)
    {
        if (sys->p_window->b_opaque)
            AndroidOpaquePicture_Release(p_picsys, b_render);
        else
            AndroidWindow_UnlockPicture(sys, sys->p_window, p_pic, b_render);
        p_picsys->b_locked  = false;
    }
}
Esempio n. 4
0
static void Display(vout_display_t *vd, picture_t *picture)
{
    vout_display_sys_t *sys = vd->sys;
    VLC_UNUSED(picture);

    if (sys->p_window->b_opaque)
        AndroidOpaquePicture_Release(picture->p_sys, true);
    else
        AndroidWindow_UnlockPicture(sys, sys->p_window, picture);

    if (sys->p_sub_pic)
        AndroidWindow_UnlockPicture(sys, sys->p_sub_window, sys->p_sub_pic);

    sys->b_displayed = true;
}
Esempio n. 5
0
static void PoolUnlockOpaquePicture(picture_t *p_pic)
{
    picture_sys_t *p_picsys = p_pic->p_sys;

    AndroidOpaquePicture_Release(p_picsys, false);
}