summaryrefslogtreecommitdiffstats
path: root/video/out
Commit message (Collapse)AuthorAgeFilesLines
* vo/x11_common: do not select motion events when --no-mouse-movements is setahodesuka2013-12-281-1/+1
|
* Revert "x11: don't set global error handler"wm42013-12-271-0/+28
| | | | | | | | | | | | | This reverts commit 877303aaa9111fc56a8e5edbeb439699acfe44c0. The OpenGL 2.1 fallback for vo_opengl didn't work. Two things come together: 1. trying to create an OpenGL 3.0 context will fail with a GLXBadFBConfig error, and 2. X errors are fatal by default. Since the reverted commit removed the X error handler, the mpv process was killed, instead of continuing for the fallback. (Note that this commit is not an exact inverse commit, since mp_msg changed, but it does about the same thing.)
* Revert "cocoa: unlock on uninit"Stefano Pigozzi2013-12-261-3/+1
| | | | | | Not sure why but this doesn't seem to be needed anymore. This reverts commit 6ead6aa005f1c78a117bde58e48f106cfd1e9806.
* corevideo: fix video initialization when not using VDAStefano Pigozzi2013-12-261-52/+46
| | | | | | | query_format was setting state even if wasn't the correct thing to do. Somehow it worked by pure luck (until commit e6e6b88b6da). Fix the initialization by setting state inside of reconfig.
* build: fix shm detection on OpenBSDStefano Pigozzi2013-12-261-0/+1
| | | | Fixes #427
* cocoa: sanitize window title string and guard against NULLStefano Pigozzi2013-12-251-1/+6
| | | | | | | | | | | If the utf8 string used to create the NSString for title was invalid utf8, -stringWithUTF8String returned nil and triggered an assertion in Cocoa's framework code. Sanitize the utf8 string and if the sanitation wasn't enough just avoid crashing by not setting a title. Fixes #406
* vo_x11/vo_xv: fix build when using --disable-xextStefano Pigozzi2013-12-252-12/+12
|
* vo_vdpau: fix unintended truncation of 64 bit timestamps to 32 bitwm42013-12-222-2/+2
| | | | | | | | How embarrassing... This code is inactive for all VOs other than vo_vdpau. For vo_vdpau, this caused various issues, such as stuttering after about an hour of running mpv; see github issue #403.
* vo_vdpau: add some debugging messages for frame timingwm42013-12-221-2/+4
| | | | | | Note that this will print a difference even with perfect sync, because the code queues the frames _between_ vsync, probably for error margin (though I don't understand why it uses the exact values chosen).
* gl_lcms: actually acquire mutexwm42013-12-221-0/+2
| | | | Prevents race conditions (which can happen only in theory anyway).
* msg: rename mp_msg_log -> mp_msgwm42013-12-214-28/+28
| | | | Same for companion functions.
* msg: convert defines to enumwm42013-12-212-3/+3
| | | | Also get rid of MSGL_HINT and the many MSGL_DBG* levels.
* vo_opengl_old: remove leftoverswm42013-12-211-1/+1
|
* path lookup functions: mp_msg conversionswm42013-12-211-1/+1
| | | | | | | | | | | | | | | | | There's a single mp_msg() in path.c, but all path lookup functions seem to depend on it, so we get a rat-tail of stuff we have to change. This is probably a good thing though, because we can have the path lookup functions also access options, so we could allow overriding the default config path, or ignore the MPV_HOME environment variable, and such things. Also take the chance to consistently add talloc_ctx parameters to the path lookup functions. Also, this change causes a big mess on configfiles.c. It's the same issue: everything suddenly needs a (different) context argument. Make it less wild by providing a mp_load_auto_profiles() function, which isolates most of it to configfiles.c.
* stream: mp_msg conversionswm42013-12-211-4/+5
| | | | We also drop some slave mode stuff from stream_vcd.
* x11: mp_msg conversion for fstype help outputwm42013-12-212-10/+8
|
* m_option: add mp_log callback to OPT_STRING_VALIDATE optionswm42013-12-214-16/+16
| | | | | And also convert a bunch of other code, especially ao_wasapi and ao_portaudio.
* m_option, m_config: mp_msg conversionswm42013-12-212-2/+3
| | | | | | | | Always pass around mp_log contexts in the option parser code. This of course affects all users of this API as well. In stream.c, pass a mp_null_log, because we can't do it properly yet. This will be fixed later.
* input: rework how input sources are addedwm42013-12-211-2/+2
| | | | | | | | | | | | | | Until now, there were two functions to add input sources (stuff like stdin input, slave mode, lirc, joystick). Unify them to a single function (mp_input_add_fd()), and make sure the associated callbacks always have a context parameter. Change the lirc and joystick code such that they take store their state in a context struct (probably worthless), and use the new mp_msg replacements (the point of this refactoring). Additionally, get rid of the ugly USE_FD0_CMD_SELECT etc. ifdeffery in the terminal handling code.
* bitmap_packer: use printf() for fatal messagewm42013-12-211-2/+2
| | | | | | This is printed right before abort(), which is bad style anyway. Converting this to mp_msg will help nobody, and passing through a mp_log is effort.
* vaapi: mp_msg conversionswm42013-12-212-21/+21
| | | | | | This ended up a little bit messy. In order to get a mp_log everywhere, mostly make use of the fact that va_surface already references global state anyway.
* vdpau: mp_msg conversionswm42013-12-212-52/+55
|
* video/fmt-conversion.c: remove unknown pixel format messageswm42013-12-211-2/+5
| | | | | | | | | | | This removes the messages printed on unknown pixel format messages. Passing a mp_log to them would be too messy. Actually, this is a good change, because in the past we often had trouble with these messages printed too often (causing terminal spam etc.), and printing warnings or error messages on the caller sides is much cleaner. vd_lavc.c had a change earlier to print an error message if a decoder outputs an unsupported pixel format.
* image_writer: mp_msg conversionswm42013-12-211-1/+1
| | | | Adds an awkward mp_log argument for error messages.
* gl_lcms: use global lock to deal with crappy lcms2 message callbackwm42013-12-211-14/+22
| | | | | | | | | lcms2 has a global message callback for error reporting. If you don't set this, these error messages are silently thrown away. I think we still want the error messages, so we have to do dumb stuff to avoid clashes. This doesn't handle the case if another library in the same process sets the message callback, but at least this should exclude possible memory errors when running multiple instances of mpv.
* video/out: pass along global contextwm42013-12-215-4/+10
| | | | Will be needed for other parts (especially in gl_lcms.c).
* x11: don't set global error handlerwm42013-12-211-22/+0
| | | | | | | | | This has similar problems as the ALSA message callback, though in theory we could use the Display handle to find the right mpv instance from the global callback. It still wouldn't work if another library happens to set the error handler at the same time. There doesn't seem much of an advantage overriding the error handler (though it used to be required), so remove it.
* w32_common: support file drag and dropMartin Herkt2013-12-201-0/+38
|
* w32_common: fix mouse clicksMartin Herkt2013-12-191-12/+17
| | | | | | | | | | | | | | Apparently this has been broken for a year or so. The were three reasons for the breakage here: 1. The window dragging hack prevented any DOWN event from passing through since it always returned before we even got the button. 2. The window style had CS_DBLCLKS in its flags, so we did not get any DOWN events when the OS had detected a double click (instead expecting us to handle a DBL event). 3. We never sent any mouse buttons when mouse movement handling was disabled.
* Reduce recursive config.h inclusions in headerswm42013-12-181-2/+0
| | | | | | In my opinion, config.h inclusions should be kept to a minimum. MPlayer code really liked including config.h everywhere, though, even in often used header files. Try to reduce this.
* Fix OSX build; remove all remaining mpvcore references11rcombs2013-12-173-6/+6
|
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-1723-36/+36
|
* Move options/config related files from mpvcore/ to options/wm42013-12-1718-25/+25
| | | | | | | | | Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.
* Move mpvcore/input/ to input/wm42013-12-176-15/+15
|
* Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsgwm42013-12-161-1/+1
| | | | | | | | | The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless.
* Allow some options taking filenames to refer to mpv config dirwm42013-12-141-1/+4
| | | | | | | | | | Add the mp_get_user_path() function, and make it expand special path prefixes. Use it for some things in mpv which take filenames (--input-config, --screenshot-template, opengl icc-profile suboption). This allows accessing files in the mpv config dir without hardcoding the config path by prefixing the path with ~~/. Details see manpage additions.
* video: change --video-zoom behaviorwm42013-12-131-3/+5
| | | | | | | | | | | Use the scaled video size (i.e. as shown on the window) as reference for zoom. This is the easiest way to fix different width/height scale factors as they happen when zooming video with a pixel aspect ratio other than 1:1. Also fix the unscaled mode, so that it 1. doesn't scale even with --video-zoom, and 2. doesn't scale by small amounts when the video is cropped by making the window smaller than the video.
* vo: reset some fields properlywm42013-12-101-0/+6
| | | | | | Otherwise, next_pts2 can be == next_pts (and not MP_NOPTS_VALUE), in which case the player thinks the first frame has duration 0. (Weird corner case.)
* cocoa: make borderless window resizableagiz2013-12-071-1/+1
| | | | Fixes #399
* video: remove --flipwm42013-12-054-4/+4
| | | | | | | | | | | | | | | | The --flip option flipped the image upside-down, by trying to use VO support, or if not available, by inserting a video filter. I'm not sure why it existed. Maybe it was important in ancient times when VfW based decoders output an image this way (but even then, flipping an image is a free operation by negating the stride). One nice thing about this is that it provided a possible path for implementing video orientation, which is a feature we should probably support eventually. The important part is that it would be for free for VOs that support it, and would work even with hardware decoding. But for now get rid of it. It's useless, trivial, stands in the way, and supporting video orientation would require solving other problems first.
* wayland: print waylands display errosAlexander Preisinger2013-12-041-0/+40
| | | | | This is very usefull especially if you want to use newer wayland stuff like wl_subsurfaces and xdg_surfaces.
* gl_video: change internal API for hwdec mp_image downloadStefano Pigozzi2013-12-023-10/+13
| | | | | | Previous API worked under the assumption that download_image is always called after map_image. In practice this is true, but it's better to have a much generic API that doesn't depend on the order in which the functions are called.
* gl_video: use hwdec download_image call only if hwdec is activewm42013-12-021-2/+3
| | | | | | | | | | The hwdec driver can be loaded, even if it's not used (e.g. when playing a file with no hardware decoding after one with it enabled). Also, check whether dlimage is NULL. Since this will do call into the native hwdec API, there's a chance a driver could fail doing this, it's better to check the return value, even if this case currently can't happen.
* options: add option to disable using right Alt key as Alt GrVivek Jain2013-12-022-4/+6
| | | | | | | | | mpv was hardcoded to always consider the right Alt key as Alt Gr, but there are parituclar combinations of platforms and keyboard layouts where it's more convenient to treat the right Alt as a keyboard modifier just like the left one. Fixes #388
* vo_opengl: support for vda hardware decodingStefano Pigozzi2013-12-024-0/+158
| | | | | | | | | | | The harder work was done in the previous commits. After that this feature comes out almost for free. The only problem is I can't get the textures created with CGLTexImageIOSurface2D to download properly, thus the code performs download using some CoreVideo APIs. If someone knows why download of textures created with CGLTexImageIOSurface2D doesn't work please contact me :)
* gl_video: support packed YUV formats with Apple extensionsStefano Pigozzi2013-12-024-2/+47
| | | | | | | | | | This adds support for packed YUV formats (YUVY and UYVY) using the extension GL_APPLE_rgb_422. While supporting this formats on their own is not that important (considering most video is planar YUV) they are used for interoperability with IOSurfaces. Next commit will use this formats to render VDA hardware decoded frames through IOSurface and OpenGL interoperability.
* vo_opengl: add support for rectangle textureswm42013-12-015-44/+86
| | | | | | | | | This allows vo_opengl to use GL_TEXTURE_RECTANGLE textures, either by enabling it with the 'rectangle-textures' sub-option, or by having a hwdec backend force it. By default it's off. The _only_ reason we're adding this is because VDA can export rectangle textures only.
* vo_null: don't reject hwaccel formatswm42013-12-011-2/+0
| | | | | | This is not strictly needed anymore. (On the other hand, it's not really possible to do hw decoding with vo_null, because the VO is still responsible for opening the hw decoder API, but that's another story.)
* options: add options that set defaults for af/vf/ao/vowm42013-12-011-0/+2
| | | | | | | | There are some use cases for this. For example, you can use it to set defaults of automatically inserted filters (like af_lavrresample). It's also useful if you have a non-trivial VO configuration, and want to use --vo to quickly change between the drivers without repeating the whole configuration in the --vo argument.
* Take care of some libavutil deprecations, drop support for FFmpeg 1.0wm42013-11-291-3/+3
| | | | | | | | | | | | | | PIX_FMT_* -> AV_PIX_FMT_* (except some pixdesc constants) enum PixelFormat -> enum AVPixelFormat Losen some version checks in certain newer pixel formats. av_pix_fmt_descriptors -> av_pix_fmt_desc_get This removes support for FFmpeg 1.0.x, which is even older than Libav 9.x. Support for it probably was already broken, and its libswresample was rejected by our build system anyway because it's broken. Mostly untested; it does compile with Libav 9.9.
* gl_hwdec: use a imgfmt field instead of a query_format callbackwm42013-11-294-15/+5
| | | | | Now that vdpau always uses a single image format, this can be simplified.
* vdpau: always let decoder output IMGFMT_VDPAUwm42013-11-292-3/+3
| | | | | | | | | | The old ffmpeg vdpau support code uses separate vdpau pixel formats for each decoder (pretty much because mplayer's architecture sucked), which just gets into the way. Force the old decoder's output to IMGFMT_VDPAU, and remove IMGFMT_IS_VDPAU() where we can remove it. This should completely remove the differences betwene the old and new vdpau decoder outside of the decoder.
* vaapi: remove unused hw image formats, simplifywm42013-11-291-3/+3
| | | | | | | | | | PIX_FMT_VDA_VLD and PIX_FMT_VAAPI_VLD were never used anywhere. I'm not sure why they were even added, and they sound like they are just for compatibility with XvMC-style decoding, which sucks anyway. Now that there's only a single vaapi format, remove the IMGFMT_IS_VAAPI() macro. Also get rid of IMGFMT_IS_VDA(), which was unused.
* cocoa: unlock on uninitStefano Pigozzi2013-11-261-1/+3
| | | | NSLock should be unlocked before dealloc is called on it.
* osd: remove mp_osd_res.video_par fieldwm42013-11-246-7/+1
| | | | | | This is not needed anymore, because we decided that the PAR of the decoded video matters, and not the PAR of the filtered video that arrives at the VO.
* Rename sub.c/.h to osd.c/.hwm42013-11-2416-18/+15
| | | | | This was way too misleading. osd.c merely calls the subtitle renderers, instead of actually dealing with subtitles.
* video: move struct mp_hwdec_info into its own header filewm42013-11-235-5/+5
| | | | | | | | This means most code accessing this struct must now include hwdec.h instead of dec_video.h. I just put it into dec_video.h at first because I thought a separate file would be a waste, but it's more proper to do it this way, as there are too many files which include dec_video.h only to get the mp_hwdec_info definition.
* vo_opengl: fix compilationwm42013-11-221-2/+2
| | | | Never do a trivial change while drunk and without actually testing it.
* vo_opengl: initialize all fields for VFCTRL_GET_HWDEC_INFOwm42013-11-221-4/+8
| | | | | | This initialized only the load_api and load_api_ctx fields, and left the other fields as they were. This failed with vf_vavpp, which assumed all fields are initialized.
* cocoa: use window-scale to support video scaling functionalityStefano Pigozzi2013-11-223-6/+10
| | | | | In the cocoa backend you can use cmd+0/1/2 to scale the window. This commit makes it use the new window-scale functionality.
* cocoa: implement window-scaleStefano Pigozzi2013-11-221-0/+20
|
* switch the build system to wafStefano Pigozzi2013-11-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | This commit adds a new build system based on waf. configure and Makefile are deprecated effective immediately and someday in the future they will be removed (they are still available by running ./old-configure). You can find how the choice for waf came to be in `DOCS/waf-buildsystem.rst`. TL;DR: we couldn't get the same level of abstraction and customization with other build systems we tried (CMake and autotools). For guidance on how to build the software now, take a look at README.md and the cross compilation guide. CREDITS: This is a squash of ~250 commits. Some of them are not by me, so here is the deserved attribution: - @wm4 contributed some Windows fixes, renamed configure to old-configure and contributed to the bootstrap script. Also, GNU/Linux testing. - @lachs0r contributed some Windows fixes and the bootstrap script. - @Nikoli contributed a lot of testing and discovered many bugs. - @CrimsonVoid contributed changes to the bootstrap script.
* vo_vdpau: don't calculate destination alpha when drawing OSDwm42013-11-181-2/+2
| | | | | | Same as MPlayer svn commit r36515 "Chose cheaper alpha blend equation." No idea if this is actually faster, but can't hurt.
* gl_common: print SW renderer warning only if it was the only reason we ↵wm42013-11-141-1/+1
| | | | rejected it
* gl_common: remove unneeded callbackwm42013-11-144-4/+0
| | | | We got rid of this some time ago, but apparently not completely.
* wayland: create xkbcommon keymap from stringAlexander Preisinger2013-11-131-2/+1
| |</