aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* vd_lavc: simplify an aspect of hwdec fallbackGravatar wm42016-01-29
| | | | | | Don't give the "software_fallback_decoder" field special meaning. Alwass set it, and rename it to "decoder". Whether hw decoding is used is determined by the "hwdec" field already.
* player: refactor: some more minor decoder/output decouplingGravatar wm42016-01-29
| | | | | | These changes don't make too much sense without context, but are preparation for later. Then the audio_src/video_src fields will be actually be NULL under circumstances.
* audio: refactor: separate audio init and filter/output initGravatar wm42016-01-29
| | | | | | | | | | | | Before this commit, reinit_audio_chain() did 2 things: create all the management data structures and initialize the decoder, and handling lazy filter/output init (as well as dealing with format changes). For the second purpose, it could be called multiple times (even though it wasn't really idempotent). This was pretty weird, so make them separate functions. The new function is actually idempotent too. It also turns out the reinit functions don't have to call themselves recursively for the spdif PCM fallback.
* audio: move pts reset checkGravatar wm42016-01-29
| | | | Reduces the dependency of the filter/output code on the decoder.
* player: fix initial audio sync in certain casesGravatar wm42016-01-29
| | | | | | | | | | | | | | | | | Regression caused by commit 3b95dd47. Also see commit 4c25b000. We can either use video_next_pts and add "delay", or we just use video_pts. Any other combination breaks. The reason why the assumption that delay==0 at this point was wrong exactly because after displaying the first video frame (usually done before audio resync) a new frame might be "added" immediately, resulting in a new video_next_pts and "delay", which will still amount to video_pts. Fixes #2770. (The reason why display-sync was blamed in this issue is because enabling display-sync in the options forces a prefetch by 2 instead of 1 frames for seeks/playback restart, which triggers the issue, even if display-sync is not actually enabled. In this case, display-sync is never enabled because the frames have a unusually high frame duration. This is also what exposed the initial desync issue.)
* video: fix broken-PTS fallback determinationGravatar wm42016-01-29
| | | | | | | | | | This codes tries to deal with broken PTS timestamps, but since commit 271cabe6 it didn't always overwrite the previous timestamp as it should have. This mattered only if there were broken timestamps in the video stream. Also remove the pointless prev_codec_pts variables, since the decoder doesn't overwrite these fields anymore.
* audio: move mp_audio->AVFrame conversion to a functionGravatar wm42016-01-29
| | | | | | | | | This also makes it refcounted, i.e. the new AVFrame will reference the mp_audio buffers, instead of potentially forcing the consumer of the AVFrame to copy the data. All the extra code is for handling the >8 channels case, which requires very messy dealing with the extended_ fields (not our fault).
* TOOLS/lua/ao-null-reload.lua: send ao-reload on audio-device-list changeGravatar Kevin Mitchell2016-01-28
| | | | | | | Only triggers if ao=null. This is required for ao=wasapi to recover from periods with no available devices. fixes #2738
* rpi: add VC-1 supportGravatar wm42016-01-28
| | | | | Oops, this was forgotten earlier. Enables automatic use of the VC-1 hardware decoder on RPI.
* mp_image: copy dts as part of mp_image attributes tooGravatar wm42016-01-28
| | | | | Fixes DTS handling with certain container formats broken in commit b53cb8de (when using vaapi-copy or dxva2-copy).
* ao_wasapi: add "wasapi" prefix to non-static find_deviceID functionGravatar Kevin Mitchell2016-01-28
|
* ao_wasapi: correct check for specified device on default changeGravatar Kevin Mitchell2016-01-28
| | | | | | Correctly avoid a reload if the current device was specified by the user through --audio-device. Previously, we only recognized if the user had specified --ao=wasapi:device=.
* ao_wasapi: fix check for already found deviceGravatar Kevin Mitchell2016-01-28
| | | | | oops, forgot to change this when I made get_deviceID a more proper function. state->deviceID is not set or read here - that's for the caller to do.
* video: fix coverart switchingGravatar wm42016-01-27
| | | | | | If cover art is re-enabled during playback, the covert art picture (which has pts==0) will be discarded. Add another corner case to the list.
* rpi: add mpeg-4 decoding supportGravatar wm42016-01-27
|
* demux_mkv: allow negative timestampsGravatar wm42016-01-27
| | | | | | | FFmpeg can generate such files. It's unclear whether they're allowed by Matroska. mkvinfo shows packet timestamps in both forms (one of them must be a bug), and at last libavformat's demuxer treats timestamps as signed.
* vo_opengl: do chroma merging in integer conversion stageGravatar wm42016-01-27
| | | | | | This is a huge win when playing yuv420p10 on ANGLE - the 2 conversion stages for planes 1 and 2 and the chroma merging stage are all merged into one.
* vo_opengl: add precision qualifier to usampler2D on ANGLEGravatar wm42016-01-27
| | | | | | | | GLES requires this. Some more common sampler types have default precisions, but not usampler2D. Newer ANGLE builds verify this more strictly than older builds, so this wasn't caught before. Fixes #2761.
* vo_opengl: replace tscale-interpolates-only with interpolation-thresholdGravatar wm42016-01-27
| | | | | The previous approach was too naive, and can e.g. ruin playback if scheduling switches e.g. between 1 and 2 vsync per frame.
* vo_opengl: support 10 bit support with ANGLEGravatar wm42016-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | GLES does not support high bit depth fixed point textures for unknown reasons, so direct 10 bit input is not possible. But we can still use integer textures, which are supported by GLES 3.0. These store integer data just like the standard fixed point textures, except they are not normalized on sampling. They also don't support bilinear filtering, and require a special sampler ("usampler2D"). While these texture formats enable us to shuffle the data to the GPU, they're rather impractical with the requirements mentioned above and our current architecture. One problem is that most code assumes it can always use bilinear scaling (even if bilinear is never used when using appropriate scale/cscale options). Another is that we don't have any concept of running a function on a texture in an uniform way. So for now, run a simple conversion step through a FBO. The FBO will use the rgba16f format normally, which gives enough bits for 10 bit, and will at least gracefully degrade with higher depth input. This is bound to be much slower than a more "direct" method, but at least it works and is simple to implement. The odd change of function call order in init_video() is to properly disable "dumb mode" (no FBO use) if these texture formats are in use.
* vo_opengl: actually reset use_normalized_range fieldGravatar wm42016-01-26
| | | | | | | | | This was never reset - absolutely can't be right. If the renderer somehow switches back to another codepath, it certainly has to be reset. Maybe this was hard to hit, as the normalization is going to be idempotent in simpler cases (like rendering RGBA input). Also get rid of the "merged" variable.
* vo_opengl: default to rgba16f FBOs on ANGLEGravatar wm42016-01-26
| | | | | Although it has only 1 bit more precission than rgba10_a2, it was reported to improve the visual quality.
* command: always allow setting volume/mute propertiesGravatar wm42016-01-26
| | | | | | | | | | | | | | | | | | | | | | | This seems generally easier when using libmpv (and was already requested and implemented before: see commit 327a779a; it was reverted some time later). With the weird internal logic we have to deal with, in particular the --softvol=no case (using system volume), and using the audio API's mixer (--softvol=auto on some systems), we still can't avoid all glitches and corner cases that complicate this issue so much. The API user is either recommended to use --softvol=yes or auto, or to watch the new mixer-active property, and assume the volume/mute properties have significant values if the mixer is active. Remaining glitches: - changing the volume/mute properties has no effect if no internal mixer is used (--softvol=no) and the mixer is not active; the actual mixer controls do not change, only the property values - --volume/--mute do not have an effect on the volume/mute properties before mixer initialization (the options strictly are only applied during mixer init) - volume-max is 100 while the mixer is not active
* video: slightly improve video stream switchingGravatar wm42016-01-26
| | | | | Resync newly switched video streams to the current playback position. (Normal seeks will reset playback_pts to NOPTS.)
* vaapi: lower number of allocated surfaces againGravatar wm42016-01-26
| | | | | | | Commit b53cb8de increased this by the number of additionally delayed surfaces. But since this is only enabled in copy-back mode (which is what process_image is about), the other additional surfaces accounted for the direct rendering case can be ignored.
* manpage: fix typoGravatar wm42016-01-25
|
* vo_opengl: add tscale-interpolates-only sub-optionGravatar wm42016-01-25
|
* vo_opengl: default scaler-resizes-only sub-option to yesGravatar wm42016-01-25
| | | | | | | | Often requested. The main argument, that prominent scalers like sharpen change the image even if no scaling happens, disappeared anyway. ("sharpen", unsharp masking, is neither prominent nor a scaler anymore. This is an artifact from MPlayer, which fuses unsharp masking with bilinear scaling in order to make it single-pass, or so.)
* vd_lavc: delay images before reading them backGravatar wm42016-01-25
| | | | Facilitates hardware pipelining in particular with nvidia/dxva.
* video: cleanup pts/dts passing between decoder componentsGravatar wm42016-01-25
| | | | | Instead of using semi-public codec_pts/codec_dts fields in struct dec_video, pass them via mp_image fields.
* vo_opengl: rename custom shader entrypoint from sample to sample_pixelGravatar wm42016-01-25
| | | | | | | "sample" is a reserved identifier at least in GLES ES. Suggestions for a better name than "sample_pixel" are still welcome. Fixes #2733.
* vo_opengl: vdpau: better handling of preemption recoveryGravatar wm42016-01-25
| | | | | If recovery from preemption is done successfully, continue normally. Only fail if it's preempted during init.
* vdpau: force driver to report preemption earlyGravatar wm42016-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another fix for the crazy and insane nvidia preemption behavior. This time, the situation is that we are using vo_opengl with vdpau interop, and that vdpau got preempted in the background while mpv was sitting idly. This can be e.g. reproduced by using: --force-window=immediate --idle --hwdec=vdpau and switching VTs. Then after switching back, load a video file. This will not let mp_vdpau_handle_preemption() perform preemption recovery, simply because it will do so only once vdp_decoder_create() has been called. There are some other API calls which trigger preemption, but many don't. Due to the way the libavcodec API works, vdp_decoder_create() is way too late. It does so when get_format returns. It notices creating the decoder fails, and continues calling get_format without the vdpau format. We could perhaps force it to reinit again (by adding a call to vdpau.c, that checks for preemption, and sets hwdec_request_reinit), but this seems too much of a mess. Solve it by calling API in mp_vdpau_handle_preemption() that empirically does trigger preemption: output_surface_put_bits_native(). This call is useless, and in fact should be doing nothing (empty update VdpRect). There's the slight chance that in theory it will slow down operation, but in practice it's bound to be harmless. It's the likely cheapest and simplest API call I've found that can trigger the fallback this way. (The driver is closed source, so it was up to trial & error.) Also, when initializing decoding, allow initial preemption recovery, which is needed to pass the test mention above.
* audio: fix spdif PCM fallbackGravatar wm42016-01-25
| | | | | | | | | With the format left untouched, this would just try to reinit with a spdif format again. We're not clearing the format in reset_audio_state() so the audio chain can be recreated any time without having to wait for a frame to be decoded.
* audio: release pending audio frame on seekingGravatar wm42016-01-25
|
* video: remove some useless old RGB formatsGravatar wm42016-01-25
| | | | | | | | | | | | | Some VOs had support for these - remove them. Typically, these formats will have only some use in cases where using RGB software conversion with libswscale is faster than letting the VO/GPU do it (i.e. almost never). For the sake of testing this case, keep IMGFMT_RGB565. This is the least messy format, because it has no padding/alpha bits with unknown semantics. Note that decoding to these formats still works. We'll let libswscale repack the data to whatever the VO in use can take.
* dvb: fix segmentation fault in case no valid configuration is found.Gravatar Oliver Freyermuth2016-01-24
| | | | This was introduced in c55b242 .
* manpage: minor correctionsGravatar wm42016-01-24
| | | | Pointed out by der_richter on IRC.
* video: limit maximum number of VO frames correctlyGravatar wm42016-01-24
| | | | | Otherwise, vo_frame.frames can be unintentionally overflown, leading to undefined behavior in corner cases.
* DOCS/interface-changes: fix typoGravatar wm42016-01-23
|
* player: free queued audio frame on uninitGravatar wm42016-01-23
|
* manpage: adjust vf/af-command descriptionGravatar wm42016-01-22
|
* af_lavfi, vf_lavfi: fix compilation on LibavGravatar wm42016-01-22
| | | | It has no avfilter_graph_send_command().
* command: add af-command commandGravatar wm42016-01-22
| | | | Similar to vf-command. Requested. Untested.
* vo_opengl: vaapi: don't expect EGL exts. to be in common ext. stringGravatar wm42016-01-22
|
* command: add vf-command commandGravatar wm42016-01-22
|
* ao_wasapi: use correct UINT type for device enumerationGravatar Kevin Mitchell2016-01-22
| | | | | | Notably, the address of the enumerator->count member is passed to IMMDeviceCollection::GetCount(), which expects a UINT variable, not an int. How did this ever work?
* ao_wasapi: exit earlier if there are zero playback devices foundGravatar Kevin Mitchell2016-01-22
| | | | | | | | Previously, if the enumerator found no devices, attempting to get the default device with IMMDeviceEnumerator::GetDefaultAudioEndpoint would result in the cryptic (and undocumented) E_PROP_ID_UNSUPPORTED. This way, the user is given a better indication of what exactly is wrong and isolates any other possible triggers for this error.
* dvb: remove trailing whitespaceGravatar wm42016-01-22
|
* dvb: fix compilation with older Linux headersGravatar wm42016-01-22
| | | | | | | At least DTV_ENUM_DELSYS is not available in older versions. It's hard to tell when this identifier was introduced, but it appears it was probably API version 5.5.