aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* 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
|
* command: do not return 0 for bitrates if unknownGravatar wm42015-10-23
| | | | | | | | This makes the bitrate properties unavailable, instead of returning 0 when: 1. No track is selected, or 2. Not enough packets have been read to have a bitrate estimate yet
* player: offset chapter display by start timeGravatar wm42015-10-23
| | | | | | Some mkv files can have this. The chapter times are still timestamps (and thus not affected by the start time), but it misplaces the OSD chapter ticks.
* vo_opengl_cb: fix passing through some video equalizer propertiesGravatar wm42015-10-23
| | | | | | | | | | | | | | | | | | | | | | The equalizer code as it exists in vo_opengl works perfectly fine. The situation in vo_opengl_cb is pretty different. The playback thread can't communicate with the renderer thread synchronously (essentially to give the API user more flexibility). So the equalizer communication has to be done in an asynchronous way too. There were two problems. First, the eq capabilities can change with the pixel format, and the renderer initializes them on config only. This means equalizers were disabled on the first config run, and options like --video-output-levels or --brightness would not work. So we just initialize the caps with a known superset. The player will not correctly indicate when setting an eq doesn't work, but we're fine with it, as it is a relatively cosmetic issue. Second, it copied back the eq settings in the "wrong" moment (what for?), which overwrote the settings in some cases. Third, the eq was not reset correctly on vo init. This is needed to make it behave the same as vo_opengl.
* client API: fix typo and wording in a commentGravatar wm42015-10-22
|
* demux: cosmetics: remove indirectionGravatar wm42015-10-22
| | | | Let's not waste precious lines.
* sub: adjust behavior on mismatching video/subtitle aspect mismatchGravatar wm42015-10-21
| | | | | | | | | | | | | | | | 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_SPACEGravatar wm42015-10-21
| | | | | | 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 buildGravatar wm42015-10-21
| | | | "Let's apply cosmetic last minute changes without testing them."
* input: add key name for U+3000 IDEOGRAPHIC SPACEGravatar wm42015-10-21
| | | | | | | 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 outsideGravatar wm42015-10-21
| | | | | | | | | | | | | | | 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 layoutsGravatar wm42015-10-21
| | | | | | | | | | | | | | | 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 countGravatar wm42015-10-21
| | | | | | | | | 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 changesGravatar wm42015-10-21
| | | | | Not particularly important; just being nice and potentially avoiding problems caused by format setting.
* ao_coreaudio: log current format before setting new formatGravatar wm42015-10-21
|
* ao_coreaudio: fix some minor memory leaksGravatar wm42015-10-21
|
* vo_opengl: make the default debanding settings less excessiveGravatar Niklas Haas2015-10-21
| | | | | | | | | 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 authenticationGravatar Joschka Tillmanns2015-10-20
| | | | | | | | 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. youtubeGravatar bitingsock2015-10-20
| | | | Signed-off-by: wm4 <wm4@nowhere>
* ao_coreaudio: raise timeout for change-physical-formatGravatar wm42015-10-20
| | | | | | | | | | 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"Gravatar Ricardo Vieira2015-10-20
| | | | | | 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 modeGravatar wm42015-10-19
| | | | | 1 to 2 frames desync is still tolerable, and will be quickly compensated (if everything works).
* player: do not use copysign()Gravatar wm42015-10-19
| | | | | | | 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 decodedGravatar wm42015-10-19
| | | | | | | | | | 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 failureGravatar wm42015-10-19
| | | | | | | | | | 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 headersGravatar wm42015-10-19
| | | | | | 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 fieldGravatar wm42015-10-19
| | | | | | | 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 formatsGravatar wm42015-10-18
| | | | | | | | 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 valueGravatar wm42015-10-17
|
* build: remove explicit checks for VPPGravatar wm42015-10-17
| | | | | 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 FourCCGravatar wm42015-10-17
| | | | | | | 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 versionGravatar wm42015-10-17
| | | | | | | | 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 timeGravatar wm42015-10-16
| | | | | | | | | | | | | | | | | 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 unknownGravatar wm42015-10-16
| | | | | | 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.