~ubuntu-branches/ubuntu/trusty/vdpau-video/trusty-proposed

« back to all changes in this revision

Viewing changes to src/vdpau_buffer.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Mejia
  • Date: 2010-02-12 14:58:28 UTC
  • Revision ID: james.westby@ubuntu.com-20100212145828-f0q1g7qzq03din26
Tags: upstream-0.6.3
ImportĀ upstreamĀ versionĀ 0.6.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  vdpau_buffer.h - VDPAU backend for VA API (VA buffers)
 
3
 *
 
4
 *  vdpau-video (C) 2009-2010 Splitted-Desktop Systems
 
5
 *
 
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.
 
10
 *
 
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.
 
15
 *
 
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
 
19
 */
 
20
 
 
21
#ifndef VDPAU_BUFFER_H
 
22
#define VDPAU_BUFFER_H
 
23
 
 
24
#include "vdpau_driver.h"
 
25
 
 
26
typedef struct object_buffer object_buffer_t;
 
27
struct object_buffer {
 
28
    struct object_base  base;
 
29
    VAContextID         va_context;
 
30
    VABufferType        type;
 
31
    void               *buffer_data;
 
32
    unsigned int        buffer_size;
 
33
    unsigned int        max_num_elements;
 
34
    unsigned int        num_elements;
 
35
    uint64_t            mtime;
 
36
};
 
37
 
 
38
// Create VA buffer object
 
39
object_buffer_p
 
40
create_va_buffer(
 
41
    vdpau_driver_data_p driver_data,
 
42
    VAContextID         context,
 
43
    VABufferType        buffer_type,
 
44
    unsigned int        num_elements,
 
45
    unsigned int        size
 
46
) attribute_hidden;
 
47
 
 
48
// Destroy VA buffer object
 
49
void
 
50
destroy_va_buffer(
 
51
    vdpau_driver_data_p driver_data,
 
52
    object_buffer_p     obj_buffer
 
53
) attribute_hidden;
 
54
 
 
55
// Schedule VA buffer object for destruction
 
56
void
 
57
schedule_destroy_va_buffer(
 
58
    vdpau_driver_data_p driver_data,
 
59
    object_buffer_p     obj_buffer
 
60
) attribute_hidden;
 
61
 
 
62
// vaCreateBuffer
 
63
VAStatus
 
64
vdpau_CreateBuffer(
 
65
    VADriverContextP    ctx,
 
66
    VAContextID         context,
 
67
    VABufferType        type,
 
68
    unsigned int        size,
 
69
    unsigned int        num_elements,
 
70
    void               *data,
 
71
    VABufferID         *buf_id
 
72
) attribute_hidden;
 
73
 
 
74
// vaDestroyBuffer
 
75
VAStatus
 
76
vdpau_DestroyBuffer(
 
77
    VADriverContextP    ctx,
 
78
    VABufferID          buffer_id
 
79
) attribute_hidden;
 
80
 
 
81
// vaBufferSetNumElements
 
82
VAStatus
 
83
vdpau_BufferSetNumElements(
 
84
    VADriverContextP    ctx,
 
85
    VABufferID          buf_id,
 
86
    unsigned int        num_elements
 
87
) attribute_hidden;
 
88
 
 
89
// vaMapBuffer
 
90
VAStatus
 
91
vdpau_MapBuffer(
 
92
    VADriverContextP    ctx,
 
93
    VABufferID          buf_id,
 
94
    void              **pbuf
 
95
) attribute_hidden;
 
96
 
 
97
// vaUnmapBuffer
 
98
VAStatus
 
99
vdpau_UnmapBuffer(
 
100
    VADriverContextP    ctx,
 
101
    VABufferID          buf_id
 
102
) attribute_hidden;
 
103
 
 
104
#endif /* VDPAU_BUFFER_H */