Changeset 55da14ec974e67d4197a8547a2a26ed540feded9
- 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
| r8d06898 |
r55da14e |
|
| 1435 | 1435 | { |
|---|
| 1436 | 1436 | /* (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 | |
|---|
| 1437 | 1453 | #if 0 |
|---|
| 1438 | 1454 | if( p_vout->p_libvlc->p_input_bank->pp_input[0] != NULL ) |
|---|
| … | … | |
| 1623 | 1639 | if( !p_vout->b_fullscreen ) |
|---|
| 1624 | 1640 | { |
|---|
| 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 ); |
|---|
| 1627 | 1644 | |
|---|
| 1628 | 1645 | xsize_hints.base_width = xsize_hints.width = p_win->i_width; |
|---|
| … | … | |
| 2552 | 2569 | XvAttribute *p_attr; |
|---|
| 2553 | 2570 | int i_attr, i_num_attributes; |
|---|
| | 2571 | Atom autopaint = None, colorkey = None; |
|---|
| 2554 | 2572 | |
|---|
| 2555 | 2573 | /* If this is not the format we want, or at least a |
|---|
| … | … | |
| 2588 | 2606 | "packed" : "planar" ); |
|---|
| 2589 | 2607 | |
|---|
| 2590 | | /* Make sure XV_AUTOPAINT_COLORKEY is set */ |
|---|
| | 2608 | /* Use XV_AUTOPAINT_COLORKEY if supported, otherwise we will |
|---|
| | 2609 | * manually paint the colour key */ |
|---|
| 2591 | 2610 | p_attr = XvQueryPortAttributes( p_vout->p_sys->p_display, |
|---|
| 2592 | 2611 | i_selected_port, |
|---|
| … | … | |
| 2597 | 2616 | if( !strcmp( p_attr[i_attr].name, "XV_AUTOPAINT_COLORKEY" ) ) |
|---|
| 2598 | 2617 | { |
|---|
| 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 ); |
|---|
| 2602 | 2620 | XvSetPortAttribute( p_vout->p_sys->p_display, |
|---|
| 2603 | 2621 | 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 ); |
|---|
| 2605 | 2631 | } |
|---|
| 2606 | 2632 | } |
|---|
| | 2633 | p_vout->p_sys->b_paint_colourkey = |
|---|
| | 2634 | autopaint == None && colorkey != None; |
|---|
| 2607 | 2635 | |
|---|
| 2608 | 2636 | if( p_attr != NULL ) |
|---|
| r206cd3a |
r55da14e |
|
| 231 | 231 | #if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc) |
|---|
| 232 | 232 | int i_xvport; |
|---|
| | 233 | vlc_bool_t b_paint_colourkey; |
|---|
| | 234 | int i_colourkey; |
|---|
| 233 | 235 | #else |
|---|
| 234 | 236 | Colormap colormap; /* colormap used (8bpp only) */ |
|---|
| … | … | |
| 337 | 339 | int i_backlight_on_counter; |
|---|
| 338 | 340 | #endif |
|---|
| 339 | | |
|---|
| 340 | | |
|---|
| 341 | 341 | }; |
|---|
| 342 | 342 | |
|---|