summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Lampard <mlampard@users.sourceforge.net>2001-11-08 08:49:26 +0000
committerMike Lampard <mlampard@users.sourceforge.net>2001-11-08 08:49:26 +0000
commit19f7c11677334b04cfadee6810ceb315e5cac33f (patch)
treebb8d6522f8d5e9c67be939597359fdbf7bd7492d /src
parent9b73270ff645abbeb18366ff4f2003504cf27521 (diff)
downloadxine-lib-19f7c11677334b04cfadee6810ceb315e5cac33f.tar.gz
xine-lib-19f7c11677334b04cfadee6810ceb315e5cac33f.tar.bz2
change dxr3_tvmode option to dxr3_vomode & dxr3_preferred_tvmode, overlay
users now have the ability to switch between tvout & overlay on-the-fly when started in overlay mode by hiding the vo window. small compiler warning fixes. CVS patchset: 997 CVS date: 2001/11/08 08:49:26
Diffstat (limited to 'src')
-rw-r--r--src/dxr3/dxr3_decoder.c4
-rw-r--r--src/dxr3/dxr3_video_out.h7
-rw-r--r--src/dxr3/dxr3_vo_core.c61
-rw-r--r--src/dxr3/dxr3_vo_standard.c4
4 files changed, 53 insertions, 23 deletions
diff --git a/src/dxr3/dxr3_decoder.c b/src/dxr3/dxr3_decoder.c
index bf7ec0e81..fccb4260e 100644
--- a/src/dxr3/dxr3_decoder.c
+++ b/src/dxr3/dxr3_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_decoder.c,v 1.29 2001/11/07 12:30:54 mlampard Exp $
+ * $Id: dxr3_decoder.c,v 1.30 2001/11/08 08:49:26 mlampard Exp $
*
* dxr3 video and spu decoder plugin. Accepts the video and spu data
* from XINE and sends it directly to the corresponding dxr3 devices.
@@ -599,7 +599,7 @@ static void spudec_event_listener (void *this_gen, xine_event_t *event_gen) {
break;
case XINE_EVENT_SPU_FORCEDISPLAY:
{
- this->menu=event->data;
+ (int*)this->menu=event->data;
}
break;
}
diff --git a/src/dxr3/dxr3_video_out.h b/src/dxr3/dxr3_video_out.h
index 0ff756a8a..74874d9ac 100644
--- a/src/dxr3/dxr3_video_out.h
+++ b/src/dxr3/dxr3_video_out.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_video_out.h,v 1.2 2001/11/07 12:48:58 mlampard Exp $
+ * $Id: dxr3_video_out.h,v 1.3 2001/11/08 08:49:26 mlampard Exp $
*
*/
@@ -60,7 +60,7 @@ struct coeff {
typedef struct {
int fd_control;
- int overlay_enabled;
+
int xoffset;
int yoffset;
int xcorr;
@@ -101,9 +101,10 @@ typedef struct dxr3_driver_s {
int xpos, ypos;
int width, height;
int overlay_enabled;
+ int tv_switchable; /* can switch from overlay<->tvout */
float desired_ratio;
- int zoom_enabled;
+ int zoom_enabled; /* zoomed 16:9 mode */
int video_width;
int video_aspect;
diff --git a/src/dxr3/dxr3_vo_core.c b/src/dxr3/dxr3_vo_core.c
index 40b2731a2..9a06c64dc 100644
--- a/src/dxr3/dxr3_vo_core.c
+++ b/src/dxr3/dxr3_vo_core.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_vo_core.c,v 1.3 2001/11/07 13:03:21 mlampard Exp $
+ * $Id: dxr3_vo_core.c,v 1.4 2001/11/08 08:49:26 mlampard Exp $
*
*************************************************************************
* core functions common to both Standard and RT-Encoding vo plugins *
@@ -110,22 +110,16 @@ void dxr3_read_config(dxr3_driver_t *this)
this->vo_driver.set_property(&this->vo_driver,
VO_PROP_ASPECT_RATIO, ASPECT_FULL);
- str = config->lookup_str(config, "dxr3_tvmode", "default");
- if (!strcmp(str, "ntsc")) {
- this->tv_mode = EM8300_VIDEOMODE_NTSC;
- fprintf(stderr, "dxr3_vo: setting tv_mode to NTSC\n");
- } else if (!strcmp(str, "pal")) {
- this->tv_mode = EM8300_VIDEOMODE_PAL;
- fprintf(stderr, "dxr3_vo: setting tv_mode to PAL 50Hz\n");
- } else if (!strcmp(str, "pal60")) {
- this->tv_mode = EM8300_VIDEOMODE_PAL60;
- fprintf(stderr, "dxr3_vo: setting tv_mode to PAL 60Hz\n");
- } else if (!strcmp(str, "overlay")) {
+ str = config->lookup_str(config, "dxr3_vomode", "tv");
+ if (!strcasecmp(str, "tv")) {
+ this->overlay_enabled=0;
+ this->tv_switchable=0; /* don't allow on-the-fly switching */
+ } else if (!strcasecmp(str, "overlay")) {
this->tv_mode = EM8300_VIDEOMODE_DEFAULT;
fprintf(stderr, "dxr3_vo: setting up overlay mode\n");
if (dxr3_overlay_read_state(&this->overlay) == 0) {
this->overlay_enabled = 1;
-
+ this->tv_switchable=1;
str = config->lookup_str(config, "dxr3_keycolor", "0x80a040");
sscanf(str, "%x", &this->overlay.colorkey);
@@ -133,11 +127,26 @@ void dxr3_read_config(dxr3_driver_t *this)
sscanf(str, "%f", &this->overlay.color_interval);
} else {
fprintf(stderr, "dxr3_vo: please run autocal, overlay disabled\n");
+ this->overlay_enabled=0;
+ this->tv_switchable=0;
}
+ }
+ str = config->lookup_str(config, "dxr3_preferred_tvmode", "default");
+
+ if (!strcasecmp(str, "ntsc")) {
+ this->tv_mode = EM8300_VIDEOMODE_NTSC;
+ fprintf(stderr, "dxr3_vo: setting tv_mode to NTSC\n");
+ } else if (!strcasecmp(str, "pal")) {
+ this->tv_mode = EM8300_VIDEOMODE_PAL;
+ fprintf(stderr, "dxr3_vo: setting tv_mode to PAL 50Hz\n");
+ } else if (!strcasecmp(str, "pal60")) {
+ this->tv_mode = EM8300_VIDEOMODE_PAL60;
+ fprintf(stderr, "dxr3_vo: setting tv_mode to PAL 60Hz\n");
} else {
this->tv_mode = EM8300_VIDEOMODE_DEFAULT;
}
-
+
+
if (this->tv_mode != EM8300_VIDEOMODE_DEFAULT)
if (ioctl(this->fd_control, EM8300_IOCTL_SET_VIDEOMODE, &this->tv_mode))
fprintf(stderr, "dxr3_vo: setting video mode failed.");
@@ -360,8 +369,8 @@ int dxr3_gui_data_exchange (vo_driver_t *this_gen,
dxr3_driver_t *this = (dxr3_driver_t*) this_gen;
x11_rectangle_t *area;
XWindowAttributes a;
-
- if (!this->overlay_enabled) return 0;
+
+ if (!this->overlay_enabled && !this->tv_switchable) return 0;
switch (data_type) {
case GUI_DATA_EX_DEST_POS_SIZE_CHANGED:
@@ -396,6 +405,25 @@ int dxr3_gui_data_exchange (vo_driver_t *this_gen,
rect->h = y2-y1;
}
break;
+ case GUI_DATA_EX_VIDEOWIN_VISIBLE:
+ {
+ int window_showing;
+ (int *)window_showing = (int *)data;
+ if(!window_showing){
+ fprintf(stderr, "dxr3_vo: Hiding VO window and diverting video to TV\n");
+ dxr3_overlay_set_mode(&this->overlay, EM8300_OVERLAY_MODE_OFF );
+ this->overlay_enabled=0;
+ }else{
+ fprintf(stderr, "dxr3_vo: Using VO window for overlaying video\n");
+ dxr3_overlay_set_mode(&this->overlay, EM8300_OVERLAY_MODE_OVERLAY );
+ this->overlay_enabled=1;
+ }
+ dxr3_set_property((vo_driver_t*) this,
+ VO_PROP_ASPECT_RATIO, this->aspectratio);
+ dxr3_overlay_adapt_area(this, area->x, area->y, area->w, area->h);
+ break;
+ }
+
default:
return -1;
}
@@ -646,6 +674,7 @@ int dxr3_overlay_set_signalmode(dxr3_overlay_t *this,int mode)
void dxr3_overlay_buggy_preinit(dxr3_overlay_t *this, int fd)
{
/* TODO: catch errors */
+
this->fd_control = fd;
dxr3_overlay_set_screen(this);
dxr3_overlay_set_window(this, 1,1, 2,2);
diff --git a/src/dxr3/dxr3_vo_standard.c b/src/dxr3/dxr3_vo_standard.c
index 0d5a19684..2c3c7c4ab 100644
--- a/src/dxr3/dxr3_vo_standard.c
+++ b/src/dxr3/dxr3_vo_standard.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_vo_standard.c,v 1.2 2001/11/07 12:48:58 mlampard Exp $
+ * $Id: dxr3_vo_standard.c,v 1.3 2001/11/08 08:49:26 mlampard Exp $
*
*******************************************************************
* Dummy video out plugin for the dxr3. Is responsible for setting *
@@ -167,7 +167,7 @@ void dxr3_exit (vo_driver_t *this_gen)
dxr3_driver_t *this = (dxr3_driver_t *) this_gen;
- if(this->overlay_enabled)
+ if(this->overlay_enabled!=-1)
dxr3_overlay_set_mode(&this->overlay, EM8300_OVERLAY_MODE_OFF );
close(this->fd_control);
}