1 #ifndef PIPE_VIDEO_CONTEXT_H
2 #define PIPE_VIDEO_CONTEXT_H
8 #include <pipe/p_video_state.h>
13 struct pipe_video_surface;
14 struct pipe_macroblock;
15 struct pipe_picture_desc;
16 struct pipe_fence_handle;
19 * Gallium video rendering context
21 struct pipe_video_context
23 struct pipe_screen *screen;
24 enum pipe_video_profile profile;
25 enum pipe_video_chroma_format chroma_format;
29 void *priv; /**< context private data (for DRI for example) */
31 void (*destroy)(struct pipe_video_context *vpipe);
34 * Picture decoding and displaying
37 void (*decode_bitstream)(struct pipe_video_context *vpipe,
39 struct pipe_buffer **bitstream_buf);
41 void (*decode_macroblocks)(struct pipe_video_context *vpipe,
42 struct pipe_video_surface *past,
43 struct pipe_video_surface *future,
44 unsigned num_macroblocks,
45 struct pipe_macroblock *macroblocks,
46 struct pipe_fence_handle **fence);
48 void (*clear_surface)(struct pipe_video_context *vpipe,
49 unsigned x, unsigned y,
50 unsigned width, unsigned height,
52 struct pipe_surface *surface);
54 void (*render_picture)(struct pipe_video_context *vpipe,
55 /*struct pipe_surface *backround,
56 struct pipe_video_rect *backround_area,*/
57 struct pipe_video_surface *src_surface,
58 enum pipe_mpeg12_picture_type picture_type,
59 /*unsigned num_past_surfaces,
60 struct pipe_video_surface *past_surfaces,
61 unsigned num_future_surfaces,
62 struct pipe_video_surface *future_surfaces,*/
63 struct pipe_video_rect *src_area,
64 struct pipe_surface *dst_surface,
65 struct pipe_video_rect *dst_area,
66 /*unsigned num_layers,
67 struct pipe_texture *layers,
68 struct pipe_video_rect *layer_src_areas,
69 struct pipe_video_rect *layer_dst_areas,*/
70 struct pipe_fence_handle **fence);
74 * Parameter-like states (or properties)
77 void (*set_picture_desc)(struct pipe_video_context *vpipe,
78 const struct pipe_picture_desc *desc);
80 void (*set_decode_target)(struct pipe_video_context *vpipe,
81 struct pipe_video_surface *dt);
83 /* TODO: Interface for CSC matrix, scaling modes, post-processing, etc. */
92 #endif /* PIPE_VIDEO_CONTEXT_H */