1
mirror of https://code.videolan.org/videolan/vlc synced 2024-10-03 01:31:53 +02:00
Commit Graph

54483 Commits

Author SHA1 Message Date
Lyndon Brown
358fe9c6c7 swscale: purge obsolete SIMD selection
the swscale cpu feature flags were deprecated in 2012 and removed in 2015
([1]) in favour of auto-detection, hence the version guard used within the
`GetSwsCpuMask()` function.

in vlc v4.0-dev we are purging MMX/MMXEXT and so have a need to remove the
corresponding portions of the function. this alone though would leave the
function and related code only catering to enabling altivec in the one
special case of compiling with an old swscale version. i felt that it was
probably better to just rip it all out.

[1]: 9d58639e27
2021-07-22 06:59:35 +00:00
Lyndon Brown
19d74319bb vorbix,x264: tidy plugin variant flags
- makes the code a little more readable.
 - switches to use of "plugin" rather than "module", as is more
   appropriate here.
2021-07-21 16:19:29 +00:00
Lyndon Brown
991a77950f chroma: tidy plugin simd variant flags
...to use short labels like `PLUGIN_PLAIN` and `PLUGIN_SSE2` rather than
`MODULE_NAME_IS_xxx_yyy[_zzz]`. this makes the code cleaner, easier to read,
and improves consistency. it also helps remove a source of plugin vs.
module confusion.

trying to recognise that something like `MODULE_NAME_IS_i420_yuy2` refers
to the 'plain' variant, compared to `MODULE_NAME_IS_i420_yuy2_sse2` for the
SSE2 variant, was problematic.

the `#else // defined(MODULE_NAME_IS_xxx_yyy_sse2)` instances have been
changed to `#elif defined(PLUGIN_SSE2)` in the i420 plugin.

the flag passed to the nv12 plugin was removed (rather than replaced with
`PLUGIN_PLAIN`) because it is unused.

the i420_rgb plugin used short `SSE2` type defines. these have been changed
to `PLUGIN_SSE2` style for consistency.
2021-07-21 16:19:29 +00:00
Ilkka Ollakka
923b582e8f swscale: set colorspace information to swscale context
Colorspace most cases default with swscale, but it shouldn't hurt to
define it if possible.
2021-07-21 05:38:34 +00:00
Lyndon Brown
dde3546047 grain,chroma-copy: purge stray emms
these modules have no MMX code, and MMX is being purged, so there
is no reason for issuing `emms` instructions.
2021-07-20 17:18:17 +00:00
Lyndon Brown
dd38fdc4f2 deinterlace: use sfence instead of emms for SSE2
we're purging all MMX/MMXEXT code; `sfence` is more appropriate.
2021-07-20 15:02:06 +00:00
Lyndon Brown
831fa3cd0f deinterlace: purge MMX/MMXEXT
notes:
 - this removes all SIMD acceleration for x86/x86_64. originally this work
   started by converting the MMX code to SSE2, then purged remaining
   artifacts, but a build error on android has blocked that work from
   being merged for now. this commit thus takes a different approach of
   simply purging the old MMX/MMXEXT code first, with getting the SSE2
   implementation working to be done as a follow up.
 - the `EndMMX()` function is retained (renamed to `EndSSE()`) because it
   is still used under the merge code. the `emms` instruction will be
   replaced with an `sfence` instruction separately, as more appropriate.
2021-07-20 15:02:06 +00:00
Steve Lhomme
4c7b2517dc direct3d11: fix winstore build
DEFINE_GUID in C++ resolves to an external C define but it won't exist in the
display module compiled in C++ in release builds.
2021-07-20 11:17:07 +00:00
Thomas Guillem
e41b435304 audiotrack: don't use DynamicsProcessing with passthrough
Fixes #25921
2021-07-20 07:56:33 +00:00
Fatih Uzunoglu
4413d1e1ef qml: add fallback widget for player toolbar 2021-07-16 09:37:04 +00:00
Blake Haydon
8045a6cc9a Replace connexion with connection 2021-07-15 19:39:34 +00:00
Steve Lhomme
20edbebd05 vout: wayland: remove stray dimension fields
Forgotten in 51cf42cd5d
2021-07-15 17:52:42 +00:00
Martin Storsjö
850e0bcfa0 mft: Add a prefix to local definitions of GUIDs
This fixes building with the very latest nightly version of mingw-w64.

