vout_internal.h 5.25 KB
Newer Older
Laurent Aimar's avatar
Laurent Aimar committed
1 2 3
/*****************************************************************************
 * vout_internal.h : Internal vout definitions
 *****************************************************************************
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
4
 * Copyright (C) 2008 VLC authors and VideoLAN
Laurent Aimar's avatar
Laurent Aimar committed
5 6 7 8 9
 * Copyright (C) 2008 Laurent Aimar
 * $Id$
 *
 * Authors: Laurent Aimar < fenrir _AT_ videolan _DOT_ org >
 *
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
10 11 12
 * 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
Laurent Aimar's avatar
Laurent Aimar committed
13 14 15 16
 * (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
LGPL  
Jean-Baptiste Kempf committed
17 18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
Laurent Aimar's avatar
Laurent Aimar committed
19
 *
Jean-Baptiste Kempf's avatar
LGPL  
Jean-Baptiste Kempf committed
20 21 22
 * 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.
Laurent Aimar's avatar
Laurent Aimar committed
23 24
 *****************************************************************************/

25 26
#ifndef LIBVLC_VOUT_INTERNAL_H
#define LIBVLC_VOUT_INTERNAL_H 1
Laurent Aimar's avatar
Laurent Aimar committed
27

28 29
#include <vlc_picture_fifo.h>
#include <vlc_picture_pool.h>
Laurent Aimar's avatar
Laurent Aimar committed
30
#include <vlc_vout_display.h>
31
#include <vlc_vout_wrapper.h>
32
#include "vout_control.h"
33
#include "control.h"
34
#include "snapshot.h"
35
#include "statistic.h"
36
#include "chrono.h"
37

38 39 40 41 42 43 44 45
/* It should be high enough to absorbe jitter due to difficult picture(s)
 * to decode but not too high as memory is not that cheap.
 *
 * It can be made lower at compilation time if needed, but performance
 * may be degraded.
 */
#define VOUT_MAX_PICTURES (20)

46
/* */
47 48
struct vout_thread_sys_t
{
49 50
    /* Splitter module if used */
    char            *splitter_name;
51

52 53 54
    /* Input thread for dvd menu interactions */
    vlc_object_t    *input;

55
    /* */
56
    video_format_t  original;   /* Original format ie coming from the decoder */
57
    unsigned        dpb_size;
58

59 60 61 62 63 64 65
    /* Snapshot interface */
    vout_snapshot_t snapshot;

    /* Statistics */
    vout_statistic_t statistic;

    /* Subpicture unit */
66
    vlc_mutex_t     spu_lock;
Laurent Aimar's avatar
Laurent Aimar committed
67
    spu_t           *spu;
68
    vlc_fourcc_t    spu_blend_chroma;
69
    filter_t        *spu_blend;
70

71
    /* Video output window */
72
    vout_window_t   *window;
73

74 75
    /* Thread & synchronization */
    vlc_thread_t    thread;
76
    bool            dead;
77
    vout_control_t  control;
78

79
    /* */
Laurent Aimar's avatar
Laurent Aimar committed
80 81 82 83 84 85
    struct {
        char           *title;
        vout_display_t *vd;
        bool           use_dr;
    } display;

86
    struct {
87 88
        mtime_t     date;
        mtime_t     timestamp;
89 90
        bool        is_interlaced;
        picture_t   *decoded;
91 92
        picture_t   *current;
        picture_t   *next;
93
    } displayed;
94

95 96 97 98
    struct {
        mtime_t     last;
        mtime_t     timestamp;
    } step;
99

100 101 102 103 104
    struct {
        bool        is_on;
        mtime_t     date;
    } pause;

105
    /* OSD title configuration */
106 107 108 109 110 111
    struct {
        bool        show;
        mtime_t     timeout;
        int         position;
    } title;

112 113 114 115 116
    struct {
        bool        is_interlaced;
        mtime_t     date;
    } interlacing;

117
    /* */
118
    bool            is_late_dropped;
119 120

    /* Video filter2 chain */
121 122
    struct {
        vlc_mutex_t     lock;
123 124
        char            *configuration;
        video_format_t  format;
125 126
        struct filter_chain_t *chain_static;
        struct filter_chain_t *chain_interactive;
127
        bool            has_deint;
128
    } filter;
129

130 131
    /* */
    vlc_mouse_t     mouse;
132 133

    /* */
134 135 136 137 138
    picture_pool_t  *private_pool;
    picture_pool_t  *display_pool;
    picture_pool_t  *decoder_pool;
    picture_fifo_t  *decoder_fifo;
    vout_chrono_t   render;           /**< picture render time estimator */
139 140
};

141 142
/* TODO to move them to vlc_vout.h */
void vout_ControlChangeFullscreen(vout_thread_t *, bool fullscreen);
143
void vout_ControlChangeWindowState(vout_thread_t *, unsigned state);
144 145
void vout_ControlChangeDisplayFilled(vout_thread_t *, bool is_filled);
void vout_ControlChangeZoom(vout_thread_t *, int num, int den);
146 147 148 149
void vout_ControlChangeSampleAspectRatio(vout_thread_t *, unsigned num, unsigned den);
void vout_ControlChangeCropRatio(vout_thread_t *, unsigned num, unsigned den);
void vout_ControlChangeCropWindow(vout_thread_t *, int x, int y, int width, int height);
void vout_ControlChangeCropBorder(vout_thread_t *, int left, int top, int right, int bottom);
150
void vout_ControlChangeFilters(vout_thread_t *, const char *);
151
void vout_ControlChangeSubSources(vout_thread_t *, const char *);
152
void vout_ControlChangeSubFilters(vout_thread_t *, const char *);
Laurent Aimar's avatar
Laurent Aimar committed
153
void vout_ControlChangeSubMargin(vout_thread_t *, int);
154
void vout_ControlChangeViewpoint( vout_thread_t *, const vlc_viewpoint_t *);
155

156
/* */
157
void vout_IntfInit( vout_thread_t * );
158
void vout_IntfReinit( vout_thread_t * );
Laurent Aimar's avatar
Laurent Aimar committed
159

160
/* */
161 162
int  vout_OpenWrapper (vout_thread_t *, const char *, const vout_display_state_t *);
void vout_CloseWrapper(vout_thread_t *, vout_display_state_t *);
163 164
int  vout_InitWrapper(vout_thread_t *);
void vout_EndWrapper(vout_thread_t *);
165
void vout_ManageWrapper(vout_thread_t *);
166

167 168
/* */
int spu_ProcessMouse(spu_t *, const vlc_mouse_t *, const video_format_t *);
169
void spu_Attach( spu_t *, vlc_object_t *input, bool );
Laurent Aimar's avatar
Laurent Aimar committed
170
void spu_ChangeMargin(spu_t *, int);
171

Laurent Aimar's avatar
Laurent Aimar committed
172
#endif