summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-31 10:23:39 +0000
committernick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-31 10:23:39 +0000
commit9bf9892bd31ece2ece7dd70261bed2a9c923e4cd (patch)
treec9da86838af0dc44b493a8aa5b50709a5263a4cb
parentb587a3d642a763d0e56b165a95ed8ea7a0bc1eff (diff)
downloadmpv-9bf9892bd31ece2ece7dd70261bed2a9c923e4cd.tar.bz2
mpv-9bf9892bd31ece2ece7dd70261bed2a9c923e4cd.tar.xz
Use new tune info
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4435 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/vo_fbdev.c2
-rw-r--r--libvo/vo_vesa.c2
-rw-r--r--libvo/vo_xvidix.c13
-rw-r--r--libvo/vosub_vidix.c45
-rw-r--r--libvo/vosub_vidix.h2
5 files changed, 55 insertions, 9 deletions
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index 9296e4c276..c691d870ea 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -1102,7 +1102,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
else y_offset = 0;
if(vidix_init(width,height,x_offset,y_offset,image_width,
image_height,format,fb_bpp,
- fb_xres,fb_yres) != 0)
+ fb_xres,fb_yres,info) != 0)
{
printf(FBDEV "Can't initialize VIDIX driver\n");
vidix_name = NULL;
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index 406d32b93c..20bb99042b 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -897,7 +897,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
{
if(vidix_init(width,height,x_offset,y_offset,image_width,
image_height,format,video_mode_info.BitsPerPixel,
- video_mode_info.XResolution,video_mode_info.YResolution) != 0)
+ video_mode_info.XResolution,video_mode_info.YResolution,info) != 0)
{
printf("vo_vesa: Can't initialize VIDIX driver\n");
vidix_name = NULL;
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index db2b153b4f..05ea75067b 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -57,6 +57,7 @@ static vidix_grkey_t gr_key;
/* VIDIX related */
static char *vidix_name;
+static vo_tune_info_t vtune;
/* Image parameters */
static uint32_t image_width;
@@ -73,7 +74,7 @@ static Window mRoot;
static uint32_t drwX, drwY, drwWidth, drwHeight, drwBorderWidth,
drwDepth, drwcX, drwcY, dwidth, dheight, mFullscreen;
-static void set_window(int force_update)
+static void set_window(int force_update,const vo_tune_info_t *info)
{
#ifdef HAVE_NEW_GUI
if (vo_window != None)
@@ -154,7 +155,8 @@ static void set_window(int force_update)
/* FIXME: implement runtime resize/move if possible, this way is very ugly! */
vidix_stop();
if (vidix_init(image_width, image_height, window_x, window_y,
- window_width, window_height, image_format, vo_depthonscreen, vo_screenwidth, vo_screenheight) != 0)
+ window_width, window_height, image_format, vo_depthonscreen,
+ vo_screenwidth, vo_screenheight,info) != 0)
{
mp_msg(MSGT_VO, MSGL_FATAL, "Can't initialize VIDIX driver: %s: %s\n",
vidix_name, strerror(errno));
@@ -363,8 +365,9 @@ else
vidix_grkey_set(&gr_key);
}
- set_window(1);
-
+ set_window(1,info);
+ if(info) memcpy(&vtune,info,sizeof(vo_tune_info_t));
+ else memset(&vtune,0,sizeof(vo_tune_info_t));
#ifdef HAVE_NEW_GUI
if (vo_window == None)
#endif
@@ -388,7 +391,7 @@ static void check_events(void)
const int event = vo_x11_check_events(mDisplay);
if ((event & VO_EVENT_RESIZE) || (event & VO_EVENT_EXPOSE))
- set_window(0);
+ set_window(0,&vtune);
return;
}
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c
index a921fe4430..f40cd57d38 100644
--- a/libvo/vosub_vidix.c
+++ b/libvo/vosub_vidix.c
@@ -100,7 +100,7 @@ int vidix_preinit(const char *drvname,void *server)
int vidix_init(unsigned src_width,unsigned src_height,
unsigned x_org,unsigned y_org,unsigned dst_width,
unsigned dst_height,unsigned format,unsigned dest_bpp,
- unsigned vid_w,unsigned vid_h)
+ unsigned vid_w,unsigned vid_h,const void *info)
{
size_t i,awidth;
int err;
@@ -166,6 +166,49 @@ int vidix_init(unsigned src_width,unsigned src_height,
vidix_play.dest.w = dst_width;
vidix_play.dest.h = dst_height;
vidix_play.num_frames=NUM_FRAMES;
+ vidix_play.src.pitch.y = vidix_play.src.pitch.u = vidix_play.src.pitch.v = 0;
+ if(info)
+ {
+ switch(((const vo_tune_info_t *)info)->pitch[0])
+ {
+ case 2:
+ case 4:
+ case 8:
+ case 16:
+ case 32:
+ case 64:
+ case 128:
+ case 256: vidix_play.src.pitch.y = ((const vo_tune_info_t *)info)->pitch[0];
+ break;
+ default: break;
+ }
+ switch(((const vo_tune_info_t *)info)->pitch[1])
+ {
+ case 2:
+ case 4:
+ case 8:
+ case 16:
+ case 32:
+ case 64:
+ case 128:
+ case 256: vidix_play.src.pitch.u = ((const vo_tune_info_t *)info)->pitch[1];
+ break;
+ default: break;
+ }
+ switch(((const vo_tune_info_t *)info)->pitch[2])
+ {
+ case 2:
+ case 4:
+ case 8:
+ case 16:
+ case 32:
+ case 64:
+ case 128:
+ case 256: vidix_play.src.pitch.v = ((const vo_tune_info_t *)info)->pitch[2];
+ break;
+ default: break;
+ }
+ }
if((err=vdlConfigPlayback(vidix_handler,&vidix_play))!=0)
{
printf("vosub_vidix: Can't configure playback: %s\n",strerror(err));
diff --git a/libvo/vosub_vidix.h b/libvo/vosub_vidix.h
index 7a68bcfe0c..e686c033be 100644
--- a/libvo/vosub_vidix.h
+++ b/libvo/vosub_vidix.h
@@ -17,7 +17,7 @@ int vidix_preinit(const char *drvname,void *server);
int vidix_init(unsigned src_width,unsigned src_height,
unsigned dest_x,unsigned dest_y,unsigned dst_width,
unsigned dst_height,unsigned format,unsigned dest_bpp,
- unsigned vid_w,unsigned vid_h);
+ unsigned vid_w,unsigned vid_h,const void *info);
int vidix_start(void);
int vidix_stop(void);
void vidix_term( void );