summaryrefslogtreecommitdiffstats
path: root/libvo
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into osd_changeswm42012-10-2412-293/+422
|\ | | | | | | | | Conflicts: libvo/vo_xv.c
| * vo_opengl: fix help output typowm42012-10-231-1/+1
| |
| * 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...
| * 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-167-10/+78
| | | | | | | | | | | | 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.
* | 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.)
* | 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.
* | core: do not try to redraw OSD if VO doesn't support OSDwm42012-10-242-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | 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: allow taking screenshots with subtitleswm42012-10-242-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2411-209/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | sub, vf_ass: allow rendering RGBA subs, replace old vf_ass renderingwm42012-10-243-3/+3
| | | | | | | | | | | | | | | | | | | | 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-247-53/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | spudec: use csputils for color conversionwm42012-10-242-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just to get rid of that conversion copy&pasted from the internet. R and G are swapped for unknown reasons. Testing various subtitles seem to yield the same results as VLC. The sub-bitmap renderers output the correct colors. The colorspace conversion is used without problems for vo_gl, vo_gl3 and vo_vdpau. The problem is most likely that apparently, the DVD palette read from the subtitle track extradata is converted to YUV using vobsub_palette_to_yuv(), and swapped in the process. Or in other words, the YUV colors spu->global_palette are encoded with R and G swapped. Add some utility definition to csputils.c/h to make converting single color values easier.
* | Remove things related to old OSDwm42012-10-249-647/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To ease changing all the VOs to the new OSD rendering, fallbacks, conversions, support code etc. was left all over the code. Now that all VOs have been changed, all that code is inactive. Remove it. Strip down spudec.c. We don't need the old grayscale and scaling stuff anymore. (Not removing spudec itself yet - I'm not confident that the libavcodec DVD sub decoder is sufficient, and it would also require some hacks to get DVD palette and resolution information from libdvdread to libavcodec.) The option --spuaa, --spualign, --spugauss were used with the old sub scaling code, and don't do anything anymore.
* | vo_x11: use new OSD APIwm42012-10-241-60/+26
| |
* | vo_xv: simplify screenshot codewm42012-10-241-35/+5
| | | | | | | | | | | | We now have a simple function to get a XvImage buffer as mp_image. Return that as screenshot. We don't even need to copy the image (we allocate a mp_image struct only, no image data).
* | vo_xv: use new OSD APIwm42012-10-241-101/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | Aspect ratio stuff needs to be fixed later. "Fixing" the position of OSD elements outside of the screen due to panscan needs to be added back as well (what the removed fixup_osd_position() function did). The amount of data needed to "backup" an image when OSD is rendered increases. This is because we support color OSD/subtitles now. The old code rendered into the Y plane only, while the new code touches all 3 planes. For YV12, which is probably the only format supported not considering chroma-swapped and packed formats, 0.5 times more memory is copied when the OSD is used in pause mode.
* | vo_lavc: use new OSD APIRudolf Polzer2012-10-241-83/+50
| | | | | | | | Merged by wm4 from commits c93978f17b76 and following.
* | csputils: cosmetic changeswm42012-10-241-15/+5
| |
* | sub: add helper to draw sub-bitmaps into an imageRudolf Polzer2012-10-242-0/+64
| | | | | | | | | | Merged by wm4 from commits 93978f17b76d..13211ef5fc20. Changed copyright header in draw_bmp.c to "mpv", and removed the one in draw_bmp.h.
* | libmpcodecs: move vf_scale.c swscale helper functions to sws_utils.cRudolf Polzer2012-10-241-2/+1
| | | | | | | | | | Extracted/rebased by wm4 from commits 93978f17b76d..13211ef5fc20. Actual mp_image_swscale is added in a later commit.
* | Merge branch 'master' into osd_changeswm42012-10-1614-844/+1146
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile command.c libvo/gl_common.c libvo/vo_corevideo.m libvo/vo_opengl.c libvo/vo_opengl_old.c libvo/vo_opengl_shaders.glsl sub/ass_mp.c sub/osd_libass.c sub/sd_ass.c
| * manpage: improvements to vo_opengl documentationwm42012-10-151-7/+7
| | | | | | | | | | | | | | | | Mention the FBO format chaos. Some other things were not entirely correct anymore. Also update the "builtin" documentation in vo_opengl.c.
| * input: track location info for input commandswm42012-10-141-1/+1
| | | | | | | | | | | | If parsing a command fails, its location is printed. The location is the path to the input.conf, and the line number of the key binding and the associated input command.
| * vo_opengl: fix filter reinitializationwm42012-10-141-4/+4
| | | | | | | | | | | | | | The second scaling filter (cscale) was never reset correctly due to a fatal oversight. In particular, this could lead to OpenGL errors, if the new filter needs a 2D texture, but the old texture was 1D (because init_scaler reuses the texture).
| * Merge branch 'input_changes' into masterwm42012-10-121-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: DOCS/man/en/vo.rst etc/input.conf input/input.c m_property.c
| | * input: verify input.conf on loadingwm42012-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | When input.conf is loaded, verify each command and print a warning if it's invalid or uses legacy commands. This is done for both the user's and the embedded config files. The diff is a bit noisy, because mp_input_parse_cmd() is changed to take a bstr as argument instead of a char*.
| * | Rename to "mpv"wm42012-10-126-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the name of this project to mpv. Most user-visible mentions of "MPlayer" and "mplayer" are changed to "mpv". The binary name and the default config file location are changed as well. The new default config file location is: ~/.mpv/ Remove etc/mplayer.desktop. Apparently this was for the MPlayer GUI, which has been removed from mplayer2 ages ago. We don't have a logo, and the MS Windows resource files sort-of require one, so leave etc/mplayer.ico/.xpm as-is. Remove the debian and rpm packaging scripts. These contained outdated dependencies and likely were more harmful than useful. (Patches which add working and well-tested packaging are welcome.)
| * | gl_common: allow compilation on Mac OS 10.6Stefano Pigozzi2012-10-072-1/+18
| | | | | | | | | | | | | | | Define just enough constants to allow compilation on OS X Snow Leopard. mpv's OpenGL autodetection features should make the rest.
| * | vo_opengl: don't try to map an empty bufferwm42012-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The change detection signalled a full re-upload on initialization, but no texture reallocation. Binding the uninitialized buffer caused an OpenGL error. Fixes error messages on start with "opengl-hq".
| * | vo_opengl: change default FBO formatwm42012-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | GL_RGB16 doesn't seem to work universally (e.g. Intel). Use GL_RGB by default, and use GL_RGB16 for "opengl-hq" only. This may require users of Intel GPUs to manually experiment with the fbo-format suboption when using "opengl-hq", as GL_RGB16 doesn't seem to work there in some cases (black screen).
| * | vo_opengl: use PBOs by default with opengl-hqwm42012-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not really known whether PBO use causes problems of any kind (most likely not). They should slightly increase performance. Use them by default with "opengl-hq". Even though PBOs don't have anything to do with rendering quality, "opengl-hq" provides a test bed for features that should be enabled by default, but aren't out of fear for regressions.
| * | vo_opengl: use low quality default settings, add opengl-hq aliaswm42012-10-032-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | Change the default settings for vo_opengl to highest performance and compatibility, but lowest quality. Use bilinear as default scaler. Add "opengl-hq" as alias for high quality settings. This alias uses exactly the same settings as vo_opengl did before this commit.
| * | VO: add mechanism to replace old VO names, use it with "gl" and "gl3"wm42012-10-032-37/+24
| | | | | | | | | | | | | | | Rather than duplicating the VO driver structs to add aliases, replace them textually when searching for the VO on initialization.
| * | vo_opengl: always check GL errors in first 5 frameswm42012-10-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | |