Libplacebo v4.192 got a very significant overhaul of the tone-mapping
subsystem and associated APIs. For consistency's sake, present users
with only a UI based on the new configuration style, and use
backwards-compatibility code to map the new enums back to the old API's
set of options.
To avoid having to write this boilerplate twice, provide a common helper
that both the libplacebo vout and the opengl vout can use.
1. The mechanism implemented to keep these two in-sync is broken
2. Interface changes some CSD controls based on window visibility, this
causes conflicts (ref #26668)
The rav1e .pc file adds -I${includedir}/rav1e so including rav1e/rav1e.h
would expand to ${includedir}/rav1e/rav1e/rav1e.h which leads to the
header not being found.
Technically, this just requires forwarding the colorspace and HDR
metadata information to the libplacebo swapchain.
In practice, this does nothing at all on OpenGL, and for Vulkan it only
works with implementations that provide VK_KHR_swapchain_colorspace and
VK_EXT_hdr_metadata, which in practice means "Windows, Wayland and DRM
only", although we don't support DRM or wayland (yet) so it really just
means "Windows only".
We provide only a very short list of valid configurations, because
anything else is severely limited in practice.
These options are only *overrides* of the detected values. This needs to
be made clear to the user - e.g. setting this to PQ will *not* put the
display into PQ mode.
Needed for OpenGL, to avoid printing an error on the first frame, before
the `control()` function is called.
Also allows us to bail out early on swapchain initialization errors.
It's not using LIBCOM when linking but uses WRL with COM objects coming from
DWriteCreateFactory called indirectly. We could later clean the code with
WRL.
Every involved modules other than FFmpeg's assume little endian (e.g.
VA, which derives from DRM which uses little endian always), or only
works on little endian systems at all.
Commit d8aebc365d said:
> The texture scaling factor represents how a plane is scaled compared
> to the first plane, so by definition, the first plane is not scaled
> (its ratio is 1:1).
However, with YUY2 pictures, half the horizontal resolution is currently
lost by the interop. Therefore, until this is fixed, the sampler must
scale accordingly.
This reverts commit d8aebc365d.
Fixes#26682
This implements progressive content for most formats defined in
IETF RFC4175. This only takes care of converting the RTP payloads into
VLC picture buffers; parsing the RTP headers remains the job of the RTP
access module.
For consistency, this uses exclusively planar formats.
Later optimisations could substitute packed formats selectively.
This rectifies ioctl parameters so that allocating frame buffers no
longer fails in kernel.
This also cleans up the triple-buffered frame buffer handling:
now we keep one picture buffer for each of the 3 front buffers, instead
of switching the property of a dummy picture all the time.
The dsm interrupt context was also registered when calling the
credential API that can end up in keystore modules that need to register
an interrupt context. To fix this issue, register the interrupt context
only before dsm calls.
To plot the black borders, we need our drawable to cover the entirety
of the parent window.
Refs #26495.
Note that this engenders two regressions that need fixing in following
changesets:
- The video is drawn in the top left, regardless of the video
alignment setting.
- If the video is shrunk without moving the window (e.g. by cropping),
damaged pixels are not blacked out.
This widget has been a mere shadow of its former self even since
3001875707 left it just wrapping a call
to `QLineEdit::setPlaceholderText()`. Considering this, and that it's only
used in one place anyway, it's really not worth keeping.
I've cleaned up related copyright notices. They had mistakenly been left in
the customwidgets files by e14f47780d, and
having reviewed the history of `SearchLineEdit` there seems to be no
relevant link to the old `ClickLineEdit` code requiring these notices being
kept in the searchlineedit files.
Only the Linux and macOS targets probably require it. It should not be the case
on Windows. BlackMagic probably doesn't support other platforms than these 3.
For Linux we already build with -pthread. For macOS this is not even needed.
This used one too many derefs, and then due to the earlier write of null
near the beginning of the function (making a null write here redundant)
there was thus a null-deref.
Regression from 0e9db4f7e6.
The DXGI code is always compiled on Windows as it's only using calls available
since Windows 7, although IDXGIOutputDuplication will not be available.
The block_t sent contains a D3D11-based picture_t that can be used without
any additional copy using the shared handle.
This fixes the bad option default for this value. The default being
`VPX_DL_GOOD_QUALITY`, which is defined as `1000000` not `0` as seemed to be
the author's assumption, did not map to the specified range of 0-2 and thus
was getting clamped to 2, corresponding to 'best' quality rather than 'good'
quality.
It was requested in review to map the option values to match the vpx defines
rather than simply change the default value to `0`. This necessitates
removal of the range.
This was placed into the same grid row+column as a spinbox and thus
achieved absolutely nothing. Presumably it was intended for the adjacent
column, however since it achieves nothing either way let's just drop it.
Viewing the ui files in Qt creator revealed excess empty space at the
bottom of some, a huge amount in the case of media-library. This ultimately
has no impact upon the final result, but I thought I'd fix it for neatness.
Note that these numbers were the product of simply dragging the canvas size
until it snapped into place.
Such that the effect is thus visible in Qt Creator/Designer.
The compatibility note is obviously obsolete now, but presumably we still
want this style anyway since its read-only.
Rather than have a grid covering the entire contents of the look-n-feel
groupbox, which creates unnecessary complexity, use a sub-widget to group
together and layout the radio controls and the line underneath, letting the
parent layout thus just be a simple vertical-box. Using a widget rather
than just a sub-layout is necessary if we are to be able to do things like
hide the new selection sub-widget when not applicable.
The difference is almost identical, the radio controls are just spaced a
few pixels further apart.
This puts us in a position to hide the selection control and preview image
if skinning is not available (the previous layout did not work for this).
Identified by a different invocation of ASAN than I'd previously used.
wrt. the second fix it seems `clear()` alone does not destroy these items.
```
Direct leak of 64560 byte(s) in 1345 object(s) allocated from:
#0 0x7f1f87268f37 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
#1 0x7f1f71099981 in ExpertPrefsTableModel::ExpertPrefsTableModel(module_t**, unsigned long, QWidget*) ../../modules/gui/qt/dialogs/preferences/expert_model.cpp:260
#2 0x7f1f710a32fa in PrefsDialog::setExpert() ../../modules/gui/qt/dialogs/preferences/preferences.cpp:106
#3 0x7f1f710a8851 in PrefsDialog::PrefsDialog(QWindow*, qt_intf_t*) ../../modules/gui/qt/dialogs/preferences/preferences.cpp:74
#4 0x7f1f70ee43e2 in DialogsProvider::prefsDialog() ../../modules/gui/qt/dialogs/dialogs_provider.cpp:253
#5 0x7f1f714f6f97 in DialogsProvider::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) gui/qt/dialogs/dialogs_provider.moc.cpp:268
#6 0x7f1f714f7c11 in DialogsProvider::qt_metacall(QMetaObject::Call, int, void**) gui/qt/dialogs/dialogs_provider.moc.cpp:388
#7 0x7f1f70568f1c (/lib/x86_64-linux-gnu/libQt5Qml.so.5+0x2c4f1c)
...
Direct leak of 1112 byte(s) in 122 object(s) allocated from:
#0 0x7f1f872127a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
#1 0x7f1f710950f0 in ExpertPrefsTableItem::ExpertPrefsTableItem(module_config_t*, QString const&, QString const&, bool) ../../modules/gui/qt/dialogs/preferences/expert_model.cpp:61
#2 0x7f1f710999ac in ExpertPrefsTableModel::ExpertPrefsTableModel(module_t**, unsigned long, QWidget*) ../../modules/gui/qt/dialogs/preferences/expert_model.cpp:260
#3 0x7f1f710a32fa in PrefsDialog::setExpert() ../../modules/gui/qt/dialogs/preferences/preferences.cpp:106
#4 0x7f1f710a8851 in PrefsDialog::PrefsDialog(QWindow*, qt_intf_t*) ../../modules/gui/qt/dialogs/preferences/preferences.cpp:74
#5 0x7f1f70ee43e2 in DialogsProvider::prefsDialog() ../../modules/gui/qt/dialogs/dialogs_provider.cpp:253
#6 0x7f1f714f6f97 in DialogsProvider::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) gui/qt/dialogs/dialogs_provider.moc.cpp:268
#7 0x7f1f714f7c11 in DialogsProvider::qt_metacall(QMetaObject::Call, int, void**) gui/qt/dialogs/dialogs_provider.moc.cpp:388
#8 0x7f1f70568f1c (/lib/x86_64-linux-gnu/libQt5Qml.so.5+0x2c4f1c)
...
Direct leak of 33 byte(s) in 33 object(s) allocated from:
#0 0x7f1f872677cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7f1f86eac342 in vlc_alloc ../../include/vlc_common.h:1149
#2 0x7f1f86eac342 in module_config_get ../../src/modules/modules.c:346
#3 0x7f1f710995f5 in ExpertPrefsTableModel::ExpertPrefsTableModel(module_t**, unsigned long, QWidget*) ../../modules/gui/qt/dialogs/preferences/expert_model.cpp:230
#4 0x7f1f710a32fa in PrefsDialog::setExpert() ../../modules/gui/qt/dialogs/preferences/preferences.cpp:106
#5 0x7f1f710a8851 in PrefsDialog::PrefsDialog(QWindow*, qt_intf_t*) ../../modules/gui/qt/dialogs/preferences/preferences.cpp:74
#6 0x7f1f70ee43e2 in DialogsProvider::prefsDialog() ../../modules/gui/qt/dialogs/dialogs_provider.cpp:253
#7 0x7f1f714f6f97 in DialogsProvider::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) gui/qt/dialogs/dialogs_provider.moc.cpp:268
#8 0x7f1f714f7c11 in DialogsProvider::qt_metacall(QMetaObject::Call, int, void**) gui/qt/dialogs/dialogs_provider.moc.cpp:388
#9 0x7f1f70568f1c (/lib/x86_64-linux-gnu/libQt5Qml.so.5+0x2c4f1c)
```
The groupbox had a name that misleadingly suggested that it only contained
"instance" related controls when actually it contains both instance and
playlist controls. If dbus is not available it is only the instance ones
that should be hidden not the entire groupbox.
The `CONFIG_GENERIC_NO_BOOL` macro dates from a time when some config
control types took an extra boolean flag in addition to input and label
widget pointers, and some did not, and thus two different macros were
needed.
This has been obsolete since 259f2753af
which removed the relevant bool param.
Note that this macro never gained logic for disabling options that were
unavailable, unlike `CONFIG_GENERIC`, so one side benefit of switching
these items over to `CONFIG_GENERIC` is that they will correctly be
disabled when unavailable now.
Note that a tweak to `CONFIG_GENERIC` was necessary to fix a compilation
error due to there now being use cases where the label param is null.
...unless we are running out and have no other option left.
This provides zero-copy video capture in most cases.
Note though that the rawvideo decoder will still copy frames to adjust
pitches and transfer from capture buffers to picture buffers (even if
the pitches do not need adjustments).
This tracks which buffers have been dequeued and not yet requeued.
When the capture ends, only buffers which were still queued will be
freed. The pool is freed whence all buffers have been freed.
This also automatically requeues a buffer when it is freed as long as
the capture has not been terminated.
This will be used later on.
Note that the FD is still stored in demux_sys_t for the cases where the
pool is not created, i.e. user pointer and read-write capture modes.
User pointers and memory map modes are identified by the same device
capability flag (STREAMING). If user pointers are not supported (and
they typically are not for physical hardware), then REQBUFS returns
EINVAL.
If the error is EINVAL, printing the error message "Invalid arguments"
gives the wrong impression that VLC is misuing the V4L API. If the
error is something else, then it is a real error, so should be printed
as such.
1. Videotoolbox doesn't handle codec info. It do crop the right
and bottom side if codec_size > output_size
2. There is no API to configure i_x_offset/i_y_offset to videotoolbox
3. It was a bug to let videotoolbox to crop and don't reset
i_x_offset/i_y_offset.
This gives a table listing all options, similar to and inspired by the
`about:config` interface in Firefox.
Unique benefits:
- It highlights which options have been modified from default state.
- It allows selective resetting of individual options to default values.
Support is included to toggle booleans with a simple double-click.
Double-clicking on other types opens the edit dialog.
For colour selection items, the modify action directly opens the Qt
colour selection dialog rather than present the colour control used in
the advanced preferences view, since this is much cleaner.
Note that the existing simple and advanced views are not linked; if you
change an option in one view, that change is not reflected in the other,
and saving changes only uses the state from the selected view. The same
is currently true of the new expert mode, though I plan to later change
this behaviour (for all three).
Note also that hotkey items are deliberately excluded from this view.
The dedicated hotkey editor is best suited to managing hotkeys. It does
not work well to include the set of 224 unique hotkey options within this
table, especially since we'd have to duplicate the code checking for
duplicate assignments if we allow editing of them as with all other
option types within this interface. It may seem odd for the 'expert'
mode to be the only one without hotkey editing, however the hotkey editor
does not really fit well into 'advanced' mode either, and I have plans to
propose separating the hotkey editor entirely from within the set of
three views in a small redesign.
Fixes#18607.
Needed shortly for the editing dialog of 'expert' prefs mode.
Note that I have not implemented it for `KeySelectorControl` since
I intend to exclude hotkeys entirely from expert mode.
Our control classes are not widgets, deriving from `QObject` not `QWidget`.
Their component widgets are inserted into an external parent widget which
effectively passes ownership to that widget - when that widget is destroyed
any widgets it encapsulates will automatically also be destroyed.
Destructors of our control classes should thus not attempt to delete their
component widgets, since unless the control object is destroyed first, the
destructor will get called twice.
The unnecessary explicit deletion of this component widget within this
control class destructor was thus risking such double-destruction. This did
not seem to be occurring within the current codebase, however I happened to
encounter it in some later work.
Adding padding was the goal in specifying a row height here. Doing it
via a style sheet seems to be the proper way.
The height with this solution is roughly equivalent.
Complementing such highlighting done in the new 'expert' preferences
interface (see !1344).
The name field is highlighted if either of the normal or global assignments
differ from their defaults.
We now have a context menu. Trying to open a context menu should be the
natural action to take in looking for potential hidden functionality. It is
thus now less necessary to give instructions to help users find a way to
perform editing.
This primarily complements !1344 with a means to reset individual hotkey
settings.
Note, just like the existing means of triggering the edit dialog, doing so
on the name column enters edit mode for the normal hotkey assignment.
This is primarily prep for the next commit, where we will need to keep
track of default values.
Essentially this is just implementing a custom `QTreeWidgetItem` like
previously done for the advanced preferences tree.
The `aTable` variable was unnecessary - we check that `obj` equals
`table`, so we can just use `table` rather than making a cast of `obj`.
Also, much cleaner with a switch block.
ssize_t is not a standard C type. In some cases it's supposed to hold no more
than a long [1]. That's 2 GB in normal case which is enough for 16k*16k 16-bit
RGBA.
> The implementation shall support one or more programming environments in
> which the widths of blksize_t, pid_t, size_t, ssize_t, and suseconds_t are no
> greater than the width of type long. The names of these programming
> environments can be obtained using the confstr() function or the getconf
> utility.
Make sure the new type is equivalent to the old one so we don't break ABI.
And a recompilation will hopefully no bring any warning (otherwise that was
assumed to be ssize_t by the host app was not correct).
[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
In v199, plane crops and overlays are now automatically flipped for
flipped swapchains, absolving the user from the need to handle this
special case.
For backwards compatiblity with older libplacebo, hide this logic behind
an #ifdef'd bool instead of completely removing it.
It's better not to use it when reference counting is not involved. Otherwise
operator& and ReleaseAndGetAddressOf() are better.
And use ComPtr::As() rather than interface::QueryInterface() to avoid using
GetAddressOf.
It's better not to use it when reference counting is not involved. Otherwise
operator& and ReleaseAndGetAddressOf() are better.
And use ComPtr::As() rather than interface::QueryInterface() to avoid using
GetAddressOf.
It's better not to use it when reference counting is not involved. Otherwise
operator& and ReleaseAndGetAddressOf() are better.
And use ComPtr::As() rather than interface::QueryInterface() to avoid using
GetAddressOf.
It's better not to use it when reference counting is not involved. Otherwise
operator& and ReleaseAndGetAddressOf() are better.
And use ComPtr::As() rather than interface::QueryInterface() to avoid using
GetAddressOf.
The previous behaviour upon filter change was that:
- If the search string was not empty then everything visible was expanded.
- If empty, then everything would be collapsed except the selected node.
This is rather annoying IMO, for instance - from a default starting state
where top-level nodes are expanded and 2nd-level collapsed, if you apply a
filter and then subsequently remove it, you annoyingly end up with more
collapsed than you started with.
I feel that it works much better to just leave the expanded/collapsed state
untouched, preserving the initial state and any changes the user has made
before/after filtering, even though this forces users to expand any
2nd-level filter results they are interested in for themselves. It's also
much more simple.
Note that in some cases they have been changed to forward declarations, and
in some they have been moved, for instance inclusion of `<QUrl>` was moved
from `qt.hpp` to where it was needed.