packages: tvtime/tvtime-autodetect_textured_overlay.patch - match adaptor n...

pluto pluto at pld-linux.org
Sat Mar 6 19:50:04 CET 2010


Author: pluto                        Date: Sat Mar  6 18:50:04 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- match adaptor name instead of tricky and not always correct port attribute.

---- Files affected:
packages/tvtime:
   tvtime-autodetect_textured_overlay.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/tvtime/tvtime-autodetect_textured_overlay.patch
diff -u packages/tvtime/tvtime-autodetect_textured_overlay.patch:1.1 packages/tvtime/tvtime-autodetect_textured_overlay.patch:1.2
--- packages/tvtime/tvtime-autodetect_textured_overlay.patch:1.1	Wed Jan 20 22:43:31 2010
+++ packages/tvtime/tvtime-autodetect_textured_overlay.patch	Sat Mar  6 19:49:59 2010
@@ -1,41 +1,15 @@
 --- tvtime-1.0.2/src/xvoutput.c.orig	2005-08-14 19:35:50.000000000 +0200
-+++ tvtime-1.0.2/src/xvoutput.c	2010-01-20 22:37:29.062165988 +0100
-@@ -102,6 +102,25 @@
-     return 0;
- }
- 
-+static int xv_port_has_textured_overlay( XvPortID port )
-+{
-+    int attributes, i;
-+    XvAttribute* attributeValues = XvQueryPortAttributes( display, port, &attributes );
-+    if ( !attributes )
-+        return 0;
-+    for ( i = 0; i < attributes; i++ )
-+    {
-+        XvAttribute attrib = attributeValues[ i ];
-+        if ( strcmp( attrib.name, "XV_HWPLANAR" ) == 0 )
-+        {
-+            XFree( attributeValues );
-+            return 1;
-+        }
-+    }
-+    XFree( attributeValues );
-+    return 0;
-+}
-+
- static int xv_check_extension( void )
- {
-     unsigned int version;
-@@ -123,15 +142,37 @@
++++ tvtime-1.0.2/src/xvoutput.c	2010-03-06 19:43:26.000000000 +0100
+@@ -123,15 +123,37 @@
  
      XvQueryAdaptors( display, output_window, &adaptors, &adaptorInfo );
  
 +    /* first attempt: check for textured layers with yuv2... */
 +    for( i = 0; i < adaptors; i++ ) {
-+        if( adaptorInfo[ i ].type & XvImageMask ) {
++        if(( adaptorInfo[ i ].type & XvImageMask ) && ( strstr( adaptorInfo[ i ].name, "Textured" ) != NULL )) {
 +            for( j = 0; j < adaptorInfo[ i ].num_ports; j++ ) {
 +                XvPortID port = adaptorInfo[ i ].base_id + j;
-+                if( xv_port_has_textured_overlay( port ) && xv_port_has_yuy2( port ) ) {
++                if( xv_port_has_yuy2( port ) ) {
 +                    if( XvGrabPort( display, port, 0 ) == Success ) {
 +                        xv_port = port;
 +                        if( xvoutput_verbose ) {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/tvtime/tvtime-autodetect_textured_overlay.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list