summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* configure, build: remove --disable-libav supportUoti Urpala2011-12-1116-97/+24
| | | | | Remove support for building the player without libavcodec and libavformat. These libraries are now always required.
* vo_vdpau: use new want_redraw mechanism in one more caseUoti Urpala2011-12-091-3/+1
|
* options: change --ass-hinting default to 0Uoti Urpala2011-12-071-1/+0
| | | | | | | With current typical video sizes, font sizes are large enough that they don't really need hinting (and particularly so for font sizes in display-resolution rendered subtitles in fullscreen mode), and hinting apparently causes problems with some fonts.
* Merge remote-tracking branch 'pigoz/gl'Uoti Urpala2011-12-073-13/+27
|\
| * vo_gl: cocoa: point swapinterval to cocoa_common functionStefano Pigozzi2011-12-063-0/+11
| | | | | | | | | | | | | | | | Currently there is no way to set the swap interval with a function that has a signature compatible with other platforms' gl extensions. Make a wrapper function around the gui toolkit method of setting the swap interval property, and point gl->SwapInterval to it.
| * vo_gl: cocoa: decouple cocoa_common from gl_commonStefano Pigozzi2011-12-063-13/+16
| | | | | | | | | | | | Remove the useless dependency on MPGLContext from cocoa_common, since it was used just to access the vo struct. Change gl_common to pass the vo struct directly to all the cocoa_common functions.
* | Merge remote-tracking branch 'wm4/window_title'Uoti Urpala2011-12-0715-62/+107
|\|
| * libvo: change default window title to "mplayer2"wm42011-12-062-2/+2
| | | | | | | | | | Also change the WM_CLASS "application class" string from "MPlayer" to "mplayer2". This string is visible as application name in Gnome 3.
| * x11: set window titles as UTF-8wm42011-12-062-3/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Always set the X11 window title properties as UTF-8. This is a bit tricky for X11 window properties which are not specified to use UTF-8, such as WM_NAME. We also properly set WM_ICON_NAME, which means the window caption and the text used in the task bar (of the WM has one) will be the same on most window managers. Before this commit, WM_ICON_NAME was always hardcoded to "MPlayer", even if --title or --use-filename-title was used. Also update the window title only on reconfigure, like it is done in mplayer-svn commit 34380.
| * libvo: remove title argument from struct vo_driver.configwm42011-12-0615-60/+50
| | | | | | | | | | | | | | | | | | | | This affects only the "new" VO API. The config() title argument was barely used, and it's hardcoded to "MPlayer" in vf_vo.c. The X11 and the Cocoa GUI backends, which are the only ones properly supporting window titles, ignored this argument. Remove the title argument. Add the vo_get_window_title function. All GUI VOs are supposed to use it for the window title.
* | ad_ffmpeg: avoid avcodec_close() if avcodec_open() failedUoti Urpala2011-12-061-1/+1
| | | | | | | | | | | | Avoid calling avcodec_close() in uninit() if avcodec_open() failed. Calling avcodec_close() on a non-open codec context causes a crash with recent Libav versions.
* | core: minor hrseek tweak (affects vo_vdpau deint frames)Uoti Urpala2011-12-061-3/+2
| | | | | | | | | | | | Remove no longer necessary tests from hrseek code. As a result each field of vo_vdpau framerate-doubling deinterlace modes is now considered as a possible seek target.
* | commands: playback speed: better responsiveness without audioUoti Urpala2011-12-061-3/+5
| | | | | | | | | | | | | | | | Adjust the scheduled time until next frame when changing playback speed (only affects behavior without audio). The main case where this makes a difference is when it would take a noticeably long time to switch frames with the previous speed and you switch to a faster speed.
* | core, vo: new window refresh logic, add slow-video OSD redrawUoti Urpala2011-12-066-74/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove code refreshing window contents after events such as resize from vo_vdpau, vo_gl and vo_xv. Instead have them simply set a flag indicating that a refresh is needed, and have the player core perform that refresh by doing an OSD redraw. Also add support for updating the OSD contents over existing frames during slow-but-not-paused playback. The VOs now also request a refresh if parameters affecting the picture change (equalizer settings, colormatrix, VDPAU deinterlacing setting). Even previously the picture was typically redrawn with the new settings while paused because new OSD messages associated with setting changes triggered a redraw, but this did not happen if OSD was turned off. A minor imperfection is that now window system events can trigger a single one-frame step forward when using vo_xv after pausing so that vo_xv does not yet have a copy of the current image. This could be fixed but I think it's not important enough to bother.
* | core, vo: modify OSD redraw architecture, support EOSDUoti Urpala2011-12-0614-63/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the core sent VFCTRL_REDRAW_OSD to change OSD contents over the current frame. Change this to VFCTRL_REDRAW_FRAME followed by normal EOSD and OSD drawing calls, then vo_flip_page(). The new version supports changing EOSD contents for libass-rendered subtitles and simplifies the redraw support code needed per VO. vo_xv doesn't support EOSD changes because it relies on vf_ass to render EOSD contents earlier in the filter chain. vo_xv logic is additionally simplified because the previous commit removed the need to track the status of current and next images separately (now each frame is guaranteed to become "visible" soon after we receive it as "next", with no VO code running in the interval between).
* | vo: do final frame draw only near page flipUoti Urpala2011-12-064-12/+51
|/ | | | | | | | | | | | | | | | | | | | | | | | | Separate passing a new frame to VOs using the new API into two steps. The first, vo_draw_image(), happens after a new frame is available from the filter chain. In constrast to old behavior, now the frame is not actually rendered yet at this point (though possible slice draw calls can already reach the VO before). The second step, vo_new_frame_imminent(), happens when we're close enough to the display time of the new frame that we'll commit to flipping it as the next action and will not change the OSD over the previous frame any more. This new behavior fixes a previous problem with vo_vdpau and vo_gl in the situation where the player is paused after decoding a new frame but before flipping it; previously changing OSD in that state would switch to the new frame as a side effect. It would also allow an easy way to fix extra output files produced with something like "--vo=png --frames=1" with precise seeking, but this is not done yet. The code now relies on a new mp_image from the filter chain staying valid even after the vf_vo put_image() call providing it returns. In other words decoders/filters must not deallocate or otherwise invalidate their output frame between passing it forward and returning from the decode/filter call.
* vo_gl: add native mac osx Cocoa backend for vo_glStefano Pigozzi2011-11-266-1/+660
| | | | | | | | | Add native Cocoa code to display an OpenGL window. Some of the code is based on the OpenGL parts of vo_corevideo but I took the time to remove old code based on Carbon. There is autodetection in the configure script but you can use --enable[disable]-cocoa to enable[disable] this.
* vo_corevideo: fix key interpretation with modifiersStefano Pigozzi2011-11-261-2/+9
| | | | | | | | When interpreting a key event, use the "charactersIgnoringModifiers" method of the event in order to extract Alt+key combinations while keeping the normal meaning of "key". When the right alt modifier is pressed use the "characters" method to allow AltGr behavior to be used to generate different characters.
* vo_gl: fix cscale=4 and cscale=5 doing nothingwm42011-11-251-2/+4
| | | | | | | | | | | | | | | | The ARB shader code generated at the end of the shaders for scaling mode 4 and 5 was something like: MAD yuv.g, b.r, {0.5}, a.r; This appears to be semantically equivalent with: MAD yuv.g, b.rrrr, {0.5, 0, 0, 0}, a.rrrr; This has the consequence that the result register, yuv.g, will not contain the value computed by the scale filter, but a.r. a.r is the unchanged value sampled from the normal texture coordinates, so the filter did effectively nothing and behaved as if cscale=0 was specified. The basic mistake here is that yuv.g does not specify a single register, but it specifies the full vector register yuv, with writing enabled on the g channel. This means yuv.g will assigned the g channel of the the result vector computed by the MAD instruction.
* vo_gl: fix 10 bit with Mesa drivers (Intel/Nouveau on Linux)wm42011-11-253-8/+18
| | | | | | | | | | | | | | | | | | The GL_LUMINANCE16 texture format had only 8 bit precision on Mesa based drivers. This caused heavy degradation of the image when playing formats with more than 8 bits per pixel, such as 10 bit h264. Use GL_R16 instead, which at least Mesa and Nvidia drivers actually implement as 16 bit textures. Since sampling from this texture format doesn't return anything meaningful in the other color components (unlike luminance textures), the shader code has to be slightly changed. GL_R16 requires the GL_ARB_texture_rg extension. Check for it, and fall back to the old texture format if it's not available. The low precision of the GL_LUMINANCE16 format has just been fixed in upstream Mesa, but it'll take a while before that fix is available in distros.
* vo_gl: make shader code generation easier to deal withwm42011-11-251-152/+188
| | | | | | | | | The shader code was generated from very long strings with lots of format specifiers with snprintf calls. It was almost impossible to quickly tell what variables were inserted where in the shader. Make this more readable by implementing a kind of simple variable substitution, which allows replacing the format specifiers in the code templates with with variable names.
* Merge branch 'screenshot' (early part)Uoti Urpala2011-11-2519-172/+613
|\
| * vo_xv: implement screenshotswm42011-11-251-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | Caveat: the OSD will be included in the screenshots when the screenshot is taken during normal playback. This doesn't happen when a screenshot is taken while playback is paused. Fixing this would introduce a small performance reduction during normal playback, which is unacceptable for a possibly rarely used optional feature. Due to the nature of the Xv API, taking a screenshot of the scaled video isn't possible either.
| * vo_gl: implement screenshotswm42011-11-253-0/+80
| |
| * vo_vdpau: implement screenshotswm42011-11-253-11/+91
| |
| * video: use talloc for mp_image, abort if out of memorywm42011-11-251-14/+20
| | | | | | | | | | Make new_mp_image() allocate the struct with talloc and abort() if the av_malloc for image plane data fails.
| * core: add screenshot mode for actual VO window contentswm42011-11-256-11/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The screenshot command normally converts the currently displayed video frame to an image. Add support for an alternative screenshot mode that is supposed to capture the real window contents. Such a screenshot contains a possibly scaled version of the frame, the OSD, and subtitles. Add a default key binding Alt+s for taking screenshots in this mode. This needs special VO support, and might not work with all VOs (this commit does not yet contain an implementation for any VO, only the infrastructure).
| * core: add infrastructure to get screenshots from VOswm42011-11-259-144/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a VO command (VOCTRL_SCREENSHOT) which requests a screenshot directly from the VO. If VO support is available, screenshots will be taken instantly (no more 1 or 2 frames delay). Taking screenshots when hardware decoding is in use will also work (vdpau). Additionally, the screenshots will now use the same colorspace as the video display. Change the central MPContext to be allocated with talloc so that it can be used as a talloc parent context. This commit does not yet implement the functionality for any VO (added in subsequent commits). The old screenshot video filter is not needed anymore if VO support is present, and in that case will not be used even if it is present in the filter chain. If VO support is not available then the filter is used like before. Note that the filter still has some of the old problems, such as delaying the screenshot by at least 1 frame.
* | ao_coreaudio: fix crash when using mute with S/PDIF outputreimar2011-11-251-1/+4
| | | | | | | | | | | | | | | | | | | | RenderCallbackSPDIF might call read_buffer with NULL data. The purpose is to drain data from the buffer when the output is muted. Add a check to call av_fifo_drain() in this case. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34241 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34242 b3059339-0415-0410-9bf9-f77b7e298cf2
* | ao_coreaudio: fix S/PDIF output on OS X 10.7Zongyao Qu2011-11-251-37/+50
| |
* | commands, vd_ffmpeg: fix switch_ratio slave commandUoti Urpala2011-11-145-35/+48
| | | | | | | | | | | | | | | | | | The implementation of the switch_ratio command was hacky and called mpcodecs_config_vo() to reconfigure the filter/VO chain from under an existing decoder. This call no longer worked properly with vd_ffmpeg after that started using mpcodec_config_vo2(). Add new video decoder control command VDCTRL_RESET_ASPECT and use this to tell vd_ffmpeg to reinitialize the output chain properly.
* | options, core/hrseek: add --hr-seek-demuxer-offsetUoti Urpala2011-11-143-0/+4
| | | | | | | | | | | | | | | | | | | | | | Some demuxers do not accurately seek to a keyframe before a given time but instead start too late. This means that precise seeks cannot work either. Most notably the libavformat mpeg demuxer exhibits this behavior depending on the file being played (with the internal mpeg demuxer precise seeks don't work at all). Add new option --hr-seek-demuxer-offset which can be used as a workaround with such demuxers. The value of the option is subtracted from the seek target position given to the demuxer when doing a precise seek.
* | core/hrseek: support precise seeks in audio-only caseUoti Urpala2011-11-141-4/+18
| | | | | | | | | | | | | | Before, precise seeking only worked if there was a video stream; in the audio-only case playback always started from the demuxer seek position. Add code to cut away samples from the demuxer seek position to the seek target position.
* | debian: remove leftover references to deleted OSD menu filesUoti Urpala2011-11-141-1/+1
| |
* | subopt-helper: support "no-" prefix to negate suboptionsUoti Urpala2011-11-141-16/+17
| | | | | | | | | | | | Support "no-" prefix to negate boolean suboptions in the subopt helper (used to parse VO etc suboptions). Previously only "no" was supported, unlike toplevel options which gained "no-" support earlier.
* | vd_ffmpeg: disable slice use that fails with size changesUoti Urpala2011-11-141-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When not using direct rendering, vd_ffmpeg created an mp_image struct before calling libavcodec decoder, so that possible slice support could be checked from the mpi_image and output would be ready for slice-drawing calls. However, this behavior is unsound with decoders that can change output size, as the parameters can change after the mp_image was created. Disable the code creating the mp_image at that point, which also disables use of slices in this case. Slices are disabled with threading anyway, so I think trying to add workarounds to support them is not a high priority. I think this code has always been buggy, but before common thread use it was rarely executed because the direct-rendering case was used instead.
* | cleanup: vf_scale.c, vf.c: replace numbers by flag macro namesUoti Urpala2011-11-142-13/+16
| |
* | cosmetics: vf.[ch]: reformatUoti Urpala2011-11-145-489/+586
|/ | | | Also a couple of smaller changes to other files.
* core, demux: fix --identify chapter output with ordered chapterswm42011-10-255-72/+64
| | | | | | | | | | | | | | | Information about individual chapters was printed during demuxer opening phase, and total chapter count (ID_CHAPTERS) was printed according to mpctx->demuxer->num_chapters. When playing a file with ordered chapters, this meant that chapter information about every source file was printed individually (even though only the chapters from the first file would be used for playback) and the total chapter count could be wrong. Remove the printing of chapter information from the demuxer layer and print the chapter information and count actually used for playback in core print_file_properties(). Also somewhat simplify the internal chapters API and remove possible inconsistencies.
* vd_ffmpeg.c: remove useless realvideo avctx->sub_id settingUoti Urpala2011-10-251-1/+0
| | | | Libavcodec has ignored the caller-set sub_id value since 2006.
* libmenu: remove OSD menu functionality (--menu)Uoti Urpala2011-10-2527-4483/+8
| | | | | | | | | | Something like the OSD menu functionality could be useful. However the current implementation has several problems and would require a relatively large amount of work to get into good shape. As far as I know there are few users of the existing functionality. Nobody is working on the existing code and keeping it compiling at all while changing other code would require extra work. So delete the menu code and some related code elsewhere that's used by nothing else.
* vo_gl: fix crash with backends lacking control() featureswm42011-10-241-0/+6
| | | | | | | | Some functionality provided by the windowing backend (such as x11, win32) is optional. The function pointers in MPGLContext are NULL if the functionality is not implemented. Check them before calling them, instead of crashing. This happened at least on Windows with the "vo_ontop" command.
* vo_gl: remove support for nvidia register combiners (yuv=1)wm42011-10-243-169/+7
| | | | | | | | | | | | | The register combiner color conversion is broken and seems to use a slightly incorrect color matrix (the image looks gray-ish). Completely remove all code related to nVidia register combiners. Unless you have an ancient nVidia GPU, there's no reason to prefer register combiners over fragment shaders. Users with ancient GPUs without fragment shader support can just use -vo xv. Passing yuv=1 (register combiners) as sub option will print a warning and use yuv=2 (fragment shaders) instead.
* vo_gl: fix crash with ati-hack after 20256a8a64c9679bc9136bbwm42011-10-241-28/+34
| | | | | | | | | | | | | | | | | | | | | | Using the ati-hack and force-pbo suboptions (both can be enabled automatically when particular ATI drivers are detected) could lead to segfaults due to incorrect length calculation. The problem is that width*((bpp+7)/8) == width*(bpp+7)/8 doesn't hold true in general. The old code used bpp/8, because bpp was always guaranteed to be divisible by 8. When commit 20256a8a64c96 fixed bugs around 10 bit pixel formats, this assumption was broken, and resulted in out of bounds memory accesses. Additionally, the color values that were used to clear image borders were incorrect and showed up as pink borders on the right/bottom sides of the video when playing 10 bit content. Make the clear value approximately correct; the borders are still filled with a single byte value even though formats with 9-16 bits should be cleared with 2-byte values with the low byte 0. This commit also contains some other minor cleanups with no functional changes.
* vo_gl: remove mesa-buffer suboptionwm42011-10-243-79/+28
| | | | | | | This option enabled using Mesa specific functions, which have never been widely supported, and were removed from Mesa in 2010. http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb2a66fd0c095fe03be5aaf88c8d48f5867425d3
* vo: sdl: handle key modifierswm42011-10-241-9/+43
| | | | | | | | | Now modifiers such as shift, control, and alt are handled. Unfortunately this requires a hack to deal with a SDL quirks when combining CTRL and a letter key. Also add some missing key syms.
* vo_gl: move window creation functions from vo_gl.c into gl_common.cwm42011-10-243-90/+71
| | | | | | | Now all windowing specific code is in gl_common.c. init_mpglcontext() used to set dummy callbacks for non-optional windowing callbacks. Remove these, as they only lead to confusion.
* vo_gl/sdl: use desktop resolution for fullscreen modewm42011-10-243-0/+20
| | | | | Before the SDL code would change screen resolution when switching to fullscreen. Try to keep existing desktop resolution instead.
* vo_gl: add new vo name "gl_sdl" to make SDL+GL mode availablewm42011-10-242-9/+45
| | |