summaryrefslogtreecommitdiffstats
<
Commit message (Collapse)AuthorAgeFilesLines
* 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 handlingwm42015-03-026-9/+11
| | | | | | | | | | | | It was possible to make the player play local files by putting rar:// links into remote playlists, and some other potentially unsafe things. Redo the handling of it. Now the rar-redirector (the thing in demux_playlist.c) sets disable_safety, which makes the player open any playlist entries returned. This is fine, because it redirects to the same file anyway (just with different selection/interpretation of the contents). On the other hand, rar:// itself is now considered fully unsafe, which means that it is ignored if found in normal playlists.
* msg: use relaxed atomics for log level testwm42015-03-022-1/+9
| | | | | | This should be sufficient. If stdatomic.h is not available, we make no difference.
* buid: readd -Wparentheseswm42015-03-027-8/+8
| | | | | | | | | This warning wasn't overly helpful in the past, and warned against perfectly fine code. But at least with recent gcc versions, this is the warning that complains about assignments in if expressions (why???), so we want to enable it. Also change all the code this warning complains about for no reason.
* vo_direct3d: support NV12 with shaderswm42015-03-024-196/+359
| | | | | | | | | | | | | Semi-important, because --hwdec=dxva2 outputs NV12, and we really don't want people to end up with the "old" StretchRect method. Unfortunately, I couldn't actually get it to work. It seems most D3D drivers (including the wine D3D implementation) reject D3DFMT_A8L8, and I could not find any other 2-channel 8 bit Direct3D 9 format. It seems newer D3D APIs have DXGI_FORMAT_R8G8_UNORM, but there's no way to get it in D3D9. Still pushing this; maybe it actually works on some drivers.
* vf_scale: libswscale is being stupidwm42015-03-012-3/+10
| | | | | | | | | | | | This time (there are a lot of times), libswscale randomly ignores brightness/saturation/contrast settings. Looking at MPlayer code, it appears the return value of sws_setColorspaceDetails() signals if changing these settings is supported at all. (Nevermind that supporting this feature has almost 0 value, and obviously eats maintenance time.)
* Lua: add mp.get_screen_margins().torque2015-03-011-0/+12
| | | | | | When used with mp.get_screen_size(), mp.get_screen_margins() allows a Lua script to determine what portion of the mpv window actually has the video in it.
* Revert "Revert recent vo_opengl related commits"Niklas Haas2015-02-2811-23/+89
| | | | | | | | | | | | | | | | | | | | | | | | Omitted a simple, but devastasting check. Fixed the relevant commits now. This reverts commit 8d24e9d9b8ad1b5d82139980eca148dc0f4a1eab. diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 9c8a643..f1ea03e 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -1034,9 +1034,9 @@ static void compile_shaders(struct gl_video *p) shader_def_opt(&header_conv, "USE_CONV_GAMMA", use_conv_gamma); shader_def_opt(&header_conv, "USE_CONST_LUMA", use_const_luma); shader_def_opt(&header_conv, "USE_LINEAR_LIGHT_BT1886", - gamma_fun == MP_CSP_TRC_BT_1886); + use_linear_light && gamma_fun == MP_CSP_TRC_BT_1886); shader_def_opt(&header_conv, "USE_LINEAR_LIGHT_SRGB", - gamma_fun == MP_CSP_TRC_SRGB); + use_linear_light && gamma_fun == MP_CSP_TRC_SRGB); shader_def_opt(&header_conv, "USE_SIGMOID", use_sigmoid); if (p->opts.alpha_mode > 0 && p->has_alpha && p->plane_count > 3) shader_def(&header_conv, "USE_ALPHA_PLANE", "3");
* Revert recent vo_opengl related commitswm42015-02-2811-87/+21
| | | | | | | | | | | | | | | Breaks vo_opengl by default. I'm hot able to fix this myself, because I have no clue about the overcomplicated color management logic. Also, whilethis is apparently caused by commit fbacd5, the following commits all depend on it, so revert them too. This reverts the following commits: e141caa97dade07f4d7e0d6c208bcd3493e712ed 653b0dd5295453d9661f673b4ebd02c5ceacf645 729c8b3f641e633474be612e66388c131a1b5c92 fbacd5de31de964f7cd562304ab1c9b4a0d76015 Fixes #1636.
* video: fix typowm42015-02-281-1/+1
| | | | Pointed out in #1636.
* stream_dvb: Always define NO_STREAM_ID_FILTER if missing.Oliver Freyermuth2015-02-282-2/+2
| | | | | | | It is also used for initialization in channel-list setup. Should fix compilation on FreeBSD, and is more correct since it is used unconditionally. Reverts 6445648 .
* cocoa: remove the setNextKeyView hackStefano Pigozzi2015-02-282-6/+14
| | | | | | Just use makeFirstResponder on the mpv events view from client code if you need the built in keyboard events (this is easier for dealing with view nesting).
* examples/cocoabasic: allow to send stop commandStefano Pigozzi2015-02-281-13/+19
|
* manpage: fix typozymos2015-02-281-1/+1
| | | | Signed-off-by: wm4 <wm4@nowhere>
* vd_lavc: respect lavc's color_trc fieldNiklas Haas2015-02-282-0/+3
| | | | | We now actually use the TRC tagging information lavc provides us with, instead of always manually guessing.
* screenshots: check for AVFrame csp supportNiklas Haas2015-02-283-0/+15
| | | | Apparently, libav stable is old enough to not have these fields.
* screenshots: add support for csp taggingNiklas Haas2015-02-283-0/+14
| | | | | | This relies on upstream support in lavc, and will hence basically not work at all. The intent is to get support for writing this information into ffmpeg's PNG encoders etc.
* csputils: add missing gamma supportNiklas Haas2015-02-285-21/+55
| | | | | | | | | | | We have MP_CSP_TRC defined, but it wasn't being used by practically anything. This commit adds missing conversion logic, adds it to mp_image, and moves the auto-guessing logic to where it should be, in mp_image_params_guess_csp (and out of vo_opengl). Note that this also fixes a minor bug: csp_prim was not being copied between mp_image structs if the format was not YUV in both cases, but this is wrong - the primaries are always relevant.
* csputils: add support for BT.470-MNiklas Haas2015-02-282-1/+13
| | | | | For some kind of legacy TV system, who knows? But ffmpeg supports it, and it's cheap for us to add.
* vo_opengl: delete 16 bit test texturewm42015-02-271-0/+1
| | | | | Essentially a leak, but not that bad since it's small and allocated only once.
* vo_opengl: fix some commentswm42015-02-271-3/+3
|
* stream: remove stream filter conceptwm42015-02-275-43/+16
| | | | Unused since the previous commit. (Apparently it was a stupid idea.)
* stream_rar: treat rar files as playlistswm42015-02-273-77/+33
| | | | | | | | | | | | Refactors an older hack, which for some reason used a more complicated way. This generates the playlist representing the contents of the rar file in demux_playlist.c. The pseudo-demuxer could easily be separate from the the playlist parsers (and in fact there's almost no shared code), but I don't think this obscure feature deserves a separate file. Sample files created with: rar a -v20000k -m0 files.rar file1.mkv file1.mkv
* build: improve DVB checkwm42015-02-271-1/+1
| | | | | | A use of NO_STREAM_ID_FILTER was added to the DVB code recently. While I have no idea what it's needed for, it makes mpv fail to compile on FreeBSD 10.1. Add it to the dvb configure check.
* options: handle choice -> flag fallback automaticallywm42015-02-274-21/+32