From 40e94d73853bc8cb980147778d72616953ad10a2 Mon Sep 17 00:00:00 2001 From: arpi Date: Thu, 11 Apr 2002 21:07:00 +0000 Subject: VFCAP added git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5567 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/mga_common.c | 2 +- libvo/video_out_internal.h | 2 ++ libvo/vo_mpegpes.c | 4 ++-- libvo/vo_vesa.c | 2 +- libvo/vo_x11.c | 6 +++--- libvo/vo_xv.c | 8 ++++---- libvo/vosub_vidix.c | 7 ++++--- 7 files changed, 17 insertions(+), 14 deletions(-) (limited to 'libvo') diff --git a/libvo/mga_common.c b/libvo/mga_common.c index e863f76976..978b830ed4 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -223,7 +223,7 @@ query_format(uint32_t format) case IMGFMT_UYVY: // case IMGFMT_RGB|24: // case IMGFMT_BGR|24: - return 1; + return 3 | VFCAP_OSD|VFCAP_HWSCALE_UP|VFCAP_HWSCALE_DOWN; } return 0; } diff --git a/libvo/video_out_internal.h b/libvo/video_out_internal.h index 84303b3d83..33401caf3e 100644 --- a/libvo/video_out_internal.h +++ b/libvo/video_out_internal.h @@ -21,6 +21,8 @@ * */ +#include "../libmpcodecs/vfcap.h" + static uint32_t control(uint32_t request, void *data, ...); static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, diff --git a/libvo/vo_mpegpes.c b/libvo/vo_mpegpes.c index e64a9b270b..4ab1d608e1 100644 --- a/libvo/vo_mpegpes.c +++ b/libvo/vo_mpegpes.c @@ -496,9 +496,9 @@ static uint32_t draw_slice(uint8_t *srcimg[], int stride[], int w,int h,int x0,i static uint32_t query_format(uint32_t format) { - if(format==IMGFMT_MPEGPES) return 1|256; + if(format==IMGFMT_MPEGPES) return 3|VFCAP_TIMER; #ifdef USE_LIBFAME - if(format==IMGFMT_YV12) return 1|256; + if(format==IMGFMT_YV12) return 1|VFCAP_TIMER|VFCAP_OSD; #endif return 0; } diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c index 59edea683a..fa4a49959f 100644 --- a/libvo/vo_vesa.c +++ b/libvo/vo_vesa.c @@ -445,7 +445,7 @@ static uint32_t query_format(uint32_t format) { if(verbose > 2) printf("vo_vesa: query_format was called: %x (%s)\n",format,vo_format_name(format)); - return 1; /* due new SwScale code */ + return 1 | VFCAP_OSD | VFCAP_SWSCALE; /* due new SwScale code */ } static void paintBkGnd( void ) diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 5a09e6a096..16907d8ef5 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -569,9 +569,9 @@ static uint32_t query_format( uint32_t format ) if (IMGFMT_IS_BGR(format)) { if (IMGFMT_BGR_DEPTH(format) == vo_depthonscreen) - return 0x1|0x2|0x4; + return 3|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_FLIP; else - return 0x1|0x4; + return 1|VFCAP_OSD|VFCAP_SWSCALE|VFCAP_FLIP; } switch( format ) @@ -585,7 +585,7 @@ static uint32_t query_format( uint32_t format ) case IMGFMT_I420: case IMGFMT_IYUV: case IMGFMT_YV12: - return 0x1|0x4; + return 1|VFCAP_OSD|VFCAP_SWSCALE; } return 0; } diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 37ba830c43..13d4549f12 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -707,13 +707,11 @@ static uint32_t get_image(mp_image_t *mpi){ return VO_FALSE; } - static uint32_t query_format(uint32_t format) { - int flag=1; + int flag=3|VFCAP_HWSCALE_UP|VFCAP_HWSCALE_DOWN|VFCAP_OSD; // FIXME! check for DOWN /* check image formats */ - fo = XvListImageFormats(mDisplay, xv_port, (int*)&formats); - if(format==IMGFMT_BGR24){ format=IMGFMT_YV12;flag|=2;} // conversion! + if(format==IMGFMT_BGR24){ format=IMGFMT_YV12;flag&=~2;flag|=VFCAP_FLIP;} // conversion! for(i = 0; i < formats; i++){ // printf("Xvideo image format: 0x%x (%4.4s) %s\n", fo[i].id,(char*)&fo[i].id, (fo[i].format == XvPacked) ? "packed" : "planar"); if (fo[i].id == format) return flag; //xv_format = fo[i].id; @@ -792,6 +790,8 @@ static uint32_t preinit(const char *arg) return -1; } + fo = XvListImageFormats(mDisplay, xv_port, (int*)&formats); + return 0; } diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c index 8ee84ecba9..bf6acf3952 100644 --- a/libvo/vosub_vidix.c +++ b/libvo/vosub_vidix.c @@ -31,6 +31,7 @@ #include "video_out.h" #include "../mp_image.h" +#include "../libmpcodecs/vfcap.h" #define NUM_FRAMES VID_PLAY_MAXFRAMES /* Temporary: driver will overwrite it */ #define UNUSED(x) ((void)(x)) /* Removes warning about unused arguments */ @@ -361,12 +362,12 @@ uint32_t vidix_query_fourcc(uint32_t format) vo_server->draw_slice = vidix_draw_slice_swYV12; forced_fourcc=IMGFMT_YUY2; printf("vosub_vidix: WARNING!!! Using YV12 to YUY2 SW convertion\n"); - return 0x02; + return VFCAP_CSP_SUPPORTED|VFCAP_HWSCALE_UP|VFCAP_HWSCALE_DOWN; } } - return 0 ; + return 0; } - return 0x2; /* hw support without conversion */ + return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_HWSCALE_UP|VFCAP_HWSCALE_DOWN; } int vidix_grkey_support(void) -- cgit v1.2.3