summaryrefslogtreecommitdiffstats
path: root/libvo
Commit message (Collapse)AuthorAgeFilesLines
* osx_common.c: Fix compilationUoti Urpala2009-09-261-1/+2
| | | | | This file should have been fixed when merging it from svn. Broke compilation with OS X-specific VOs enabled.
* Merge branch 'vdpau' into buildUoti Urpala2009-09-196-872/+1263
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vdpau: (22 commits) VO: Prefer vo_vdpau over vo_xv again vo_vdpau: Fix X event handling bugs vo_vdpau: Fix memory corruption bug with MP_IMGTYPE_NUMBERED core/VO: Allow VO drivers to add/modify frames video_out.h: Cosmetics VO interface: Remove obsolete draw_frame() from new interface vo_vdpau: Support recovering from VDPAU display preemption vo_vdpau: Support updating OSD while paused vo_vdpau.c: Reindent control() switch statement vo_vdpau: Allocate one large surface for EOSD content vo_vdpau.c: cosmetics vo_vdpau: reindent after GUI code removal vo_vpdau: Clean up uninit logic vo_vdpau: Make CHECK_ST macro safer vo_vdpau: Move all remaining static/global variables to context vo_vdpau: Move things to context struct vo_vdpau: Make info struct const vo_vdpau: Replace global function table with context variable vo_vdpau: Move VDPAU interface pointers into one struct vo_vdpau: Add template file for VDPAU functions ...
| * VO: Prefer vo_vdpau over vo_xv againUoti Urpala2009-09-191-3/+3
| | | | | | | | | | vo_vdpau should now be fixed enough that it's a clearly better choice than vo_xv.
| * vo_vdpau: Fix X event handling bugsUoti Urpala2009-09-191-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check_events() first checked for a RESIZE event and called resize() if needed, and then queued a frame to be reshown if in pause state and the event was either RESIZE or EXPOSE. The most obvious problems with the code were: - resize() already called flip_page() internally, so the code in check_events could lead to _two_ frames being queued. - The call in resize() didn't depend on pause status, so the behavior was inconsistent. - The code in check_events() actually queued the wrong output surface. It showed the same surface as flip_page() would show _next_, while it should have shown the previously shown one. This typically led to the screen contents changing to a previous state, as the new surface had not been initialized and had contents from a previous use. Fix the double update. Make resize() also only immediately update the video if paused (this also affects changing to/from fullscreen) and otherwise leave the old window contents be until the next frame. Queue the right frame in check_events(). Also make resize() a bit more careful to only show contents if they were successfully updated (though a case where we're paused without content to show shouldn't normally happen).
| * core/VO: Allow VO drivers to add/modify framesUoti Urpala2009-09-183-72/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add interfaces to allow VO drivers to add or remove frames from the video stream and to alter timestamps. Currently this functionality only works with in correct-pts mode. Use the new functionality in vo_vdpau to properly support frame-adding deinterlace modes. Frames added by the VDPAU deinterlacing code are now properly timed. Before every second frame was always shown immediately (probably next monitor refresh) after the previous one, even if you were watching things in slow motion, and framestepping didn't stop at them at all. When seeking the deinterlace algorithm is no longer fed a mix of frames from old and new positions. As a side effect of the changes a problem with resize events was also fixed. Resizing calls video_to_output_surface() to render the frame at the new resolution, but before this function also changed the list of history frames, so resizing could give an image different from the original one, and also corrupt next frames due to them seeing the wrong history. Now the function has no such side effects. There are more resize-related problems though that will be fixed in a later commit. The deint_mpi[] list of reserved frames is increased from 2 to 3 entries for reasons related to the above. Having 2 entries is enough when you initially get a new frame in draw_image() because then you'll have those two entries plus the new one for a total of 3 (the code relied on the oldest mpi implicitly staying reserved for the duration of the call even after usage count was decreased). However if you want to be able to reproduce the rendering outside draw_image(), relying on the explicitly reserved list only, then it needs to store 3 entries.
| * video_out.h: CosmeticsUoti Urpala2009-09-171-73/+73
| | | | | | | | | | Reindent structs that used 8-space indent, change type of is_new to bool, remove unnecessary <stdarg.h> include.
| * VO interface: Remove obsolete draw_frame() from new interfaceUoti Urpala2009-09-175-21/+4
| |
| * vo_vdpau: Support recovering from VDPAU display preemptionUoti Urpala2009-09-072-61/+166
| | | | | | | | | | | | | | Add code to reinitialize all VDPAU objects if a display preemption condition occurs. Reinitializing them in the middle of playback will cause video corruption at least until the next keyframe when using hardware decoding, but decoding does seem to recover after a keyframe.
| * vo_vdpau: Support updating OSD while pausedUoti Urpala2009-09-051-0/+6
| |
| * vo_vdpau.c: Reindent control() switch statementUoti Urpala2009-09-051-77/+76
| |
| * vo_vdpau: Allocate one large surface for EOSD contentUoti Urpala2009-09-052-78/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a single large bitmap surface for EOSD objects and pack all the bitmap rectangles inside that. The old code created a separate bitmap surface for every bitmap and then resized the cached surfaces when drawing later frames. The number of surfaces could be large (at least about 2000 for one sample subtitle script) so this was very inefficient. The old code also used a very simple strategy for pairing existing surfaces to new bitmaps; it could resize tiny surfaces to hold large glyphs while using existing large surfaces to hold tiny glyphs and as a result allocate arbitrarily much more total surface area than was necessary. The new code only supports using a single surface, freeing it and allocating a larger one if necessary. It would be possible to support multiple surfaces in case of hitting the maximum bitmap surface size, but I'll wait to see if that is actually needed before implementing it. NVIDIA seems to support bitmap surface sizes up to 8192x8192, so it would take either a really pathological subtitle script rendered at a high resolution or an implementation with lower limits before multiple surfaces would be necessary. The packing algorithm should successfully pack the bitmaps into a surface of size w*h as long as the total area of the bitmaps does not exceed 16/17 (w-max_bitmap_width)*(h-max_bitmap_height), so there should be no totally catastrophic failure cases. The 16/17 factor comes from approximate sorting used in the algorithm. On average performance should be better than this minimum guaranteed level.
| * Merge branch 'vdpau_old' into vdpauUoti Urpala2009-08-312-684/+794
| |\
| | * vo_vdpau.c: cosmeticsUoti Urpala2009-08-291-198/+258
| | |
| | * vo_vdpau: reindent after GUI code removalUoti Urpala2009-08-291-30/+28
| | |
| | * vo_vpdau: Clean up uninit logicUoti Urpala2009-08-291-52/+54
| | |
| | * vo_vdpau: Make CHECK_ST macro saferUoti Urpala2009-08-291-41/+51
| | | | | | | | | | | | Also contains a couple of changes in destroy_vdpau_objects.
| | * vo_vdpau: Move all remaining static/global variables to contextUoti Urpala2009-08-291-103/+103
| | |
| | * vo_vdpau: Move things to context structUoti Urpala2009-08-291-254/+257
| | |
| | * vo_vdpau: Make info struct constUoti Urpala2009-08-291-1/+1
| | |
| | * vo_vdpau: Replace global function table with context variableUoti Urpala2009-08-291-91/+148
| | |
| | * vo_vdpau: Move VDPAU interface pointers into one structUoti Urpala2009-08-291-53/+55
| | | | | | | | | | | | | | | | | | Replace a bunch of vdp_* function pointer variables with one struct. A variable that was before named "vdp_xyz" is now the struct field "vdp.xyz".
| | * vo_vdpau: Add template file for VDPAU functionsUoti Urpala2009-08-292-86/+44
| | | | | | | | | | | | | | | | | | | | | | | | Add a template file that contains a single listing of various information needed about the VDPAU interface functions, and is then included multiple times to create required declarations and tables. Previously some of the information needed to be duplicated for each of those uses.
| | * vo_vdpau: Make compile as new-style VOUoti Urpala2009-08-291-78/+97
| | |
| | * vo_vdpau: Delete GUI stuff, include font_load.h for force_load_fontUoti Urpala2009-08-291-8/+1
| | | | | | | | | | | | font_load.h was previously included through gui/interface.h
* | | Merge svn changes up to r29684Uoti Urpala2009-09-162-41/+40
|\ \ \
| * | | Add standard license header and move a misplaced comment.reimar2009-09-051-1/+18
| | | | | | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29649 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | | Factor out duplicated code to set play video scaled by a certain factor.reimar2009-09-041-39/+21
| | | | | | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29646 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | | Subopt parser subopts should now be const.reimar2009-09-041-1/+1
| | | | | | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29645 b3059339-0415-0410-9bf9-f77b7e298cf2
* | | | Merge svn changes up to r29644Uoti Urpala2009-09-0416-618/+363
|\| | | | |/ / |/| |
| * | Consistently use sizeof(variable) instead of sizeof(type) where easily possible.reimar2009-09-021-7/+7
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29632 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Cosmetics: get rid of many pointless ()reimar2009-09-021-17/+17
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29631 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Reduce code duplication for half/normal/double video size handling.reimar2009-09-021-31/+19
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29630 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Remove unused variable.reimar2009-09-021-1/+0
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29629 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | vo_quartz: change deallocation/uninit to more reliably free allocated data.reimar2009-09-021-29/+20
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29618 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Make glContext a local variable, it is not needed outside the functionreimar2009-09-012-3/+2
| | | | | | | | | | | | | | | | | | | | | where it is allocated, reference counting takes care of freeing it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29617 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Add a dealloc function to corevideo to reduce the memleaks fromreimar2009-09-011-0/+11
| | | | | | | | | | | | | | | | | | | | | (for my sample) about 12 MB to 2 MB. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29616 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Fix some of the major memleaks of vo_corevideo with -fixed-voreimar2009-09-011-24/+27
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29615 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Do not do a unmap/map cycle on Windows given with -wid, with some windowreimar2009-09-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | managers this has the ugly side-effect of moving the window. Instead call XInstallColormap to ensure the Colormap is installed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29614 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Check setGlWindow return value to fail properly instead of crashing if e.g.reimar2009-09-012-2/+4
| | | | | | | | | | | | | | | | | | | | | no OpenGL support is available. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29612 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Make shm_fd a local variable and close it when we need it no longer, thusreimar2009-09-011-1/+3
| | | | | | | | | | | | | | | | | | | | | fixing a file descriptor leak. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29609 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Reduce vo_corevideo memleaks by initializing static context etc. only oncereimar2009-09-011-14/+26
| | | | | | | | | | | | | | | | | | | | | in preinit and freeing the video-specific data before reallocating in config. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29608 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Fix memleak when using fontconfig without a font name.reimar2009-09-011-3/+1
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29607 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Use MPlayer's standard aspect handling functions in corevideoreimar2009-09-012-100/+30
| | | | | | | | | | | | | | | | | | | | | instead of reimplementing them incompletely. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29606 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Port feature from corevideo: remember half/double size settings and reapplyreimar2009-08-281-0/+6
| | | | | | | | | | | | | | | | | | | | | them after an aspect change. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29579 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Make aspect switching work again (used the wrong variable and alwaysreimar2009-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | switched to the original aspect). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29578 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Fix implicit declaration of mp_input_.. functions.reimar2009-08-281-0/+1
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29577 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | 1l, use sizeof for snprintf size instead of hard-coding the current value.reimar2009-08-281-1/+1
| | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29576 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Reuse the osx_common convert_key function to convert OSX keycodes to MPlayerreimar2009-08-281-52/+3
| | | | | | | | | | | | | | | | | | | | | keycodes instead of its own switch-case in vo_corevideo.m git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29575 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Move aspect change handling from vo_quartz to osx_common.reimar2009-08-283-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | This could probably be even moved to video_out, though the names should be improved. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29574 b3059339-0415-0410-9bf9-f77b7e298cf2
| * | Add osx_common.c and move the keycode conversion (OSX to MPlayer) there.reima