summaryrefslogtreecommitdiffstats
path: root/src/libXvMC/context.c
diff options
context:
space:
mode:
authorYounes Manton <[email protected]>2008-07-24 16:50:18 -0400
committerYounes Manton <[email protected]>2008-07-24 16:50:18 -0400
commitd1dc937c62083c3d8ab9f420df8e54f5c3217468 (patch)
tree3e345839ad504d285b3759a83db690ff5920a842 /src/libXvMC/context.c
parenta8da04cb861b8f9caf3acd33f52f64621f0c15e2 (diff)
g3dvl: Added more XvMC stubs to get mplayer working.
Diffstat (limited to 'src/libXvMC/context.c')
-rw-r--r--src/libXvMC/context.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/libXvMC/context.c b/src/libXvMC/context.c
index 59e1cb2b256..9cf654d6bb2 100644
--- a/src/libXvMC/context.c
+++ b/src/libXvMC/context.c
@@ -183,18 +183,36 @@ XvMCSurfaceInfo* XvMCListSurfaceTypes(Display *display, XvPortID port, int *num)
surface_info->chroma_format = XVMC_CHROMA_FORMAT_420;
surface_info->max_width = 2048;
surface_info->max_height = 2048;
+ surface_info->subpicture_max_width = 2048;
+ surface_info->subpicture_max_height = 2048;
surface_info->mc_type = XVMC_IDCT | XVMC_MPEG_2;
surface_info->surface_type_id = 123; /* FIXME: XAllocID(display)*/;
- surface_info->flags |= XVMC_INTRA_UNSIGNED;
+ surface_info->flags = XVMC_INTRA_UNSIGNED | XVMC_SUBPICTURE_INDEPENDENT_SCALING | XVMC_BACKEND_SUBPICTURE;
return surface_info;
}
XvImageFormatValues* XvMCListSubpictureTypes(Display* display, XvPortID port, int surface_type_id, int *count_return)
{
- /* TODO */
- *count_return = 0;
-
- return NULL;
+ XvImageFormatValues *image_formats = calloc(1, sizeof(XvImageFormatValues));
+
+ *count_return = 1;
+
+ image_formats[0].id = 123;
+ image_formats[0].type = XvRGB;
+ image_formats[0].byte_order = LSBFirst;
+ image_formats[0].bits_per_pixel = 8;
+ image_formats[0].format = XvPacked;
+ image_formats[0].num_planes = 1;
+ image_formats[0].depth = 8;
+ image_formats[0].red_mask = 0x0000FF;
+ image_formats[0].green_mask = 0x00FF00;
+ image_formats[0].blue_mask = 0xFF0000;
+ image_formats[0].component_order[0] = 'R';
+ image_formats[0].component_order[0] = 'G';
+ image_formats[0].component_order[0] = 'B';
+ image_formats[0].scanline_order = XvTopToBottom;
+
+ return image_formats;
}