summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sub: read subtitles until their timestamps are past videowm42016-01-111-1/+1
| | | | | Change >= to >, because if the timestamps are equal, further subtitle packets with the same timestamps could be required (e.g. ASS).
* player: eliminate demux_get_next_pts()wm42016-01-116-37/+6
| | | | | | | | | | | | | | | | This slightly changes behavior when seeking with external audio/subtitle tracks if transport streams and mpeg files are played, as well as behavior when seeking with such external tracks. get_main_demux_pts() is evil because it always blocks on the demuxer (if there isn't already a packet queued). Thus it could lock up the player, which is a shame because all other possible causes have been removed. The reduced "precision" when seeking in the ts/mpeg cases (where SEEK_FACTOR is used, resulting in byte seeks instead of timestamp seeks) might lead to issues. We should probably drop this heuristic. (It was introduced because there is no other way to seek in files with PTS resets with libavformat, but its value is still questionable.)
* cache: remove useless return valuewm42016-01-111-5/+2
| | | | It was unused, and also returned the wrong value in some cases.
* vaapi: replace VA_STR_FOURCCwm42016-01-114-7/+4
|
* ao_coreaudio: replace fourcc_repr()wm42016-01-113-35/+7
| | | | Replace with the more general mp_tag_str().
* etc: rename "example.conf" to "mpv.conf"Dmitrij D. Czarkoff2016-01-111-0/+0
|
* dxva2: log more debug infoswm42016-01-111-11/+41
| | | | | Dump the complete list of decoders and image formats. If it's a decoder we know, add a stringified name.
* ao_wasapi: move out some utility functionswm42016-01-115-76/+128
| | | | | | Note that hresult_to_str() (coming from wasapi_explain_err()) is mostly wasapi-specific, but since HRESULT error codes are unique, it can be extended for any other use.
* common: add mp_tag_str() utility functionwm42016-01-112-0/+20
|
* waf: add "lua51" ("51obsd") to list of possible lua namesDmitrij D. Czarkoff2016-01-111-0/+1
|
* ytdl: Include Referer header as wellYen Chi Hsuan2016-01-101-3/+6
| | | | | Some videos require correct Referer header for downloading, or 403 Forbidden is thrown.
* TOOLS: remove old build systemwm42016-01-102-1500/+0
| | | | I'll still use it privately, but nobody else should.
* player: detect audio PTS jumps, make video PTS heuristic less aggressivewm42016-01-094-14/+23
| | | | | | | | | | | | | | | | | | | | | | This is another attempt at making files with sparse video frames work better. The problem is that you generally can't know whether a jump in video timestamps is just a (very) long video frame, or a timestamp reset. Due to the existence of files with sparse video frames (new frame only every few seconds or longer), every heuristic will be arbitrary (in general, at least). But we can use the fact that if video is continuous, audio should also be continuous. Audio discontinuities can be easily detected, and if that happens, reset some of the playback state. The way the playback state is reset is rather radical (resets decoders as well), but it's just better not to cause too much obscure stuff to happen here. If the A/V sync code were to be rewritten, it should probably strictly use PTS values (not this strange time_frame/delay stuff), which would make it much easier to detect such situations and to react to them.
* Fix build on older libavcodec versionswm42016-01-083-0/+9
| | | | avcodec_profile_name() was added only a week ago or so.
* manpage: adjust documented screenshot file namewm42016-01-081-2/+3
| | | | Fixes #2696.
* img_format: fix padding calculation with P010wm42016-01-081-1/+1
| | | | This was broken during refactoring commit e2d90b38 before pushing it.
* vd_lavc: log codec profile when attempting hardware decodingwm42016-01-081-0/+4
| | | | Should be useful.
* common: allow "\/" as escape sequencewm42016-01-081-1/+2
| | | | | | | | | | | | | mp_parse_escape() is used by the JSON parser in json.c, and JSON allows escaping "/" (solidus). Although it makes no sense, apparently Javascript traditionally allowed that as escape sequence for working around issues with embedding Javascript in HTML. (Or something like this must have been the history of this issue.) Since it's valid in Javascript, it had to be valid in JSON as well, and JSON explicitly specifies it as valid escape. Fixes #2694.
* dvb: cleanup dvb_params struct, remove some unneeded fdsOliver Freyermuth2016-01-073-11/+8
| | | | | | | One was just used as an alias, the other one (sec_fd) was not used at all. Signed-off-by: wm4 <wm4@nowhere>
* img_format: fix compilation on older libavutil releaseswm42016-01-071-1/+1
| | | | | | | | | | AVComponentDescriptor.offset was introduced relatively recently. On older releases, you have to use AVComponentDescriptor.offset_plus1, which is now deprecated. Instead of adding ifdeffery, assume AV_PIX_FMT_NV21 is the only format for which this applies (and will remain the only case), which is probably true enough.
* vo_opengl: generic semi-planar supportwm42016-01-071-9/+10
| | | | | | Should take care of the planned FFmpeg AV_PIX_FMT_P010 addition. (This will eventually be needed when doing HEVC Main 10 decoding with DXVA2 copyback.)
* img_format: add a generic flag for semi-planar formatswm42016-01-072-4/+30
|
* img_format: take care of pixfmts that declare paddingwm42016-01-071-2/+9
| | | | | | | | | | A format could declare that some or all LSBs in a component are padding bits by setting a non-0 AVComponentDescriptor.shift value. This means we would interpret it incorrectly, because until now we always assumed all regular formats have the padding in the MSBs. Not a single format that does this actually exists, though. But a NV12 variant will be added later in FFmpeg.
* win32: fix fd://James Ross-Gowan2016-01-073-6/+13
| | | | | | | | Windows definitely supports Unix-style fd inheritance. This mostly worked when launched from mpv.exe, though mpv should change the file mode to O_BINARY. When launched from mpv.com, the wrapper must pass the list of handles (stored in the undocumented lpReserved2 and cbReserved2 fields) to the mpv process.
* filter_kernels: improve the gaussian functionNiklas Haas2016-01-071-2/+2
| | | | | | | | | | | | | | | | | | | | | Commit 3909e4cd ended up losing the ability to tune the gaussian window, which this commit trivially reintroduces. The constant scaling factor (present in the code copied from glumpy) also goes against filter_kernels.c conventions, which is that f(0.0) = 1 (and the invoking code takes care of normalization), and has been removed. The values of this new gaussian function corresponds to different functions when compared against the old version. To translate the old values p1 to the new values p2 requires solving 2^(e/p1) = e^(2/p2) or p2 = p1 * 2/(e * ln(2)) ≈ p1 * 1.0615 In other words, to get the old default in the new function requires setting scale-param1 to 1.0615. (The new function is *slightly* sharper by default) (Though most users should probably not notice the change)
* filter_kernels: relicense under BSDwm42016-01-071-11/+5
| | | | | | | | | | | To get a uniform license for this file, relicense the mpv parts to BSD as well. But leave the door open for a later change to LGPL. (All non-Glumpy code was written within mpv, and all mpv authors have agreed to LGPL relicensing.) Closes #2688.
* vo_opengl: hwdec_vdpau: relicense under LGPLwm42016-01-071-7/+7
| | | | All code was written by myself.
* vo_opengl: video.h: fix licensewm42016-01-071-7/+8
| | | | | This is a mistake coming from commit 6ef06aa1: it accidentally changed the license from GPL/LGPL dual to GPL only.
* vo_opengl: hwdec_vaegl: change license to LGPL 2.1wm42016-01-071-9/+7
| | | | | | | | | This file claims to be based on the "MPlayer VA-API patch", but this is untrue. Only some glue code was copied from hwdec_vaglx.c, and this glue code was never in MPlayer or the MPlayer VA-API patch in any form, and instead part of the mpv-original way we do hardware decoding OpenGL interop. The EGL interop method didn't exist at the time the MPlayer VA-API patch was created either.
* mpv.desktop: add audio/mp4 mime typewm42016-01-071-1/+1
| | | | Who thought mime types were a good idea?
* player: reset playback abort when reloading a filewm42016-01-071-0/+1
| | | | | | | | | | | | PT_RELOAD_FILE is a somewhat obscure case when using DVB or when switching Matroska editions. Both cases were broken, because the asynchronous playback abort mechanism was still triggered. This mechanism is used to force the demuxer and stream layers to exit immediately (instead of blocking on I/O possibly forever), and is normally disabled on playback start. The reopen path is a bit strange, and needs to reset it manually. Pointed out in #2568.
* player: make watch later/resume work when "playing" directorieswm42016-01-066-9/+98
| | | | | | | | | | | | | | If you do "mpv /bla/", and then branch out into sub-directories using playlist navigation, and then used quit and watch later, then playing the same directory did not resume from the previous point. This was because resuming is based on the path hash, so a path prefix can't be detected when resuming the parent directory. Solve this by writing each path prefix when playing directories is involved. (This includes all parent paths, so interestingly, "mpv /" would also resume in the above example.) Something like this was requested multiple times, and I want it too.
* video: fix debug messagewm42016-01-061-1/+1
| | | | Should not be a warning, and the message text was also very useless.
* filter_kernels: replace AGG-based codewm42016-01-061-71/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces code based on AGG, taken from this source file: http://vector-agg.cvs.sourceforge.net/viewvc/vector-agg/agg-2.5/include/agg_image_filters.h The intention is that filter_kernels.c can be relicensed to LGPL or BSD. Because the AGG author died, full replacement is the only way to achieve it. This affects only some filter functions. These are exclusively mathematical functions for computing filter coefficients. (Other parts in filter_kernel.c were originally written by me, with heavy additions and refactoring done by other mpv contributors.) While the code is mostly just well-known mathematical formulas written down in C form, AGG copyright could perhaps be claimed anyway. To remove the AGG code, I replaced it with the filter functions from: https://github.com/glumpy/glumpy/blob/master/glumpy/library/build-spatial-filters.py These functions conveniently compute exactly the same thing in mpv, Glumpy, AGG (and about anything that will filter images using the same mathematical principles). First I ported the Python code in the file to C. Then I replaced all functions in filter_kernels.c with this code that could be replaced. Then I investigated whether the remaining functions were based on AGG code and took appropriate action: hanning(), hamming(), quadric(), bicubic(), kaiser(), blackman(), spline16(), spline36(), gaussian(), sinc() were taken straight from Glumpy. For sinc(), re-add the "fabs(x) < 1e-8" check, which was added in commit 586dc557 for unknown reasons. gaussian() loses its filter parameter for some reason. (Well, who cares, not my problem.) The really awkward thing is that the text for hanning() and hamming() does not change. In theory these functions are now based on Glumpy code, but it seems like this can be neither proven nor denied. (The same happened in some other cases with at least a few lines of code.) sphinx() was added in commit 586dc557, and looks suspiciously like sinc() as well. Replace the first 3 lines of the body with the ported function (of which 2 lines do not change; the first uses code only in mpv, and the second is just "return 1.0;"). The 4th line is only similar on an abstract level (and that because of the mathematical relation between these functions). Although the original sinc() was probably used as template for it, with the other lines replaced, I don't think you could make the claim that it falls under AGG copyright. jinc() was added in commit 26baf5b9, but the code for it might be based on sinc(). Rewrite it based on the "new" sinc(). Some of the same remarks as with sphinx() apply. cubic_bc() was ported from Glumpy's Mitchell(). (As far as I'm aware, with the default parameters it's called "the" Mitchell-Netravali filter, but in mpv this function is used to generate a whole group of filters.) spline64() was added in commit a8b67c66, and was probably derived from spline36(). Re-derive it from the "new" spline36(). triangle() could be considered derived from the original bilinear(). This is this in the original commit: static double bilinear(kernel *k, double x) { return 1.0 - x; } This _might_ be based on AGG's image_filter_bilinear: struct image_filter_bilinear { static double radius() { return 1.0; } static double calc_weight(double x) { return 1.0 - x; } }; Considering that the "framework" was written by me, and the only part from AGG taken is "return 1.0 - x;", and this part is trivial and was later thoroughly replaced, this is probably not under the AGG copyright. I'm hoping this doesn't introduce regressions. But the main focus is not being productive anyway, and I didn't rigorously check unintended changes in functionality.
* ao_dsound: remove this audio outputwm42016-01-065-732/+2
| | | | | | | It existed for XP-compatibility only. There was also a time where ao_wasapi caused issues, but we're relatively confident that ao_wasapi works better or at least as good as ao_dsound on Windows Vista and later.
* ao_wasapi: remove unnecessary header fileKevin Mitchell2016-01-055-74/+31
| | | | | All the wasapi files were including both ao_wasapi.h and ao_wasapi_utils.h. Just merge them into a single file.
* ao_wasapi: initialize change notify in main threadKevin Mitchell2016-01-052-3/+6
| | | | This is something else that has nothing to do with audio rendering.
* ao_wasapi: remove old vistablob prototypeKevin Mitchell2016-01-051-2/+0
| | | | this function was removed earlier, but the prototype was missed
* ao_wasapi: make find_deviceID read only wrt struct aoKevin Mitchell2016-01-053-19/+20
| | | | This makes it clearer that state->device is being allocated.
* ao_wasapi: move device selection to main threadKevin Mitchell2016-01-053-8/+10
| | | | In attempt to simplify the audio event thread, this can now be moved out.
* ao_wasapi: avoid some redundant error messages in device selectionKevin Mitchell2016-01-051-15/+7
| | | | | If these error conditions are triggered, the called function will have already output a sufficiently informantive error message.
* ao_wasapi: alloc later to avoid free on errorKevin Mitchell2016-01-051-2/+1
| | | | | In get_device_desc, don't alloc the return value until we know there wasn't an error.
* audio: update outdated commentwm42016-01-051-3/+4
|
* ao_pulse: attempt to fall back to an arbitrary sample formatwm42016-01-051-2/+7
| | | | | | | | | | | | | | | | | | | | | | | Normally, PulseAudio accepts any combination of sample format, sample rate, channel count/map. Sometimes it does not. For example, the channel rate or channel count have fixed maximum values. We should not fail fatally in such cases, but attempt to fall back to a working format. We could just send pass an "unset" format to Pulse, but this is not too attractive. Pulse could use a format which we do not support, and also doing so much for an obscure corner case is not reasonable. So just pick a format that is very likely supported. This still could fail at runtime (the stream could fail instead of going to the ready state), but this sounds also too complicated. In particular, it doesn't look like pulse will tell us the cause of the stream failure. (Or maybe it does - but I didn't find anything.) Last but not least, our fallback could be less dumb, and e.g. try to fix only one of samplerate or channel count first to reduce the loss, but this is also not particularly worthy the effort. Fixes #2654.
* ao_pulse: check for sample rate boundswm42016-01-051-1/+1
| | | | | | | pa_format_info_valid() does not do this. (Although there is a proposed patch on the PulseAudio mailing list.) See #2654.
* ao_pulse: move format setting into a functionwm42016-01-051-20/+26
| | | | No real functional changes.
* options: raise maximum value for --audio-sampleratewm42016-01-051-1/+1
| | | | Helps with testing.
* vo_rpi: handle rotationwm42016-01-051-1/+14
| | | | | Since the MMAL video renderer component supports exactly what we need, it's pretty simple.
* vo_rpi: work around firmware oddness leading to incorrect video rectwm42016-01-051-2/+4
| | | | | | | | | | | Apparently, the firmware will ignore pixel_x/pixel_y if the numeric value of them gets too high (even if they indicate square pixel aspect ratio). Even worse, the destination rectangle is ignored completely, and the video frame is simply stretched to the screen. I suspect this is an overflow or weird sanity check within the firmware. Work it around by limiting the fields to 16000, which is an arbitrary but apparently working limit.
* bundle: remove git sha from the Info.plist versionStefano Pigozzi2016-01-051-1/+10
| | | | Fixes #2677
* build: add option of html manualChris Mayo2016-01-052-0/+19
|
* demux_lavf: re-enable codepage autodetection for .assfwr2016-01-041-2/+1
| | | | | | | | There are a lot of incorrectly encoded subtitles with .ass extension and non-ass subtitles (srt, ssa) with such extension, so we need to try codepage detection even for .ass. Signed-off-by: wm4 <wm4@nowhere>
* ao_wasapi: remove +x flag from fileswm42016-01-044-0/+0
|
* chmap_sel: prefer inexact equivalents over perfect upmixwm42016-01-042-11/+22
| | | | | | | | | | | | | Given 5.1(side), this lets it pick 5.1 from [5.1, 7.1]. Which was probably the original intention of this replacement stuff. Until now, the opposite was done in some cases. Keep the old heuristic if the replacement is not perfect. This would mean that a subset of the channel layout is an inexact equivalent, but not all of it. (My conclusion is that audio output APIs should be designed to simply take any channel layout, like the PulseAudio API does.)
* ao_wasapi: just use a pointer to the deviceID in change_notifyKevin Mitchell2016-01-041-3/+1
| | | | | Rather than creating a new string from the device instance. This will allow moving the change_init to the main thread before the device is loaded.
* ao_wasapi: correctly name the IMMNotificationClientVtblKevin Mitchell2016-01-041-2/+2
|
* ao_wasapi: make persistent enumerator local to change_notifyKevin Mitchell2016-01-044-21/+12
| | | | This is no longer required by anything else
* ao_wasapi: rewrite device listing and selectionKevin Mitchell2016-01-042-225/+187
| | | | | | | | | | | | | Unify and clean up listing and selection. Use common enumerator code for both operations to avoid duplication or inconsistencies. Maintain, but significatnly simplify manual device selection by id, name or number. This actually fixes loading by name which didn't really work before since the "name" displayed by --audio-device=help differed from that used to match the selection, which used the device "description" instead. Save the selected deviceID in the private structure for later loading. This will permit moving the device selection into the main thread in a future commit.
* vo_opengl: fix operation on GLES 2.0wm42016-01-041-2/+2
| | | | | | | | | GLSL in GLES 2.0 did not have line continuation in its preprocessor. This broke shader compilation. It also broke subtitle rendering in vo_rpi, which reuses some of the OpenGL code. Line continuation was finally added in GLES 3.0, which is perhaps the reason why ANGLE accepted it.
* sd_ass: fix memory leaks with --sub-ass=nowm42016-01-041-1/+4
| | | | This affects only the codepath which forcibly disables any ASS tags.
* vo_opengl: reset nnedi3 weights properlyBin Jin2016-01-031-0/+1
| | | | Fixes #2661
* x11: silence xdg-screensaver failure messagewm42016-01-031-2/+2
|
* player: make sure streams are selected with ordered chapterswm42016-01-031-3/+3
| | | | | | | | When using --start with timeline/ordered chapters, then the timeline_switch_to_time() functio