vlc_vout_wrapper.h 3.23 KB
Newer Older
1 2 3 4 5 6 7 8
/*****************************************************************************
 * vlc_vout_wrapper.h: definitions for vout wrappers (temporary)
 *****************************************************************************
 * Copyright (C) 2009 Laurent Aimar
 * $Id$
 *
 * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
 *
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
9 10 11
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
12 13 14 15
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
16 17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
18
 *
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
19 20 21
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 23 24 25 26 27 28
 *****************************************************************************/

#ifndef VLC_VOUT_WRAPPER_H
#define VLC_VOUT_WRAPPER_H 1

#include <vlc_vout_display.h>

Pierre Ynard's avatar
Pierre Ynard committed
29
/* XXX DO NOT use it outside the vout module wrapper XXX */
30 31

/**
32
 * It retreives a picture pool from the display
33
 */
34
static inline picture_pool_t *vout_display_Pool(vout_display_t *vd, unsigned count)
35
{
36
    return vd->pool(vd, count);
37 38 39 40 41
}

/**
 * It preparse a picture for display.
 */
42 43 44
static inline void vout_display_Prepare(vout_display_t *vd,
                                        picture_t *picture,
                                        subpicture_t *subpicture)
45 46
{
    if (vd->prepare )
47
        vd->prepare(vd, picture, subpicture);
48 49 50 51 52
}

/**
 * It display a picture.
 */
53 54 55
static inline void vout_display_Display(vout_display_t *vd,
                                        picture_t *picture,
                                        subpicture_t *subpicture)
56
{
57
    vd->display(vd, picture, subpicture);
58 59 60 61 62 63 64
}

/**
 * It holds a state for a vout display.
 */
typedef struct {
    vout_display_cfg_t cfg;
65
#if defined(_WIN32) || defined(__OS2__)
66
    unsigned wm_state;
67
#endif
68
    vlc_rational_t sar;
69 70 71 72 73
} vout_display_state_t;

/**
 * It creates a vout managed display.
 */
74 75 76
vout_display_t *vout_NewDisplay( vout_thread_t *, const video_format_t *,
    const vout_display_state_t *, const char *module,
    mtime_t double_click_timeout, mtime_t hide_timeout );
77 78 79
/**
 * It destroy a vout managed display.
 */
80 81 82 83
void vout_DeleteDisplay(vout_display_t *, vout_display_state_t *);
bool vout_IsDisplayFiltered(vout_display_t *);
picture_t * vout_FilterDisplay(vout_display_t *, picture_t *);
bool vout_AreDisplayPicturesInvalid(vout_display_t *);
84

85
bool vout_ManageDisplay(vout_display_t *, bool allow_reset_pictures);
86

87 88 89 90 91
void vout_SetDisplayFilled(vout_display_t *, bool is_filled);
void vout_SetDisplayZoom(vout_display_t *, unsigned num, unsigned den);
void vout_SetDisplayAspect(vout_display_t *, unsigned num, unsigned den);
void vout_SetDisplayCrop(vout_display_t *, unsigned num, unsigned den,
                         unsigned left, unsigned top, int right, int bottom);
92
void vout_SetDisplayViewpoint(vout_display_t *, const vlc_viewpoint_t *);
93

94 95
#endif /* VLC_VOUT_WRAPPER_H */