summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* stream: use relaxed atomic loads for checking playback abortswm42015-03-091-1/+1
| | | | | | | Seems appropriate, and will probably avoid performance surprises with scary architectures which don't have trivial implementations for atomic loads. (Consider that demux_mkv calls this very often now, and libavformat demuxers and streams did this for a while now.)
* demux_mkv: never warn when trying to resync on EOFwm42015-03-091-2/+4
| | | | | | If this happens, the file is actually broken, but the assumption is simply that the file was truncated, and printing a warning would be strange.
* demux_mkv: check for playback abortswm42015-03-093-0/+9
| | | | | | | | | Check async abort notification. libavformat already do something equivalent. Before this commit, the demuxer could enter resync mode (and print silly warning messages) when the stream stopped returning data because of an abort.
* w32_common: remove redundant is_maximized functionJames Ross-Gowan2015-03-091-8/+1
| | | | This already exists as IsMaximized in the Windows API.
* cocoa: fix minimized state getterStefano Pigozzi2015-03-091-5/+2
|
* x11: fix VOCTRL_GET_WIN_STATEwm42015-03-091-0/+1
| | | | | | | | | | Do not rely on the pointed-to argument to be initialized; VOCTRLs are supposed to completely overwrite them on success (or not to touch them on failure). The currently only caller of VOCTRL_GET_WIN_STATE initializes the value before calling this, so this is merely about correctness and didn't lead to any actual bugs.
* w32_common: support the "window-minimized" propertyJames Ross-Gowan2015-03-092-2/+6
|
* stream/smb: mark as network stream for --cache=autoKevin Mitchell2015-03-091-0/+1
| | | | | | | This causes the cache to be enabled with --cache=auto. It was not done previously because the small cache size 320k actually led to worse performance. However, with the current default cache size of 25000kb, caching notably improves performance.
* manpage: document swapinterval defaultNiklas Haas2015-03-091-1/+2
|
* cocoa: support the "window-minimized" propertyJaime Marquínez Ferrándiz2015-03-083-1/+33
| | | | Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
* vf_vavpp: fix deinterlacingFilip Milivojevic2015-03-081-0/+8
| | | | | | | Add filter parameters to VAAPI deinterlacing filter to actually process bottom fields instead of deinterlacing top field twice. Signed-off-by: wm4 <wm4@nowhere>
* input.conf: add key binding to override ASS subtitle styleswm42015-03-082-0/+8
|
* DOCS: minor update to coding stylewm42015-03-081-0/+2
|
* cocoa: fix autohide in fullscreenStefano Pigozzi2015-03-084-5/+26
|
* cocoa: fix mouse hiding with launchpad and dock foldersStefano Pigozzi2015-03-083-1/+18
| | | | | | | | | | | | Some UI elements in OS X – like Launchpad and Dock folders – are implemented using borderless windows in background demonized applications. When we use these elements, mpv doesn't stop to be the active application, but the mpv window leaves keyWindow state while we use the OS controls. This commit just keeps track of window state to update the cursor visibility accordingly. Fixes #513
* options: add M_OPT_FILE to new options that are missing itPhilip Sequeira2015-03-072-2/+2
| | | | Fixes shell completion.
* audio: refuse to change playback speed with spdifwm42015-03-072-3/+5
| | | | | | | | | | | | Handle the failure gracefully, instead of exploding and disabling audio. Just set the speed back to 1.0. Also remove the AF_DETACH from af_scaletempo. This actually created a dangling pointer in af_add(), a tricky consequence of af_add() reconfiguring the filter chain and the newly added filter using AF_DETACH. Fortunately the AF_DETACH is not needed (and probably never worked - it comes from MPlayer times, and MPlayer also disables audio when trying to change speed with spdif).
* audio: make changing playback speed slightly more robustwm42015-03-071-32/+39
| | | | | | | | | | | Always use af_scaletempo if it's inserted, even if the option --audio-pitch-correction=no is set. Make sure all filters are reset on speed change. It's conceivable that dynamic changes to the filter chain at runtime leave filters around without resetting their speed parameters. Also move the code to a separate function.
* cocoa: clamp mouse position to window.torque2015-03-071-0/+2
| | | | | Prevents out-of-window coordinates being reported for mouse coordinates. Previously they could be out-of-window coordinates on init or on resize.
* cocoa: update mouse coordinates when window is initialized.torque2015-03-073-2/+4
| | | | | | Make MpvEventsView -signalMousePosition a public method so it can be called without a compiler warning. Previously, the mouse position would be reported as (0,0) until the cursor was moved.
* cocoa: don't uninit light sensor if not presentStefano Pigozzi2015-03-071-2/+4
|
* vo_opengl/x11: fix automatic ICC profile loadingMartin Herkt2015-03-072-6/+11
| | | | | | | | | | | | mpv would attempt to load ICC profiles several times during VO init even if no window is displayed. This potentially causes it to load a profile for a different screen than it is going to be displayed on, thereby invalidating the profile cache and rebuilding the LUT every single time. It would not unload a previously loaded profile when the video window is moved to a display without an installed profile. Fix these issues and tweak the log messages a little.
* cocoa: remove possible use after freeStefano Pigozzi2015-03-071-5/+5
|
* cocoa: fix some crashes caused by async uninitStefano Pigozzi2015-03-071-31/+15
| | | | | | | Always keep around our private state and destroy it when we are really done in the async uninit callback. Fixes #1657
* af_scaletempo: minor simplificationwm42015-03-061-15/+6
|
* af_scaletempo: restore confusing mplayer behaviorwm42015-03-061-3/+9
| | | | | | | | | This matters only when setting obscure scaletempo suboptions. See #1653. (But what we really should do is figuring out how to do this in a sane way.)
* demux_mkv: actually skip elements out of reachwm42015-03-061-1/+2
| | | | | This is missing from the previous commit. Not that harmful, but also slightly un-nice since even a failed seek will reset the cache.
* demux_mkv: fix issues with unseekable streamswm42015-03-061-14/+16
| | | | | | | | | | | | | | | A user reported a webm stream that couldn't be played. The issue was that this stream 1. was on an unseekable HTTP connection, and 2. had a SeekHead element (wtf?). The code reading the SeekHead marked the element as unreadable too early: although you can't seek in the stream, reading the header elements after the SeekHead read them anyway. Marking them as unreadable only after the normal header reading fixes this. (The way the failing stream was setup was pretty retarded: inserting these SeekHead elements makes absolutely no sense for a stream that cannot be seeked.) Fixes #1656.
* Lua: add unpack shim for Lua 5.2/5.3 compatibility.torque2015-03-061-0/+2
| | | | | | | | | The global unpack function got moved to table.unpack in Lua 5.2, and it's only available as the global if 5.2 is built with compatibility enabled (the default). Lua 5.3 does not build with 5.1 compatibility by default. Fixes #1648.
* vo_vaapi: fix video equalizer (second try)wm42015-03-061-12/+36
| | | | | | | | | | | | The vaapi equalizer have a custom range, and can have a smaller range than mpv's normalized video equalizer values. The result is that a vaapi equalizer value can map to multiple mpv values, so changing a mpv value by 1 can get "stuck". Fix by remember the mpv value, and returning it if it still corresponds to the vaapi value. Really fixes #1647. (Why am I even bothering with this irredeemable crap?)
* player: allow changing playback speed in early audio init stageswm42015-03-061-1/+1
| | | | | | | | | If the audio decoder was created, but no audio filter chain created yet (still trying to decode a first audio frame), setting the "speed" property could explode. It tried to recreate the filter chain, even though no format was set yet. This is inconvenient and should not happen.
* DOCS/compile-window.md: add Lua package to MXE instructionswm42015-03-061-2/+2
| | | | The MSYS2 ones already mention Lua.
* build: make vdpau and dxva2 checks nicerwm42015-03-062-4/+4
| | | | | | Using check_statement() with an empty statement just to check for the header is quite a hack. Fix check_headers() (so it takes a "use" parameter), and use it for the checks instead.
* player: fix operation if command line is emptywm42015-03-062-12/+13
| | | | | | | main() being called with argc==0 is probably possible. Fix by skipping the program name early. (I already changed and reverted this once, but this time we make sure that it's less likely to confuse the skipped argv with main()'s argv by naming it "options".)
* osx: terminate argv properly when arguments are removedwm42015-03-061-1/+4
| | | | | | | The player now relies on the (slightly obscure) requirement that argv is NULL-terminated. Might fix #1652.
* DOCS, options: fix exampleChrisK22015-03-051-1/+1
|
* build: check whether hwaccels are enabled in FFmpegwm42015-03-051-3/+5
| | | | | FFmpeg can be compiled with them disabled, and then it won't provide the public headers specific to these APIs, causing mpv compilation failure.
* vo_opengl: make smoothmotion-threshold inclusiveNiklas Haas2015-03-051-2/+2
| | | | | This behavior makes more sense near the borders, eg. smoothmotion-threshold=0 and smoothmotion-threshold=0.5.
* vd_lavc: let --hwdec=auto select "vaapi-copy"wm42015-03-051-1/+1
| | | | | | | | | | | | Instead of "vaapi", simply by changing the probe order. "vaapi" uses the GLX GL interop, which has causing us more problems than it solved. Unfortunately this leads also to copying if "--hwdec=auto --vo=vaapi" is used, even though GLX is not involved in this case - but I don't care enough to make the probe logic cleverer just for this. You can still get the zero-copy path with --hwdec=vaapi.
* vd_lavc: request 1 more threads than CPU coreswm42015-03-051-0/+2
| | | | | | | | | | This duplicates the logic which FFmpeg's libavcodec uses. The effects are unknown, though it's somewhat clear that a single thread doesn't necessarily saturate a single CPU. (Eventually we should just let FFmpeg auto-init the thread count, but for now I prefer it this way, so e.g. verbose mode will print the thread count.)
* vo_vaapi: round equalizer valueswm42015-03-051-2/+5
| | | | | Probably fixes #1647 (if it's correct at all). I couldn't reproduce with the vdpau libva driver, but a driver can use different ranges.
* client API: mention the changes to the seek/screenshot commandswm42015-03-052-1/+3
| | | | Also fix a typo in the manpage.
* player, client API: refactor cplayer init, reduce client API differenceswm42015-03-055-51/+60
| | | | | | | | | | | | | Move the command line parsing and some other things to the common init routine shared between command line player and client API. This means they're using almost exactly the same code now. The main intended side effect is that the client API will load mpv.conf; though still only if config loading is enabled. (The cplayer still avoids creating an extra thread, passes a command line, and prints an exit status to the terminal. It also has some different defaults.)
* player: minor simplificationwm42015-03-053-16/+11
| | | | | argv is always terminated with a NULL, so we don't need to drag argc along. Simplifies the following commit a little bit.
* vo_opengl: increase ambient light changes log levelStefano Pigozzi2015-03-041-1/+1
| | | | info is a quite too annoying. increase it to verbose.
* README: fix typoswm42015-03-041-1/+1
|
* ad_spdif: remove per-packet messagewm42015-03-041-1/+0
| | | | It was annoying and didn't ever help with anything.
* player: use symbolic constant for seek precisionwm42015-03-044-29/+43
| | | | Meh.
* input: use flag option type for some input commandswm42015-03-044-38/+50
| | | | | | | | | | This gets rid of the need for a second (or more) parameters; instead it can be all in one parameter. The (now) redundant parameter is still parsed for compatibility, though. The way the flags make each other conflict is a bit tricky: they have overlapping bits, and the option parser disallows setting already set bits.
* input: remove numeric compatibility parameters from commandswm42015-03-041-14/+14
| | | | | | MPlayer requires numeric values for input command parameters. mplayer2 also did. mpv changed these to choices using symbolic strings a long time ago, but left numeric choices for compatibility.
* options: add flag option typewm42015-03-042-0/+121
|
* cache: assume file size from EOF positionwm42015-03-041-2/+8
| | | | | | If we're caching a stream with unknown size, and we reach EOF, then consider the EOF position the file size. Typically makes sense when reading from a pipe or a http connection that did not send a size.
* README: add some better linkswm42015-03-041-3/+31
| | | | | Also write something about MPlayer, since this is a frequently asked question.
* win32: fix some more -Wparentheses warningswm42015-03-043-4/+4
| | | | | | | Stupid compiler. For decode_surrogate_pair(), I changed the order of evaluation; it shouldn't matter, but this order is more readable in my opinion.
* build: fix warnings with --disable-libasswm42015-03-041-2/+2
| | | | This crap seems to break every other fullmoon.
* cocoa: silence -Wlogical-op-parenthesesStefano Pigozzi2015-03-041-1/+1
|
* vo_opengl: add gamma-auto optionStefano Pigozzi2015-03-046-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | This automatically sets the gamma option depending on lighting conditions measured from the computer's ambient light sensor. sRGB – arguably the “sibling” to BT.709 for still images – has a reference viewing environment defined in its specification (IEC 61966-2-1:1999, see http://www.color.org/chardata/rgb/srgb.xalter). According to this data, the assumed ambient illuminance is 64 lux. This is the illuminance where the gamma that results from ICC color management is correct. On the other hand, BT.1886 formalizes that the gamma level for dim environments to be 2.40, and Apple resources (WWDC12: 2012 Session 523: Best practices for color management) define the BT.1886 dim at 16 lux. So the logic we apply is: * >= 64lux -> 1.961 gamma * =< 16lux -> 2.400 gamma * 16lux < x < 64lux -> logaritmic rescale of lux to gamma. The human perception of illuminance roughly follows a logaritmic scale of lux [1]. [1]: https://msdn.microsoft.com/en-us/library/windows/desktop/dd319008%28v=vs.85%29.aspx
* cocoa: add support for querying ambient lightingStefano Pigozzi2015-03-042-0/+97
| | | | | | | | | This will be pretty useful to let mpv automatically change VO parameters based on ambient lighting conditions. The conversion code and polinomial equation from Apple LMU values to Lux is taken from Firefox: their license, MPL is GPL compatible and allows relicensing to GPL (MPL is more liberal).
* stream_cdda: add option to enable cdtext, and disable it by defaultwm42015-03-032-3/+9
| | | | Fixes #1615.
* stream_cdda: fix parameter passingwm42015-03-031-2/+0
| | | | | All cdda options (except --cdrom-drive) were ignored, because the priv struct (with the options set) was just replaced. Oops.
* sub: this isn't needed eitherwm42015-03-034-8/+0
|
* Revert "demux_lavf: workaround for broken libavformat subtitle seeking"wm42015-03-031-23/+4
| | | | | | | This reverts commit c8f49be919ffaf983bde77b63d75f96a593ec7a8. Not needed anymore; fixed in all supported FFmpeg releases. Though I could not test again, because all sample files are gone (oops).
* sd_lavc: remove mp4 vobsub extradata hackwm42015-03-031-35/+0
| | | | | The proper fix is now available in all supported FFmpeg and Libav releases.
* Remove some FFmpeg/Libav compatibility hackswm42015-03-038-139/+3
| | | | | | All of these are now in the supported FFmpeg and Libav versions. The 3 remaining API checks are for FFmpeg-only things.
* build: bump required FFmpeg/Libav librarieswm42015-03-034-17/+18
| | | | | | | | | | | | | | | | The af_lavrresample commit made compilation fail on Libav 10, so I think it's time to require somewhat more recent dependencies. Libav 11 is the latest release, and FFmpeg 2.4 seems to correspond to Libav 11. So use these. Also adjust the configure failure message. Instead of (accidentally) printing the pkg-config versions twice, print the release version numbers too. This is helpful, because the release version numbers are completely different from the pkg-config ones. I will probably remove some compatibility hacks in the following commits too.
* manpage: improve --osd-fractions descriptionwm42015-03-031-1/+2
|
* manpage: remove empty line to fix formattingwm42015-03-021-1/+0
| | | | | | The HTML rendering of this page formats the ``timeout`` section differently, and we suspect it's because of this. (Or in other words: wtf rst??)
* audio: change playback speed directly in resamplerwm42015-03-026-102/+75
| | | | | | | | | | | | | Although the libraries we use for resampling (libavresample and libswresample) do not support changing sampelrate on the fly, this makes it easier to make sure no audio buffers are implicitly dropped. In fact, this commit adds additional code to drain the resampler explicitly. Changing speed twice without feeding audio in-between made it crash with libavresample inc ertain cases (libswresample is fine). This is probably a libavresample bug. Hopefully this will be fixed, and also I attempted to workaround the situation that crashes it. (It seems to point in direction of random memory corruption, though.)
* demux_lavf: use this for image formatswm42015-03-021-6/+13
| | | | | | | | | | | | | | | | | | Use the (relatively new) libavformat image format probing functionality, instead of letting demux_mf guess by file extension and MIME type. The libavformat support is weird, though. Traditionally, it uses an absolutely terrible hack to detect images by extension, _and_ (which is the horrible part) will randomly interpret parts of the filename as specifiers for matching by number. So something like '%03d' will be interpreted as placeholder for a frame number. The worst part is that such character sequences can be perfectly valid and common in http URLs. This is known as "image2" demuxer. The newer support, which probes by examining the file header, is split into several format-specific demuxers with names ending in "_pipe". So we check for such a name suffix. (At this point we're doing fine-grained hacking around ffmpeg weirdness, so a clean solution is impossible anyway until upstream changes.)
* player: refine rar:// playlist-safety handl