Changeset 55da14ec974e67d4197a8547a2a26ed540feded9

Show
Ignore:
Timestamp:
03/05/08 22:37:14 (6 months ago)
Author:
Gildas Bazin <gildas@videolan.org>
git-committer:
Gildas Bazin <gildas@videolan.org> 1204753034 +0000
git-parent:

[f26a646b38f93d0386141ee760fab791697fa84b]

git-author:
Gildas Bazin <gbazin@videolan.org> 1204577897 +0000
Message:

* modules/video_output/x11/*: manually paint the xv colour key if XV_AUTOPAINT_COLORKEY isn't supported.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/video_output/x11/xcommon.c

    r8d06898 r55da14e  
    14351435            { 
    14361436                /* (if this is the last a collection of expose events...) */ 
     1437 
     1438#if defined(MODULE_NAME_IS_xvideo) 
     1439                x11_window_t *p_win = p_vout->p_sys->p_win; 
     1440 
     1441                /* Paint the colour key if needed */ 
     1442                if( p_vout->p_sys->b_paint_colourkey && 
     1443                    xevent.xexpose.window == p_win->video_window ) 
     1444                { 
     1445                    XSetForeground( p_vout->p_sys->p_display, 
     1446                                    p_win->gc, p_vout->p_sys->i_colourkey ); 
     1447                    XFillRectangle( p_vout->p_sys->p_display, 
     1448                                    p_win->video_window, p_win->gc, 0, 0, 
     1449                                    p_win->i_width, p_win->i_height ); 
     1450                } 
     1451#endif  
     1452 
    14371453#if 0 
    14381454                if( p_vout->p_libvlc->p_input_bank->pp_input[0] != NULL ) 
     
    16231639    if( !p_vout->b_fullscreen ) 
    16241640    { 
    1625         p_win->owner_window = (Window)vout_RequestWindow( p_vout, &p_win->i_x, &p_win->i_y, 
    1626                                         &p_win->i_width, &p_win->i_height ); 
     1641        p_win->owner_window = (Window) 
     1642            vout_RequestWindow( p_vout, &p_win->i_x, &p_win->i_y, 
     1643                                &p_win->i_width, &p_win->i_height ); 
    16271644 
    16281645        xsize_hints.base_width  = xsize_hints.width = p_win->i_width; 
     
    25522569            XvAttribute     *p_attr; 
    25532570            int             i_attr, i_num_attributes; 
     2571            Atom            autopaint = None, colorkey = None; 
    25542572 
    25552573            /* If this is not the format we want, or at least a 
     
    25882606                         "packed" : "planar" ); 
    25892607 
    2590             /* Make sure XV_AUTOPAINT_COLORKEY is set */ 
     2608            /* Use XV_AUTOPAINT_COLORKEY if supported, otherwise we will 
     2609             * manually paint the colour key */ 
    25912610            p_attr = XvQueryPortAttributes( p_vout->p_sys->p_display, 
    25922611                                            i_selected_port, 
     
    25972616                if( !strcmp( p_attr[i_attr].name, "XV_AUTOPAINT_COLORKEY" ) ) 
    25982617                { 
    2599                     const Atom autopaint = 
    2600                         XInternAtom( p_vout->p_sys->p_display, 
    2601                                      "XV_AUTOPAINT_COLORKEY", False ); 
     2618                    autopaint = XInternAtom( p_vout->p_sys->p_display, 
     2619                                             "XV_AUTOPAINT_COLORKEY", False ); 
    26022620                    XvSetPortAttribute( p_vout->p_sys->p_display, 
    26032621                                        i_selected_port, autopaint, 1 ); 
    2604                     break; 
     2622                } 
     2623                if( !strcmp( p_attr[i_attr].name, "XV_COLORKEY" ) ) 
     2624                { 
     2625                    /* Find out the default colour key */ 
     2626                    colorkey = XInternAtom( p_vout->p_sys->p_display, 
     2627                                            "XV_COLORKEY", False ); 
     2628                    XvGetPortAttribute( p_vout->p_sys->p_display, 
     2629                                        i_selected_port, colorkey, 
     2630                                        &p_vout->p_sys->i_colourkey ); 
    26052631                } 
    26062632            } 
     2633            p_vout->p_sys->b_paint_colourkey = 
     2634                autopaint == None && colorkey != None; 
    26072635 
    26082636            if( p_attr != NULL ) 
  • modules/video_output/x11/xcommon.h

    r206cd3a r55da14e  
    231231#if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc) 
    232232    int                 i_xvport; 
     233    vlc_bool_t          b_paint_colourkey; 
     234    int                 i_colourkey; 
    233235#else 
    234236    Colormap            colormap;               /* colormap used (8bpp only) */ 
     
    337339    int                 i_backlight_on_counter; 
    338340#endif 
    339  
    340   
    341341}; 
    342342