| Commit message (Collapse) | Author | Age |
|
|
|
| |
Fix https://github.com/mpv-player/mpv/issues/5420
|
|
|
|
|
|
| |
The use of the FFmpeg hls protocol (as opposed to demuxer) is
"discouraged", and probably only causes additional potential security
problems at best, so drop it.
|
|
|
|
|
|
| |
Not much we can do, too hard to work around.
Fixes #3361.
|
| |
|
|
|
|
|
|
|
|
| |
Instead of duplicating the append code, reimplement it using the
existing code. The difference between -add and -append is that -append
does not take multiple items (thus removing the need for escaping), but
-append can reuse all code for -add by pretending the separator is never
found.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Requested. See manpage additions.
The main reason why this goes through the trouble to keep the
action/operation parameter separate is so that we don't expose some
option parser implementation details to the command (although that is a
relatively weak reason), and also to make it more different from the
"set" command, which can't support this type of option as it goes
through the property layer.
Fixes #5435.
|
|
|
|
| |
Don't leave any room for interpretation.
|
|
|
|
|
|
| |
And use it for 2 demuxer options. It could be used for more options
later. (Though the --cache options can not use this, because they use KB
as base unit.)
|
|
|
|
|
|
|
|
|
|
|
| |
Add the print callback to all option types (except pseudo option types
which don't represent values). This makes it less confusing for client
API users (no strange properties that can't be read), and also lists the
default properly with --list-options.
Fix the option type for audio formats - they use int, not uint32_t.
Fix some identation cosmetic issues.
|
|
|
|
|
|
|
| |
Always make the hw params dump function use MSGL_DEBUG, and remove the
MSGL_V use. That means you need -v -v to see them. The detailed
information is usually not very interesting, so this reduces the log
noise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The af_get_best_sample_formats() function had an argument of
int[AF_FORMAT_COUNT], which is slightly incorrect, because it's 0
terminated and should in theory have AF_FORMAT_COUNT+1 entries. It won't
actually write this many formats (since some formats are fundamentally
incompatible), but it still feels annoying and incorrect. So fix it, and
require that callers pass an AF_FORMAT_COUNT+1 array.
Note that the array size has no meaning in C function arguments (just
another issue with C static arrays being weird and stupid), so get rid
of it completely.
Not changing the af_lavcac3enc use, since that is rewritten in another
branch anyway.
|
|
|
|
|
|
|
|
|
|
| |
When overlay-add etc. is run, make sure the playlop is rerun so that it
considers actually redrawing the screen.
(I considered making the OSD code generally wakeup the player, but that
will probably lead to redundant wakeups, so I didn't bother.)
Fixes #5431.
|
|
|
|
|
| |
The check is redundant - if removed, it will write the same value, so
it's a NOP.
|
|
|
|
|
|
| |
Not very clean since there's a lot of potential unsafe urls that youtube-dl
can give us, depending on whether it's a single url, split tracks,
playlists, segmented dash, etc.
|
|
|
|
| |
ISO files have been supported by bd:// for a while.
|
| |
|
| |
|
| |
|
|
|
|
| |
libbluray's way too verbose on default loglevel with non-breaking issues.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I found that at least for mjpeg streams, FFmpeg will set packet pts/dts
anyway. The mjpeg raw video demuxer (along with some other raw formats)
has a "framerate" demuxer option which defaults to 25, so all mjpeg
streams will be played at 25 FPS by default.
mpv doesn't like this much. If AVFMT_NOTIMESTAMPS is set, it prints a
warning, that might print a bogus FPS value for the assumed framerate.
The code was originally written with the assumption that FFmpeg would
not set pts/dts for such formats, but since it does, the printed
estimated framerate will never be used. --fps will also not be used by
default in this situation.
To make this hopefully less confusing, explicitly state the situation
when the AVFMT_NOTIMESTAMPS flag is set, and give instructions how to
work it around.
Also, remove the warning in dec_video.c. We don't know what FPS it's
going to assume anyway. If there are really no timestamps in the stream,
it will trigger our normal missing pts workaround. Add the assumed FPS
there.
In theory, we could just clear packet timestamps if AVFMT_NOTIMESTAMPS
is set, and make up our own timestamps. That is non-trivial for advanced
video codecs like h264, so I'm not going there. For seeking and
buffering estimation the situation thus remains half-broken.
This is a mitigation for #5419.
|
|
|
|
| |
This lets scripts query the value of 'background' and similar properties
|
|
|
|
| |
see https://wiki.debian.org/DebianMultimedia/PlayerSupport
|
|
|
|
|
|
|
|
|
|
|
|
| |
this adds the standard menu bar items Services, Hide Others, Show All
and Close, as suggested by Apple's HIG.
https://developer.apple.com/macos/human-interface-guidelines/menus/menu-bar-menus/#app-menu
- Services are useful to add custom actions and shortcuts via the
System Preferences to mpv
- Close is important since the menu bar can open secondary windows, like
About or the Open dialogue. those couldn't be closed with the standard
system shortcut before. this is now possible.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
NSFileHandlingPanelOKButton is deprecated with macOS 10.13, but the
replacement NSModalResponseOK is not available on 10.8 and earlier.
added a declaration for 10.8 and earlier since i only officially
dropped support for 10.7 and earlier. this is untested.
|
| |
|
|
|
|
|
|
|
| |
It was actually already implemented as ta_dup_ptrtype(), but that seems
like a clunky name. Also we still use the talloc_ names throughout the
source, and I'd rather use an old name instead of a mixing inconsistent
naming conventions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you play a video with an external audio track, and do backwards
keyframe seeks, then audio can be missing. This is because a backwards
seek can end up way before the seek target (this is just how this seek
mode works). The audio file will be seeked at the correct seek target
(since audio usually has a much higher seek granularity), which results
in silence being played until the video reaches the originally intended
seek target.
There was a hack in audio.c to deal with this. Replace it with a
different hack. The new hack probably works about as well as the old
hack, except it doesn't add weird crap to the audio resync path (which
is some of the worst code here, so this is some nice preparation for
rewriting it). As a more practical advantage, it doesn't discard the
audio demuxer packet cache. The old code did, which probably ruined
seeking in youtube DASH streams.
A non-hacky solution would be handling external files in the demuxer
layer. Then chaining the seeks would be pretty easy. But we're pretty
far from that, because it would either require intrusive changes to the
demuxer layer, or wouldn't be flexible enough to load/unload external
files at runtime. Maybe later.
|
|
|
|
|
|
|
| |
mp_sws_set_from_cmdline() has the only purpose to respect the --sws-
command line options. Instead of forcing callers to get the option
struct containing these, let callers pass mpv_global, and get it from
the option core code directly. This avoids minor annoyances later on.
|
|
|
|
| |
Helpful for debugging, sometimes.
|
|
|
|
|
|
|
| |
FFmpeg has its own rather "special" image pools (AVHWFramesContext)
specifically for hardware decoding. So it's not really practical to use
our own pool implementation. Add these helpers, which make it easier to
use FFmpeg's code in mpv.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes that AVFrames passing through libavfilter (such as with
--lavfi-complex) implicitly stripped some fields. I'm not actually sure
what to do with the mp_image_params.color.light field here (what happens
if the colorspace changed?) - there is no equivalent in AVFrame or
FFmpeg at all.
It did not affect the old --vf code, because it doesn't allow
libavfilter to change the metadata.
Also log the .light field in verbose mode.
|
|
|
|
| |
Sometimes helps avoiding usage mistakes.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is some craziness here: the function allocates m_config_cache,
which in turn allocates the actual option struct, which is what the
function returns. The user would expect to be able to use talloc_free()
to deallocate everything. Of course this didn't work, because the
returned pointer is not the root parent in the talloc tree.
But with some additional talloc craziness, this can be fixed. We
rearrange the parent pointers such that freeing the option struct will
free m_config_cache first, which uninits the contents in the option
struct, but fortunately not the option struct itself.
This change should simplify API use on the caller side, and reduce
surprises.
|
|
|
|
|
|
| |
mp_read_option_raw() should not print the deprecation warning if the
option is deprecated. This change also means you can't pass an alias
to the function, but all existing uses should be fine.
|
|
|
|
| |
Hopefully this is easier to read.
|
|
|
|
|
|
|
|
|
|
|
| |
This commit eliminates the following clang warning:
warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
Going by the clang commit message, this seems to be explicitly specified
as UB by the standard, and they added this warning because MSVC
apparently results in different behavior. Whatever, we can just avoid
the warning with some small changes.
|
|
|
|
|
|
| |
ipc-unix.c does this out of convenience. Since signals are global
process state, this deserves a mention, since applications could in
theory rely on SIGPIPE being set to something else.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DR (direct rendering) works by having the decoder decode into the GPU
staging buffers, instead of copying the video data on texture upload. We
did this even for formats unsupported by the GPU or the renderer. This
"worked" because the staging memory is untyped, and the video frame was
converted by libswscale to a supported format, and then uploaded with a
copy using the normal non-DR texture upload path.
Even though it "works", we don't gain anything from using the staging
buffers for decoding, since we can't use them for upload anyway. Also,
staging memory might be potentially limited (what really happens is up
to the driver). It's easy to avoid, so just skip it in these cases.
|
|
|
|
|
|
|
|
|
|
|
| |
The check_gl_features(p) call here checks whether dumb mode can be used.
It uses the field use_integer_conversion, which is set _after_ the call
in the same function. Move check_gl_features() to the end of the
function, when use_integer_conversion is finally set.
Fixes that it tried to use bilinear filtering with integer textures. The
bug disabled the code that is supposed to convert it to non-integer
textures.
|
|
|
|
|
|
|
|
| |
This segfaults otherwise. The conditional is needed to break a circular
dependency (gl_init depends on mpgl_load_functions which depends on
recreate_dispmanx which calls gl_ctx_resize).
Fixes #5398
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces the multiply-pitch af-command. Users may bind
keys to this command in order to incrementally adjust the pitch of a
track. This will probably mostly be useful for musicians trying to
transpose up and down by semi tones without having to calculate
the correct ratio beforehand.
As an example, here is an input.conf to test this feature:
{ af-command all multiply-pitch 0.9438743126816935
} af-command all multiply-pitch 1.059463094352953
|
| |
|
|
|
|
|
|
| |
Uses track tbr instead of track disposition id for dash selection
Works just as expected because youtube-dl also takes tbr from the manifests.
|
|
|
|
|
| |
opengl_cb.h should mention GLES 2.0 support, since this
support is available. Now it does mention it.
|