summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | | | | | | | | | | | | | | In the past it happened quite often that flag options (yes/no) were changed to choice options (yes/no/some more). The problem with this was that while flag options don't need a parameter, this wasn't the case with choice options. A hack was introduced to compensate for this: setting M_OPT_OPTIONAL_PARAM on the option, and an empty string ("") was added as choice, so that the choice could be used like a flag. So, for example, "--mute" would set the choice "". Fix this by 1. not requiring a parameter if there's a "yes" choice, and 2. redirect an empty parameter to "yes". The effect is that a choice option with the choices ["yes", "no"] is pretty much equivalent to a flag option.
* options: minor simplification in flag option parserwm42015-02-271-20/+14
|
* demux: bump default demuxer queue sizeswm42015-02-272-4/+4
| | | | | | | | | | Now that we have fast stream switching, we can bump these sizes, as the queues cause no delay in switching anymore. Of course, the fast stream switching works for mkv and mp4 only. Other formats will incur a quite terrible delay especially in network mode, which this commit changes to 10 seconds. Let's see if someone complains...
* client API: make some more properties observablewm42015-02-271-1/+2
| | | | A/V sync things.
* manpage: update wording on speedNiklas Haas2015-02-271-2/+3
| | | | | | The way I interpreted it, it seemed like this was not default behavior and could be enabled with --audio-pitch-correction - it should be made clearer that this is actually *the default behavior*.
* vo_opengl: implement antiringing for tensor scalersNiklas Haas2015-02-273-10/+17
| | | | | | | | | | | | This is based on pretty much the same (somewhat naive) logic right now. I'm not convinced that the extra logic that eg. madVR includes is worth enough to warrant heavily confusing the logic for it. This shouldn't slow down the logic at all in any sane shader compiler, and indeed it doesn't on any shader compiler that I tested. Note that this currently doesn't affect cscale at all, due to the weird implementation details of that.
* input: handle closed pipe correctlywm42015-02-261-1/+1
|
* input: if FD is not writable, just don't write to the FDwm42015-02-261-6/+11
| | | | This is for the case if the FD is a uni-directional pipe.
* input: allow passing FDs to --input-filewm42015-02-262-3/+15
|
* input: avoid creating world-writeable file with --input-unix-socketwm42015-02-263-0/+9
| | | | | This requires fchmod(), which is not necessarily available everywhere. It also might not work at all. (It does work on Linux.)
* audio: accept 1.0 and 2.0 as aliases for mono and stereowm42015-02-261-0/+2
|
* player: adjust A/V desync messagewm42015-02-261-3/+3
| | | | | | Broken drivers are an issue rather often. Maybe this gives the user an idea that this could be the reason. (We can't dump much more info on a 80x24 terminal.)
* vo_opengl: test FBOs only if they're going to be usedwm42015-02-261-30/+28
| | | | | | | | | | Change test_fbo() so that it checks the FBO lazily, and restructure check_gl_features() to invoke it only if we know that a FBO will be needed for a certain enabled feature. This can avoid strange error messages when using --vo=opengl and the FBO format does not work. It's also less confusing when reading the verbose log (users might think that the FBO is actually used, etc.).
* vo_xv: don't attempt to clear window before mappedwm42015-02-261-0/+2
| | | | | | | | This can happen with the "no-colorkey" suboption. Then the code in xv_draw_colorkey() can be run before vo_x11_config_vo_window(), when vo_gc is not allocated yet. Fixes #1629.
* ytdl: add "--ytdl-params" optionThiago Kenji Okada2015-02-254-0/+22
| | | | | | | | | | | This option allows the user to pass non-supported options directly to youtube-dl, such as "--proxy URL", "--username USERNAME" and '--password PASSWORD". There is no sanity checking so it's possible to break things (i.e. if you pass "--version" mpv exits with random JSON error). Signed-off-by: wm4 <wm4@nowhere>
* cache: use MPCLAMP() macrowm42015-02-251-9/+2
|
* cache: limit to file sizewm42015-02-251-1/+8
| | | | | Saves some memory. Should be especially helpful if many small files are loaded, like when mass-loading subtitle files and the cache is enabled.
* remove dead commentStefano Pigozzi2015-02-251-2/+0
|
* build: move QuartzCore linking to the cocoa checkStefano Pigozzi2015-02-253-2/+4
| | | | | It's needed for the DisplayLink functions so it must be enabled for the basic cocoa code.
* sd_ass: replace a deprecated libass API callwm42015-02-251-1/+1
|
* demux_mkv_timeline: fix potential issue when enabling cachewm42015-02-251-0/+1
| | | | | | | | | | | | If the cache is enabled, the demuxer is closed and opened again (because currently, the cache can not be enabled atfer data was already read). The call for opening a new demuxer uses the same params struct, which references the ctx->uids array. But there is a MP_TARRAY_GROW() invocation somewhere on the way, which can reallocate the ctx->uids array, making params.uids a dangling pointer. This issue probably existed for a longer time, probably since 5cd33853 (slightly more obvious since f50b105d).
* demux_mkv_timeline: move uids array to context toowm42015-02-251-31/+26
| | | | | | | Again removes some indirections and extra arguments. Also replace some memcpy/memmoves with assignments. (Assignments became possible only later, when reference UIDs were turned into a struct.)
* demux_mkv_timeline: pass sources array as part of contextwm42015-02-251-45/+39
| | | | Removes tripple pointer indirections and such.
* demux_mkv: minor refactor for deferred cue readingwm42015-02-251-45/+41
| | | | | | Should behave about the same, but reduces code some duplication with seeking and reading a header element pointed to by a SeekHead. It also makes behavior with incomplete files slightly better.
* demux_mkv: don't spam too many warnings with partial fileswm42015-02-251-14/+15
| | | | | Limit it to a single message. It often printed more than that, and in some cases (old files with "cluster" index), spammed a lot.
* manpage: adjust --ass-style-override descriptionwm42015-02-251-2/+1
| | | | | No "modified libass" is needed anymore. Also, it said that the "force" choice is more reliable than "force", which makes no sense.
* vo_opengl: greatly increase smoothmotion performanceNiklas Haas2015-02-242-74/+105
| | | | | | | | | | | | | | | | | | | | Instead of rendering and upscaling each video frame on every vsync, this version of the algorithm only draws them once and caches the result, so the only operation that has to run on every vsync is a cheap linear interpolation, plus CMS/dithering. On my machine, this is a huge speedup for 24 Hz content (on a 60 Hz monitor), up to 120% faster. (The speedup is not quite 250% because of the overhead that the larger FBOs and CMS provides) In terms of the implementation, this commit basically swaps interpolation and upscaling - upscaling is moved to inter_program, and interpolation is moved to the final_program. Furthermore, the main bulk of the frame rendering logic (upscaling etc.) was moved to a separete function, which is called from gl_video_interpolate_frame only if it's actually necessarily, and skipped otherwise.
* manpage: update documentation for smoothmotionNiklas Haas2015-02-241-8/+27
| | | | | | | | | | | Hopefully, this will really clear up how the thing is supposed to work (and that it's not SVP, nor MVTools). I also removed instances of the word "interpolation", since that's a term that's easily misleading. Finally, I expanded on smoothmotion-threshold since the purpose/meaning was a bit confusing.
* sub: fully update plaintext subtitle styles at runtimewm42015-02-242-6/+13
| | | | | | | | | | | | | | | Update options like --sub-text-margin-y at runtime. These are somewhat of a problem, because ass_set_selective_style_override() (intentionally) does not override them. This should be fixed in libass (by providing additional override modes), but for now this will do. Also change the signature of mp_ass_configure(), so we can get access to the track. Additionally, drop the redundant setting of the style Alignment (it's overwritten by mp_ass_set_style()). See #1622 (again).
* sub: move mp_ass_configure() codewm42015-02-243-60/+57
| | | | | sd_ass.c is the only user, and the function is starting to become extremely "special". No other changes.
* osd: force alignment for OSD barwm42015-02-241-1/+2
| | | | | | | | Overwrite the alignment applied by the OSD style. Additionally, remove the initialization of the Alignment field in create_ass_track(); the value is always overwritten by mp_ass_set_style() later. Fixes #1626.
* osd: always reset style paramswm42015-02-241-11/+8
| | | | | | | There was some logic to set certain things on init only. Not sure why this was done (saving some cheap calculations?) - but since the next call would override these style settings by applying the usual subtitle style, I don't think this was intended.
* vo_opengl: another GLES2 issuewm42015-02-241-1/+9
| | | | | | | | | | GLES2 randomly does not support the transpose parameter in matrix uniform calls. So we have to do this manually. Sure it was worth to mutilate the standard just so all these shitty SoC vendors can safe 3 lines of code. (Obviously trying to handle all of GLES2 to GL 4.x in a single codebase was a mistake.)