Commit Graph

19582 Commits

Author SHA1 Message Date
Alexandre Janniaux 115c9e7f26 input: es_out: remove previous priv_control
Every clients have switched to using the private control callback from
the vlc_input_es_out interface.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 580f2391c4 input: es_out_source: move PrivControl
Every clients are now using either the vlc_input_es_out priv_control
callback or they fallback to the es_out_t implementation if not filled.
Moving the call to vlc_input_es_out will allow removing the private
control from the es_out_t callback interface.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 7fb05a8486 es_out.c: switch to vlc_input_es_out PrivControl
Every clients are now using either the vlc_input_es_out priv_control
callback or they fallback to the es_out_t implementation if not filled.
Moving the call to vlc_input_es_out will allow removing the private
control from the es_out_t callback interface.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux e01dd1f457 es_out: timeshift: switch to vlc_input_es_out PrivControl
Every clients are now using either the vlc_input_es_out priv_control
callback or they fallback to the es_out_t implementation if not filled.
Moving the call to vlc_input_es_out will allow removing the private
control from the es_out_t callback interface.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 7deb75d079 es_out: remove compatibility macros
Now that every private es_out_t clients are using the struct vlc_input_es_out
type, we can remove those macros safely.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 3a5d4950fd es_out: timeshift: switch to vlc_input_es_out client
input_EsOutTimeshiftNew() is now receiving a vlc_input_es_out instance
to initialize the next hop in the es_out_t chain, so we can use this
internally. This will allow calling the vlc_input_es_out private control
instead of the es_out_t one.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux a01acd5082 es_out: timeshift: initialize with vlc_input_es_out
Now that every input es_out_t implementations are inheriting
vlc_input_es_out and every locations in the input are storing
vlc_input_es_out directly, we can forward the downclass to the
es_out_timeshift vlc_input_es_out implementation so that it can forward
the private controls to the next vlc_input_es_out.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 298dcb9de5 input: es_out: implement private controls via vlc_input_es_out
Thanks to the compability macros, we didn't need to modify the client
code, and now that every clients are using vlc_input_es_out, we can
downcast directly when needed.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 3702607906 es_out_timeshift: redirect to private operations when available
Setup compatibility path to redirect to vlc_input_es_out private control
instead of using the es_out_t private control when it's available.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux ad7bfa7d29 input: es_out_source: redirect to private operations when available
Setup compatibility path to redirect to vlc_input_es_out private control
instead of using the es_out_t private control when it's available.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 66a3078f36 input: es_out_source: directly store vlc_input_es_out
input_EsOutSourceNew() is now receiving a vlc_input_es_out instance to
initialize the next hop in the es_out_t chain, so we can use this
internally. This will allow calling the vlc_input_es_out private control
instead of the es_out_t one.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 0902d6a6fe input: es_out_source: initialize with vlc_input_es_out
Now that every input es_out_t implementations are inheriting
vlc_input_es_out and every locations in the input are storing
vlc_input_es_out directly, we can forward the downclass to the
es_out_source vlc_input_es_out implementation so that it can forward the
private controls to the next vlc_input_es_out.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux b0d126b516 input: source: store vlc_input_es_out directly
Make input_source_t store a vlc_input_es_out directly instead of an
es_out_t. Indeed, an input_source_t is always linked to an es_out_t
which is able to execute private controls for the playback.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 7b818ff4d8 input: store intermediate vlc_input_es_out
Now that the es_out is an instance of vlc_input_es_out, we want to use
the new interface as much as possible. The es_out private callbacks will
handle both types so the transition can be partial in this commit to
keep it minial aand mostly change the stored variables and the other calls.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 4033cbe450 es_out: handle both es_out_t and vlc_input_es_out
This commit provides temporary compatibility macros to be able to change
the type used for the first parameter in each of the clients of the
private control API.

They will be removed in later commits.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 37271343eb input: es_out: return vlc_input_es_out
Now that every clients are inheriting vlc_input_es_out, we can output a
vlc_input_es_out object to the core input directly.