In 7fb7c9f6e4,
the MFVideoFormat_L8 mediatype GUID was added, conflicting with our
own definition with the same name.
2021-07-14 18:21:19 +00:00
Alexandre Janniaux
2828c95004 skins2: vlcproc: use lambda to static initialize cbs
The callbacks needed to be defined with the correct order and without
oversight since C++14 doesn't support designated initializer. But
vlc_player and playlist callbacks are all optional and there's no point
in having such constraint for C++ code. Use a static lambda initializer
with an initial zero-initializer to circumvent this limitation.
2021-07-14 17:57:42 +00:00
Alexandre Janniaux
31b125d42a qt: playlist_model: use lambda to static initialize cbs
The callbacks needed to be defined with the correct order and without
oversight since C++14 doesn't support designated initializer. But
vlc+playlist callbacks are all optional and there's no point in having
such constraint for C++ code. Use a static lambda initializer with an
initial zero-initializer to circumvent this limitation.
2021-07-14 17:57:42 +00:00
Alexandre Janniaux
2cb3c1f0c3 qt: playlist_controller: use lambda to static initialize cbs
The callbacks needed to be defined with the correct order and without
oversight since C++14 doesn't support designated initializer. But
vlc+playlist callbacks are all optional and there's no point in having
such constraint for C++ code. Use a static lambda initializer with an
initial zero-initializer to circumvent this limitation.
2021-07-14 17:57:42 +00:00
Alexandre Janniaux
1f743fa704 qt: player: use lambda to static initialize cbs
The callbacks needed to be defined with the correct order and without
oversight since C++14 doesn't support designated initializer. But
vlc_player callbacks are all optional and there's no point in having
such constraint for C++ code. Use a static lambda initializer with an
initial zero-initializer to circumvent this limitation.
2021-07-14 17:57:42 +00:00
Romain Vimont
8db4590854 vout: explicitly release picture_t
The picture_t was released implicitly from vout_dispay_Display().

If the caller explicitly wants to check if the display callback is NULL
for other reasons, they might be tempted to avoid calling
vout_display_Display() at all, which would leak the picture.
2021-07-14 16:13:08 +00:00
Rémi Denis-Courmont
f32f289264 Rationalise not found error codes
We don't need 4 different codes for essentially the same thing, which
is that a certain thing could not be found.
2021-07-14 14:53:16 +00:00
Rémi Denis-Courmont
d1c2a20a98 gst: use VLC_ENOMEM rather than VLC_ENOMOD
...when failing to instantiate an object.
2021-07-14 14:53:16 +00:00
Rémi Denis-Courmont
6a69daad1f Use VLC_EINVAL rather than VLC_ENO*
VLC_ENO* means that something cannot be found (usually by name/ID).

VLC_EINVAL means that a parameter value is invalid.
2021-07-14 14:53:16 +00:00
Rémi Denis-Courmont
dd20ace531 Rename VLC_EBADVAR to VLC_EINVAL 2021-07-14 14:53:16 +00:00
Rémi Denis-Courmont
aebb111024 Introduce VLC_ENOTSUP error code
Better than VLC_EGENERIC when something is understood to be unsupported
on the local system.
2021-07-14 14:53:16 +00:00
Rémi Denis-Courmont
2e4165c0cc Introduce VLC_EACCES error code
EACCES means that an operation is not possible in the current state.

This is not to be confused with EPERM meaning that the user does not
have the necessary credentials. Also compare HTTP results 401 and 403.

