aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* stream/audio: fix unchecked strdupsGravatar wm42015-10-30
| | | | | See #2435. It's literally a waste of time trying to fix minor memory leaks in this old, unused, and crappy code.
* command: add mistimed-frame-count propertyGravatar wm42015-10-30
| | | | | Does what the manpage says. This is a replacement incrementing the dropped frame counter (see previous commit).
* video: fix framedrop accounting in display-sync modeGravatar wm42015-10-30
| | | | | | | | | | | | | | Commit a1315c76 broke this slightly. Frame drops got counted multiple times, and also vo.c was actually trying to "render" the dropped frame over and over again (normally not a problem, since frames are always queued "tightly" in display-sync mode, but could have caused 100% CPU usage in some rare corner cases). Do not repeat already dropped frames, but still treat new frames with num_vsyncs==0 as dropped frames. Also, strictly count dropped frames in the VO. This means we don't count "soft" dropped frames anymore (frames that are shown, but for fewer vsyncs than intended). This will be adjusted in the next commit.
* vo_opengl: cache frames only in display-sync modeGravatar wm42015-10-30
| | | | | | | vo_frame.num_vsyncs can be != 1 in some cases in normal sync mode too. This is not a very exact fix, but in exchange it's robust. (These vo_frame flags are way too tricky in combination with redrawing and such.)
* vo_opengl: do not attempt to cache frames in FBO in dumb-modeGravatar wm42015-10-30
| | | | | | | | | | There were occasional shader compilation and rendering failures if FBOs were unavailable. This is caused by the FBO caching code getting active, even though FBOs are unavailable (i.e. dumb-mode). Boken by commit 97fc4f. Fixes #2432.
* manpage: briefly mention libmpvGravatar wm42015-10-30
|
* vd_lavc: fix declarationsGravatar wm42015-10-30
| | | | | | | Fixes linker failure. How did this ever work? Apparently it did most of the time, but apparently we just got the first case where it didn't. Fixes #2433.
* manpage: extend profile documentationGravatar wm42015-10-29
|
* vo: take normal drop path when dropping in display-sync modeGravatar wm42015-10-29
| | | | I hope there wasn't a deeper reason for exiting early.
* vo_drm: show osd in audio only modeGravatar Paul B Mahol2015-10-29
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* player: raise display sync desync toleranceGravatar wm42015-10-28
| | | | | | | Bump it to 80, and 2 vsyncs. This is another measure against vsync jitter. Admittedly this is a bit simplistic (and we should probably estimate a stable estimated vsync phase instead), but for now this will do.
* player: reset AO stats on pause and other discontinuitiesGravatar wm42015-10-28
| | | | It's annoying.
* player: simplify display-adrop mode safeguardGravatar wm42015-10-28
| | | | | | It's not needed, because the additional data is not appended, but is the total size of the audio buffer. The maximum size is the static audio drop size (or twice, if the audio is duplicated).
* player: minor refactor for A/V diff computationGravatar wm42015-10-28
| | | | | | | | Calculate the A/V difference directly in the display sync code, instead of the awkward current way, which reuses the fields for audio sync. We still set time_frame, because it makes falling back to audio sync somewhat smoother.
* player: fix display sync A/V difference estimation on dropsGravatar wm42015-10-28
| | | | | | | When dropping or repeating frames, we essentially influence when the frame after the next frame will be shown, not the next frame. This led to dropping/repeating frames 2 times, because the A/V difference had a delay of one frame. Compensate it with the expected value.
* sub: remove use of semi-deprecated libass fieldGravatar wm42015-10-28
| | | | | In newer libass version, this does nothing, and will be removed on the next API/ABI bump.
* Replace deprecated av_free_packet() callsGravatar wm42015-10-28
| | | | | | av_free_packet() got finally deprecated. Use av_packet_unref() instead, which has almost the same semantics, has existed for a while, and is available in all FFmpeg and Libav versions we support.
* demux_mkv: fix cluster skip with duration probingGravatar wm42015-10-27
| | | | The start time probing essentially broke it.
* vo: kill non-working missed frame detectionGravatar wm42015-10-27
| | | | | | | | | | | | | | | This was not very reliable. In the normal vo_opengl case, this didn't deal well enough with vsync jitter. Vsync timings can jitter quite extremely, up to a whole vsync duration, in which case the "missed" frame counter keeps growing, even though nothing is wrong. This behavior also messes up the A/V difference calculation, but as long as it's within tolerance, it won't provoke extra frame dropping/repeating. Real misses are harder to detect, and I might add such detection later. In the vo_opengl_cb case, this was additionally broken due to the asynchronity between renderer and VO threads.
* player: disable total-avsync-change update in display-sync modeGravatar wm42015-10-27
| | | | | The total-avsync-change property made no sense in display-sync mode (in addition to making not all that much sense in general).
* player: fix display-sync A/V calculation on high playback speedsGravatar wm42015-10-27
| | | | | | This is all kinds of stupid - update_avsync_after_frame() will multiply this value with the speed at a later point, and we only update this field for this function. (This should be refactored.)
* player: add audio drop/duplicate modeGravatar wm42015-10-27
| | | | Not very robust in the moment.
* player: simplify audio sync pts calculationGravatar wm42015-10-27
| | | | | This was done for symmetry with adjust_sync(). But mpctx->delay is always 0 at this point, so prefer slightly simpler code.
* demux_mkv: fix duration probing for files with non-0 start timeGravatar wm42015-10-26
| | | | | When using --demuxer-mkv-probe-video-duration=full and the file did not start at timestamp 0, the reported duration was still wrong.
* ao_coreaudio_exclusive: check for maximum channel countGravatar wm42015-10-26
| | | | | | Until recently, the channel layout code happened to catch this, but now an explicit check is needed. Otherwise, it'd try to pad the missing channels with NA in the channel map fallback code.
* client API: change error string if playback fails completelyGravatar wm42015-10-26
| | | | | It can print this if AO/VO initialization fails, which makes the wording a lie. Change it to something more diplomatically safe.
* ao_coreaudio_exclusive: fallback to stereo on unknown channel layoutsGravatar wm42015-10-26
| | | | | | | | | | | This is intended for the case when CoreAudio returns only unknown channel layouts, or no channel layout matches the number of channels the CoreAudio device forces. Assume that outputting stereo or mono to the first channels is safe, and that it's better than outputting nothing. It's notable that XBMC/kodi falls back to a static channel layout in this case. For some messed up reason, the layout it uses happens to match with the channel order in ALSA's/mpv's "7.1(alsa)" layout.
* ao_coreaudio_chmap: minor refactorGravatar wm42015-10-26
| | | | | | Share some code between ca_init_chmap() and ca_get_active_chmap(), which also makes it look slightly nicer. No functional changes, other than the additional log message.
* ao_coreaudio_chmap: allow stereo as fallback; avoid mono fallbackGravatar wm42015-10-26
| | | | | | | | | | | | | | | | If no channel layouts were determined (which can actually happen with some "strange" devices), the selection code was falling back to mono, because mono is always added as a fallback. This doesn't seem quite right. Allow a fallback to stereo too, if no channel layout could be retrieved at all. So we always assume that mono and stereo work, if no other layouts are available. (I still don't know what the CoreAudio stereo layout is supposed to do. It could be used to swap left and right channels. It could also be used to pad/move the channels, but I have never seen that. And it can be set to non-stereo channels, which breaks mpv. Whatever.)
* ao_coreaudio: fix another minor memory leakGravatar wm42015-10-26
| | | | How stupid, even the cleanup gotos were already there.
* audio: bump maximum number of channels to 16Gravatar wm42015-10-26
| | | | | | | | | | | The main reason is that ao_coreaudio_exclusive needs this for some OSX devices. They want packed audio, and special-casing this in the coreaudio code would be too much of a pain. The maximum of channels we can support is 64 (because FFmpeg uses 64 bit masks for channel layouts), but since struct mp_audio can get pretty big (has static allocations of 2 pointers for each channel for planar mode), it's less wasteful to stay lower for now.
* audio: use AVFrames with more than 8 channels correctlyGravatar wm42015-10-26
| | | | | | | Requires messy dealing with the extended_ fields. Don't bother with af_lavfi and ao_lavc for now. There are probably no valid use-cases for these.
* af_lavrresample: make planarization pass work with >8 channelsGravatar wm42015-10-26
| | | | | | | | | | av_get_default_channel_layout() fails with channel counts larger than 8. The channel layout doesn't need to make sense, so pick an arbitrary fallback. libswresample also has options for setting the channel counts directly, but better not introduce new concepts in the code. Also, libavresample doesn't have these options.
* audio: improve mp_chmap_to_lavc_unchecked() unknown chmap behaviorGravatar wm42015-10-26
| | | | | | | | | | | | | | | | | | | | | | | Change it so that it will always return a bitmask with the correct number of channels set if an unknown channel map is passed. This didn't work for channel counts larger than 8, as there are not any standard channel layouts defined with more than 8 channels (both in mpv and FFmpeg). Instead, it returned 0. This will help when raising the maximum allowed channel count in mpv. Some code in af_lavrresample relies on it, more or less. One change is that unknown channel maps won't result in lavc standard channel layouts anymore, just a set of random speakers. This should be fine, as the caller of mp_chmap_to_lavc_unchecked() should handle these cases. For mp_chmap_reorder_to_lavc() this is not so clear anymore, but should also be ok. For normal channel maps, simply dropping NA channels is still the correct and wanted behavior. Currently, the mpv maximum channel count is 8. This commit is preparation for raising this limit.
* audio: always log channel maps before determining final mapGravatar wm42015-10-26
| | | | | Until now, this was done only in debug verbosity, while some AOs logged equivalent information in verbose mode. Clean this up.
* ao_coreaudio: fix potential UB in error casesGravatar wm42015-10-26
| | | | | | | | | mNumberChannelDescriptions being 0 is pretty much an error, but if it can happen, then the code checking the chmap below will trigger UB, as chmap is not initialized at all. Also, simplify the code a little: we never change the number of channels, so this is just fine.
* ao_coreaudio_chmap: add more loggingGravatar wm42015-10-26
|
* af: prevent endless loop when removing filters due to spdifGravatar wm42015-10-26
| | | | | | | | | | | | | | | | | | | | | This code removes filters which can not take spdif inout. This was made so that PCM filters are transparently dropped in spdif mode. This entered an endless loop with: --af=lavcac3enc:::2 --audio-channels=5.1 The forced number of output channels is incompatible with spdif. It's trying to insert af_lavrresample as conversion filter to compensate for it. Of course this doesn't work, which triggers the PCM filter removal. Then it goes on normally - since the new state is exactly as before, it will try the same thing again, forever. Fix by reusing the retry counter, which is a very dumb but very effective measure against these cases of filter negotiation failure. We could try to be more clever (for example, if the removed filter is a conversion filter, we can be sure this won't work, and error out immediately). But better keep it simple and robust.
* ao_alsa: log format probing in verbose modeGravatar wm42015-10-25
| | | | | And also remove a redundant log message. (We can tell from the following probe or error message whether or not the format test is successful.)
* vd_lavc: make software decoding fallback an optionGravatar Rodger Combs2015-10-25
|
* options: remove --use-text-osdGravatar wm42015-10-24
|
* ytdl: disable --all-subs if "sub-lang" is in raw-optionsGravatar Ricardo Constantino2015-10-24
| | | | | | Defaults stay the same (--all-subs is used if sub-lang wasn't used.) Don't forget to also add "write-sub=" if using sub-lang or else it won't work.
* vo_opengl: remove source shader leftoverGravatar Bin Jin2015-10-24
| | | | The source shader was removed after deband was introduced.
* sd_lavc: take care of AVPicture deprecationGravatar wm42015-10-23
|
* vo_opengl: always cache to an FBO when not interpolatingGravatar Niklas Haas2015-10-23
| | | | | | This speeds up redraws considerably (improving eg. <60 Hz material on a 60 Hz monitor with display-sync active, or redraws while paused), but slightly slows down the worst case (eg. video FPS = display FPS).
* vo: expose frame->num_vsyncs to the VO backendGravatar Niklas Haas2015-10-23
| | | | | It's not clear why this was originally hidden, but the information is useful for allowing the VO backend to make decisions about caching.
* w32_common: disable IMEGravatar James Ross-Gowan2015-10-23
| | | | | | | | | | The IME is not useful for key-bindings. Handle the base ASCII chars instead and don't show the IME window. For the sake of libmpv users, the IME should only be disabled on mpv's GUI thread and not application- wide. No IME on the GUI thread should also mean that VK_PROCESSKEY will never have to be handled, so the logic for that can be removed as well.
* vo_opengl: wayland: use a more standard symbolGravatar wm42015-10-23
| | | | | They're the same, but EGL_CONTEXT_MAJOR_VERSION_KHR technically is an extension, while EGL_CONTEXT_CLIENT_VERSION is the standardized alias.
* vo_opengl: vaapi: fix compilation failure on older systemsGravatar wm42015-10-23
| | | | | | | Older systems have certain EGL extension definitions missing. We redefine them to make the build system easier, and because it's trivial. But we forgot to define the EGL_LINUX_DMA_BUF_EXT identifier. (I hope it's the only missing one.)
* command: make bitrate properties work correctly for external tracksGravatar wm42015-10-23
|