For now, the input still upcasts to es_out_t to avoid modifying the
whole file in this commit.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 29c651217a es_out: timeshift: inherit vlc_input_es_out
No functional changes for now, the ops are set to NULL. This will allow
to move the private control callback out of the es_out_t interface.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux 098a70a7b8 es_out: source: inherit vlc_input_es_out
No functional changes for now, the ops are set to NULL. This will allow
to move the private control callback out of the es_out_t interface.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux cf0b96340c es_out: inherit vlc_input_es_out
No functional changes for now, the ops are set to NULL. This will allow
to move the private control callback out of the es_out_t interface.
2024-04-30 21:09:23 +00:00
Alexandre Janniaux b90e31e7fb es_out: add new vlc_input_es_out structure
The structure will replace the previous priv_control that was
implemented mostly by input-specific es_out, and will allow to implement
more controls through operations instead, when suited.
2024-04-30 21:09:23 +00:00
Steve Lhomme fd149a3838 audio_output: don't inherit equalizer parameters if the equalizer module is not found 2024-04-28 16:11:37 +00:00
Alexandre Janniaux d56e9c1e7b es_out: use es_out_sys_t (downcast) as parameter
The upper class was used everywhere, leading to the pointer being
downcasted at the beginning of every function. By using the downcast
class everywhere, we don't introduce explicit downcast in most places.

This commit also reduces the usage of the es_out_t type as parameter,
which will be moved to another downclass in follow-up MR.
2024-04-23 19:33:01 +00:00
Alexandre Janniaux 5689fcde76 es_out_timeshift: use downcast class as parameter
The upper class was used everywhere, leading to the pointer being
downcasted at the beginning of every function. By using the downcast
class everywhere, we don't introduce explicit downcast in most places.

This commit also reduces the usage of the es_out_t type as parameter,
which will be moved to another downclass in follow-up MR.
2024-04-23 19:33:01 +00:00
Alexandre Janniaux 212ed3d898 es_out_timeshift: switch to dedicated structure
es_out_sys_t is the name used in es_out.c for the main es_out. By
providing a dedicated name, we gain more clarity and better integration
with tooling.
2024-04-23 19:33:01 +00:00
Alexandre Janniaux 8363d6c360 es_out_source: expose new dedicated struct
es_out_sys_t is the name used in es_out.c for the main es_out. By
providing a dedicated name, we gain more clarity and better integration
with tooling.
2024-04-23 19:33:01 +00:00
Alexandre Janniaux 52adca10c9 es_out: add missing includes
The includes are missing when including this file into another.
2024-04-23 19:33:01 +00:00
Alexandre Janniaux a8e7319148 input: es_out: fix copy-paste typo 2024-04-23 19:33:01 +00:00
Alexandre Janniaux c1b91b1e39 input: move item parse to its own file
Input item parsing depends on other components and exposes its own new
objects so separate it from the main input.c file to ease compilation
with tests.
2024-04-15 06:34:38 +00:00
Alexandre Janniaux b0b5f69347 input: move input_source_t to its own files
input_source_t doesn't depend on anything, so it can be moved to its own
files so that it can be included in tests without using input.c also.
2024-04-15 06:34:38 +00:00
Steve Lhomme 65b813712c display: remove redundant VOUT_DISPLAY_CHANGE_DISPLAY_FILLED
If the display filling mode of the video changed, the video placement has changed as well.
Display modules don't actually care about the aspect ratio, just where they're supposed to stretch the video.
2024-04-15 05:51:40 +00:00
Steve Lhomme 0c10d95148 display: remove redundant VOUT_DISPLAY_CHANGE_ZOOM
If the zoom of the video changed, the video placement has changed as well.
Display modules don't actually care about the aspect ratio, just where they're supposed to stretch the video.
2024-04-15 05:51:40 +00:00
Steve Lhomme 4ab62d06f8 display: notify display modules when the picture placement changed
In many cases that's what they really care about. Not the display size or display filled value.
2024-04-15 05:51:40 +00:00
Steve Lhomme 1c46d14f70 display: keep the video placement internally 2024-04-15 05:51:40 +00:00
Steve Lhomme dfdc613df5 vout: update the display fit dynamically 2024-04-15 05:27:09 +00:00
Thomas Guillem d221a4a4db player: don't add npt to input times
The player timer will handle it.