Also compare with EINVAL (VLC_EBARVAR) meaning that operating is not
possible because the value of a parameter is invalid.
2021-07-14 14:53:16 +00:00
Lyndon Brown
75bca60374 purge all remaining 3dNow artefacts 2021-07-14 08:49:42 +00:00
Lyndon Brown
327bf56c91 deinterlace: purge 3dNow 2021-07-14 08:49:42 +00:00
Lyndon Brown
b2dc6a5685 gradfun: purge MMXEXT 2021-07-13 20:24:17 +00:00
Lyndon Brown
57d35779bd chroma: purge MMX from i420_yuy2, i422_yuy2, i420_rgb 2021-07-13 20:00:44 +00:00
Steve Lhomme
f25ace1c64 caca: don't keep the window locally
It's always set in vd->cfg->window
2021-07-13 13:51:40 +00:00
Steve Lhomme
1dfc22bc7b vout: android: don't keep the display width/height locally
It's already in vd->cfg.
2021-07-13 12:27:23 +00:00
Steve Lhomme
51cf42cd5d vout: wayland: don't keep the display width/height locally
It's already in vd->cfg and cannot change without a call to
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE. The value in vd->cfg during Prepare is always
the correct one.
2021-07-13 12:11:21 +00:00
Prince Gupta
3e466a6d25 qml/SortControl: use native menu 2021-07-13 08:19:00 +00:00
Prince Gupta
f12f7fa1c1 qt: implement SortMenu 2021-07-13 08:19:00 +00:00
Francois Cartegnie
e469c589a7 demux: adaptive: start with lowest non audio on NearOptimal Logic 2021-07-12 15:16:32 +00:00
Thomas Guillem
08cbeca2b7 avcodec: vaapi: adapt to the hw_device_ctx API
Contrary to all other hardware decoders, vaapi can't work with a
hwaccel_context anymore. It requires a hw_device_ctx or a hw_frames_ctx
to work.

This first implementation use a hw_device_ctx and let avcodec handle its
frames pool. It is also possible to handle hw_frames_ctx ourself to get
more controls.

Note: Most of the code could be reused by other va modules if we decide
to a hw_device_ctx.

Fixes #25707
2021-07-12 09:52:31 +02:00
Thomas Guillem
906ffbaa63 avcodec: video: fix swfmt detection when using a hw_device_ctx 2021-07-12 09:52:31 +02:00
Thomas Guillem
fe63b86f3b avcodec: video: also store the pic reference in opaque_ref
The future vaapi va module will create AVFrame from hwframes_ctx with a
frame->buf[0] set internally by avcodec. If this is the case, don't
override it and use opaque_ref (an user field) to keep the reference on
the VLC picture_t.
2021-07-12 09:52:31 +02:00
Thomas Guillem
03b9c4bcd9 avcodec: video: remove unused data
frame->buf[0] must be valid but doesn't have to contain data since the
data will be accessed via frame->data[] directly.

Furthermore, all va modules are only setting frame->data[3], therefore,
frame->data[0] was always NULL.
2021-07-12 09:52:31 +02:00
Thomas Guillem
e3b5b5b07b avcodec: va: change vlc_va_Get arguments
Provide the AVCodecContext and the full AVFrame. It will be used by the
new vaapi va module.
2021-07-12 09:52:31 +02:00
Steve Lhomme
2721256e9b display: don't pass the vout_display_cfg_t on Open
It's already set as a read-only pointer in vd->cfg before calling Open().
2021-07-12 09:21:55 +02:00
Steve Lhomme
6b7a6d86ae vout: direct3d11: build in C++
This allows using COM helpers and shorter API calls.

