summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into osd_changeswm42012-10-2441-435/+1389
|\ | | | | | | | | Conflicts: libvo/vo_xv.c
| * cleanup: remove vd_internal.hwm42012-10-231-48/+0
| | | | | | | | This was stupid crap for old vd_* files, and vd_ffmpeg doesn't need it.
| * vo_opengl: fix help output typowm42012-10-231-1/+1
| |
| * VF: remove IMGFMT_MPEGPESwm42012-10-226-20/+2
| | | | | | | | | | | | | | | | | | This wasn't used anymore. Remove the reference to IMGFMT_MJPEG in vf_dlopen as well. Thus format is used as FourCC in the TV code (i.e. it's on the demuxer level, just like raw formats), and never appears in the video filter chain. For starters, vd_ffmpeg can never produce this format.
| * vd: remove references to vf_palette and vf_lavcwm42012-10-221-48/+3
| | | | | | | | | | | | Both of these video filters have been deleted. There wasn't any use-case left where these were needed. Videos with paletted pixel formats still work.
| * vd_ffmpeg, vf: fix crashes with some game formatsreimar2012-10-222-5/+8
| | | | | | | | | | | | | | | | | | | | | | Fixes for palette allocation handling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34304 b3059339-0415-0410-9bf9-f77b7e298cf2 This caused a crash with http://samples.ffmpeg.org/cdxl/fruit.cdxl if direct rendering was used. (Which is rarely these days.) With small changes: avoid av_freep() use, as this function is not sane.
| * osd_libass: increase robustness when handling internal OSD escapeswm42012-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The \xFF escape is used internally to insert special OSD symbols (which need a font change to the internal OSD font). There was potential for breakage when \xFF was followed by \0, because then "in" would be advanced past the string's end. Normally this can't happen, as it would require invalid UTF-8 input data. But we don't check input for UTF-8 validness, so there's a potential issue here. Garbled output is ok on invalid UTF-8 input, but crashing is not. Make it more robust by checking for this.
| * osd_libass: fix stupid dangling pointer crashwm42012-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | append_utf8_buffer() reallocates the buffer passed to it, and returns the new pointer. This bug was originally introduced in mplayer2 when that project merged mpv's osd_libass.c. That merge changed some minor things, including ASS escape handling. When mpv used this better method of escape handling too (commit 0ff7dd992fb0), the bug was duplicated.
| * mp_image: add IMGFMT_BGR0/PIX_FMT_BGR0wm42012-10-214-0/+10
| | | | | | | | Needed by ffv1.
| * vo_vdpau: fix screenshotswm42012-10-211-18/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to take screenshots printed vdpau errors on the terminal, and the resulting screenshots were filled with black. The problem was that that the screenshot code tried to use an unallocated output surface (the one at vc->output_surfaces[vc->num_output_surfaces]). This used to refer to the last allocated surface, until this was changed by a recently merged commit. That commit also added a separate screenshot surface. The merge somehow went wrong, and that part was not integrated. <uau> wm4: you used an earlier buggy version of a commit OK...
| * mplayer: make terminal status playback time consistent with OSDwm42012-10-211-14/+8
| | | | | | | | | | | | | | | | Always use the same function as the OSD does (get_current_time()). This loses the logic to display "???" if the time is unknown, as get_current_time() returns 0 in this case. (The function has far too many uses to change that now, and it seems to happen rarely in practice.)
| * build: fix compilation on Windows (manifest files)wm42012-10-203-3/+3
| |
| * VO: fix screenshot size with -geometrywm42012-10-204-24/+8
| | | | | | | | | | | | | | | | | | | | The -geometry switch works by modifying the d_width/d_height values passed to VOs. Moreover, d_width/d_height seem to be subject to the -monitorpixelaspect option. Screenshots should not be influenced by this. Change screenshot supporting VOs to use the original d_width/d_height values stored in vo->aspdat.prew/h. (Not all uses of -geometry did this. E.g. --geometry=900x560+0+20 did.)
| * gl_common: hack to support compilation on FreeBSDwm42012-10-201-0/+12
| | | | | | | | | | | | It seems FreeBSD 10.0-CURRENT as of this time doesn't include the GLX extension and header file definitions for creating OpenGL 3.x core contexts. Dump some more hacks into gl_header_fixes.h.
| * cocoa_common: avoid situational nil dereferencingStefano Pigozzi2012-10-191-2/+3
| |
| * cocoa_common: use the same window level when windowed and fullscreenStefano Pigozzi2012-10-161-17/+7
| | | | | | | | | | | | | | | | This greatly simplifies the code and makes alt tab behave like it is supposed to: it doesn't put the mplayer window behind the other ones when losing focus. If you have other programs that are displaying themselves above the normal window level, avoid them or use --ontop.
| * cocoa_common: split window creation in helper functionsStefano Pigozzi2012-10-161-88/+112
| | | | | | | | This commit hopefully makes it easier to follow the flow of the program.
| * cocoa_common: cosmetics / reformatStefano Pigozzi2012-10-161-87/+118
| | | | | | | | | | Use 80columns almost exclusively and reformat Objective-C messages declarations to follow Apple's style (i.e.: - (int)name; instead of - (int) name;).
| * gl_common: remove useless cocoa wrapper functionsStefano Pigozzi2012-10-161-18/+3
| |
| * cocoa_common: remove useless importStefano Pigozzi2012-10-161-2/+0
| | | | | | | | | | QuartzCore was probably forgot after extracting the code from `vo_corevideo`. The OpenGL.h include can be avoided with no warnings/errors.
| * cocoa_common: replace TickCount() with NSProcessInfo#systemUptimeStefano Pigozzi2012-10-161-4/+3
| | | | | | | | | | TickCount is depracted in OS X 10.8. Substitute it with a public Cocoa API call available since OS X 10.6.
| * cocoa_common: use IOKit to perform power managementStefano Pigozzi2012-10-168-12/+80
| | | | | | | | | | | | This allows to remove the call to the deprecated `UpdateSystemActivity`. The additional benefit is power management is disabled only if the video is really playing. A paused video will not stop the system from idling.
| * cocoa_common: save state in the vo structStefano Pigozzi2012-10-165-62/+85
| | | | | | | | | | Save the cocoa state in an instance variable for the Objective-C part of the code and use a field in the vo struct for the raw C part of the code.
| * codecs: add Video Decode Acceleration Framework codecStefano Pigozzi2012-10-161-0/+16
| | | | | | | | | | | | | | | | | | | | Video Decode Acceleration Framework is a framework by Apple to provide GPU assisted H.264 decoding. It is available on Mac OS X v10.6.3 and later with Mac models equipped with the NVIDIA GeForce 9400M, GeForce 320M, GeForce GT 330M, ATI HD Radeon GFX, Intel HD Graphics and others. This commit uses the new video decoder added in FFmpeg based upon this framework.
| * TOOLS: add script for osx bundle generationStefano Pigozzi2012-10-1613-0/+913
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a make task and python script to create a Mac OS X Application Bundle to be used when compiling with the --enable-macosx-finder and --enable-macosx-bundle configure flags. The main svg icon was created by me and heavily inspired by Apple's iTunes and AppStore icon designs. We are still looking for something better. For the audio, movie and subtitles icons I added the main logo to MPlayer OSX Extended icons. Use with `make osxbundle` after running configure and make.
* | vo_lavc: never draw OSDwm42012-10-241-1/+1
| | | | | | | | | | | | This guarantees that only subtitles are drawn. (Before this change, we relied on the fact that OSD is only visible on user interaction, or if explicitly request with --osd-level.)
* | manpage: cleanupwm42012-10-246-214/+96
| | | | | | | | | | Removing text about things that have been removed from the code long ago, other fixes.
* | options: remove --ffactor switchwm42012-10-247-21/+2
| | | | | | | | | | | | | | This controlled the generation of the palette for DVD subs if no palette was found. The option name and description is confusing, and it was probably barely useful. Remove the option, and hardcode the behavior to the option's default value.
* | options: remove --subfont-autoscale (changes default font scale)wm42012-10-246-44/+2
| | | | | | | | | | | | | | | | | | The code for this option attempted to emulate the old as-documented behavior. It wasn't very good at it, and now that the old OSD code has been removed, it's entirely pointless. This removes the factor 1.7 with which --subfont-text-scale was multiplied.
* | options: remove subtitle related options that did nothingwm42012-10-246-61/+5
| | | | | | | | | | | | | | Most of these cased working when the OSD was switched to libass, or didn't do anything even before that. Also don't recursively include subreader.h in sub.h.
* | draw_bmp: fix IMGFMT_BGR32 useRudolf Polzer2012-10-241-9/+15
| |
* | sub: add clarifying commentswm42012-10-241-1/+3
| |
* | core: disable vf_sub auto-insertionwm42012-10-243-48/+1
| | | | | | | | | | | | | | Since most VOs support rendering subs directly, this doesn't change much. Changes include: vo_null is faster, vo_image doesn't add subtitles by default (while vo_lavc does), vo_caca doesn't render subs (but you couldn't read them anyway).
* | VF: rename vf_ass to vf_subwm42012-10-247-30/+25
| | | | | | | | | | | | | | | | | | | | | | | | This reflects the fact that this filter now renders all types of subtitles, not just ASS subtitles. Always compile this filter, not just on CONFIG_ASS. Note that --no-ass still disables auto-inserting this filter. It's the only way to disable auto-insertion, so keep it even though it's not really ASS specific anymore. --no-ass also disables using libass for rendering text subs directly.
* | vo_corevideo: add screenshot capabilityStefano Pigozzi2012-10-245-40/+71
| | | | | | | | | | | | | | | | | | Added screenshot capability to the corevideo VO by sending back the raw data from the CVPixelBuffer. Also added "screenshot window" functionality from the other OpenGL based VOs, which uses glReadPixels to read image data back. This was moved to gl_common to avoid duplication.
* | screenshot: hack against w/width confusionwm42012-10-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct mp_image has two sets of size members: width/height and w/h. It's not even sure which one of these is the ACTUAL dimension, and which is the "stored" or "visible" dimension. vf_get_image() (a core function for video filters) does something confusing with the sizes, and often sets up cropped versions of other filter's image buffers. The screenshot code uses w/h to store the display size for anamorphic video, while width/height is the size of the pixel data. The draw_bmp.c code, as well as sws_utils.c, always use w/h for the size of the pixel data. It's an unholy mess, and the screenshot code potentially breaks it even more. Work that around with a hack, until we hopefully clean up mp_image and the video filter code.
* | draw_bmp: fix for yuy2 formatwm42012-10-242-1/+5
| | | | | | | | | | | | | | mp_get_chroma_shift() modifies its argument even if it fails, so we have to restore that. mp_image didn't set chroma shifts for yuy2.
* | core: do not try to redraw OSD if VO doesn't support OSDwm42012-10-244-24/+29
| | | | | | | | | | | | | | | | | | | | | | | | This fixes awkward framestepping when seeking with -vo null while paused (caused because seeking by default draws an OSD bar, and mplayer trying to redraw the OSD in that case; this logic is actually needed with vo_xv). It would have been simpler to just check vo->driver->draw_osd (and leave that callback to NULL for VOs which don't support OSD), but for now try to retain the capability to let VOs decide based on the image format whether to support OSD or not.
* | sub: simplify OSD redrawing logicwm42012-10-243-25/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Normally, we can redraw the OSD any time. But some drivers don't support OSD redrawing (vo_null etc.), or only "sometimes" (vo_xv). For that, some additional logic is needed. Simplify that logic. This might also fix subtle bugs with the OSD not updating or endless frame stepping in unforseen corner cases. Do this by adding a new flag, which tells whether the OSD should be redrawn. Remove some minor code duplication.
* | manpage: optional input command args can't just be omittedwm42012-10-241-6/+6
| | | | | | | | | | | | | | | | Fix the "grammar" of such commands to be hopefully less confusing. Also, add the "-" for such arguments, which skips optional arguments without changing their default value. Also change some mentions of "mplayer" to "mpv".
* | vo_corevideo: fix EOSD artifactsStefano Pigozzi2012-10-241-13/+16
| | | | | | | | | | | | The new EOSD code suffered from artifacts due to missing setup of a projection matrix. This commit fixes the problem and uniforms the resize code to the one driving vo_opengl_old.
* | screenshot: change "screenshot" input commandwm42012-10-247-32/+32
| | | | | | | | | | | | | | "screenshot" now maps to "screenshot subtitles" by default, instead of "screenshot video". Swap the argument order: the more useful argument should come first. Remove the compatibility aliases for numeric choices (e.g. "screenshot 1 0" won't work anymore).
* | screenshot: allow taking screenshots with subtitleswm42012-10-246-19/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new screenshot mode "subtitles", which basically takes the video frame as decoded, and renders subtitles into it. This may fail for some pixel formats, because libswscale sucks. If this becomes ever a real problem, the code could be changed to convert the image to RGBA first (or whatever the image writer wants), and then render the subtitles into it. This would avoid the additional image copy needed with vo_xv too. But for now, it seems better to go with the current method in the common case: vo_opengl creates an image copy anyway, and drawing bitmaps to yv12 is better, as no color space conversion is involved in draw_bmp.c's up/downsampling conversion.
* | vo_corevideo: uninitialize CoreVideo objects before OpenGLwm42012-10-241-1/+1
| |
* | VO, sub: refactorwm42012-10-2430-375/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove VFCTRL_DRAW_OSD, VFCAP_EOSD_FILTER, VFCAP_EOSD_RGBA, VFCAP_EOSD, VOCTRL_DRAW_EOSD, VOCTRL_GET_EOSD_RES, VOCTRL_QUERY_EOSD_FORMAT. Remove draw_osd_with_eosd(), which rendered the OSD by calling VOCTRL_DRAW_EOSD. Change VOs to call osd_draw() directly, which takes a callback as argument. (This basically works like the old OSD API, except multiple OSD bitmap formats are supported and caching is possible.) Remove all mentions of "eosd". It's simply "osd" now. Make OSD size per-OSD-object, as they can be different when using vf_sub. Include display_par/video_par in resolution change detection. Fix the issue with margin borders in vo_corevideo.
* | draw_bmp: don't try to call swscale if image format not supportedwm42012-10-243-2/+18
| | | | | | | | If that happens, we silently fail.
* | sub: add cache to mp_draw_sub_bitmaps()wm42012-10-244-19/+86
| | | | | | | | This caches scaled RGBA sub-bitmaps.
* | sub, vf_ass: allow rendering RGBA subs, replace old vf_ass renderingwm42012-10-246-228/+88
| | | | | | | | | | | | | | | | | | | | Do this by replacing all the old vf_ass drawing code by draw_bmp.c. Change sub.c to always use osd_draw() for the other OSD drawing routines, and simplify the code a bit. spudec.c subtitles (i.e. DVD subs) are now considered subtitles, and are rendered by vf_ass, if that filter is inserted.
* | sub: fix text subtitle aspect ratio with vo_xv and vo_lavc, refactorwm42012-10-2413-70/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes that vo_xv didn't display text subtitles correctly when using anamorphic video. It didn't pass the aspect information to the subtitle renderer. Also, try to render OSD correctly with respect to aspect ratio settings: on vo_xv, the OSD is rendered into the video, and needs to be "stretched" too when playing anamorphic video. When the -monitorpixelaspect option is used, even with VOs such as vo_opengl the OSD has to be rendered with that aspect ratio. As preparation for future commits, replace the weird vsfilter_scale value with a somewhat more sensible video_par member. Also, struct mp_eosd_res is a better place for the aspect ratio parameters, as OSD needs this too. Use osd_draw_on_image() directly in vo_lavc, which fixes aspect ratio issues as well.
* |