aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* aspect: remove useless debug messagesGravatar wm42016-04-10
| | | | Never needed them. This makes the code slightly more readable.
* vo_opengl: improve rotation handling (again)Gravatar wm42016-04-08
| | | | | | | | | | | | | | | | | Apply basic transformations like rotation by 90° and mirroring when sampling from the source textures. The original idea was making this part of img_tex.transform, but this didn't work: lots of code plays tricks on the transform, so manipulating it is not necessarily transparent, especially when width/height are switched. So add a new pre_transform field, which is strictly applied before the normal transform. This fixes most glitches involved with rotating the image. Cropping and rotation are now weirdly separated, even though they could be done in the same step. I think this is not much of a problem, and has the advantage that changing panscan does not trigger FBO reallocations (I think...).
* TOOLS/zsh.pl: properly escape last changeGravatar Philip Sequeira2016-04-08
| | | | | | I'm an idiot. Fixes #3032.
* command: add keepaspect propertyGravatar wm42016-04-08
| | | | | | Just a bridge to the option. (Did I ever mention that I hate the property/option separation.)
* osd: add italic font for osdGravatar st4t1k2016-04-08
|
* TOOLS/zsh.pl: don't complete URLs by defaultGravatar Philip Sequeira2016-04-08
| | | | | | | ...unless no files match. Fixes #2892. To get the old behaviour back, use something like: zstyle ':completion:*:*:mpv:*' tag-order
* vo_opengl: log if glGetString(GL_VERSION) returns NULLGravatar wm42016-04-08
| | | | | | Typically happens with some implementations if no context is currrent, or is otherwise broken. This is particularly relevant to the opengl_cb API, because the API user will have no other indication what went wrong.
* d3d: fix Windows buildGravatar wm42016-04-07
| | | | | | Commit f009d16f accidentally broke it. Thanks to RiCON for noticing and testing.
* vo_opengl: videotoolbox: use kCVPixelBufferLock_ReadOnly for screenshotsGravatar wm42016-04-07
| | | | Why not.
* videotoolbox: change how videotoolbox format is managedGravatar wm42016-04-07
| | | | | | | | | | | | | | | | | | | | | | | The underlying intention of this code is to make changing --videotoolbox-format at runtime work. For this reason, the format can't just be statically setup, but must be read from the option at runtime. This means the format is not fixed anymore, and we have to make sure the renderer is property reinitialized if the format changes. There is currently no way to trigger reinit on this level, which is why the mp_image_params.hw_subfmt field was introduced. One sketchy thing remains: normally, the renderer is supposed to be involved with VO format negotiation, which would ensure that the VO can take the format at all. Since the hw_subfmt is not part of this format negotiation, it's implied the get_vt_fmt() callback only returns formats supported by the renderer. This is not necessarily clear because vo_opengl checks this with converted_imgfmt separately. None of this matters in practice though, because we know all formats are always supported. (This still requires somehow triggering decoder reinit to make the change effective.)
* mp_image: introduce a hw_subfmt fieldGravatar wm42016-04-07
| | | | | | | | | | | For hwaccel formats, mp_image will merely point to a hardware surface handle. In these cases, the mp_image_params.imgfmt field describes the format insufficiently, because it mostly only describes the type of the hardware format, not its underlying format. Introduce hw_subfmt to describe the underlying format. It makes sense to use it with most hwaccels, though for now it will be used with the following commit only.
* vd_lavc: let hardware decoder request delaying frames explicitlyGravatar wm42016-04-07
| | | | | | | | | | Until now, the presence of the process_image() callback was used to set a delay queue with a hardcoded size. Change this to a vd_lavc_hwdec field instead, so the decoder can explicitly set this if it's really needed. Do this so process_image() can be used in the VideoToolbox glue code for something entirely unrelated.
* vd_lavc: fix codec vs. decoder confusionGravatar wm42016-04-07
| | | | | | | | | | Some functions which expected a codec name (i.e. the name of the video format itself) were passed a decoder name. Most "native" libavcodec decoders have the same name as the codec, so this was never an issue. This should mean that e.g. using "--vd=lavc:h264_mmal --hwdec=mmal" should now actually enable native surface mode (instead of doing copy- back).
* vo: don't reset vsync statistics on seeks etc.Gravatar wm42016-04-06
| | | | | | | | | | | | | | | | | | The sync-by-display mode relies on using the vsync statistics for timing. As a consequence discontinuities must be handled somehow. Until now we have done this by completely resetting these statistics. This can be somewhat annoying, especially if the GL driver's vsync timing is not ideal. So after e.g. a seek it could take a second until it locked back to the proper values. Change it not to reset all statistics. Some state obviously has to be reset, because it's a discontinuity. To make it worse, the driver's vsync behavior will also change on such discontinuities. To compensate, we discard the timings for the first 2 vsyncs after each discontinuity (via num_successive_vsyncs). This is probably not fully ideal, and num_total_vsync_samples handling in particular becomes a bit questionable.
* sub: interpret "text" subtitles as srtGravatar wm42016-04-06
| | | | | Most players will interpret HTML-style tags (aka srt) in almost any kind of text subtitles; make mpv do this too.
* vo_opengl: fix build breakageGravatar wm42016-04-06
|
* vo_opengl: minor simplificationGravatar wm42016-04-05
| | | | It's the same functionally.
* vo_opengl: fix nnedi + rectangle texturesGravatar wm42016-04-05
| | | | Shader compilation error due to incompatible samplers.
* cache: disable useless "Cache is not responding" warningGravatar wm42016-04-03
| | | | | | | | | | | | | | | Tuning it in a way to be actually useful is too much effort. As alternative, there's the "buffering" detection, which operates on a much higher level. The only disadvantage is that it's harder to guess for the user whether this is a network problem, or if e.g. libavformat is probing too much data when opening a stream. Maybe the cache-speed property is helpful here. For now, do not remove the associated code, but just silence the warning. Fixes #3019.
* x11: do not set _NET_WM_BYPASS_COMPOSITOR by defaultGravatar wm42016-04-03
| | | | | | | | | | | It's pretty "unfriendly" and causes too many issues. (Probably. At least they're more obvious to a user than e.g. broken frame timing.) Potentially we could apply heuristics like applying this only on fullscreen, but let's not. It's up to the user to configure this to get best results. Fixes #2997.
* aspect: make video-zoom logarithmicGravatar Niklas Haas2016-04-03
| | | | | | | | | | | | | The past behavior was a bit weird, especially when zooming out. There was no simple way to zoom in or out in consistent increments using keybindings alone. The new behavior preserves most of the old behavior's semantics but scales out to infinity better. It coincidentally also makes it really easy to get clean power of 2 ratios (e.g. 2x, 4x, 8x and their inverses). Fixes #3004.
* manpage: change underscore to hyphen in input commandGravatar Kevin Mitchell2016-04-03
| | | | fixes #3018
* manpage: fix typoGravatar Kevin Mitchell2016-04-02
|
* manpage: add example for --msg-levelGravatar wm42016-04-02
| | | | I guess the syntax is not necessarily very obvious.
* build: make DVB test stricterGravatar wm42016-04-02
| | | | | | | | | | | | | | | | | | | I got a report that the build on a recent aarch64 Linux kernel failed. DVB support was detected, but errored on compilation: In file included from ../stream/stream_dvb.c:57:0: ../stream/dvbin.h:72:5: error: unknown type name 'fe_bandwidth_t' fe_bandwidth_t bw; Make the test stricter, which should take care of this. (I couldn't find out what exactly triggered the failure, nor could I attempt to reproduce it.) The change in stream/dvbin.h is to make sure that this isn't caused by incorrect header inclusion. It now includes the same files as the configure test.
* build: fix AVCodecParameters FFmpeg API check (again)Gravatar wm42016-04-02
| | | | | | | Commit 0d746522 was complete non-sense. The description and the code mention the wrong struct. This time I actually tested it.
* sd_lavc: use decoder-reordered PTS for PGSGravatar wm42016-04-02
| | | | | | | | | | | | | | | | There is an obscure feature which requires essentially reordering PTS from different packets. Unfortunately, libavcodec introduced a ridiculously shitty API for this, which works very much unlike the audio/video API. Instead of simply passing through the PTS, it wants to fuck with it for no reason, and even worse, fucks with other fields and changes their semantivcs (??????). This affects AVSubtitle.end_display_time. This probably will cause issues for us, and I have no desire to find out whether it will. Since only PGS requires this, and it happens not to use end_display_time, do it for PGS only. Fixes #3016.
* sd_lavc: add a comment about duration==0 handlingGravatar wm42016-04-02
| | | | | | | | Basically, this information is useless, because some muxers (hurr libavformat) write bogus information anyway. This means if we e.g. see PGS packets in mkv with duration explicitly set to 0, we must not trust that value anyway. (The FFmpeg API problem is leaking into files, how nice.)
* sd_lavc: fix subtitle display with unknown end timestampsGravatar wm42016-04-02
| | | | | This is a theoretical issue, because subtitle end timestamps for all but the current subtitle are always known.
* ao_coreaudio_exclusive: add missing newline to log messageGravatar wm42016-04-01
|
* gl_lcms: choose BT.1886 gamma per-channelGravatar Niklas Haas2016-04-01
| | | | | | | | | This makes the black point closer (chromatically) to the white point, by ensuring channels keep their consistent brightness ratios as they go down to zero. I also raised the 3DLUT version as this changes semantics and is a separate commit from the previous one.
* vo_opengl: generate 3DLUT against source and use full BT.1886Gravatar Niklas Haas2016-04-01
| | | | | | | | | | | | | | | | | | | This commit refactors the 3DLUT loading mechanism to build the 3DLUT against the original source characteristics of the file. This allows us, among other things, to use a real BT.1886 profile for the source. This also allows us to actually use perceptual mappings. Finally, this reduces errors on standard gamut displays (where the previous 3DLUT target of BT.2020 was unreasonably wide). This also improves the overall accuracy of the 3DLUT due to eliminating rounding errors where possible, and allows for more accurate use of LUT-based ICC profiles. The current code is somewhat more ugly than necessary, because the idea was to implement this commit in a working state first, and then maybe refactor the profile loading mechanism in a later commit. Fixes #2815.
* build: fix AVCodecParameters FFmpeg API checkGravatar wm42016-04-01
| | | | | | FFmpeg partially merged the API change. It added the AVCodecParameters definition, but not the AVCodecContext.codecpar field. The new code compiles only with the API fully merged, so adjust the check.
* build: disable encoding mode by defaultGravatar wm42016-03-31
| | | | | | | | | Encoding mode uses deprecated API. See previous commit. Encoding mode will stop working/compiling at some point in the future, so unless someone fixes the encoding code, it will stay disabled by default. (Note that the deprecations are not merged in FFmpeg yet, but they will soon. They've been deprecated in Libav for a while now.)
* demux_lavf, ad_lavc, ad_spdif, vd_lavc: handle FFmpeg codecpar API changeGravatar wm42016-03-31
| | | | | | | | | AVFormatContext.codec is deprecated now, and you're supposed to use AVFormatContext.codecpar instead. Handle this for all of the normal playback code. Encoding mode isn't touched.
* demux_lavf: remove old MicroDVD frame timing guessingGravatar wm42016-03-31
| | | | | | | | | | This was changed in 2014, so I suppose users will usually have a FFmpeg release which includes the corresponding upstream change. If not, well too bad for those MicroDVD-obsessed users. Also don't try to retrieve the default framerate as exported by the demuxer, and instead hardcode it and trust it won't ever change. this avoids that we have to deal with a larger mess in the codecpar commit.
* demux_lavf: remove some old framerate guessingGravatar wm42016-03-31
| | | | | | I don't trust it one bit, and it's a bother with the codecpar change. If it turns out to be important for some file formats, it could be added back (or FFmpeg fixed).
* mplayer-input.conf: fix input.conf location in commentGravatar Ben Boeckel2016-03-31
|
* dxva2: abort on mp_image_new_custom_ref failureGravatar Kevin Mitchell2016-03-30
|
* dxva2: stop using pointer obfuscator LPDIRECT3DSURFACE9Gravatar Kevin Mitchell2016-03-30
| | | | It's just ugly and unnecessary.
* dxva2: rewrite to use shared code with d3d11vaGravatar Kevin Mitchell2016-03-30
| | | | This is basically a full rewrite to make it look more like d3d11va.c
* vd_lavc: add d3d11va hwdecGravatar Kevin Mitchell2016-03-30
| | | | | | This commit adds the d3d11va-copy hwdec mode using the ffmpeg d3d11va api. Functions in common with dxva2 are handled in a separate decode/d3d.c file. A future commit will rewrite decode/dxva2.c to share this code.
* ta: add TA_FREEP macroGravatar Kevin Mitchell2016-03-30
| | | | | This sets the pointer to NULL after talloc_freeing it. This emulates the av_freep function for ta_talloc, but with a macro instead.
* player: hide cache in status line by default againGravatar wm42016-03-30
| | | | | | Commit 57506b27 accidentally broke this. The status (including the usually always active demuxer cache) should be shown only if the stream cache is actually enabled.
* Revert "demux_mkv: don't trust DefaultDuration for audio"Gravatar wm42016-03-30
| | | | | | | | | | This reverts commit 503c6f7fd6c3c542667c93c75db260671c4ba982. There are situations where some decoders (MF apparently) always require a timestamp. Also, this makes bitrate estimation more granular than necessary. It seems it's better to try to detect fiels with broken default durations explicitly instead. Or maybe something should be added to smooth audio timestamps after filters.
* vo_opengl: draw transparency checkerboard after upscalingGravatar Niklas Haas2016-03-29
| | | | | | | | | | | | | This also draws it after color management etc. In a nutshell, this change makes the transparency checkerboard independent of upscaling, panning, cropping etc. It will always be the same apparent size and position (relative to the window). It will also be independent of the video colorspace and such things. (Note: This might cause white imbalance issues if playing a file with a white point that does not match the display, in absolute colorimetric mode. But that's uncommon, especially in conjunction with transparent image files, so it's not a primary concern here)
* vo_opengl: always premultiply alphaGravatar wm42016-03-29
| | | | | | Until now, we've let the windowing backend decide. But since they usually require premultiplied alpha, and premultiplied alpha is easier to handle, hardcode it.
* vo_opengl: fix rotation directionGravatar wm42016-03-29
| | | | | | The recent changes fixed rotation handling, but reversed the rotation direction. The direction is expected to be counter-clockwise, because demuxers export video rotation metadata as such.
* cache: fix incorrect EOF conditionGravatar wm42016-03-29
| | | | | | Don't assume EOF if we didn't try to read anything in the first place. Fixes regressions in particular with low cache sizes, which triggered the other code paths more often.
* cache: use a single STREAM_CTRL for various cache infoGravatar wm42016-03-29
| | | | | | | | Instead of having a separate for each, which also requires separate additional caching in the demuxer. (The demuxer adds an indirection, since STREAM_CTRLs are not thread-safe.) Since this includes the cache speed, this should fix #3003.