summaryrefslogtreecommitdiffstats
path: root/libvo/vo_dxr3.c
diff options
context:
space:
mode:
authormswitch <mswitch@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-09 11:35:24 +0000
committermswitch <mswitch@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-09 11:35:24 +0000
commitfceaa28287cf5e57a2bf478aeb8df2b199ae01ec (patch)
tree21182af01e4d9563265a29e33b2bfc4f9054fb3e /libvo/vo_dxr3.c
parentf31c512e5d2606a9b1c99f138ad5579fdca0e422 (diff)
downloadmpv-fceaa28287cf5e57a2bf478aeb8df2b199ae01ec.tar.bz2
mpv-fceaa28287cf5e57a2bf478aeb8df2b199ae01ec.tar.xz
Added switch to disable prebuffering
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4606 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_dxr3.c')
-rw-r--r--libvo/vo_dxr3.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index 9a283060bf..94f3de2056 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -77,7 +77,7 @@ static int s_width, s_height;
static int s_pos_x, s_pos_y;
static int d_pos_x, d_pos_y;
static int osd_w, osd_h;
-
+static int noprebuf = 0;
static int img_format = 0;
/* File descriptors */
@@ -102,11 +102,10 @@ uint32_t control(uint32_t request, void *data, ...)
uint32_t flag = 0;
switch (request) {
case VOCTRL_RESET:
- /* Apparently the new em8300 flushing code is still not working.
- * I'll get on it, but this should be good enough for now
- */
- close(fd_video);
- fd_video = open(fdv_name, O_WRONLY);
+ if (!noprebuf) {
+ close(fd_video);
+ fd_video = open(fdv_name, O_WRONLY);
+ }
return VO_TRUE;
case VOCTRL_QUERY_FORMAT:
switch (*((uint32_t*)data)) {
@@ -129,7 +128,11 @@ uint32_t control(uint32_t request, void *data, ...)
printf("VO: [dxr3] You have disabled libavcodec support (Read DOCS/codecs.html)!\n");
#endif
}
- return (flag | 0x100);
+ if (noprebuf) {
+ return flag;
+ } else {
+ return (flag | 0x100);
+ }
}
return VO_NOTIMPL;
}
@@ -415,11 +418,18 @@ static void check_events(void)
static uint32_t preinit(const char *arg)
{
char devname[80];
- int fdflags = O_WRONLY | O_NONBLOCK;
+ int fdflags = O_WRONLY;
/* Open the control interface */
if (vo_subdevice) {
- sprintf(devname, "/dev/em8300-%s", vo_subdevice);
+ if (!strcmp("noprebuf", vo_subdevice)) {
+ printf("VO: [dxr3] Disabling prebuffering.\n");
+ noprebuf = 1;
+ fdflags |= O_NONBLOCK;
+ } else {
+ printf("VO: [dxr3] Forcing use of device %s\n", vo_subdevice);
+ sprintf(devname, "/dev/em8300-%s", vo_subdevice);
+ }
} else {
/* Try new naming scheme by default */
sprintf(devname, "/dev/em8300-0");