summaryrefslogtreecommitdiff
path: root/src/vdpau_mixer.h
blob: 7e18958a1d7d24f2fcff39b0452b36e14daa0eec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
 *  vdpau_mixer.h - VDPAU backend for VA-API (video mixer abstraction)
 *
 *  libva-driver-vdpau (C) 2009-2011 Splitted-Desktop Systems
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (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
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU 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
 */

#ifndef VDPAU_MIXER_H
#define VDPAU_MIXER_H

#include "vdpau_driver.h"

#define VDPAU_MAX_VIDEO_MIXER_DEINT_SURFACES 3

typedef struct object_mixer object_mixer_t;
struct object_mixer {
    struct object_base          base;
    unsigned int                refcount;
    VdpVideoMixer               vdp_video_mixer;
    VdpChromaType               vdp_chroma_type;
    unsigned int                width;
    unsigned int                height;
    unsigned int                hqscaling_level;
    unsigned int                va_scale;
    VdpColorStandard            vdp_colorspace;
    VdpProcamp                  vdp_procamp;
    uint64_t                    vdp_procamp_mtime;
    uint64_t                    vdp_bgcolor_mtime;
    VdpVideoSurface             deint_surfaces[VDPAU_MAX_VIDEO_MIXER_DEINT_SURFACES];
};

object_mixer_p
video_mixer_create(
    vdpau_driver_data_t *driver_data,
    object_surface_p     obj_surface
) attribute_hidden;

object_mixer_p
video_mixer_create_cached(
    vdpau_driver_data_t *driver_data,
    object_surface_p     obj_surface
) attribute_hidden;

void
video_mixer_destroy(
    vdpau_driver_data_t *driver_data,
    object_mixer_p       obj_mixer
) attribute_hidden;

object_mixer_p
video_mixer_ref(
    vdpau_driver_data_t *driver_data,
    object_mixer_p       obj_mixer
) attribute_hidden;

void
video_mixer_unref(
    vdpau_driver_data_t *driver_data,
    object_mixer_p       obj_mixer
) attribute_hidden;

VdpStatus
video_mixer_set_background_color(
    vdpau_driver_data_t *driver_data,
    object_mixer_p       obj_mixer,
    const VdpColor      *vdp_color
) attribute_hidden;

VdpStatus
video_mixer_render(
    vdpau_driver_data_t *driver_data,
    object_mixer_p       obj_mixer,
    object_surface_p     obj_surface,
    VdpOutputSurface     vdp_background,
    VdpOutputSurface     vdp_output_surface,
    const VdpRect       *vdp_src_rect,
    const VdpRect       *vdp_dst_rect,
    unsigned int         flags
) attribute_hidden;

#endif /* VDPAU_MIXER_H */