summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-16 15:22:45 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-16 15:22:45 +0000
commit576095dfb9915dbc2c16cfbd07d5ed6ea5c9cba6 (patch)
tree9c401ef14e8af788f1ced85db6e89b42dbfb563c /libvo
parent6af2546071bdeafa264eff942a3a2514fe18e8c2 (diff)
downloadmpv-576095dfb9915dbc2c16cfbd07d5ed6ea5c9cba6.tar.bz2
mpv-576095dfb9915dbc2c16cfbd07d5ed6ea5c9cba6.tar.xz
added vidix_start() and vidix_stop() for better runtime-resize support ;)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4199 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_fbdev.c2
-rw-r--r--libvo/vo_vesa.c1
-rw-r--r--libvo/vo_xvidix.c9
-rw-r--r--libvo/vosub_vidix.c32
-rw-r--r--libvo/vosub_vidix.h2
5 files changed, 35 insertions, 11 deletions
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index 236e25a154..587b2265bf 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -1105,7 +1105,7 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width,
return -1;
}
else printf(FBDEV "Using VIDIX\n");
-
+ vidix_start();
}
else
#endif
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index a3f2fd1887..33a71afe25 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -928,6 +928,7 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
return -1;
}
else printf("vo_vesa: Using VIDIX\n");
+ vidix_start();
}
#endif
}
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index 013be5163f..d06e3e01f7 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -78,9 +78,9 @@ static void resize(int x, int y)
window_y = drwcY;
window_width = drwWidth;
window_height = drwHeight;
+
/* FIXME: implement runtime resize/move if possible, this way is very ugly! */
- vidix_term();
- vidix_preinit(vidix_name, &video_out_xvidix);
+ 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)
{
@@ -89,9 +89,10 @@ static void resize(int x, int y)
vidix_term();
uninit();
exit(1); /* !!! */
- x = window_width;
- y = window_height;
}
+ vidix_start();
+ x = window_width;
+ y = window_height;
}
mp_msg(MSGT_VO, MSGL_INFO, "[xvidix] window properties: pos: %dx%d, size: %dx%d\n",
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c
index 74b437c3fd..db937ae99c 100644
--- a/libvo/vosub_vidix.c
+++ b/libvo/vosub_vidix.c
@@ -145,11 +145,6 @@ int vidix_init(unsigned src_width,unsigned src_height,
printf("vosub_vidix: Can't configure playback: %s\n",strerror(err));
return -1;
}
- if((err=vdlPlaybackOn(vidix_handler))!=0)
- {
- printf("vosub_vidix: Can't start playback: %s\n",strerror(err));
- return -1;
- }
next_frame = 0;
vidix_mem =vidix_play.dga_addr;
@@ -159,10 +154,35 @@ int vidix_init(unsigned src_width,unsigned src_height,
return 0;
}
+void vidix_start(void)
+{
+ int err;
+
+ if((err=vdlPlaybackOn(vidix_handler))!=0)
+ {
+ printf("vosub_vidix: Can't start playback: %s\n",strerror(err));
+ return -1;
+ }
+ return 0;
+}
+
+void vidix_stop(void)
+{
+ int err;
+
+ if((err=vdlPlaybackOff(vidix_handler))!=0)
+ {
+ printf("vosub_vidix: Can't stop playback: %s\n",strerror(err));
+ return -1;
+ }
+ return 0;
+}
+
void vidix_term( void )
{
if(verbose > 1) printf("vosub_vidix: vidix_term() was called\n");
- vdlPlaybackOff(vidix_handler);
+// vdlPlaybackOff(vidix_handler);
+ vidix_stop();
vdlClose(vidix_handler);
}
diff --git a/libvo/vosub_vidix.h b/libvo/vosub_vidix.h
index 1a6d3e013e..cd6bc054f1 100644
--- a/libvo/vosub_vidix.h
+++ b/libvo/vosub_vidix.h
@@ -19,6 +19,8 @@ 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);
+void vidix_start(void);
+void vidix_stop(void);
void vidix_term( void );
uint32_t vidix_query_fourcc(unsigned fourcc);