aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
...
* demux: demote packet queue overflow to a warningGravatar wm42016-08-22
| | | | | | | | | It doesn't necessarily have to mean anything bad. We're still too lazy to provide any more detailed information (e.g. whether this happened to likely bad interleaving, excessive amount of packets like with some ASS subs, or that the readahead user option is limitted by the packet queue size).
* player: log if video is considered an imageGravatar wm42016-08-21
| | | | It's a heristic that can fail, so better log it.
* manpage: fix typoGravatar wm42016-08-20
|
* vo: be more trusting to estimated display FPSGravatar wm42016-08-20
| | | | | | | | | | | | | | | This should actually be rather safe - we already check whether the estimated value jitters less than the (possibly untrustworthy) nominal one. Remove a "safety" check that disabled this code for small deviations, and make it trigger sooner into playback. Also lower the log level of messages about using the estimated display FPS down to verbose. Normally there's another mechanism for smoothing out minor estimation differences, but that is not good enough here. This possibly improves behavior as reported in #3433, which can be reproduced with --vo=null:fps=48.426 --display-fps=48 (though it doesn't consider the jitter introduced by a real VO).
* player: update Windows playback state asynchronouslyGravatar wm42016-08-20
| | | | | | | | | | | | | | | | | | Doing this required synchronizing with the VO thread, which could lead to audio dropouts if the VO was frozen (which can happen in practice if e.g. an opengl_cb user is not doing what the API demands). Add a way to send asynchronous VOCTRLs, and use that for the playback state. In theory, it would be better to make this status update a several function and to "merge" several queued update, but that would be slightly more effort/code, and the update is so infrequent that the merging would never happen anyway. The change to vo_destroy() is to make sure all queued asynchronous reuqests are finished before making the vo_thread exit. Even though it's only used on MS Windows, it's run on any platform with any VO, which makes this worse.
* ta: add a helper macroGravatar wm42016-08-20
|
* vo: fix mismatching types in pointer operationGravatar wm42016-08-20
| | | | | | | run_control() dereferences an uint32_t as int. Whether this is allowed depends on what uint32_t is typedefed to (dereferencing an unsigned int as int should be fine). Fix it by always using int. The uint32_t type never really made sense.
* af_lavrresample: better swr reinitializationGravatar Paul B Mahol2016-08-20
|
* manpage: info about --panscan vs. --video-unscaledGravatar rr-2016-08-19
|
* aspect: add --video-unscaled=downscale-bigGravatar rr-2016-08-19
|
* af_lavrresample: fix error if resampler could not be recreatedGravatar wm42016-08-19
| | | | | | | | There are situations where the resampler is destroyed and recreated during playback. If recreating the resampler unexpectedly fails, the filter function is supposed to return an error. This wasn't done correctly, because get_out_samples() accessed the resampler before the check. Move the check up to fix this.
* command: prevent O(n^2) behaviour for playlist propertyGravatar James Ross-Gowan2016-08-20
| | | | | | | | | When fetching the playlist property, playlist_entry_from_index would be called for each playlist entry, which traversed a linked list to get the entry corresponding to the specified index. This was very slow for large playlists. Since get_playlist_entry is called for each index in order, it can avoid a full traversal of the linked list by using the next pointer on the previously requested entry.
* vd_lavc: remove unnecessary initializationGravatar wm42016-08-19
| | | | This is already the default value.
* demux: change fps field to doubleGravatar wm42016-08-19
| | | | Because why not.
* video/audio: always provide "proper" timestamps to libavcodecGravatar wm42016-08-19
| | | | | | | | | | | | | | | | | | | Instead of passing through double float timestamps opaquely, pass real timestamps. Do so by always setting a valid timebase on the AVCodecContext for audio and video decoding. Specifically try not to round timestamps to a too coarse timebase, which could round off small adjustments to timestamps (such as for start time rebasing or demux_timeline). If the timebase is considered too coarse, make it finer. This gets rid of the need to do this specifically for some hardware decoding wrapper. The old method of passing through double timestamps was also a bit questionable. While libavcodec is not supposed to interpret timestamps at all if no timebase is provided, it was needlessly tricky. Also, it actually does compare them with AV_NOPTS_VALUE. This change will probably also reduce confusion in the future.
* av_common: improve rounding for float->int timestamp conversionsGravatar wm42016-08-19
|
* player: refresh very low framerate video on filter changesGravatar wm42016-08-19
| | | | | | | Limit the max. time the refresh is delayed. Make it refresh at all if image mode is enabled. Fixes #3435.
* vf_rotate: allow arbitrary rotationGravatar wm42016-08-19
| | | | | | | vf_rotate selects the correct filter for 90° rotation, but it can be extended to use lavfi's vf_rotate as fallback. See #3434.
* github: fix typoGravatar wm42016-08-18
|
* github: encourage bug reportsGravatar wm42016-08-18
| | | | | Word this sentence slightly more positively because we are a positive project.
* demux_lavf: don't report start time for oggGravatar wm42016-08-18
| | | | | Better with ogg shoutcast streams. These have PTS resets on each playlist item, so the PTS would usually reset to some negative value.
* player: make looping slightly more seamlessGravatar wm42016-08-18
| | | | | | This affects A-B loops and --loop-file, and audio. Instead of dropping audio by resetting the AO, try to make it seamless by not sending data after the loop point, and after the seek send new data without a reset.
* audio: improve aspects of EOF handlingGravatar wm42016-08-18
| | | | | | | | | | | The code actually kept going out of EOF mode into resync mode back into EOF mode when the playloop had to wait after an audio EOF caused by the endpts. This would break seamless looping (as added by the next commit). Apply endpts earlier, to ensure the filter_audio() function always returns AD_EOF in this case. The idiotic ao_buffer makes this an amazing pain in the ass.
* video: don't discard video frames after endptsGravatar wm42016-08-18
| | | | | | | | | | | | Instead of letting it keep decoding by trying to find a new frame, "plug" the frame queue by not removing it. (Or actually, by putting it back instead of discarding it.) Matters for seamless looping (following commits), and possibly some other corner cases. The added function vf_unread_output_frame() is a bit of a sin, but still reasonable, since its implementation is trivial.
* build: make avutil-mastering-metadata check slightly more robustGravatar wm42016-08-18
| | | | | Fixes the specific scenario of compiling against a local Libav build, while the system has FFmpeg installed.
* manpage: input: fix define-section syntaxGravatar jaseg2016-08-17
| | | | Source says "force", manpage said "forced". Now both say "force".
* player: add option to control duration of image displayGravatar wm42016-08-17
| | | | | | | | | | | | | The --image-display-duration option controls how long an image is displayed. It's also possible to display the image forever (until manual user interaction stops playback). With this, the core drops the old method to "drain" video (i.e. waiting for the last frame duration on end of playback). Instead, we reuse MPContext.time_frame. The old mechanism was disabled for non-images anyway. Fixes #3425.
* m_option: add mechanism to allow inf/-inf float optionsGravatar wm42016-08-17
| | | | Used by the next commit.
* m_option: simplify float value range handlingGravatar wm42016-08-17
| | | | | | Use clamp_double() to handle all value restriction/verification. The error messages become a bit less nice, but they were kind of incomplete before.
* demux: fix undefined behavior with ogg metadata updateGravatar wm42016-08-16
| | | | | | | | | | When an ogg track upodates metadata, we have to perform a complicated runtime update due to the demux.c architecture. A detail was broken and an array was allocated with the previous number of streams, which usually led to invalid memory write accesses at least on the first update. See github commit comment on commit b9ba9a89.
* af_lavrresample: work around libswresample misbehaviorGravatar wm42016-08-16
| | | | | | | | | | | | | | | | | | The touched code is for seek resets and such - we simply want to reset the entire resample state. But I noticed after a seek a tiny bit of audio is missing (mpv's audio sync code inserted silence to compensate). It turns out swr_drop_output() either does not reset some internal state as we expect, or it's designed to drop not only buffered samples, but also future samples. On the other hand, libavresample's avresample_read(), does not have this problem. (It is also pretty explicit in what it does - return/skip buffered data, nothing else.) Is the libswresample behavior a bug? Or a feature? Does nobody even know? Who cares - use the hammer to unfuck the situation. Destroy and deallocate the libswresample context and recreate it. On every seek.
* player: allow passing flags to queue_seek()Gravatar wm42016-08-15
| | | | | | | | | | | | Change the last parameter from a bool to an int, which is supposed to take bit-flags. The at this point only flag is MPSEEK_FLAG_DELAY, which replaces the previous bool parameter. The old false parameter becomes 0, the old true parameter becomes MPSEEK_FLAG_DELAY. Since the old "immediate" parameter is now essentially inverted, two coalesced immediate and delayed seeks end up as delayed instead of immediate. This change doesn't matter, since there are no relative immediate seeks anyway.
* DOCS: Update versionGravatar Martin Herkt2016-08-15
|
* vo_direct3d: add missing headerGravatar Paul B Mahol2016-08-14
| | | | | | Fixes build under cygwin. Signed-off-by: wm4 <wm4@nowhere>
* sub: don't potentially discard too many subtitles on seekGravatar wm42016-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | The accepts_packet packet callback is supposed to deal with subtitle decoders which have only a small queue of current subtitle events (i.e. sd_lavc.c), in case feeding it too many packets would discard events that are still needed. Normally, the number of subtitles that need to be preserved is estimated by the rendering pts (get_bitmaps() argument). Rendering lags behind decoding, so normally the rendering pts is smaller than the next video frame pts, and we simply discard all subtitle events until the rendering pts. This breaks down in some annoying corner cases. One of them is seeking backwards: the VO will still try to render the old PTS during seeks, which passes a high PTS to the subtitle renderer, which in turn would discard more subtitles than it should. There is a similar issue with forward seeks. Add hacks to deal with those issues. There should be a better way to deal with the essentially unknown "rendering position", which is made worse by screenshots or rendering with vf_sub. At the very least, we could handle seeks better, and e.g. either force the VO not to re-render subs after seeks (ugly), or introduce seek sequence numbers to distinguish attempts to render earlier subtitles when a seek is done.
* command: add replaygain information properties to track-listGravatar wm42016-08-13
|
* demux: minor cleanup to replaygain error handlingGravatar wm42016-08-13
| | | | | | | If the PEAK tag is invalid, return an error. Make the error signalling conventions more uniform by strictly returning a negative value on error, and treating >=0 as success.
* demux: make ALBUM replaygain tags optionalGravatar wm42016-08-13
| | | | IF they're missing, use the TRACK ones instead. See #3405.
* audio: log replaygain values in af_volume instead demuxerGravatar wm42016-08-13
| | | | | | | The demuxer layer usually doesn't log per-stream information, and even the replaygain information was logged only if it came from tags. So log it in af_volume instead.
* demux: add per-track metadataGravatar wm42016-08-12
| | | | | | | | | | | | | | | | | ...and ignore it. The main purpose is for retrieving per-track replaygain tags. Other than that per-track tags are not used or accessed by the playback core yet. The demuxer infrastructure is still not really good with that whole synchronization thing (at least in part due to being inherited from mplayer's single-threaded architecture). A convoluted mechanism is needed to transport the tags from demuxer thread to user thread. Two factors contribute to the complexity: tags can change during playback, and tracks (i.e. struct sh_stream) are not duplicated per thread. In particular, we update the way replaygain tags are retrieved. We first try to use per-track tags (common in Matroska) and global tags (effectively formats like mp3). This part fixes #3405.
* audio/filter: remove delay audio filterGravatar Paul B Mahol2016-08-12
| | | | Similar filter is available in libavfilter.
* github: encourage providing sample filesGravatar wm42016-08-11
| | | | | Also, try to save users from trying to use the github file upload function. While we're at it, also make the sprunge.us hint a link.
* command: add a property that returns filename without extensionGravatar wm42016-08-11
| | | | Requested. Fixes #3404.
* manpage: remove the word "slave"Gravatar wm42016-08-11
| | | | It's discriminatory or something.
* stream/stream_bluray: display list of available titles on verboseGravatar Ricardo Constantino2016-08-11
| | | | Based on similar code on FFmpeg and libbluray's list_titles example.
* player: add --no-autoload-files optionGravatar wm42016-08-10
| | | | Allt his auto-loading is getting annoying especially for testing.
* ao_alsa: make pause state more robust, reduce minor code duplicationGravatar wm42016-08-09
| | | | | | | | | With the previous commit, ao_alsa.c now has 3 possible ways to pause playback. Actually all 3 of them need get_delay() to fake its return value, so don't duplicate that code. Also much of the code looks a bit questionable when considering inconsistent pause/resume calls from outside, so ignore redundant calls.
* ao_alsa: handle --audio-stream-silenceGravatar wm42016-08-09
| | | | | | | | | | | | | | | | | push.c does not handle this automatically, and AOs using push.c have to handle it themselves. Also, ALSA is low-level enough that it needs explicit support in user code. At least I haven't found any option that does this. We still can get away relatively cheaply by abusing underflow-handling for this. ao_alsa.c already configures ALSA to handle underflows by playing silence. So we purposely induce an underflow when opening the device, as well as when pausing or resetting the device. This introduces minor misbehavior: it doesn't account for the additional delay the initial silence adds, unless the device has fully played the fragment of silence when the player starts sending data to it. But nobody cares.
* player: add --audio-wait-open optionsGravatar wm42016-08-09
| | | | Complements the option added in the previous commit.
* player: add --audio-stream-silenceGravatar wm42016-08-09
| | | | | Completely insane that this has to be done. Crap for compensating HDMI crap.