summaryrefslogtreecommitdiffstats
path: root/video
Commit message (Collapse)AuthorAgeFilesLines
* msg: rename mp_msg_log -> mp_msgwm42013-12-216-39/+39
| | | | 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 context to sub-module print_help callbackwm42013-12-213-11/+9
|
* 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-213-3/+4
| | | | | | | | 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.
* codecs: mp_msg conversionwm42013-12-211-1/+1
|
* img_format: drop message about unknown pixel formatswm42013-12-211-7/+1
| | | | Too bad.
* 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-216-123/+135
| | | | | | 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-216-73/+77
|
* video/fmt-conversion.c: remove unknown pixel format messageswm42013-12-213-20/+17
| | | | | | | | | | | 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-213-14/+12
| | | | Adds an awkward mp_log argument for error messages.
* sws_utils: mp_msg conversionswm42013-12-213-3/+13
| | | | | | This requires the caller to provide a mp_log in order to see error messages. Unfortunately we don't do this in most places, but I guess we have to live with it.
* 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).
* video/decode: mp_msg conversionswm42013-12-215-65/+71
| | | | Doesn't cover vdpau/vaapi parts yet, because these are a bit messier.
* video/filter: mp_msg conversionswm42013-12-2116-121/+102
|
* 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.
* vf_lavfi: don't access AVFilterPad directlywm42013-12-181-2/+3
| | | | Direct access is deprecated.
* Reduce recursive config.h inclusions in headerswm42013-12-185-6/+7
| | | | | | 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-1766-100/+100
|
* Move options/config related files from mpvcore/ to options/wm42013-12-1747-62/+62
| | | | | | | | | 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-165-26/+26
| | | | | | | | | 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.
* vf_dsize: fix bug caused by typowm42013-12-141-1/+1
|
* 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.
* dec_video: fix handling of timestamp resetswm42013-12-121-1/+0
| | | | | | This code tried to pass a still monotonic (even if not strictly monotonic) PTS to the player, but as a result it remained stuck on the PTS before a reset (since the PTS was lower).
* video: display last frame, drain frames on video reconfigwm42013-12-102-0/+5
| | | | | | | | | | | | | | | | | | | | | | Until now, the player didn't care to drain frames on video reconfig. Instead, the VO was reconfigured (i.e. resized) before the queued frames finished displaying. This can for example be observed by passing multiple images with different size as mf:// filename. Then the window would resize one frame before image with the new size is displayed. With --vo=vdpau, the effect is worse, because this VO queues more than 1 frame internally. Fix this by explicitly draining buffered frames before video reconfig. Raise the display time of the last frame. Otherwise, the last frame would be shown for a very short time only. This usually doesn't matter, but helps when playing image files. This is a byproduct of frame draining, because normally, video timing is based on the frames queued to the VO, and we can't do that with frames of different size or format. So we pretend that the frame before the change is the last frame in order to time it. This code is incorrect though: it tries to use the framerate, which often doesn't make sense. But it's good enough to test this code with mf://.
* 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.)
* video: move VO reinit from filter chain to playerwm42013-12-103-117/+34
| | | | | | | | | This gets rid of the vf_vo pseudo-filter. It ends the idea of MPlayer's architecture that the VO is just a (terminating) video filter. It didn't really work for us with respect to video timing (the "end" of the video chain isn't really made for video timing, and making it do so would be awkward), and now we're removing it entirely. We will be able to fix some things, such as properly draining video on reconfiguration.
* video: move handling of brightness and deinterlacing controlwm42013-12-103-30/+42
| | | | | Handling of brightness/gamma/saturation/etc. and deinterlacing is moved from vf_vo.c to dec_video.c.
* vf_vo: remove VO reset on filter uninitwm42013-12-101-5/+0
| | | | | | I don't think this has any reason to exist. It's likely that this used to be required by the old direct rendering infrastructure. (See git blame output.)
* video: move video filter chain initialization from decoder to playerwm42013-12-105-62/+37
| | | | | | | | | | | | | This should help fixing some issues (like not draining video frames correctly on reinit), as well as decoupling the decoder, filter chain, and VO code. I also wanted to make the hardware video decoding fallback work properly if software-only video filters are inserted. This currently has the issue that the fallback is too violent, and throws away a bunch of demuxer packets needed to restart software decoding properly. But keeping "backup" packets turned out as too hacky, so I'm not doing this, at least not yet.
* compat: add compatibility kludge for Libav 9wm42013-12-081-8/+14
| | | | | | | | Libav 9 still uses the unprefixed PIX_FMT_... symbols, but they will probably be removed some time in the future. There are some other deprecations we have yet to take care of, but there are no clear replacements yet.
* vf: redo conversion filter insertion/format negotiationwm42013-12-076-175/+187
| | | | | | | | | | | | | | | | | Remove the inconsistent, duplicated, and insufficient scale filter insertion code, and do it in one place instead. This also compensates for the earlier removal of vf_match_csp() (which was in fact duplicated code). The algorithm to determine where to insert a filter etc. is probably the same, though it also comes with some changes that should make debugging easier when trying to figure out why a chain is failing to configure. Add an "in" pseudo filter, which makes insertion of conversion filters easier. Also change the vf->reconfig signature. At a later point, I'll probably change format negotiation such that the generic filter code will choose the output format, so having separate in and out params will be useful.
* video/filter: make vf->control non-recursivewm42013-12-0712-32/+27
| | | | | | Reason: I never liked it being recursive. Generally, this seems to cause more problems than trouble, and is less flexible for access outside of the chain.
* vf: remove flags from filter format statuswm42013-12-074-37/+25
| | | | | | | | I don't think we need these flags anymore. Simplify the code and get rid of the vf_format struct. There still is the vf_format.configured field, but this can be replaced by checking for a valid image format.
* video: create a separate context for video filter chainwm42013-12-077-137/+175
| | | | | | This adds vf_chain, which unlike vf_instance refers to the filter chain as a whole. This makes the filter API less awkward, and will allow handling format negotiation better.
* video/filter: remove vf_match_csp()wm42013-12-076-119/+4
| | | | | | | | | This function improves automatic filter insertion, but this really should be done by the generic filter code. Remove vf_match_csp() and all code using it as preparation for that. This commit temporarily makes handling of filter insertion worse for now, but it will be fixed with the following commits.
* vf: remove unused functionwm42013-12-072-23/+0
|
* vf: print error when creating filter failswm42013-12-071-0/+1
| | | | Before that we relied on the filters printing their own error messages.
* cocoa: make borderless window resizableagiz2013-12-071-1/+1
| | | | Fixes #399
* vf: declare config() as legacywm42013-12-051-5/+5
|
* video/filter: remove unneeded config callbackswm42013-12-055-45/+0
| | | | | | | | They didn't do anything. vf_screenshot.c actually did release the previous image, but that's not really required. At worst you could take a screenshot and get an old frame when there's no new frame yet.
* video: remove --flipwm42013-12-057-22/+7
| | | | | | | | | | | | | | | | 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.
* vf: move norm_qscale() to the only filter which uses itwm42013-12-052-15/+15
|
* vf_sub, vf_dlopen: default struct is not neededwm42013-12-052-7/+3
|
* vf: cleanup removed filter entrywm42013-12-051-1/+0
|
* video/filter: fix some bogus free() callswm42013-12-054-8/+0
| | | | The generic filter code frees these; recent regression.
* options: remove legacy hacks for sub-option handlingwm42013-12-041-17/+8
|
* vd_lavc: factor out libavcodec thread setupwm42013-12-041-15/+1
|
* vd_lavc: don't check required hwdec fieldswm42013-12-041-4/+3
|
* av_common: add timebase parameter to mp_set_av_packet()wm42013-12-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the timebase is set, it's used for converting the packet timestamps. Otherwise, the previous method of reinterpret-casting the mpv style double timestamps to libavcodec style int64_t timestamps is used. Also replace the kind of awkward mp_get_av_frame_pkt_ts() function by mp_pts_from_av(), which simply converts timestamps in a way the old function did. (Plus it takes a timebase parameter, similar to the addition to mp_set_av_packet().) Note that this should not change anything yet. The code in ad_lavc.c and vd_lavc.c passes NULL for the timebase parameters. We could set AVCodecContext.pkt_timebase and use that if we want to give libavcodec "proper" timestamps. This could be important for ad_lavc.c: some codecs (opus, probably mp3 and aac too) have weird requirements about doing decoding preroll on the container level, and thus require adjusting the audio start timestamps in some cases. libavcodec doesn't tell us how much was skipped, so we either get shifted timestamps (by the length of the skipped data), or we give it proper timestamps. (Note: libavcodec interprets or changes timestamps only if pkt_timebase is set, which by default it is not.) This would require selecting a timebase though, so I feel uncomfortable with the idea. At least this change paves the way, and will allow some testing.
* 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.
* vf_noise: reduce binary sizewm42013-12-041-4/+1
| | | | Same issues as in previous commit.
* vf_eq: revert unintended binary size increasewm42013-12-041-13/+10
| | | | | | The vf_eq context contains a very large lookup table, and the method of setting default values caused the vf_eq context to be included in the compiled code.
* video/filter: remove legacy option handling hackswm42013-12-0432-37/+35
| | | | | | | | | All filters now either use the generic option parser, or don't have options. This finally finishes a transition started in 2003 (see git commit 33b62af94760186c). Why are MPlayer devs so monumentally lazy? Sorry, but this takes the cake. You had 10 years.
* vf_vo: don't abuse option strings to set VOwm42013-12-042-6/+15
| | | | Whoever thought this was a good idea should be punched.
* vf_rotate: use option parserwm42013-12-041-2/+7
|
* vf_pp: use option parserwm42013-12-041-5/+14
|
* vf_ilpack: use option parserwm42013-12-041-8/+10
|
* vf_eq: use option parserwm42013-12-041-26/+22
|
* vf_dsize: use option parserwm42013-12-041-31/+19
| | |