summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* demux_mkv: add some overflow checks etc.wm42014-06-292-59/+111
| | | | | | | | | | | Some of these might be security relevant. The RealAudio code was especially bad. I'm not sure if all RealAudio stuff still plays correctly; I didn't have that many samples for testing. Some checks might be unnecessary or overcomplicated compared to the (obfuscated) nature of the code. CC: @mpv-player/stable
* player: fix start position when specifying with percentTsukasa OMOTO2014-06-291-1/+1
|
* options: support setting start time relative to start PTSTsukasa OMOTO2014-06-294-9/+20
| | | | Signed-off-by: wm4 <wm4@nowhere>
* player: make the time display relative to start PTSTsukasa OMOTO2014-06-297-10/+30
| | | | | | This commit makes the playback start time always at time 0. Signed-off-by: wm4 <wm4@nowhere>
* av_common: remove unneeded fieldwm42014-06-291-1/+0
| | | | This is actually needed for encoding only, and not decoding. Drop it.
* af_volume: fix calculations including replay-gainMohammad Alsaleh2014-06-281-2/+2
| | | | | | | | | | | | | rgain is not an additive value. It's a multiplier/gain. Previous behaviour produced negative level values in some cases (when rgain < 1.0) which caused volume to be louder when its value was lowered. CC: @mpv-player/stable Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com> Signed-off-by: wm4 <wm4@nowhere>
* sub: fix undefined behavior with dvd://wm42014-06-281-1/+1
| | | | | | The string could get reallocated. CC: @mpv-player/stable
* manpage: update config file locationswm42014-06-285-16/+29
| | | | Also add some explanations how the config paths are determined.
* scripting: shorten a linewm42014-06-261-2/+3
| | | | | | Also allows it to deal with NULL return values, which currently is not needed, but may or may not be required at some point in the future (what if malloc fails).
* config: use the same signature for win32/OSX specific path functionswm42014-06-264-14/+19
| | | | | | | | Seems like a good idea, even if it's basically unused (yet). Also document requirements on the functions (they're not obvious). OSX changes untested.
* config: handle --no-config case directly in mp_config_dirs()wm42014-06-261-26/+23
| | | | | Requires less special-casing, and probably also avoids that starting mpv with --no-config creates a config dir (even if nothing is loaded).
* config, player: avoid some temporary talloc contextswm42014-06-262-28/+24
| | | | | IMO a semi-bad concept, that the mpv code unfortunately uses way too much.
* config: make passing talloc context optional for some functionswm42014-06-263-31/+28
| | | | | | | | | | | | | | | | Until now, the config functions added various allocations to the user- provided talloc context. Make it so that they're all under the returned allocation instead. This allows avoiding having to create an extra temporary context for some callers, and also avoids adding random memory leaks by accidentally passing a NULL context. mp_find_all_config_files() has to be changed not to return a pointer into the middle array for this to work. Make it add paths in order (instead of reverse), and then reverse the array entries after that. Also remove the declarations for the win-specific private functions. Remove STRNULL(); it's barely needed anymore and the functions are not called with NULL filenames anymore.
* player: create config dir if it doesn't existwm42014-06-262-4/+3
| | | | | | | This was dropped in the commit adding XDG support, probably accidentally. Also normalize some whitespace.
* config: prefer the old config dir if it exists, but XDG doesn'twm42014-06-261-6/+14
| | | | | | | | | | | This means normally the XDG config dir will be used. But if the old config dir (~/.mpv) exists and the XDG config dir does not, then don't create it. To simplify the code, also make mp_path_exists() accept NULL paths. In that case it's considered as not existing. (Funnily, on Linux this already worked, because the string is passed directly to the kernel, and the kernel will just return EFAULT on invalid memory.)
* player: remove some minor code duplication in config loader codewm42014-06-263-21/+16
| | | | | | | It's better to keep the logic in one place. Also drop that a broken config file aborts loading of the player. I don't see much reason for this, and it inflates the code slightly.
* Basic xdg directory implementationKenneth Zhou2014-06-2611-152/+209
| | | | | | | | | | Search $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS for config files. This also negates the need to have separate user and global variants of mp_find_config_file() Closes #864, #109. Signed-off-by: wm4 <wm4@nowhere>
* input: readd some TV default key bindingswm42014-06-251-0/+4
| | | | Requested by a user. Closes #878.
* DOCS: add document describing the release policy and procedureAlessandro Ghedini2014-06-252-9/+71
|
* command: fix tv-channel propertywm42014-06-251-0/+3
| | | | | Now it's at least actually relayed to the TV code. I didn't/couldn't test whether it actually works, though.
* manpage: update changed defaults from previous commitwm42014-06-231-2/+2
| | | | Oops.
* cache: change auto-pause/resume defaultswm42014-06-231-2/+2
| | | | | | This is hopefully better for web streams. Temporary workaround for #870.
* demux_lavf: remove unused symbolwm42014-06-231-2/+0
|
* vo_opengl: Make approx-gamma affect OSD/subNiklas Haas2014-06-222-4/+8
| | | | | | Close #837 Signed-off-by: wm4 <wm4@nowhere>
* video: Include better heuristics for guessing primariesNiklas Haas2014-06-224-6/+36
| | | | | | | These consult the vertical resolution, matching against 576 for PAL and 480/486 for NTSC. The documentation has also been updated. Signed-off-by: wm4 <wm4@nowhere>
* video: Refactor rendering intent for DCP XYZ and :srgbNiklas Haas2014-06-224-59/+102
| | | | | | Notably, we now conform to SMPTE 428-1-2006 when decoding XYZ12 input, and we can support rendering intents other than colorimetric when converting between BT.709 and BT.2020, like with :srgb or :icc-profile.
* video: Better support for XYZ inputNiklas Haas2014-06-224-11/+67
| | | | | | | | | With this change, XYZ input is directly converted to the output colorspace wherever possible, and to the colorspace specified by the tags and/or --primaries option, otherwise. This commit also restructures some of the CMS code in gl_video.c to hopefully make it clearer which decision is being done where and why.
* video: Generate an accurate CMS matrix instead of hard-codingNiklas Haas2014-06-225-129/+290
| | | | | | | | | This also avoids an extra matrix multiplication when using :srgb, making that path both more efficient and also eliminating more hard-coded values. In addition, the previously hard-coded XYZ to RGB matrix will be dynamically generated.
* video: Support BT.2020 constant luminance systemNiklas Haas2014-06-227-14/+77
| | | | Signed-off-by: wm4 <wm4@nowhere>
* options: Expose --colormatrix-primaries to the userNiklas Haas2014-06-226-0/+62
| | | | Signed-off-by: wm4 <wm4@nowhere>
* video: Add support for non-BT.709 primariesNiklas Haas2014-06-229-18/+194
| | | | | | | This add support for reading primary information from lavc, categorized into BT.601-525, BT.601-625, BT.709 and BT.2020; and passes it on to the vo. In vo_opengl, we always generate the 3dlut against the wider BT.2020 and transform our source into this colorspace in the shader.
* video: Add BT.2020-NCL colorspace and transfer functionNiklas Haas2014-06-229-18/+49
| | | | Source: http://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2020-0-201208-I!!PDF-E.pdf
* win32: add missing priority classesJames Ross-Gowan2014-06-221-0/+2
|
* stream: add a file cachewm42014-06-228-16/+215
| | | | | | | | | For remarks, pretty much see the manpage additions. Could help with network streams that require too much seeking (maybe), or might be extended to help with the use case of watching and downloading a file at the same time. In general, it might be a useless feature and could be removed again.
* stream: minor cleanupswm42014-06-223-10/+7
| | | | | Remove unused stream type constants. Move some now DVD specific crap to stream_dvd.c.
* vo_xv: de-ancient some help messageswm42014-06-211-10/+2
| | | | | One message pointed to a removed file, so just get rid of the messages. They were helpful in the earlier 2000s, but now they're just confusing.
* DOCS: remove en/ sub-directorywm42014-06-2015-20/+20
| | | | | This additional sub-directory doesn't serve any purpose anymore. Get rid of it.
* manpage: explicitly document protocolswm42014-06-201-12/+79
|
* manpage: remove some trailing whitespacewm42014-06-201-1/+1
| | | | I wish I could make github run a hook to reject these.
* build: remove BSD-specific /usr/local include path additionswm42014-06-201-8/+0
| | | | | | It seems it's generally cleaner to leave this stuff to the BSDs. Additionally, the NetBSD part wasn't even correct, because it made the compiler prefer the system include path before local include files.
* stream_dvd, stream_dvdnav: map dvd:// to dvdnavwm42014-06-202-3/+3
| | | | The old stream_dvd.c implementation is still available under dvdread://.
* stream_dvd: fix potential endless loop on seekingwm42014-06-201-1/+2
| | | | | Attempt to fix a reported freeze with some DVDs. Unknown if this helps, and it still might read the whole DVD before terminating.
* client API: declare as stablewm42014-06-202-13/+7
| | | | | | | | It is reasonably stable, so all further changes will be versioned. Also change how the libmpv version number is generated. Fix the patch version number to 0; I don't think we have a use for this. In particular, the version doesn't version mpv, just the client API.
* build: remove some trailing whitespacewm42014-06-201-1/+1
|
* vo_vaapi: fix reference counting when using software decodingwm42014-06-201-1/+2
| | | | Recent regression.
* vf_dlopen: fix the order of the arguments to mp_image_allocMarcoen Hirschberg2014-06-191-2/+2
|
* sd_lavc: fix stupiditywm42014-06-191-2/+5
| | | | | | Reallocating an array while you still have pointers to it -> bad idea. Recent regression.
* vo_wayland: fix clearing the screen on reconfigwm42014-06-181-12/+11
| | | | | | Do this simply by clearing the mapped buffer on every draw_image() call without an actual video frame. (Maybe this is a bit expensive, but at least not more expensive than regular video display.)
* vo_sdl: fix clearing the screen on reconfigwm42014-06-181-35/+53
| | | | | | Clear the texture on reconfig(). (We could probably also do this simpler with a flag, but this is actually less complicated - except that we move the code to "map" a texture to a separate function.)
* video/out: fix redrawing with no video frame for some VOswm42014-06-185-31/+15
| | | | | | With the change to merge osd drawing into video frame drawing, some bogus logic got in: they skipped drawing the OSD if no video frame is available. This broke --no-video --force-window mode.
* bootstrap: update waf website and versionTimothy Gu2014-06-181-3/+3
| | | | | Signed-off-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: wm4 <wm4@nowhere>
* vo_opengl: fix regression with opengl:pbowm42014-06-181-4/+3
| | | | | In the pbo case, mpi was reassigned to a stack pointer, and later deallocated. Just change the code so it doesn't need to be reassigned.
* manpage: remove bogus significant whitespacewm42014-06-181-1/+1
| | | | Made the first line formatted differently.
* gl_video: fix refcountingwm42014-06-181-0/+1
|
* options: allow adding multiple files with --audio-filewm42014-06-184-6/+9
| | | | At least 1 person expected that this works this way.
* sd_lavc: improve bitmap subtitle timingwm42014-06-181-71/+103
| | | | | | | | | | | | | | | | | | | | | Until now, bitmap subtitles were decoded at "some" point, and then simply replaced the old subtitle. Although the subtitle is selected by time (PTS), it could happen that a subtitle was replaced too early. One consequence is that this might lead to flicker even if the subtitles are timed to follow each other without a gap (although most subtitles are explicitly timed to introduce such a gap). With this commit the past 4 subtitles are kept (instead of 1), so that the correct one can be picked by time. This should fix the aforementioned cases, but more importantly will allow demuxing/decoding and video display to be somewhat asynchronous. Still missing: somehow making sure the correct range of decoded subtitles is available, instead of just passing along whatever comes from the demuxer, and hoping that 4 queued subtitles are enough. But it should certainly be good enough for now. This removes a check that resets the subtitles if the PTS is 5 minutes before the end of the current subtitle; this is probably not needed.
* video: correct spelling: mp_image_params_equals -> mp_image_params_equalwm42014-06-178-14/+14
| | | | | The type is struct mp_image_params, so the "params" should have a "s". "equals" shouldn't, because it's plural for 2 params. Important.
* video: remove redundant functionwm42014-06-173-11/+2
| | | | mp_image_params_from_image() is now trivial and can be removed.
* DOCS/contribute.md: move instructions for sending patches to the topwm42014-06-171-50/+56
| | | | Separate to not confuse git history tracking.
* DOCS: remove coding-style.md to contribute.mdwm42014-06-171-0/+0
| | | | | I wonder if this is better. The intention is to make the instructions for sending patches more visible.
* vo: make draw_image and vo_queue_image transfer image ownershipwm42014-06-1717-31/+53
| | | | Basically a cosmetic change. This is probably more intuitive.
* build: check for 64bit stdatomic.h operations tooAlessandro Ghedini2014-06-172-4/+5
| | | | | This fixes the build on platform where the atomic calls can't be turned into lock-free instructions and thus need the external libatomic library (e.g. mips).
* demux_mkv: add S_DVBSUBwm42014-06-172-0/+2
| | | | Probably works; untested.
* encode: disable playback framedroppingwm42014-06-171-0/+1
| | | | | --framedrop is intended for playback only, and does nothing good with encoding. It would just randomly drop frames.
* video: check image parameterswm42014-06-173-4/+38
| | | | | | | | | Make sure every video filter has valid parameters for input and output. (This also ensures we don't take possibly invalid decoder output, or feed invalid decodr/filter output to VOs.) Also, the updated image size check now (almost) works like the corresponding check in FFmpeg.
* video: introduce failure path for image allocationswm42014-06-1745-67/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, failure to allocate image data resulted in a crash (i.e. abort() was called). This was intentional, because it's pretty silly to degrade playback, and in almost all situations, the OOM will probably kill you anyway. (And then there's the standard Linux overcommit behavior, which also will kill you at some point.) But I changed my opinion, so here we go. This change does not affect _all_ memory allocations, just image data. Now in most failure cases, the output will just be skipped. For video filters, this coincidentally means that failure is treated as EOF (because the playback core assumes EOF if nothing comes out of the video filter chain). In other situations, output might be in some way degraded, like skipping frames, not scaling OSD, and such. Functions whose return values changed semantics: mp_image_alloc mp_image_new_copy mp_image_new_ref mp_image_make_writeable mp_image_setrefp mp_image_to_av_frame_and_unref mp_image_from_av_frame mp_image_new_external_ref mp_image_new_custom_ref mp_image_pool_make_writeable mp_image_pool_get mp_image_pool_new_copy mp_vdpau_mixed_frame_create vf_alloc_out_image vf_make_out_image_writeable glGetWindowScreenshot
* gl_lcms: use thread-safe lcms API, require lcms2 2.6wm42014-06-163-29/+18
| | | | | | | | | | | | | | The error log callback was not thread-safe and not library-safe. And apparently there were some other details that made it not library-safe, such as a global lcms plugin registry. Switch the the thread-safe API provided by lcms2 starting with 2.6. Remove our approximate thread-safety hacks. Note that lcms basically provides 2 APIs now, the old functions, and the thread-safe alternatives whose names end with THR. Some functions don't change, because they already have a context of some sort. Care must be taken not to accidentally use old APIs.
* build: add '--enable-libmpv-static' optionxylosper2014-06-162-14/+34
| | | | Signed-off-by: wm4 <wm4@nowhere>
* cache: avoid race condition between cache wakeup and idlingwm42014-06-161-0/+1
| | | | | | | | | | When the reader is out of data, it tries to wake up the cache thread to get more data. In theory, there's a small race condition, which could cause the cache to miss the wakeup and idle before reaction. Most certainly didn't cause real issues, because even if this extremely unlikely race condition happens, the cache won't idle for longer than 1 second (the hardcoded cache idle time).
* vo_opengl: simplify redraw callback OSD handlingwm42014-06-165-82/+23
| | | | | | | | | OSD used to be not thread-safe at all, so a track was used to get it redrawn. This mostly reverts commit 6a2a8880, because OSD not being thread-safe was the non-trivial part of it. Mostly untested, because this code path is used on OSX only, and I don't have OSX.
* discnav: make OSD path explicitly thread-safewm42014-06-161-16/+31
| | | | | | | | The main issue was actually that the OSD callback locked the subtitle decoder, which does not necessarily work, because the OSD code is already allowed to lock it. The state was already protected by unsetting the callback (which involes the OSD lock). So, in summary, this is probably just a cleanup.
* sub: prefer ffmpeg microdvd converter over internal onewm42014-06-151-1/+1
| | | | | | We certainly don't want to maintain and improve th