It's already built with C++ from the sensor and DirectComposition handlers.
2021-07-12 08:34:00 +02:00
Steve Lhomme
5fc6a7ca5b chroma: copy: allow use from C++ code 2021-07-12 08:33:36 +02:00
Fatih Uzunoglu
676666ab37 qt: remove unneeded meta type registration
qmlRegisterUncreatableType already registers the type
to the meta object system.
2021-07-11 20:20:44 +00:00
Fatih Uzunoglu
0df3d23f5d qt: register ControlbarProfileModel as qml type 2021-07-11 20:20:44 +00:00
Fatih Uzunoglu
b7b1fcf931 qt: defer init reload() in ControlbarProfileModel
this change allows selectedProfileControlListChanged
signal to be emitted after the initial reload happens.
2021-07-11 20:20:44 +00:00
Fatih Uzunoglu
ae6e0c7bd7 qt: use isSignalConnected() instead of receivers() in ControlbarProfile
With Qt 5.0, a new syntax for signal/slot handling was introduced. This
patch updates the related function call that tests if the signal is
connected to its Qt 5 way of doing.
2021-07-11 20:20:44 +00:00
Pierre Lamot
7f6e6a7603 qml: remove js implementation of KeyHelper 2021-07-11 14:15:56 +00:00
Pierre Lamot
33b1fb29eb qml: use C++ version of KeyHelper 2021-07-11 14:15:56 +00:00
Pierre Lamot
28776845e5 qt: add C++ KeyHelper wrapper for QML
this allows to avoid code duplication between C++ and QML
2021-07-11 14:15:56 +00:00
Benjamin Arnaud
736be1eb0c qml/SortControl: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
d36d6a2133 qml/CheckedDelegate: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
ecfb0ac53e qml/LanguageMenu: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
bd031e7e4c qml/ButtonsLayout: Remove 'legacy color forcing' 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
fdc89c3094 qml/VideoInfoExpandPanel: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
ca4ad0b69a qml/MusicAlbumsGridExpandDelegate: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
490f8bd658 qml/ArtistTopBanner: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
60b979d22c qml: Create ActionButtonOverlay 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
ec179a624b qml: Create ActionButtonPrimary 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
c2380669ca qml/TabButtonExt: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
f7105b4daa qml/BannerTabButton: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
0821843c5e qml/ControlButtons: Update play button look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
ecf031b625 qml: Create IconTrackButton 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
5f36677e80 qml/IconControlButton: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
7ed1cf8255 qml/IconToolButton: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
d75be09cf3 qml/TableViewDelegate: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
cccb54b698 qml/GridItem: Update look and feel 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
77a2719ac7 qml/PlaylistDelegate: Update look and feel and fix focus 2021-07-11 11:04:05 +00:00
Benjamin Arnaud
21ce906bf1 qml/VLCColors: Conform to the VLC color palette 2021-07-11 11:04:05 +00:00
Alexandre Janniaux
786e351ab9 VLCVideoUIView: fix event reporting
The event reporting must happen one event at a time and never trigger
behaviour not expected by the underlying application. It uses a custom
runloop mode to ensure only the VLC aware code can use the runloop (and
thus usually main thread) when reporting an event. It was ensured by
calling CFRunLoopRunInMode until the runloop is stopped.

But there were multiple undetected flaws in this:
 - CFRunLoopRunInMode will terminate (with timeout or finish) whenever
   one event have been processed, so it needs to be called in loop with
   the correct invariant.
 - CFRunLoopRunInMode with timeout=0 will exit even sooner if there are
   not events available.
 - CFRunLoopStop will interrupt CFRunLoopInMode only if it's actually
   running so there's an asynchronous design flaw where we try to stop
   the event loop from another thread without syncing with this event
   loop.

This patch fixes those issues, though it adds some callback nightmares,
by adding a new level of dispatch to the main CFRunLoop, which will be
the one to call CFRunLoopStop on itself. Thus, the CFRunLoop must be in
a running state when CFRunLoopStop is called.

It also ensure that we don't leave the loop for another reason than
calling CFRunLoopStop, eg. Timeout or Finish result code.
2021-07-11 08:53:12 +00:00
Alexandre Janniaux
d9de65d1eb VLCVideoUIView: use dedicated queue for event
Switch the event queue used to a dedicated event queue which will create
its own thread, instead of using QOS parallel queues, which prevents
mixing with non-VLC tasks and ensure tasks are ordered.
2021-07-11 08:53:12 +00:00
Steve Lhomme
ac4cd93403 mft: add support for MPEG-1 and MPEG-2 video decoding 2021-07-11 08:28:14 +00:00
Steve Lhomme
459beede5b mft: fix compilation warning
And remove a useless cast from void*
2021-07-11 08:28:14 +00:00
Steve Lhomme
a8e36de0ac mft: support NV12 output
That's the preferred output format for most codec and also with better DXGI
display support.
2021-07-11 08:28:14 +00:00
Romain Vimont
6208d519af vout: use designated initializers for display ops
Benefits of *not* using designated initializers:
 - we can't forget a callback
 - it's the same in C and C++ (<20)

Benefits of using designated initializers:
 - the order of callbacks may not be wrong
 - we can read immediately which function is assigned to which callback
   (especially if some are NULL)
 - an optional callback may be added without modifying all the modules
 - we can grep a callback name to find its assignments easily
 - it is consistent with others xxx_operations in the codebase