Fixes #26609
2024-04-14 12:19:45 +00:00
Thomas Guillem acf833a655 player: timer: don't update BestSource when stopping
This will prevent to send updates after the last discontinuity (when the output
is deleted) from other ES sources.

This could happen with a high CPU load:

timer: update: source: audio/0, ts: 197001 npt: 1
timer: update: source: audio/0, ts: 198001 npt: 1
timer: update: source: audio/0, ts: 199001 npt: 1
timer: discontinuity: source: input
timer: discontinuity: source: audio/0
timer: update: source: video/0, ts: 191660 npt: 1
timer: discontinuity: source: video/0

Refs #26609
2024-04-14 12:19:45 +00:00
Thomas Guillem 1c5d699800 player: timer: split vlc_player_UpdateTimer
In 2 functions: vlc_player_UpdateTimerBestSource and
vlc_player_UpdateTimerSmpteSource.

No functional changes.
2024-04-14 12:19:45 +00:00
Thomas Guillem b685494e9e player: timer: assert the state is handled 2024-04-14 12:19:45 +00:00
Steve Lhomme 866cab56be vout_subpictures: check the stop value is usable when fading
If stop is equal to start, fade_start equals start, which ends up with a division by zero.
2024-04-10 09:24:12 +00:00
Steve Lhomme 6971fd28d8 vout_subpictures: check the stop value was set when using subpicture fading
We can't compute a fade ratio without this.
2024-04-10 09:24:12 +00:00
Steve Lhomme 7735e2b2fa vout_subpictures: check the region position is set before rendering text
It's also checked when the rendered region is placed, but it's better if we check
before rendering to identify if the initialization is missing from the text rendering or
the text source.
2024-04-09 07:14:12 +00:00
Steve Lhomme b92c25d085 subpicture: init the position of the PIP region
It's positioned at the center of the display by default as the PIP doesn't set any
alignment or set the absolute flag.

It was the value set by the calloc before 4f0d7e7731.
2024-04-09 07:14:12 +00:00
Steve Lhomme dc6eb5e78e video_text: only init i_x/i_y once
No need for extra math.
2024-04-09 07:14:12 +00:00
Thomas Guillem 0587956a91 aout: move first_pts init in stream_Synchronize
And share the same lock instance.

timing.first_pts is now only valid when using timing_report
(stream->timing struct should not be used when using time_get)
2024-04-09 06:17:59 +00:00
Thomas Guillem 71eec7349f aout: move timing rate fixup in stream_Synchronize
And share the same lock instance.
2024-04-09 06:17:59 +00:00
Thomas Guillem 9e560b691f aout: remove early clock update on rate change
This partially reverts commit 08cd94d484

The noticeable change is hard to detect and it makes the code way more
complex (and can mess the clock).
2024-04-09 06:17:59 +00:00
Fatih Uzunoglu 4134f7f3ef aout: respect AOUT_VOLUME_MAX in aout_volumeUpdate() 2024-04-09 03:57:08 +00:00
Thomas Guillem 1727b938bf aout: remove original_pts
Partial revert of 9d4bad0da0

All "audio resampler" already use the original pts (out->pts = in->pts)
(but the block->length do match the new rate).
2024-04-07 18:11:04 +00:00
Steve Lhomme 02fd6845d3 vout_subpictures: remove write-only subpicture_t absolute flag 2024-04-05 08:12:29 +02:00
Steve Lhomme 95fd2226a4 vout_subpictures: use the region absolute flag rather than the subpicture one
They should always be equal at this point.
2024-04-05 08:12:18 +02:00