summaryrefslogtreecommitdiffstats
path: root/libvo/video_out.h
Commit message (Collapse)AuthorAgeFilesLines
* core: hr-seek: fix soft hang with hrseek past EOFUoti Urpala2011-03-031-0/+1
| | | | | | | | | | | | | | | | When doing a precise seek video_out->frame_loaded was left to true while frames were being skipped. However vo_get_buffered_frame() always returns success if a frame is already loaded; due to this the EOF detection in update_video() never triggered, and a hr-seek past EOF could cause a soft hang (commands were still processed and it was possible to seek again to exit the loop). This could also happen with Matroska files using ordered chapters if an underlying file was actually shorter than the chapter that was supposed to come from it. Then seeking to a timestamp after the end of the file but before the end of the chapter would trigger the bug. Fix the problem by setting frame_loaded to false when we decide to skip the frame in question.
* cleanup: some random minor code simplification and cleanupUoti Urpala2011-01-261-1/+1
|
* cleanup: move MP_NOPTS_VALUE definition to mpcommon.hUoti Urpala2011-01-151-4/+1
|
* libvo: register X11 connection fd in input event systemUoti Urpala2010-12-141-0/+2
| | | | | | | | | | | | | | Register the X11 connection fd in the input system so that mp_input_get_cmd() can immediately wake up and handle keyboard or other X events. The callback calls vo_check_events() and tells the input system to handle any input possibly recorded during that. Before this was done for vo_xv only; this commit generalizes it to all VOs that call vo_x11_create_vo_window() - those are hopefully ones that will handle all X events in check_events(). The callback is only kept registered while the vo is properly configured. At other times calling check_events() would not clear pending input and so could lead to a busy loop.
* vo_gl: create stereo-capable window when using Quadbuffer 3Dreimar2010-11-141-0/+1
| | | | | | | Select a stereo pixel format for window when Quadbuffer OpenGL was selected as 3D mode. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32620 b3059339-0415-0410-9bf9-f77b7e298cf2
* options: move -name and -title to option structClément Bœsch2010-11-041-3/+0
|
* x11_common: add VO_EVENT_MOVEreimar2010-11-021-0/+1
| | | | | | | | | Add VO_EVENT_MOVE which is required for VOs that interact directly with hardware like MGA and VIDIX. Patch by Dirk Porezag [porezag yahoo com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32454 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge svn changes up to r31097Uoti Urpala2010-04-261-2/+6
|\
| * Avoid duplicating mouse-movement command-generation code.reimar2010-04-251-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31091 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Deduplicate enable_mouse_movements declaration.reimar2010-04-251-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31089 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add reinitialization support. Necessary for fullscreen on OSX.reimar2010-04-251-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31085 b3059339-0415-0410-9bf9-f77b7e298cf2
| * rename 'struct keymap' -> 'struct mp_keymap'siretart2010-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This avoids the compilation failure on kFreeBSD (at least amd64): In file included from libvo/vo_directfb2.c:44: libvo/video_out.h:267: error: redefinition of 'struct keymap' This is because libvo/vo_directfb2.c #includes sys/kd.h, which in turn includes sys/kbio.h, which defines another 'struct keymap'. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31059 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30514Uoti Urpala2010-03-091-0/+1
|\|
| * Create the OpenGL probe window as a hidden Window on X11.reimar2010-02-041-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30507 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Some ugly hacks to make compiling against a newer external version of libass ↵reimar2009-12-241-0/+1
| | | | | | | | | | | | work. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30107 b3059339-0415-0410-9bf9-f77b7e298cf2
* | vo_vdpau: make queuing future frame flips adjustableUoti Urpala2010-02-051-0/+2
| | | | | | | | | | | | | | | | | | | | Add -vo vdpau suboptions "queuetime_windowed" and "queuetime_fs" to specify the maximum number of milliseconds how far into the future a frame flip can be queued using the VDPAU presentation queue functionality. The intended main use of these options is to allow disabling use of the queuing feature on systems where using it causes choppiness in other graphics behavior (this is an NVIDIA driver issue; the video itself isn't affected).
* | VO: Keep aspect by adding black bars in window mode too if necessaryUoti Urpala2009-11-201-1/+1
| | | | | | | | | | | | | | | | | | By default (without -nokeepaspect) MPlayer tries to maintain video aspect ratio by using window manager hints to keep output window aspect when resizing. Before this commit it would however scale the video to completely fill the window even if the window manager did not respect those hints. Change the behavior to add black bars like in fullscreen mode instead in this case.
* | Merge svn changes up to r29912Uoti Urpala2009-11-161-0/+3
|\|
| * Added -name, -title and -use-filename-title options and implementation in ↵ptt2009-11-121-0/+3
| | | | | | | | | | | | X11 vos git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29904 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Add yuv_colorspace property, implemented in vo_vdpau and vo_xvUoti Urpala2009-11-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a property to select YUV colorspace. Currently implemented only in vo_vdpau and vo_xv. Allows switching between BT.601, BT.709 and SMPTE-240M (vdpau only). The xv support uses the "XV_ITURBT_709" attribute. At least my NVIDIA card supports that; I don't know whether other xv implementations do. Bind the colorspace switch to the 'c' key by default. 'c' is currently used by vo_sdl for some fullscreen mode change thing, but at the moment that does not conflict and if it will in the future then vo_sdl can change. VDPAU part based on a patch from Lauri Mylläri <lauri.myllari@gmail.com>
* | Implement vsync-aware frame timing for VDPAUUoti Urpala2009-11-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main things added are custom frame dropping for VDPAU to work around the display FPS limit, frame timing adjustment to avoid jitter when video frame times keep falling near vsyncs, and use of VDPAU's timing feature to keep one future frame queued in advance. NVIDIA's VDPAU implementation refuses to change the displayed frame more than once per vsync. This set a limit on how much video could be sped up, and caused problems for nearly all videos on low-FPS video projectors (playing 24 FPS video on a 24 FPS projector would not work reliably as MPlayer may need to slightly speed up the video for AV sync). This commit adds a framedrop mechanism that drops some frames so that no more than one is sent for display per vsync. The code tries to select the dropped frames smartly, selecting the best one to show for each vsync. Because of the timing features needed the drop functionality currently does not work if the correct-pts option is disabled. The code also adjusts frame timing slightly to avoid jitter. If you for example play 24 FPS video content on a 72 FPS display then normally a frame would be shown for 3 vsyncs, but if the frame times happen to fall near vsyncs and change between just before and just after then there could be frames alternating between 2 and 4 vsyncs. The code changes frame timing by up to one quarter vsync interval to avoid this. The above functionality depends on having reliable vsync timing information available. The display refresh rate is not directly provided by the VDPAU API. The current code uses information from the XF86VidMode extension if available; I'm not sure how common cases where that is inaccurate are. The refresh rate can be specified manually if necessary. After the changes in this commit MPlayer now always tries to keep one frame queued for future display using VDPAU's internal timing mechanism (however no more than 50 ms to the future). This should make video playback somewhat more robust against timing inaccuracies caused by system load.
* | vo_vdpau: Modify frame buffering codeUoti Urpala2009-11-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up code related to frame buffering and generate pts information also for the next frame in the output queue. The timing information will be used in a following framedrop patch. This commit adds one frame of buffering delay in vo_vdpau and increases the number of buffered vdpau video surfaces from 3 to 4. The delay increase makes it more important to fix remaining code in MPlayer that doesn't deal well with filter/VO delay; OTOH it should help any decoding/filtering parallelism in the underlying VDPAU implementation as now filtering a frame for display can happen while the next one is being decoded.
* | Merge branch 'vdpau' into buildUoti Urpala2009-09-191-80/+94
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 ...
| * | core/VO: Allow VO drivers to add/modify framesUoti Urpala2009-09-181-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-7/+0
| | |
* | | Merge svn changes up to r29644Uoti Urpala2009-09-041-0/+5
|\ \ \ | |/ / |/| / | |/
| * Add infrastructure and test code to enable aspect scaling and panscan in ↵reimar2009-08-271-0/+5
| | | | | | | | | | | | windowed mode. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29566 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove the internal GUIAnton Khirnov2009-07-071-4/+0
| | | | | | | | | | | | | | | | | | The GUI is badly designed and too closely coupled to the internal details of other code. The GUI code is in bad shape and unmaintained for years. There is no indication that anyone would maintain it in the future either. Even if someone did volunteer to implement a better integrated GUI having the current code in the tree probably wouldn't help much. So get rid of it.
* | Merge svn changes up to r28862Uoti Urpala2009-03-071-1/+1
|\|
| * Make WinID a 64 bit integer, this should avoid issues with valid Windowreimar2009-03-021-1/+1
| | | | | | | | | | | | | | handles on windows being interpreted as "no wid set". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28795 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28641Uoti Urpala2009-02-181-1/+3
|\| | | | | | | | | | | | | | | Convert vo_x11_border (used in vo_gl/gl2 though the vo_gl_border macro) to use a wrapper macro in old-style VOs which do not provide a VO object argument. Before this function had an explicit global_vo argument in vo_gl/gl2. New vo_vdpau uses it too so use the same mechanism as most other functions.
| * Extend calc_src_dst_rects to also calculate the border values needed forreimar2009-02-171-1/+2
| | | | | | | | | | | | | | correctly placed dvdnav highlights, and fix direct3d and vdpau accordingly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28633 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix compilation after last commit.cehoyos2009-02-171-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28627 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28549Uoti Urpala2009-02-131-0/+4
|\|
| * Add a calc_src_dst_rects that calculates from window size, panscan etc.reimar2009-02-121-0/+4
| | | | | | | | | | | | | | | | | | which part of the video source must be scaled onto which part of the window. Direct3D and (future) VDPAU need this, for XvMC it makes it easier to add cropping support and Xv is changed to keep the diff to XvMC small. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28546 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28537Uoti Urpala2009-02-121-5/+18
|\|
| * Add standard license headers, unify header formatting.diego2009-02-081-5/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28481 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge branch 'pause'Uoti Urpala2009-01-151-0/+2
|\ \
| * | Update OSD while pausedUoti Urpala2008-12-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When OSD contents change while paused, try to change the OSD drawn in the currently visible frame. If such OSD updates are not supported then advance by one frame and draw the OSD normally. Add some support for OSD redrawing to vo xv. The new xv code makes a copy of the original frame contents before drawing the OSD if MPlayer is already paused when the frame is drawn. If such a copy of the current frame exists then the frame contents can be restored and a different OSD drawn on top of the same frame.
* | | Merge svn changes up to r28176Uoti Urpala2008-12-221-0/+6
|\ \ \ | |/ / |/| / | |/ | | | | Conflicts: libvo/video_out.c libvo/x11_common.c
| * Add and use a special lookup function to do table-based translation to ↵reimar2008-12-201-0/+6
| | | | | | | | | | | | MPlayer keycodes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28172 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28087Uoti Urpala2008-12-041-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: command.c libao2/ao_ivtv.c libao2/ao_v4l2.c libmpcodecs/dec_video.h libvo/aspect.h libvo/sub.c libvo/sub.h libvo/vo_directx.c libvo/vo_macosx.m libvo/vo_quartz.c mp_core.h mplayer.c mplayer.h osdep/getch2.h osdep/timer.h
| * Get rid of pointless 'extern' keywords.diego2008-12-031-3/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28038Uoti Urpala2008-11-251-4/+0
|\|
| * Remove unnecessary #ifdef around a struct and a bunch of extern declarations.diego2008-11-241-4/+0
| | | |