diff options
author | Christophe Thommeret <hftom@free.fr> | 2008-12-08 10:51:07 +0000 |
---|---|---|
committer | Christophe Thommeret <hftom@free.fr> | 2008-12-08 10:51:07 +0000 |
commit | fcceca2c84e5b1cb24262591ee8de98ccedca1db (patch) | |
tree | f091028bd6bd037da404483e199863fc38824db9 | |
parent | 22bac86081c46fc2a95dd4865e31f94f7c2e6f53 (diff) | |
download | xine-lib-fcceca2c84e5b1cb24262591ee8de98ccedca1db.tar.gz xine-lib-fcceca2c84e5b1cb24262591ee8de98ccedca1db.tar.bz2 |
Export vdp_get_error_string; define MPEG12 cap.
-rw-r--r-- | src/video_out/video_out_vdpau.c | 14 | ||||
-rw-r--r-- | src/xine-engine/accel_vdpau.h | 1 | ||||
-rw-r--r-- | src/xine-engine/video_out.h | 1 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/video_out/video_out_vdpau.c b/src/video_out/video_out_vdpau.c index 9b7319819..80bb13b0c 100644 --- a/src/video_out/video_out_vdpau.c +++ b/src/video_out/video_out_vdpau.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 the xine project + * Copyright (C) 2008 Christophe Thommeret <hftom@free.fr> * * This file is part of xine, a free video player. * @@ -20,7 +20,6 @@ * * video_out_vdpau.c, a video output plugin using VDPAU (Video Decode and Presentation Api for Unix) * - * Christophe Thommeret <hftom@free.fr> * */ @@ -390,6 +389,8 @@ static vo_frame_t *vdpau_alloc_frame (vo_driver_t *this_gen) vdpau_frame_t *frame; vdpau_driver_t *this = (vdpau_driver_t *) this_gen; + printf( "vo_vdpau: vdpau_alloc_frame\n" ); + frame = (vdpau_frame_t *) calloc(1, sizeof(vdpau_frame_t)); if (!frame) @@ -415,6 +416,7 @@ static vo_frame_t *vdpau_alloc_frame (vo_driver_t *this_gen) frame->vdpau_accel_data.vdp_decoder_create = vdp_decoder_create; frame->vdpau_accel_data.vdp_decoder_destroy = vdp_decoder_destroy; frame->vdpau_accel_data.vdp_decoder_render = vdp_decoder_render; + frame->vdpau_accel_data.vdp_get_error_string = vdp_get_error_string; frame->width = frame->height = 0; @@ -1046,6 +1048,14 @@ static vo_driver_t *vdpau_open_plugin (video_driver_class_t *class_gen, const vo else this->capabilities |= VO_CAP_VDPAU_H264; + st = vdp_decoder_query_capabilities( vdp_device, VDP_DECODER_PROFILE_MPEG2_MAIN, &ok, &ml, &mr, &mw, &mh ); + if ( st != VDP_STATUS_OK ) + printf( "vo_vdpau: getting mpeg12_supported failed! : %s\n", vdp_get_error_string( st ) ); + else if ( !ok ) + printf( "vo_vdpau: no support for mpeg1/2 ! : no ok\n" ); + else + this->capabilities |= VO_CAP_VDPAU_MPEG12; + this->gotimage = 0; return &this->vo_driver; } diff --git a/src/xine-engine/accel_vdpau.h b/src/xine-engine/accel_vdpau.h index ef76fe5ee..f5b80e4d4 100644 --- a/src/xine-engine/accel_vdpau.h +++ b/src/xine-engine/accel_vdpau.h @@ -41,6 +41,7 @@ typedef struct { VdpDevice vdp_device; + VdpGetErrorString *vdp_get_error_string; VdpVideoSurfaceCreate *vdp_video_surface_create; VdpVideoSurfaceDestroy *vdp_video_surface_destroy; VdpDecoderCreate *vdp_decoder_create; diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index 77a7134fc..b3903d4f8 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -281,6 +281,7 @@ struct xine_video_port_s { #define VO_CAP_CROP 0x00000020 /* driver can crop */ #define VO_CAP_XXMC 0x00000040 /* driver can use extended XvMC */ #define VO_CAP_VDPAU_H264 0x00000080 /* driver can use Nvidia VDPAU for H264 */ +#define VO_CAP_VDPAU_MPEG12 0x00000100 /* driver can use Nvidia VDPAU for mpeg1/2 */ /* |