summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* demux: cosmetics: remove indirectionwm42015-10-221-4/+2
| | | | Let's not waste precious lines.
* sub: adjust behavior on mismatching video/subtitle aspect mismatchwm42015-10-211-7/+2
| | | | | | | | | | | | | | | | If the aspect ratio of the video resolution and the subtitle resolution (the implied subtitle coordinate system) mismatch, the subtitles obviously can't be overlayed over the video perfectly. Either you get video that can't be covered by subtitles, or the subtitles could go beyond the video. We don't want to stretch the subtitle to compensate for the aspect ratio, because it would look terrible. Until now, mpv used to fit the subtitle rectangle into the video rectangle (letterboxing/pillarboxing). This looks odd with some sample files with subtitle canvas being wider than the video. Also, mpc-hc displays them in a better way. vlc stretches them, which looks bad. While you probably can't win this game with all those broken files around, pick the mpc-hc method to handle this.
* input: rename recently added HALF_SPACEwm42015-10-211-1/+1
| | | | | | There was a complaint that the naming is inaccurate. That's probably right. Just use the official name instead, which is a bit clunky, but surely correct.
* ao_coreaudio_exclusive: fix buildwm42015-10-211-2/+2
| | | | "Let's apply cosmetic last minute changes without testing them."
* input: add key name for U+3000 IDEOGRAPHIC SPACEwm42015-10-211-0/+1
| | | | | | | Deserves its own name, because just like SPACE it's a printable character, but invisible. Fixes #2349... I think.
* sd_lavc: extend subtitle resolution if images go outsidewm42015-10-211-0/+9
| | | | | | | | | | | | | | | Helps with broken vobsubs, which have an incorrect resolution header set. So we just extend the subtitle resolution to the video size, if the video size is larger. This helps somewhat with readability, or makes them visible at all. It should be a pretty safe change, because normally no sub pictures are supposed to go outside of the area. It should make a difference with broken files only. The sample in question had a video resolution of 1888x1072, and a subtitle resolution of 720x480. Note that always using video resolution as subtitle resolution would break other files.
* ao_coreaudio: do not accept unknown channel layoutswm42015-10-211-1/+1
| | | | | | | | | | | | | | | Coreaudio gives us a channel map with all entries set to kAudioChannelLabel_Unknown. This is translated to a mpv channel map with all channels set to NA, which has special meaning: it's an "unknown" channel map, which acts as wildcard and can be converted from/to any channel layout. Not really what we want. I've got this with USB audio, playing stereo. The multichannel layout consisted of 2 unknown channels, while the stereo channel map was stereo (as expected). Note that channel maps with _some_ NA entries are not affected by this, and must still work.
* ao_coreaudio_exclusive: deal with devices return different channel countwm42015-10-213-1/+33
| | | | | | | | | If the device returns an unexpected number of channels instead of the requested count on init, don't immediately error out. Instead, look if there's a channel map with the given number of channels. If there isn't, still error out, because we don't want to guess the channel layout.
* ao_coreaudio: avoid unnecessary format changeswm42015-10-211-0/+6
| | | | | Not particularly important; just being nice and potentially avoiding problems caused by format setting.
* ao_coreaudio: log current format before setting new formatwm42015-10-211-0/+2
|
* ao_coreaudio: fix some minor memory leakswm42015-10-211-0/+6
|
* vo_opengl: make the default debanding settings less excessiveNiklas Haas2015-10-212-8/+8
| | | | | | | | | It's great that the new algorithm supports multiple placebo iterations and all, but it's really not necessary and hurts performance in the general case for the sake of the 0.1% that actually pause the screen and look for minute differences. Signed-off-by: wm4 <wm4@nowhere>
* options: add support for client certificate authenticationJoschka Tillmanns2015-10-204-0/+15
| | | | | | | | Client certificates are supported by ffmpeg as documented here: > https://www.ffmpeg.org/ffmpeg-protocols.html#tls Signed-off-by: wm4 <wm4@nowhere>
* TOOLS/autoload: avoid throwing an error when playing e.g. youtubebitingsock2015-10-201-1/+6
| | | | Signed-off-by: wm4 <wm4@nowhere>
* ao_coreaudio: raise timeout for change-physical-formatwm42015-10-201-1/+1
| | | | | | | | | | Reportedly fixes operation with "USB connected Parasound ZDAC v.2". (OSX and USB audio sure is not nice at all.) This might be perceived as hang by some users, so it's quite possible that this will have to be adjusted again somehow. Fixes #2409.
* Revert "vo_wayland: define opaque region"Ricardo Vieira2015-10-201-9/+0
| | | | | | This reverts commit c10fb4ce9fcd3dbbf69741eb8499c4cfabbf5412. This is already done in vo_wayland.c:resize,324 doing it here makes the window bigger before the video resizes showing a black area while dragging the border.
* player: be slightly less prone to framedrop in display sync modewm42015-10-191-3/+7
| | | | | 1 to 2 frames desync is still tolerable, and will be quickly compensated (if everything works).
* player: do not use copysign()wm42015-10-191-1/+1
| | | | | | | Apparently this function caused weird problems to me. I have no idea why. The usage of the function looks perfectly fine to me, and even rounding issues can be excluded. In any case, getting rid of this solved my problem, and makes the code actually more readable.
* vd_lavc: attempt to fallback from hwdec before anything is decodedwm42015-10-191-4/+4
| | | | | | | | | | The previous commit moved the av_frame_unref() after the got_picture check. This accidentally also deferred the software fallback reinitialization to until a software picture was decoded (instead of the exact time of the fallback), which is not ideal. Just rely on the fact that calling av_frame_unref() on a frame is ok even if nothing was decoded.
* vd_lavc: continue decoding properly after decoding failurewm42015-10-191-3/+7
| | | | | | | | | | Commit 12cd48a8 started setting the hwdec_failed field even if hwdec was not active, and because it also checked this field even if hwdec was not active, broke decoding forever. Fix this, and also avoid a memory leak or API misuse by releasing the decoded picture. Passing an unreleased frame to the decoder has as far as I know no defined effects.
* demux_lavf: always copy codec headerswm42015-10-191-1/+8
| | | | | | If this is not done, libavformat could change the headers while demuxing, all while the decoder thread reads these fields during initialization.
* video: pass through libavformat has_b_frames fieldwm42015-10-191-0/+1
| | | | | | | This fixes initial decoding of some samples. See #1341. According to Libav devs, this should be considered a libavcodec bug, but as it's hard to fix, here we go.
* vo_opengl: support all kinds of GBRP formatswm42015-10-183-13/+15
| | | | | | | | Adds support for AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP, and AV_PIX_FMT_GBRAP16. (Not that it matters, because nobody uses these anyway.)
* demux: remove demux_add_packet() return valuewm42015-10-173-7/+7
|
* build: remove explicit checks for VPPwm42015-10-174-13/+3
| | | | | This was once done when old versions of libva without VPP had to be supported. Some parts of it were removed earlier already.
* vaapi: drop non-existing FourCCwm42015-10-172-5/+0
| | | | | | | This VA_FOURCC isn't even defined by latest drivers, so I'm just assuming it doesn't exist and never existed. For planar 4:2:0, VA_FOURCC_YV12 is normally preferred, and there's even a VA_FOURCC_IYUV for 4:2:0 with unswapped planes.
* build: bump required libva versionwm42015-10-172-10/+4
| | | | | | | | 0.34 and 0.35 don't have the buffer API, such as vaAcquireBufferHandle. This is only needed for the EGL interop, but why bother staying compatible for such old things (0.36 was released over a year ago). We also can drop some minor compatibility ifdeffery.
* demux_mkv: probe start timewm42015-10-161-10/+43
| | | | | | | | | | | | | | | | | MKV files can very well start with timestamps other than 0. While mpv has support for such files in general, and demux_lavf enables this feature, demux_mkv didn't export a start time. Implement this by simply reading the first cluster timestamp. This in turn is done by reading 1 block. While we don't need the block for this prupose at all, it's the easiest way to get the cluster timestamp read correctly without code duplication. In theory this could be wrong, and a packet could start at a much later time, but in practice this won't happen. This commit also adds an option to disable this feature. It's not documented because nobody should use it. (But I happen to have a need for this.)
* command: make time properties unavailable if timestamp is unknownwm42015-10-165-15/+34
| | | | | | Let's hope this doesn't confuse client API users too much. It's still the best solution to get rid of corner cases where it actually return the wrong timestamp on start, and then suddenly jump.
* TOOLS/stats-conv: rewrite for pygtgraphwm42015-10-151-14/+26
| | | | | | | | matplotlib is pathetically slow, which makes using stats-conv.py to view dumps longer than a few seconds a huge pain. pyqtgraph is slightly faster than matplotlib. Other than that, it seems to be worse in every aspect (at least for plotting), but such is life.
* vo_opengl_cb: fix pausing and seeking if interpolation is enabledwm42015-10-141-1/+20
| | | | | | | | | | | | | | | When seeking, the current frame will have the wrong timestamp, until the seek is done and a new frame from the seek target is shown. We still use the "old" frame for redrawing during seeks. This frame has to be explicitly marked with still=true in order not to confuse the interpolation queue. If this is not done, it will ignore frames until a frame with approximately the same timestamp as the "old" frame is reached. (Does this mean interpolation handles timestamp resets incorrectly? I have no idea.) Of course we also have to clear possibly queued frames on seeks. Also, in pausing, explicitly let the frame redraw.
* player: fix an adjustment in display sync modewm42015-10-141-1/+1
| | | | | | This adjustment is supposed to improve the audio speed calculation in case of unexpected desync. The flipped sign made it actually worse, although the total impact of this bug was very minor.
* af_lavrresample: fix unintended audio drift when setting playback speedwm42015-10-141-3/+9
| | | | | | | | | | | | | | Small adjustments to the playback speed use swr_set_compensation() to stretch the audio as it is required. But since large adjustments are now handled by actually reinitializing libswresample, the small adjustments get rounded off completely with typical frame sizes. Compensate for this by accounting for the rounding error and keeping track of fractional samples that should have been output to achieve the correct ratio. This fixes display sync mode behavior, which requires these adjustments to be relatively accurate.
* msg: remove the useless trailing comment from stats dumpingwm42015-10-141-4/+2
| | | | | The origin of the stats line was added as a comment (starting with '#'). It was useless and just blowing up file sizes.
* player: fix inverted conditionwm42015-10-131-1/+1
| | | | | | | Simple oversight which made it not work at all. How did this ever work, and if it was never tested, then why did it work when fixing this oversight?
* vo_opengl: x11egl: fix confused error status codeswm42015-10-121-2/+2
| | | | This is all kinds of wonderfully stupid.
* vo_opengl: x11egl: reject nvidia drivers when autoprobingwm42015-10-121-0/+6
| | | | | | | | | Newer nVidia drivers support EGL, but they seem to work badly, apparently don't support some needed features or not in a form we want (such as swap control), and vdpau interop is not available. Disable it by default, because I'm tired of explaining this issue. Can be reverted as soon as nVidia release working drivers.
* vd_lavc: work around libavcodec nonsense causing hwdec init failurewm42015-10-121-0/+3
| | | | | | | | | | | | | | | | The libavcodec h264 decoder contains some idiotic code with unknown purpose (no sample or explanation known that necessitates its existence), that causes the AVCodecContext.get_format callback to be invoked at a time when hwaccels can't be initialized. By definition, the get_format callback is supposed to initialize hwaccels (another idiotic thing now part of the API, but different story). This causes hwdec initialization sometimes to fail (WolfensteinTwitch.mp4): the first get_format callback will mark it as failed, so the second get_format (the "proper" normal one) will not bother restoring the state, and hwdec init fails. While this should be fixed in libavcodec (good luck with that), it's quite easy to workaround.
* demux_mkv: do not return subtitle packets that end before seek targetwm42015-10-121-2/+6
| | | | | | This affects the subtitle preroll mode during seeking. It could matter somewhat with insane files with ten-thousands of subtitle events, which now seem to pop up, and will avoid packet queue overflow.
* af_lavrresample: reinit resampler on large speed changeswm42015-10-121-15/+19
| | | | | | swr/avresample_set_compensation() was made for small speed adjustments. Non-documentation says it should be used for changes not larger than 1%, so reinitialize the sampler if the change is larger than that.
* ytdl: Set a proper label for external audio tracksChrisK22015-10-111-3/+3
|
* vd_lavc: refuse to initialize vaapi with unknown profileswm42015-10-111-3/+1
| | | | | | Bad idea, although I'm not sure how harmful it actually was. Although this is common code, only the vaapi hwaccel still uses it.
* cocoa: set application policy before creating windowwm42015-10-111-5/+4
| | | | | | | | | | | | This fixes a regression since commit f4d62da8. The original code run vo_cocoa_config_window() once without creating the window, which had the effect that the last part of the function was run at least once before the actual window was created. Fix the regression by moving it to before the window is created. The regression itself is hard to describe. One test case: start mpv from a fullscreened terminal window. It should switch to another desktop, with the mpv window visible. This didn't happen anymore.
* DOCS/client_api_examples/README: add qt_openglwm42015-10-111-10/+16
| | | | | | | And also adjust the documentation for the other Qt examples to avoid redundancy. While we're at it, move the simple example to the top.
* DOCS/client_api_examples/qt_opengl: fix uninitwm42015-10-111-0/+1
| | | | | | | | | | | | | | | | | mpv_opengl_cb_uninit_gl() still needs the OpenGL context. It makes calls to free OpenGL objects. Strictly speaking, this is probably unnecessary, because the OpenGL context is destroyed afterwards (implicitly freeing all related objects). But mpv_opengl_cb_uninit_gl() does not require the destruction of the OpenGL context, and thus has to free resources manually. It's also true that OpenGL normally simply ignores API calls (or returns errors) if no context is set, but doing it properly is cleaner. That makeCurrent() can be called in the destructor is explicitly allowed and recommended for freeing GL resources in the Qt docs. This fixes a mpv error message on exit.
* DOCS/client_api_examples: add qt widget + opengl-cb examplewang-bin2015-10-116-0/+272
|
* ytdl: Remove DASH hacks, use DASH by defaultChrisK22015-10-113-16/+15
| | | | | | | | | | | Thanks to rcombs, ffmpeg now properly supports DASH and we can remove our hacks for it and use it by default whenever available. If you don't like this for whatever reason, you can get the "normal" streams back with --ytdl-format=best . Closes #579 Closes #1321 Closes #2359
* DOCS/client_api_examples/README: rewritewm42015-10-102-17/+106
| | | | | | The new one is much more detailed. Also add part of it to the libmpv doxygen.
* player: fix missed wakeup on video EOFwm42015-10-091-0/+3
| | | | | | | If video EOF happens during playback restart, and audio is syncing, and the demuxer packet queue overflows (i.e. no new packets will be read), then it could happen that the player accidentally enters sleeping, and continues playing anything only after e.g. user input wakes it up.
* manpage: font options do not support fontconfig patterns anymorewm42015-10-091-2/+5
| | | | | | libass 0.13.0 breaks this due to removal of fontconfig from its core (instead, fontconfig is one possible backend, and pattern lookup is apparently not possible anymore).
* audio: add AO deviation loggingwm42015-10-082-0/+27
| | | | | Pretty dumb (and doesn't handle pausing or other discontinuities), but at least somewhat idiot-proof.
* vo: log deviation from ideal vsync intervalwm42015-10-081-0/+5
|
* demux_subreader: participate in probing only on Libavwm42015-10-081-0/+4
| | | | | | FFmpeg supports all formats the old subreader code does, and is better at it. On the other hand, subreader.c's probing is bad and can lead to false positives easily.
* af_lavrresample: use libswsresample dynamic rate adjustment featurewm42015-10-071-9/+26
| | | | | | | | | | swr_set_compensation() changes the apparent sample rate on the fly (who would have guessed). It is thus very well-suited for adjusting audio speed on the fly during playback (like needed by the display-sync mode). It skips the relatively slow resampler reinitialization. If this doesn't work (libswresample soxr backend), then fall back to the old method.
* vo_xv: fix crash with --widwm42015-10-071-1/+1
| | | | | | Fixes #2386. Reminder that you should not use this crap-VO.
* audio: make spdif re-probe from normal decoding workwm42015-10-062-2/+11
| | | | | | | | The previous commit handled not falling back to normal decoding if the AO was reloaded (I think...), and this tries to re-engage spdif pass- through if it was previously falling back to normal decoding (e.g. because it temporarily switched to an audio device incapable of passthrough).
* audio: re-probe spdif if AO is reloadedwm42015-10-061-1/+3
| | | | Makes the spdif automagic work better on audio hotplugging.
* demux: don't attempt to open a demuxer after abort signal was givenwm42015-10-061-0/+3
| | | | | demux_open() kept trying to fallback to other demuxers when opening was cancelled. This was not really a problem, but it was stupid.
* player: make stop command actually stopwm42015-10-062-2/+2
| | | | | | | | | | | | | The stop command didn't always stop. In this case, opening a HLS URL and then sending "stop" during loading would actually make it fallback to parsing it as a playlist, and then continued to play the playlist items. (This corner case makes several unfortunate factors come together to produce this really odd behavior.) Another issue is that the "stop" was not always explicitly set. This could be a problem when sending several commands at once. Only the "quit" command should have priority over the "stop" command, so this is still checked.
* README: link to Copyright instead of LICENSE filewm42015-10-061-1/+1
| | | | | | | The Copyright file explains the whole license mess. The earlier change was apparently confusing, because the link reading "details" merely linked to the GPLv2 license instead of explaining anything. In fact, I meant to link to the Copyright file in the first place.
* video: fix base for --no-correct-ptswm42015-10-062-9/+10
| | | | | | | | | | Use the first encountered packet PTS/DTS as base, instead of the last one. This does not add the amount of frames buffered in the codec to the PTS offset, and thus is better. Also, don't add the frame time if there was no decoded frame yet. The first frame should obviously have the timestamp of the first packet (going by this heuristic).
* video: increase maximum number of buffered AVI pts sampleswm42015-10-061-1/+1
| | | | | | | While b-frame reordering limits the maximum required number to around 16, the number of additionally buffered frames can be much higher. Guess when this actually matters? (For the libavcodec MMAL wrapper.)
* video: don't sort AVI pts sampleswm42015-10-061-14/+10
| | | | | It's obviously not needed, and only an artifact of the old PTS determination code.
* video: remove user-controllable PTS sorting (--pts-association-mode)wm42015-10-067-80/+5
| | | | |