[MPlayer-dev-eng] [PATCH] vo-control method suggestion
David Holm
david at realityrift.com
Thu Feb 7 17:22:57 CET 2002
Hi,
here is a suggestion for a vo-device control method. (Don't apply this
to cvs by mistake ;).
It is intended to replace some of the vo-calls, such as draw_osd,
query_format and query_vaa since those are calls that might not be
implemented on all drivers the control could safely return -ENOSYS if it
does not recognize the VOCTRL call.
Any feedback or suggestions appreciated, also, if you like this
interface please give me a go to implement it as I'm eager to implement
prebuffering in the dxr3 device and that requires the VOCTRL_SEEK call
(or a similar one).
//David
-------------- next part --------------
Index: libvo/video_out.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/video_out.h,v
retrieving revision 1.15
diff -u -r1.15 video_out.h
--- libvo/video_out.h 31 Jan 2002 09:52:45 -0000 1.15
+++ libvo/video_out.h 7 Feb 2002 16:27:55 -0000
@@ -7,6 +7,7 @@
*/
#include <inttypes.h>
+#include <errno.h>
#include "font_load.h"
#include "img_format.h"
@@ -16,6 +17,31 @@
#define VO_EVENT_RESIZE 2
#define VO_EVENT_KEYPRESS 4
+/* A seek has occured, flush buffers if necessary */
+#define VOCTRL_SEEK 1
+/* Query Video Accelerated Architecture information.
+ * params:
+ * vaa: address of struct to be filled.
+ * (Note: driver should memset it to ZERO if it doesn't support vaa.)
+*/
+#define VOCTRL_QUERY_VAA 2
+/*
+ * Draws OSD to the screen buffer
+ */
+#define VOCTRL_DRAW_OSD 3
+
typedef struct vo_info_s
{
/* driver name ("Matrox Millennium G200/G400" */
@@ -145,6 +171,10 @@
*/
void (*uninit)(void);
+ /*
+ * Send control command to device
+ * Returns 0 on success or an errno on failure
+ */
+ int (*control)(int request, ...);
/*
* Query Video Accelerated Architecture information.
* params:
More information about the MPlayer-dev-eng
mailing list