summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-02-19 16:01:46 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-02-19 16:01:46 +0000
commitfc5d27378b5c96a4ec8d114f1f33b3aa9b807f9a (patch)
treebbd3bd1c828a9a3655bf244ce4321763f3ae08b5 /libvo
parent071f76ef0c9d1a8b0c65928f10a5be915fb0624e (diff)
downloadmpv-fc5d27378b5c96a4ec8d114f1f33b3aa9b807f9a.tar.bz2
mpv-fc5d27378b5c96a4ec8d114f1f33b3aa9b807f9a.tar.xz
Update sub-picture layer to work with recent DirectFB cvs and add support for selecting field parity. Patch by Ville Syrjl <syrjala@sci.fi>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9462 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_dfbmga.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/libvo/vo_dfbmga.c b/libvo/vo_dfbmga.c
index 3ac3eb113c..cfcfe6c7ef 100644
--- a/libvo/vo_dfbmga.c
+++ b/libvo/vo_dfbmga.c
@@ -91,6 +91,7 @@ static int use_bes;
static int use_crtc2;
static int use_spic;
static int use_input;
+static int field_parity;
static int osd_changed;
static int osd_dirty;
@@ -223,6 +224,7 @@ preinit( const char *arg )
use_crtc2 = 1;
use_spic = 1;
use_input = 1;
+ field_parity = -1;
if (vo_subdevice) {
int opt_no = 0;
@@ -243,6 +245,14 @@ preinit( const char *arg )
use_spic = !opt_no;
vo_subdevice += 5;
opt_no = 0;
+ } else if (!strncmp(vo_subdevice, "fieldparity=", 12)) {
+ vo_subdevice += 12;
+ if (*vo_subdevice == '0' ||
+ *vo_subdevice == '1') {
+ field_parity = *vo_subdevice - '0';
+ vo_subdevice++;
+ }
+ opt_no = 0;
} else if (!strncmp(vo_subdevice, "no", 2)) {
vo_subdevice += 2;
opt_no = 1;
@@ -410,6 +420,13 @@ config( uint32_t width, uint32_t height,
dlc.flags = DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE;
dlc.buffermode = DLBM_BACKVIDEO;
+#if DIRECTFBVERSION > 916
+ if (field_parity != -1) {
+ dlc.flags |= DLCONF_OPTIONS;
+ dlc.options = DLOP_FIELD_PARITY;
+ }
+#endif
+
switch (dlc.pixelformat) {
case DSPF_I420:
case DSPF_YV12:
@@ -433,6 +450,12 @@ config( uint32_t width, uint32_t height,
return -1;
}
crtc2->SetConfiguration( crtc2, &dlc );
+
+#if DIRECTFBVERSION > 916
+ if (field_parity != -1)
+ crtc2->SetFieldParity( crtc2, field_parity );
+#endif
+
crtc2->GetSurface( crtc2, &c2frame );
c2frame->GetSize( c2frame, &screen_width, &screen_height );
@@ -502,6 +525,10 @@ config( uint32_t width, uint32_t height,
dlc.flags = DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE;
dlc.pixelformat = DSPF_LUT8;
dlc.buffermode = DLBM_BACKVIDEO;
+#if DIRECTFBVERSION > 916
+ dlc.flags |= DLCONF_OPTIONS;
+ dlc.options = DLOP_ALPHACHANNEL;
+#endif
if (spic->TestConfiguration( spic, &dlc, &failed ) != DFB_OK) {
mp_msg( MSGT_VO, MSGL_ERR,
"vo_dfbmga: Invalid sub-picture configuration!\n" );