2
* vdpau_buffer.h - VDPAU backend for VA-API (VA buffers)
4
* vdpau-video (C) 2009-2011 Splitted-Desktop Systems
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
21
#ifndef VDPAU_BUFFER_H
22
#define VDPAU_BUFFER_H
24
#include "vdpau_driver.h"
26
typedef struct object_buffer object_buffer_t;
27
struct object_buffer {
28
struct object_base base;
29
VAContextID va_context;
32
unsigned int buffer_size;
33
unsigned int max_num_elements;
34
unsigned int num_elements;
36
unsigned int delayed_destroy : 1;
39
// Create VA buffer object
42
vdpau_driver_data_p driver_data,
44
VABufferType buffer_type,
45
unsigned int num_elements,
49
// Destroy VA buffer object
52
vdpau_driver_data_p driver_data,
53
object_buffer_p obj_buffer
56
// Schedule VA buffer object for destruction
58
schedule_destroy_va_buffer(
59
vdpau_driver_data_p driver_data,
60
object_buffer_p obj_buffer
70
unsigned int num_elements,
82
// vaBufferSetNumElements
84
vdpau_BufferSetNumElements(
87
unsigned int num_elements
101
VADriverContextP ctx,
108
VADriverContextP ctx,
113
unsigned int *num_elements
116
#endif /* VDPAU_BUFFER_H */