diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/video_out/video_out_xcbxv.c | 54 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 45 | ||||
-rw-r--r-- | src/video_out/video_out_xxmc.c | 31 |
4 files changed, 36 insertions, 95 deletions
@@ -9,6 +9,7 @@ xine-lib (1.1.16) 2008-??-?? * Correct AAC channel ordering for multi-channel audio, at least for FLAC when using ALSA or PulseAudio. (Needs a proper fix.) * Add position-based seeking independent from seekpoints. + * Fix some XCB Xv attribute configuration breakage. xine-lib (1.1.15) 2008-08-14 * Security fixes: diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c index be218658c..bb7e32946 100644 --- a/src/video_out/video_out_xcbxv.c +++ b/src/video_out/video_out_xcbxv.c @@ -1212,67 +1212,37 @@ static void xv_update_deinterlace(void *this_gen, xine_cfg_entry_t *entry) { this->deinterlace_method = entry->num_value; } -static void xv_update_XV_FILTER(void *this_gen, xine_cfg_entry_t *entry) { +static void xv_update_attr (void *this_gen, xine_cfg_entry_t *entry, + const char *atomstr, const char *debugstr) +{ xv_driver_t *this = (xv_driver_t *) this_gen; - int xv_filter; xcb_intern_atom_cookie_t atom_cookie; xcb_intern_atom_reply_t *atom_reply; - xv_filter = entry->num_value; - pthread_mutex_lock(&this->main_mutex); - atom_cookie = xcb_intern_atom(this->connection, 0, sizeof("XV_FILTER"), "XV_FILTER"); + atom_cookie = xcb_intern_atom(this->connection, 0, strlen (atomstr), atomstr); atom_reply = xcb_intern_atom_reply(this->connection, atom_cookie, NULL); - xcb_xv_set_port_attribute(this->connection, this->xv_port, atom_reply->atom, xv_filter); + xcb_xv_set_port_attribute(this->connection, this->xv_port, atom_reply->atom, entry->num_value); free(atom_reply); pthread_mutex_unlock(&this->main_mutex); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xcbxv: bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); + LOG_MODULE ": %s = %d\n", debugstr, entry->num_value); } -static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) { - xv_driver_t *this = (xv_driver_t *) this_gen; - int xv_double_buffer; - - xcb_intern_atom_cookie_t atom_cookie; - xcb_intern_atom_reply_t *atom_reply; - - xv_double_buffer = entry->num_value; - - pthread_mutex_lock(&this->main_mutex); - atom_cookie = xcb_intern_atom(this->connection, 0, sizeof("XV_DOUBLE_BUFFER"), "XV_DOUBLE_BUFFER"); - atom_reply = xcb_intern_atom_reply(this->connection, atom_cookie, NULL); - xcb_xv_set_port_attribute(this->connection, this->xv_port, atom_reply->atom, xv_double_buffer); - free(atom_reply); - pthread_mutex_unlock(&this->main_mutex); +static void xv_update_XV_FILTER(void *this_gen, xine_cfg_entry_t *entry) { + xv_update_attr (this_gen, entry, "XV_FILTER", "bilinear scaling mode"); +} - xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xcbxv: double buffering mode = %d\n", xv_double_buffer); +static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) { + xv_update_attr (this_gen, entry, "XV_DOUBLE_BUFFER", "double buffering mode"); } static void xv_update_XV_SYNC_TO_VBLANK(void *this_gen, xine_cfg_entry_t *entry) { - xv_driver_t *this = (xv_driver_t *) this_gen; - int xv_sync_to_vblank; - - xcb_intern_atom_cookie_t atom_cookie; - xcb_intern_atom_reply_t *atom_reply; - - xv_sync_to_vblank = entry->num_value; - - pthread_mutex_lock(&this->main_mutex); - atom_cookie = xcb_intern_atom(this->connection, 0, sizeof("XV_SYNC_TO_VBLANK"), "XV_SYNC_TO_VBLANK"); - atom_reply = xcb_intern_atom_reply(this->connection, atom_cookie, NULL); - xcb_xv_set_port_attribute(this->connection, this->xv_port, atom_reply->atom, xv_sync_to_vblank); - free(atom_reply); - pthread_mutex_unlock(&this->main_mutex); - - xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xcbxv: sync to vblank = %d\n", xv_sync_to_vblank); + xv_update_attr (this_gen, entry, "XV_SYNC_TO_VBLANK", "sync to vblank"); } - static void xv_update_xv_pitch_alignment(void *this_gen, xine_cfg_entry_t *entry) { xv_driver_t *this = (xv_driver_t *) this_gen; diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index a3612e3eb..cc2990a03 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -1269,52 +1269,31 @@ static void xv_update_deinterlace(void *this_gen, xine_cfg_entry_t *entry) { this->deinterlace_method = entry->num_value; } -static void xv_update_XV_FILTER(void *this_gen, xine_cfg_entry_t *entry) { +static void xv_update_attr (void *this_gen, xine_cfg_entry_t *entry, + const char *atomstr, const char *debugstr) +{ xv_driver_t *this = (xv_driver_t *) this_gen; Atom atom; - int xv_filter; - - xv_filter = entry->num_value; LOCK_DISPLAY(this); - atom = XInternAtom (this->display, "XV_FILTER", False); - XvSetPortAttribute (this->display, this->xv_port, atom, xv_filter); + atom = XInternAtom (this->display, atomstr, False); + XvSetPortAttribute (this->display, this->xv_port, atom, entry->num_value); UNLOCK_DISPLAY(this); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xv: bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); + LOG_MODULE ": %s = %d\n", debugstr, entry->num_value); } -static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) { - xv_driver_t *this = (xv_driver_t *) this_gen; - Atom atom; - int xv_double_buffer; - - xv_double_buffer = entry->num_value; - - LOCK_DISPLAY(this); - atom = XInternAtom (this->display, "XV_DOUBLE_BUFFER", False); - XvSetPortAttribute (this->display, this->xv_port, atom, xv_double_buffer); - UNLOCK_DISPLAY(this); +static void xv_update_XV_FILTER(void *this_gen, xine_cfg_entry_t *entry) { + xv_update_attr (this_gen, entry, "XV_FILTER", "bilinear scaling mode"); +} - xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xv: double buffering mode = %d\n", xv_double_buffer); +static void xv_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) { + xv_update_attr (this_gen, entry, "XV_DOUBLE_BUFFER", "double buffering mode"); } static void xv_update_XV_SYNC_TO_VBLANK(void *this_gen, xine_cfg_entry_t *entry) { - xv_driver_t *this = (xv_driver_t *) this_gen; - Atom atom; - int xv_sync_to_vblank; - - xv_sync_to_vblank = entry->num_value; - - LOCK_DISPLAY(this); - atom = XInternAtom (this->display, "XV_SYNC_TO_VBLANK", False); - XvSetPortAttribute (this->display, this->xv_port, atom, xv_sync_to_vblank); - UNLOCK_DISPLAY(this); - - xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xv: sync to vblank = %d\n", xv_sync_to_vblank); + xv_update_attr (this_gen, entry, "XV_SYNC_TO_VBLANK", "sync to vblank"); } static void xv_update_xv_pitch_alignment(void *this_gen, xine_cfg_entry_t *entry) { diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index b3ac39697..06a42b23f 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -2129,36 +2129,27 @@ static void xxmc_check_capability (xxmc_driver_t *this, this->props[property].value = int_default; } -static void xxmc_update_XV_FILTER(void *this_gen, xine_cfg_entry_t *entry) { +static void xxmc_update_attr (void *this_gen, xine_cfg_entry_t *entry, + const char *atomstr, const char *debugstr) +{ xxmc_driver_t *this = (xxmc_driver_t *) this_gen; Atom atom; - int xv_filter; - - xv_filter = entry->num_value; XLockDisplay(this->display); - atom = XInternAtom (this->display, "XV_FILTER", False); - XvSetPortAttribute (this->display, this->xv_port, atom, xv_filter); + atom = XInternAtom (this->display, atomstr, False); + XvSetPortAttribute (this->display, this->xv_port, atom, entry->num_value); XUnlockDisplay(this->display); xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: bilinear scaling mode (XV_FILTER) = %d\n",xv_filter); + LOG_MODULE ": %s = %d\n", debugstr, entry->num_value); } -static void xxmc_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) { - xxmc_driver_t *this = (xxmc_driver_t *) this_gen; - Atom atom; - int xv_double_buffer; - - xv_double_buffer = entry->num_value; - - XLockDisplay(this->display); - atom = XInternAtom (this->display, "XV_DOUBLE_BUFFER", False); - XvSetPortAttribute (this->display, this->xv_port, atom, xv_double_buffer); - XUnlockDisplay(this->display); +static void xxmc_update_XV_FILTER(void *this_gen, xine_cfg_entry_t *entry) { + xxmc_update_attr (this_gen, entry, "XV_FILTER", "bilinear scaling mode"); +} - xprintf(this->xine, XINE_VERBOSITY_DEBUG, - "video_out_xxmc: double buffering mode = %d\n", xv_double_buffer); +static void xxmc_update_XV_DOUBLE_BUFFER(void *this_gen, xine_cfg_entry_t *entry) { + xxmc_update_attr (this_gen, entry, "XV_DOUBLE_BUFFER", "double buffering mode"); } static void xxmc_update_xv_pitch_alignment(void *this_gen, xine_cfg_entry_t *entry) { |