The new Player timer API is able to signal discontinuities so there is
no need for the previous convoluted threshold detection.
When the timer callback `on_discontinuity` is called, either a
discontinuity has been signalled, coming from a seek or the media
itself, or the playback has been paused or stopped.
Pause can be detected because it's the only case where `system_date`
is a valid tick but for stopped we use the VLC_PLAYER_STATE_STOPPING
state which sets i_playback_state to PLAYBACK_STATE_STOPPED.
To clarify that VLC_PLAYER_STATE_STOPPING is used, it is added to the
switch case even if there is no behaviour change.
In addition, it removes the warning on llabs usage with float.
Fortify enabled implies a warning if we use strncpy with a length equal
to the buffer size. As we fill the last item with a null character, we
can use length-1 instead as well.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
The path in the description of a UNIX domain socket address is limited
to a fixed size, so avoid truncating the provided path if it's longer
than the corresponding sockaddr_un field and return an error while
emitting the corresponding error message.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Document that vlc_player_t functions should not be called from these callbacks.
A player function could trigger an action on the vout/aout and cause a callback
to be called => deadlock.
Remove the vlc_player_t * argument, it was never used.
Add the audio_output_t *argument for aout callbacks. It's not currently used,
it is added as symmetry with vout callbacks.
vlc_player_GetVoutFromEsId() can now return the vout used by an SPU es_id.
It also returns the vout order.
The on_vout_changed callback is also used for SPU es_ids. Users could check the
category of the es_id to know if the vout is attached to a VIDEO es or an SPU
one.
No real functional changes. Changes the callback and enum names to reflect the
real event: vout are now started and stopped. The same vout can be started and
stopped several time.
The capabilities are stored in a bitset. When it changes, it may be
useful to know its old value, to know which capability changed.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
The MPRIS2 introspection metadata contained several errors and
omissions inconsistent with the official MPRIS2.2 spec:
- The Player.Position property should be type 'x', not 'i'
- The Player.Shuffle property should be type 'b', not 'd'
- The Player.{Minimum,Maximum}Rate properties should be read-only,
not read-write
- The Player.CanGo{Next,Previous} properties were not declared,
despite being implemented
- The Player.Seeked signal was not declared, despite being emitted
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
The metadata in dbus_introspection.h was listed neither in
alphabetical order, nor in the same order used in the MPRIS2
specification. This commit reorders elements to match the spec,
making reconciliation easier. No changes made to any element.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
The user interface can be brought to the front, if present.
The MPRIS MediaPlayer2.TrackList interface is implemented.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
As a sort of VLC equivalent for strerror(), it is tempting to call it
vlc_strerror()... but that is already taken for converting actual
standard error codes to strings.
The fun part has been supported by the rotation filter for 7 years.
The serious part should be handled by the GUI and/or the video window,
under control of the operating system or windowing system.
Because:
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
Getting All properties
I don't know why 33464eacd6 introduced logic to prevent volume change
if the input is either paused, or not at all present, but from a
user's perspective this is not intuitive (as one of course can
adjust the volume even if nothing is playing).
fixes: #20897
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
A new hotkey to toggle subtitles visibility was introduced by commit
69d6f2ab18. The idea was to save the
current track id every time the subtitles track is switched via the
hotkey (v), and restore it on toggle (Shift+v).
However, the subtitle track is not necessarily changed via the hotkey:
it may be selected as a default subtitle, or switched from the menu for
example. As a consequence, the saved track id may be invalid.
To fix the issue, do not try to save the selected track id every time it
changes; instead, save it on toggle if subtitles are enabled, and
restore the track with the saved id if subtitles are disabled.
Fixes#16721
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
And revector a bit
refs #19874
(cherry picked from commit c1becb6c89f222f4d16b4ffd970ce5394d599938)
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Wait 100ms before sending new events and drop identical events.
This fixes global Desktop freeze (happening on Gnome Shell with Debian stable)
when playing some files that update metadatas too much. This can also happen
when the playlist fail to open a lot of files in a row.
This makes sure it outlives vout instances and is valid for the
whole playlist session.
hotkeys: Set sub-text-scale variable on playlist level
This makes sure it outlives vout instances and is valid for the
whole playlist session.
The do-not-queue flag is necessary to ensure that the bus name is
obtained immediately or not at all. Without it, each VLC instances gets
put into the queue for the same name.
Also, failure must be checked from the return value of the function,
not (typically) the low-level error flag.
This reverts commit e287366ad9.
This was an invalid way of fixing #18258
Having the fullscreen state properly propagated to the vout_display
fixes the issue in a more proper way
Only the core should have permission to do forceful deletion of
entities.
This patch removes a mostly static, from outside of the core, argument
to playlist_NodeDelete, while also making it safer to use as it was
previously possible for anything with access to the function to delete
read-only entities.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
There is no need to query all keys when we are only interested in the
presence of a single one; these changes simplify the implementation to
properly reflect the intent.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
There is no need to query all keys when we are only interested in the
presence of a single one; these changes simplify the implementation to
properly reflect the intent.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
The return-value of vlc_dictionary_all_keys is a null-terminated array
of the associated keys (on success), meaning that there is no explicit
need to query the count of keys.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>