OSDN Git Service

Add callbacks for error and info messages.
[android-x86/hardware-intel-common-libva.git] / dummy_drv_video / dummy_drv_video.h
1 /*
2  * Copyright (c) 2007 Intel Corporation. All Rights Reserved.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sub license, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the
13  * next paragraph) shall be included in all copies or substantial portions
14  * of the Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19  * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24
25 #ifndef _DUMMY_DRV_VIDEO_H_
26 #define _DUMMY_DRV_VIDEO_H_
27
28 #include <va/va.h>
29 #include "object_heap.h"
30
31 #define DUMMY_MAX_PROFILES                      11
32 #define DUMMY_MAX_ENTRYPOINTS                   5
33 #define DUMMY_MAX_CONFIG_ATTRIBUTES             10
34 #define DUMMY_MAX_IMAGE_FORMATS                 10
35 #define DUMMY_MAX_SUBPIC_FORMATS                4
36 #define DUMMY_MAX_DISPLAY_ATTRIBUTES            4
37 #define DUMMY_STR_VENDOR                        "Dummy Driver 1.0"
38
39 struct dummy_driver_data {
40     struct object_heap  config_heap;
41     struct object_heap  context_heap;
42     struct object_heap  surface_heap;
43     struct object_heap  buffer_heap;
44 };
45
46 struct object_config {
47     struct object_base base;
48     VAProfile profile;
49     VAEntrypoint entrypoint;
50     VAConfigAttrib attrib_list[DUMMY_MAX_CONFIG_ATTRIBUTES];
51     int attrib_count;
52 };
53
54 struct object_context {
55     struct object_base base;
56     VAContextID context_id;
57     VAConfigID config_id;
58     VASurfaceID current_render_target;
59     int picture_width;
60     int picture_height;
61     int num_render_targets;
62     int flags;
63     VASurfaceID *render_targets;
64 };
65
66 struct object_surface {
67     struct object_base base;
68     VASurfaceID surface_id;
69 };
70
71 struct object_buffer {
72     struct object_base base;
73     void *buffer_data;
74     int max_num_elements;
75     int num_elements;
76 };
77
78 typedef struct object_config *object_config_p;
79 typedef struct object_context *object_context_p;
80 typedef struct object_surface *object_surface_p;
81 typedef struct object_buffer *object_buffer_p;
82
83 #endif /* _DUMMY_DRV_VIDEO_H_ */