2021-07-10 15:16:50 +00:00
Romain Vimont
e5d44f6af0 vlc_tick: add MIN and MAX constants
Replace INT64_MIN and INT64_MAX used as vlc_tick_t values by
VLC_TICK_MIN and VLC_TICK_MAX.
2021-07-10 14:26:56 +00:00
Sergio Ammirata
1fa33c1886 Add libRIST based access and access_output modules.
These support the new RIST main profile as well as the RIST simple profile.

Co-authored-by: Gijs Peskens <gijs@peskens.net>
2021-07-10 09:28:35 +00:00
Sergio Ammirata
65632fe696 Remove old RIST modules 2021-07-10 09:28:35 +00:00
Thomas Guillem
bd8359f36f avcodec: va: make sys a void pointer
The concrete sys type is local to each module.
2021-07-10 09:06:46 +00:00
Francois Cartegnie
f54729f303 control: hotkeys: fix handling of text scaling 2021-07-08 09:42:57 +00:00
Francois Cartegnie
7e13498f3f control: hotkeys: fix scaling factor computation
regression by f9c971daef
2021-07-08 09:42:57 +00:00
Francois Cartegnie
296e18b19c codec: libass: speed up C blending, as for freetype 2021-07-08 07:58:14 +00:00
Francois Cartegnie
ffb4a94e2b codec: libass: don't create spu for each split command 2021-07-08 07:58:14 +00:00
Thomas Guillem
72d7150e61 aiff: handle 'chan' chunk to use coreaudio channel ordering
Fixes #25756
2021-07-08 07:40:16 +00:00
Ilkka Ollakka
16fd46fa50 avcodec: remove use of av_init_packet as it is deprecated in new ffmpeg major version
av_init_packet is deprecated in new major version of ffmpeg.

Also use av_packet_free instead of unref.

Use av_packet_clone and AVPacket * in vlc_av_packet_t.
2021-07-07 12:37:58 +00:00
Romain Vimont
3af1b9dc30 vout display: make sys a void pointer
The concrete sys type is local to each module.
2021-07-07 09:26:17 +00:00
Prince Gupta
c882e2c8a7 qml: remove 'acceptFocus' property 2021-07-05 21:31:43 +00:00
Prince Gupta
2d243f56ee qml/IconControlButton: update foreground colors 2021-07-05 21:31:43 +00:00
Prince Gupta
6485e69ae3 qml/IconControlButton: set background transparent 2021-07-05 21:31:43 +00:00
Prince Gupta
9e3a6553d6 qml/IconToolButton: allow changing background color 2021-07-05 21:31:43 +00:00
Prince Gupta
8e80788177 qml/IconToolButton: improve foreground color management 2021-07-05 21:31:43 +00:00
Prince Gupta
5691681116 qml/IconToolButton: remove 'borderEnabled' property
this property is not in use anymore
2021-07-05 21:31:43 +00:00
Prince Gupta
07dda9f70f qml/IconToolButton: remove 'backgroundVisible' property
this property is not used anywhere, also contextually this property is
incorrect
2021-07-05 21:31:43 +00:00
Prince Gupta
d8b9d19570 qml/IconToolButton: remove overlay text 2021-07-05 21:31:43 +00:00
Prince Gupta
13976c0458 qml: add inplace overlay text on ab control button
also changes overlay colors to accent, overlay text was not visible in
light theme
2021-07-05 21:31:43 +00:00
Prince Gupta
1b90844e5f qml/TopBar: use IconControlButton 2021-07-05 21:31:43 +00:00
Prince Gupta
524616d6f6 qml/IconControlButton: set colorFocus from provided 'colors' property 2021-07-05 21:31:43 +00:00
Fatih Uzunoglu
ee53dc56a2 qml: show progress in artwork info tooltip 2021-07-04 19:54:51 +00:00
Fatih Uzunoglu
5085485d24 qml: fix artwork info tooltip positioning 2021-07-04 19:54:51 +00:00
Fatih Uzunoglu
36c46548f7 qml: hide artwork info tooltip when control is hidden 2021-07-04 19:54:51 +00:00
Fatih Uzunoglu
edc645d328 qml: give space for artwork info widget border width 2021-07-04 19:54:51 +00:00