| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
If pathcch is not available paths are not normalized on Windows.
Fixes tests on ancient mingw.
|
|
|
|
|
|
|
|
|
| |
Helps with testing during cross-compilation and avoids external
dependency.
Output maybe is not that nice, but this output in our tests is not
useful anyway. We know if it changes it is beacuse one of the dependency
version changed.
|
| |
|
|
|
|
|
| |
mktemp is good enough for this test purposes and also tests if libmpv is
able to create a file that doesn't exist.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This test is expected to fail without lua and osc.lua support.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Paths like foo.mkv, ./foo.mkv .//foo.mkv, ../"$(basename
"$PWD")"/foo.mkv, and C:\foo.mkv and C:/foo.mkv on Windows, use
different config files for resuming playback, so if you quit-watch-later
and later play the same file with a different path, mpv does not resume
playback. This commit normalizes the paths on Unix to fix this.
|
|
|
|
|
| |
This is necessary to show the output with meson test. Followup to
06edb04692.
|
|
|
|
|
| |
Among others this provides a trivial test that built-in scripts aren't throwing
an error at load or init time.
|
| |
|
|
|
|
|
|
| |
With some small tweaks to the test, we can support multiple ffmpeg
versions. This adds back ffmpeg 6 support that was removed in the
previous commit.
|
|
|
|
|
|
|
| |
xvmc was removed and d3d12 was added.
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/a12cd3be98e8aba6e74274192ec6532988aa9444
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/142f727b9ca21c95414536074e3f89c687271dd4
|
|
|
|
|
|
|
|
|
| |
Removes mp_puts/mp_fputs and adds mp_fwrite.
In fact I wanted fwrite instead of puts, no need to make it more awkward
with the implicit new lines.
Fixes: fc55f355fc8225328cf0472e3deb4021eba96303
|
|
|
|
| |
For `meson test` to not eat lines on abort.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enhancement makes it easier to create constant width property
expansions, useful for the `--term-status-msg`. Additionally, it changes
to `%f` printing with manual zero trimming, which is easier to control
than `%g`. With this method, we can directly specify precision, not just
significant numbers. This approach also avoids overly high precision for
values less than 1, which is not necessary for a generic floating-point
print function.
A new print helper function is added, which can be used with adjusted
precision for specific cases where a different default is needed. This
also unifies the code slightly.
|
|
|
|
| |
Not needed anymore as timeBeginPeriod() is removed.
|
|
|
|
|
|
|
|
|
|
|
| |
timeBeginPeriod() only allows setting minimum timer resolution
to 1 ms. However, modern x86 platforms support a minimum timer
resolution of 0.5 ms. Use NtSetTimerResolution() instead for
the increased resolution, which can be set with MPV_HRT_RES.
Additionally, change the units of mp_start_hires_timers(),
mp_end_hires_timer(), MPV_HRT_RES, and MPV_HRT_MAX to nanoseconds,
in accordance with other functions used in timer.h.
|
| |
|
|
|
|
|
|
|
|
| |
- remove redundant strlen/wcslen
- reuse allocated temporary buffers
The difference is not big, but it satisfies me to remove those
redundancies.
|
|
|
|
|
|
|
| |
GetConsoleMode() can be quite slow and in mpv the mode never changes, so
we can just check it once.
Fixes performance when writing lots of logs to terminal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The screenshot command is documented to not overwrite existing files.
However, there is a race window between the filename is generated with
gen_fname and when the file is open to write. Specifically, the
convert_image function in this window can be very time consuming
depending on video and screenshot image format and size. This results
in existing file being overwritten because the file writing functions
don't check for the existance of file.
Fix this be opening the file in exclusive mode. Add overwrite parameter to
write_image for other operations that are documented to overwrite existing
files, like screenshot-to-file. Note that for write_avif, checking
existance is used instead because avio_open does not support exclusive
open mode.
|
|
|
|
| |
Needed since the previous commit.
|
| |
|
|
|
|
|
| |
These utility functions have nothing to do with user and config dir/file.
Move them to a separate file.
|
|
|
|
| |
No longer true after 8bbcc87feea7abf256a6c7f511244d09f5520c17.
|
| |
|
|
|
|
|
| |
By default the IME candidate window appears on the top left corner
of the monitor. Move it to the video window for sane behavior.
|
|
|
|
|
|
|
|
| |
These tests should really be rewritten to be less stupid so they don't
break everytime ffmpeg updates its formats, but that's too much effort
right now. Bump the required libavutil version as well.
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/8e1ef7c38f6906455ae96984d032e57106e11b77
|
|
|
|
|
|
|
|
| |
This commit replaces all uses of sig_peak and maps all HDR metadata.
Form notable changes mixed usage of maxCLL and max_luma is resolved and
not always max_luma is used which makes vo_gpu and vo_gpu_next behave
the same way.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The functions now internally use the ns timer and not the us one.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Found out with a CI image where FFmpeg is not located in the default
sysroot.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Get rid of the time during the while loop and just let this run forever
in case of a failure and also bump the timeout in meson to 60 seconds
since we know it is possible for msys to take a very long time on
occasion. That should be plenty of time for it to finish.
|
|
|
|
|
|
|
|
|
|
| |
We already have a libmpv test, but it's really basic and barely does
anything. In an effort to hopefully prevent future breakage, lets expand
this to do more stuff. First of all, it simply tests setting a bunch of
properties/options. Secondly, it tries to load a file (the mpv icon that
we already have in the source tree). And then finally it tries the
lavfi-complex filter since this is a known special case where weird
things can happen.
|
| |
|
|
|
|
| |
Added stubs for mp_set_avdict().
|
|
|
|
| |
Found by codespell
|
|
|
|
|
|
|
|
|
| |
Major release means new formats and failing tests so just add the new
stuff to the ref again and bump the minimum libavutil version. The last
ffmpeg commit that added a new format and is the minimum required
version for these subset of tests is referenced below.
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/479747645f795b6f4f376578ea1556409f943c31
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reworks all of mpv's unit tests so they are compiled as separate
executables (optional) and run via meson test. Because most of the tests
are dependant on mpv's internals, existing compiled objects are
leveraged to create static libs and used when necessary. As an aside, a
function was moved into video/out/gpu/utils for sanity's sake (otherwise
most of vo would have been needed). As a plus, meson multithreads
running tests automatically and also the output no longer pollutes the
source directory. There are tests that can break due to ffmpeg changes,
so they require a specific minimum libavutil version to be built.
|
|
|
|
|
|
| |
A few formats were added recently, some were removed, and some flags
were changed. Maybe this should be better, but just update for now so
the tests stop failing.
|
|
|
|
| |
Fixes tests on 32-bit platforms
|
|
|
|
|
| |
In the previous change, I removed the explicit mapping for Vulkan, so
it now shows up as [GENERIC].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Certain combinations of hardware formats require the use of hwmap to
transfer frames between the formats, rather than hwupload, which will
fail if attempted.
To keep the usage of vf_format for HW -> HW transfers as intuitive as
possible, we should detect these cases and do the map operation instead
of uploading.
For now, the relevant cases are moving between VAAPI and Vulkan, and
VAAPI and DRM Prime, in both directions. I have introduced the IMGFMT
entry for Vulkan here so that I can put in the complete mapping table.
It's actually not useless, as you can map to Vulkan, use a Vulkan
filter and then map back to VAAPI for display output.
|
|
|
|
|
|
|
|
| |
The first set iterates through all standard FFmpeg layouts and
checks that those which fit MP_NUM_CHANNELS succeed.
The second set iterates through built-in named channel layouts,
and attempts to convert them to AVChannelLayouts.
|
| |
|
|
|
|
|
|
|
| |
Adds secondary-sub-start and secondary-sub-end properties by setting
the current_track index in the m_property's priv variable which later
gets accessed in get_times. Also adds a test of the secondary subtitle
time properties in tests/subtimes.js bound to 'T'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add env and detach arguments. This means the command.c code must use the
"new" mp_subprocess2(). So also take this as an opportunity to clean up.
win32 support gets broken by it, because it never made the switch to the
newer function.
The new detach parameter makes the "run" command fully redundant, but I
guess we'll keep it for simplicity. But change its implementation to use
mp_subprocess2() (couldn't do this earlier, because win32).
Privately, I'm going to use the "env" argument to add a key binding that
starts a shell with a FILE environment variable set to the currently
playing file, so this is very useful to me.
Note: breaks windows, so for example youtube-dl on windows will not work
anymore. mp_subprocess2() has to be implemented. The old functions are
gone, and subprocess-win.c is not built anymore. It will probably work
on Cygwin.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This probably makes it much faster (I wouldn't know, I didn't run any
benchmarks ). Seems to work as well (although I'm not sure, it's not
like I'd perform rigorous tests).
The scale_zimg test seems to mysteriously treat color in fully
transparent alpha differently, which makes no sense, and isn't visible
(but makes the test fail). I can't be bothered with investigating this
more. What do you do with failing tests? Correct, you disable them. Or
rather, you disable whatever appears to cause them to fail, which is the
threading in this case.
This change follows mostly the tile_example.cpp. The slice size uses a
minimum of 64, which was suggested by the zimg author. Some of this
commit is a bit inelegant and weird, such as recomputing the scale
factor for every slice, or the way slice_h is managed. Too lazy to make
this more elegant.
zimg git had a regressio around active_region (which is needed by the
slicing), which was fixed in commit 83071706b2e6bc634. Apparently, the
bug was never released, so just add a warning to the manpage.
|
|
|
|
|
| |
Mainly, X2RGB10BE is added. Add our own unpack test for this format.
Also, swscale seems to have added support for GBRPF conversion.
|
|
|
|
|
|
|
|
|
|
| |
It may be completely useless, and I can't verify it as no known samples
or other known/accessible software using it, but why not?
Putting this together with he 422 code requires making it slightly more
generic. I'm still staying with a "huge" if tree instead of a table to
select the scanline worker callback, because it's actually small and not
huge (although it not being generic still feels slightly painful).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A repeat of the previous useless commits.
Pondered whether to use separate fields or just a flags integer for
color and component types; the latter won for now.
Functions like mp_imgfmt_get_component_type() are now discouraged, and
mp_imgfmt_desc.flags is back for defining all information. Some days ago
I felt like the opposite would be the better design. Fortunately, it
doesn't matter.
With this, I think all image format properties that mpv needs are
exhaustively defined all in one place.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I guess I decided to stuff it all into mp_imgfmt_desc (the "old"
struct). This is probably a mistake. At first I was afraid that this
struct would get too fat (probably justified, and hereby happened), but
on the other hand mp_imgfmt_get_desc() (which builds the struct) calls
the former mp_imgfmt_get_layout(), and the separation doesn't make too
much sense anyway. Just merge them.
Still, try to keep out the extra info for packed YUV bullshit. I think
the result is OK, and there's as much information as there was before.
The test output changes a little. There's no independent bits[] array
anymore, so formats which did not previously have set this now show it.
(These formats are mpv-only and are still missing the metadata. To be
added later). Also, the output for the cursed packed formats changes.
|
|
|
|
|
|
|
| |
My previous commit added support for this format, but it was still
broken, and prevented the allocation code from working. It's unknown
whether it's correct now (because this pixfmt is so obscure and useless,
there are no known samples around), but who cares.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|