summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 0.16.0v0.16.0Martin Herkt2016-02-292-1/+110
|
* Merge branch 'master' into release/currentMartin Herkt2016-02-28237-3450/+6513
|\
| * video: fix hr-seekwm42016-02-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | Hr-seek was often off by one frame due to rounding issues, which have been traditionally taken care off by adding a "tolerance". Essentially, frames very close to the seek target PTS are not dropped, even if they may strictly are before the seek target. Commit 0af53353 accidentally removed this by always removing frames even if they're within the "tolerance". Fix this by "unsharing" the logic and making sure the segment code is inactive for normal seeks.
| * player: simplify mp_seek()wm42016-02-281-55/+46
| |
| * demux: remove relative seekingwm42016-02-2812-149/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ever since a change in mplayer2 or so, relative seeks were translated to absolute seeks before sending them to the demuxer in most cases. The only exception in current mpv is DVD seeking. Remove the SEEK_ABSOLUTE flag; it's not the implied default. SEEK_FACTOR is kept, because it's sometimes slightly useful for seeking in things like transport streams. (And maybe mkv files without duration set?) DVD seeking is terrible because DVD and libdvdnav are terrible, but mostly because libdvdnav is terrible. libdvdnav does not expose seeking with seek tables. (Although I know xbmc/kodi use an undocumented API that is not declared in the headers by dladdr()ing it - I think the function is dvdnav_jump_to_sector_by_time().) With the current mpv policy if not giving a shit about DVD, just revert our half-working seek hacks and always use dvdnav_time_search(). Relative seeking might get stuck sometimes; in this case --hr-seek=always is recommended.
| * vo_opengl: remove redundant codeigv2016-02-281-2/+2
| |
| * osc: add always-on mode and unify visibility mode (always/never/auto)Avi Halachmi (:avih)2016-02-272-18/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds always-on mode by internally utilizing hidetimeout as negative and forbidding the user to set negative values. This removes script-message to enable/disable the osc, and instead introduces a combined 'visibility' control with the values never/auto/always. It's available via script_opts and script_message as 'osc-visibility'. As message, it also supports a 'cycle' value. The del key is bound to cycling the visibility modes.
| * osc: fix runtime enable_osc(true/false)Avi Halachmi (:avih)2016-02-271-4/+11
| | | | | | | | | | | | | | | | | | | | | | There were few issues: - When it's disabled and then enabled, it was displaying the osc briefly and then autohide right away. Don't do that. - When it's enabled and then disabled, it was not removing the osc from screen if called while the osc is visible (because tick() is responsible for the hide but it doesn't render() the empty osc when the osc is disabled). - Due to delayed/async unbinding of mouse events it was possible to show_osc() after it got disabled e.g. from mouse_move. Prevent this.
| * player: minor simplificationwm42016-02-274-18/+13
| | | | | | | | | | | | No need to pass endpts down in such a dumb way. Also remove an outdated comment somewhere.
| * ao_wasapi: make wait for audio thread termination infiniteKevin Mitchell2016-02-261-4/+3
| | | | | | | | | | The time-out was a terrible hack for marginally better behaviour when encountering #1773, which appears to have been resolved by a previous commit.
| * ao_wasapi: further flatten/simplify volume controlKevin Mitchell2016-02-261-39/+34
| |
| * ao_wasapi: use MP_FATAL for stuff that leads to init failureKevin Mitchell2016-02-262-5/+5
| |
| * ao_wasapi: move pre-resume reset into resume functionKevin Mitchell2016-02-261-16/+14
| |
| * ao_wasapi: move resetting the thread state into main loopKevin Mitchell2016-02-261-11/+3
| | | | | | | | | | This was previously duplicated between the reset/resume functions, and not properly handled in the "impossible" invalid thread state case.
| * ao_wasapi: set buffer size to device period in exclusive modeKevin Mitchell2016-02-261-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | This eliminates some intermittent pops heard in a HRT MicroStreamer DAC uncorrelated with user interaction. As a bonus, this resolves #1773 which I can o longer reproduce as of this commit. Leave the 50ms buffer for shared mode since that seems to be working quite well. This is also the way exclusive mode is done in the MSDN example code: https://msdn.microsoft.com/en-us/library/windows/desktop/dd370844%28v=vs.85%29.aspx This was originally increased in c545c40 to mitigate glitches that subsequent refactorings have eliminated.
| * ao_wasapi: replace laggy COM messaging with mp_dispatch_queueKevin Mitchell2016-02-263-175/+80
| | | | | | | | | | | | | | | | | | | | A COM message loop is apparently totally inappropriate for a low latency thread. It leads to audio glitches because the thread doesn't wake up fast enough when it should. It also causes mysterious correlations between the vo and ao thread (i.e., toggling fullscreen delays audio feed events). Instead use an mp_dispatch_queue to set/get volume/mute/session display name from the audio thread. This has the added benefit of obviating the need to marshal the associated interfaces from the audio thread.
| * ao_wasapi: avoid under-run cascade in exclusive mode.Kevin Mitchell2016-02-261-24/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't wait for WASAPI to send another feed event if we detect an underfull buffer. It seems that WASAPI doesn't always send extra feed events if something causes rendering to fall behind. This causes every subsequent playback buffer to under-run until playback is reset. The fix is simply to do a one-shot double feed when this happens, which allows rendering to catch up with playback. This was observed to happen when using MsgWaitForMultipleObjects to wait for the feed event and toggling fullscreen with vo=opengl:backend=win. This commit improves the behaviour in that specific case and more generally makes exclusive mode significantly more robust. This commit also moves the logic to avoid *over*filling the exclusive mode buffer into thread_feed right next to the above described underfil logic.
| * ao_wasapi: fix typo in commentKevin Mitchell2016-02-261-1/+1
| |
| * ao_wasapi: use SUCCEEDED/FAILED macrosKevin Mitchell2016-02-262-13/+9
| |
| * manpage: add showvolume example to --lavfi-complexwm42016-02-271-0/+3
| | | | | | | | Pretty useful for debugging surround nonsense.
| * ao: initial OpenSL ES supportIlya Zhuravlev2016-02-274-0/+259
| | | | | | | | | | | | | | | | OpenSL ES is used on Android. At the moment only stereo output is supported. Two options are supported: 'frames-per-buffer' and 'sample-rate'. To get better latency the user of libmpv should pass values obtained from AudioManager.getProperty(PROPERTY_OUTPUT_FRAMES_PER_BUFFER) and AudioManager.getProperty(PROPERTY_OUTPUT_SAMPLE_RATE).
| * dispatch: clarify lifetime issueswm42016-02-261-4/+9
| |
| * vo_opengl: set uniform variable "pixel_size" for internal shadersigv2016-02-265-28/+28
| |
| * vo_opengl: dxinterop: fix compatibility issue with Vistaigv2016-02-261-1/+2
| |
| * demux_timeline: slightly improve reported file formatwm42016-02-251-1/+3
| | | | | | | | | | Report the underlying demuxer's format. Since there can be many demuxers participating, pick the "main" segment.
| * player: slightly simplify how demuxer streams are enabled/disabledwm42016-02-255-42/+31
| | | | | | | | | | Instead of having reselect_demux_streams() look at all streams, make it look at the current stream that is being enabled/disabled.
| * player: fix --force-window behaviorwm42016-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _Of course_ the previous commit broke --force-window behavior (like it does every single time I touch it). vo_has_frame() gets cleared after a seek, so e.g. stopping playback of a file and going to the next by keeping the seek key down will enter a short moment without video at the end of the first file, which will set the stalled_video variable to true. Prevent it by using the indication whether the window was properly created (which is probably exactly what we want here). This function is also responsible for destroying the window when needed, and obviously we should never do that while video is active. (This is the actual bug, although the other change in this commit already hides the common breakage it caused.)
| * player: honor --force-window if video is selected, but inactivewm42016-02-241-4/+10
| | | | | | | | | | If a video track is selected, but no video is decoded from it (mostly with broken files), then create the window anyway.
| * demux: avoid lost wakeup on queue overflowwm42016-02-241-1/+6
| | | | | | | | | | | | | | | | | | If a stream is marked as EOF (due to no packets found in reach), then we need to wakeup the decoder. This is important especially if no packets are found at the start of the file, so the A/V sync logic actually starts playback, instead of waiting for packets that will never come. (It would randomly start playback when running the playback loop due to arbitrary external events like user input.)
| * demux_mkv: don't trust DefaultDuration for audiowm42016-02-241-5/+3
| | | | | | | | | | It's used to interpolate timestamps for sub-packets ("block laces"). It's occasionally broken, and not really needed by us.
| * vo_opengl, vo_rpi: unbreak a few thingswm42016-02-243-4/+4
| | | | | | | | | | Commit 2f562825 didn't remove the "color" declaration for these. Since the shader header already declares it, shader compilation broke.
| * player: remove pointless callwm42016-02-231-1/+0
| | | | | | | | | | This is the unfortunate video timer; it's already reset when it actually matters (after video was prepared and before video is actually started).
| * player: simplify enabling demuxer threadswm42016-02-231-17/+6
| | | | | | | | | | No need for this crazy loop anymore, and we can simply enable it for each demuxer when it's opened.
| * player: remove unused MPContext.stream fieldwm42016-02-233-11/+1
| | | | | | | | | | | | | | It was just dead code. Also fixes the stream-open-filename property, which is supposed to be read-only if a file was already opened.
| * player: remove MPContext.sources fieldswm42016-02-232-17/+4
| | | | | | | | | | | | Some oddity that is not needed anymore. The only thing which still referenced them was avoiding loading external files more than once, which is now prevented by checking the list of tracks instead.
| * vo_opengl: declare vec4 color inside fragment shader stubNiklas Haas2016-02-233-43/+27
| | | | | | | | | | | | Why was this done so stupidly, with so many complicated special cases, before? Declare it once so the shader bits don't have to figure out where and when to do so themselves.
| * vo_opengl: set uniform variable "pixel_size"igv2016-02-221-0/+2
| | | | | | | | | | pixel_size is often used variable, also reciprocal is a costly operation for AMD and older nVidia (prior to Kepler) GPUs.
| * vo_opengl: set the correct size of the input imageigv2016-02-221-2/+2
| |
| * vo_x11: add 16bpp supportGusar3212016-02-221-0/+1
| |
| * wscript: don’t install the encoding profiles with encoding disabledEmmanuel Gil Peyrot2016-02-221-1/+2
| |
| * demux_mkv: fix opus gapless behavior (2)wm42016-02-221-2/+2
| | | | | | | | | | | | | | Commit 943f76e6, which already tried this, was very stupid: it didn't actually override the samplerate for Opus, but overrode it for all codecs other than Opus. And even then, it failed to use the overridden samplerate. (Sigh...)
| * demux_lavf: adjust seeks by maximum codec delaywm42016-02-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes relative seeks. Without this, a seek back could skip so much data that the seek would effectively jump forward. (Or insert silence for files with video.) There's the question whether the frontend should do this instead (by using information from the decoders), but for now this seems more proper. demux_mkv.c does this already, sort of. libavformat doesn't for seeks in .ogg (aka .opus), but might be doing it for mkv. Seems to be a mess as well.
| * audio: make mp_audio_skip_samples() adjust the PTSwm42016-02-222-3/+3
| | | | | | | | Slight simplification/cleanup.
| * ad_lavc: skip AVCodecContext.delay samples at beginningwm42016-02-221-0/+9
| | | | | | | | | | | | | | | | Fixes correctness_trimming_nobeeps.opus. One nasty thing is that this mechanism interferes with the container-signalled mechanism with AV_FRAME_DATA_SKIP_SAMPLES. So apply it only if that is apparently not present. It's a mess, and it's still broken in FFmpeg CLI, so I'm sure this will get fucked up later again.
| * ad_lavc: make sample trimming symmetric to skippingwm42016-02-221-6/+8
| | | | | | | | | | | | I'm not quite sure what the FFmpeg AV_FRAME_DATA_SKIP_SAMPLES API demands here. The code so far assumed that skipping can be more than a frame, but not trimming. Extend it to trimming too.
| * ad_lavc: move skipping logic out of the HAVE_AVFRAME_SKIP_SAMPLES blockwm42016-02-221-10/+13
| |
| * ad_lavc: interpolate missing timestampswm42016-02-221-0/+9
| | | | | | | | | | | | | | | | | | | | This is actually already done by dec_audio.c. But if AV_FRAME_DATA_SKIP_SAMPLES is applied, this happens too late here. The problem is that this will slice off samples, and make it impossible for later code to reconstruct the timestamp properly. Missing timestamps can still happen with some demuxers, e.g. demux_mkv.c with Opus tracks. (Although libavformat interpolates these itself.)
| * audio: move frame clipping to a generic functionwm42016-02-213-33/+37
| |
| * demux_mkv: add hack to fix opus gapless behaviorwm42016-02-211-0/+6
| | | | | | | | | | | | | | I think the conclusion is that AV_PKT_DATA_SKIP_SAMPLES is misdesigned (at least for some formats), and an alternative mechanism using durations would be better. (Combining it with a proper timebase would keep sample-accuracy.)
| * manpage: fix typowm42016-02-211-1/+1
| |
| * manpage: add hint where the full keybindings are declaredwm42016-02-211-0/+4
| | | | | | | | The actual location of input.conf the user has to find out himself.
| * sub: always clip subtitles against segment endwm42016-02-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | This happens only if the new segment wasn't read yet. This is not quite proper and a problem with dec_sub.c internals. Ideally, it'd wait with rendering until a new enough segment has been read. Normally, the new segment is available immediately, so the end will be automatically clipped by switching to the right segment in the exact moment it's supposed to become effective. Usually shouldn't cause any problems, though.
| * demux_timeline: fix nested timelineswm42016-02-204-6/+7
| | | | | | | | | | You can e.g. reference ordered chapters or other EDL files in EDLs. There were some bugs left which broke this in some cases.
| * vd_lavc: simplify hwdec pixfmt checkwm42016-02-201-1/+1
| | | | | | | | | | Instead of checking whether the format is a hwaccel format, check whether it's the exact format we've requested for hardware decoding.
| * dxva2: fix autoprobingwm42016-02-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | Doing --hwdec=auto ends up picking dxva2, creating a decoder, and then sending D3D frames down the video chain, which immediately fails and falls back to software. Consider dxva2 only if the VO provides a context. If this fails, autoprobing will proceed to try dxva2-copy as usual. Fixes #2844.
| * video: allow the decoder to consume packets partiallywm42016-02-192-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation for a hypothetical API change in libavcodec, which would allow the decoder to return multiple video frames before accepting a new input packet. In theory, the body of the if() add