Commit Graph

1936 Commits

Author SHA1 Message Date
Rémi Denis-Courmont f0ce0abb31 cli: split rc.c in separate files
(no functional changes)
2020-10-16 21:36:25 +03:00
Steve Lhomme 22ad23fdfd dbus: avoid vlc_tick_t conversion from hardcoded values 2020-08-17 16:13:48 +02:00
Steve Lhomme c2a51d3107 dbus: fix vlc_tick_t value test
Either from the algorithm or the type of vlc_tick_t, it can never be bigger
than INT64_MAX.
2020-08-17 16:13:48 +02:00
Steve Lhomme 2101e03e19 control: rc: display the number of late frames in the media stats 2020-08-13 14:06:54 +02:00
Rémi Denis-Courmont 0b6f8e5c7c Check for <poll.h> explicitly 2020-06-08 16:50:39 +03:00
Steve Lhomme 4d2df8f879 modules: remove unneeded signal.h include 2020-05-18 16:18:14 +02:00
Alexandre Janniaux a33ac07870 dbus: replace discontinuity detection by player timer
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.
2020-04-11 08:56:35 +02:00
Alexandre Janniaux 42b1ccbc6a control: dbus: fix error path
The error path was shifted one label too soon, meaning that object that
couldn't be created got destroyed too.
2020-04-11 08:56:35 +02:00
Alexandre Janniaux 32398a9aeb dbus: remove stray lines 2020-04-11 08:56:35 +02:00
Rémi Denis-Courmont a18c4d6570 thread: remove vlc_cond_destroy() 2020-02-21 19:17:53 +02:00
Rémi Denis-Courmont a3226cf890 thread: remove vlc_mutex_destroy() 2020-02-21 19:16:09 +02:00
Alexandre Janniaux 67b03447cf control: rc: avoid stringop-truncation warning
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>
2020-02-13 12:15:39 +01:00
Alexandre Janniaux 605fbc81af control: rc: avoid sun_path longer than expected
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>
2020-02-13 12:15:39 +01:00
Thomas Guillem bb4d4abf5c player: rework aout/vout callbacks
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.
2019-08-26 09:27:21 +02:00
Thomas Guillem 9d25fc2193 player: rename vlc_player_vout_OSDMessage
To vlc_player_osd_Message.
2019-08-13 18:08:27 +02:00
Rémi Denis-Courmont 542df0f3ad Use set_callback() where applicable 2019-07-18 18:58:10 +03:00
Steve Lhomme 125ddf8c36 unimotion: fix const strings passed as non const
Signed-off-by: Felix Paul Kühne <felix@feepk.net>
2019-07-17 10:22:14 +02:00
Steve Lhomme 6add3c0552 ntservice: fix warning on losing const attribute 2019-07-15 09:21:51 +02:00
Thomas Guillem 11e6645313 rc: add "record" command 2019-07-12 13:16:20 +02:00
Roland Bewick 38ac694169 hotkeys: handle secondary subtitles options
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-06-25 20:50:07 +02:00
Thomas Guillem c896210b00 player: get vout and vout_order from VIDEO/SPU es_ids
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.
2019-06-25 20:50:07 +02:00
Thomas Guillem dd5ba72db7 player: add a policy to vlc_player_SelectEsId
This will replace the future vlc_player_AddEsId() function (simultaneous).
2019-06-25 20:50:07 +02:00
Thomas Guillem cb1b9717d0 player: rename vlc_player_*Track to EsId
In order to clearly identify functions using a vlc_es_id_t*.
And add Track helpers.
2019-06-20 11:00:35 +02:00
Thomas Guillem b25d1b3484 hotkeys: use own subtitle sync implementation 2019-06-20 08:35:09 +02:00
Thomas Guillem f00932a33e hotkeys: pass intf to handlers 2019-06-20 08:35:06 +02:00
Thomas Guillem 57d834cd27 include vlc_input_item.h instead of vlc_input.h 2019-06-03 16:15:55 +02:00
Thomas Guillem ee4afd6821 remove unused #include <vlc_input.h> 2019-06-03 16:15:55 +02:00
Thomas Guillem 42e8a35e76 player: associate ES ids in vout_changed event
This will allow API users to clearly identify vouts.
2019-06-03 16:15:55 +02:00
Rémi Denis-Courmont 03be397d82 rc: don't define --rc-unix is not available 2019-05-30 12:34:50 +03:00
Thomas Guillem ae0f98f72f rc: fix item leak
There is no need to hold the item since the player is locked while it is
accessed.

Fixes #22328

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2019-05-28 20:26:30 +03:00
Thomas Guillem 60220ade56 rc: lock the player only once while processing commands
And avoid racy states due to successive lock/unlock

Refs #22328

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>

Conflicts:
	modules/control/rc.c
2019-05-28 20:25:59 +03:00
Rémi Denis-Courmont e22b496b5f rc: fix potential use-after-free 2019-05-28 20:23:30 +03:00
Rémi Denis-Courmont b5543e33a8 rc: add cli and oldrc aliases 2019-05-28 19:56:21 +03:00
Rémi Denis-Courmont 1f128ba388 rc: rename back to rc from oldrc 2019-05-28 19:56:21 +03:00
Rémi Denis-Courmont 60eb593c18 rc: fix potential use-after-free 2019-05-28 19:56:21 +03:00
Rémi Denis-Courmont a862cfbdab rc: move outstanding void commands to table 2019-05-28 19:56:21 +03:00
Rémi Denis-Courmont daf758a1e4 rc: remove unused arguments to void command handlers 2019-05-28 19:56:21 +03:00
Rémi Denis-Courmont 8ecf33f5db rc: split out snapshot command
(and avoid nonsensical string comparison on void variable)
2019-05-28 19:56:21 +03:00
Rémi Denis-Courmont a29f55d397 rc: use separate callback for void player commands 2019-05-28 19:56:21 +03:00
Rémi Denis-Courmont 5c5007d957 rc: use separate callback for void playlist commands 2019-05-28 19:56:21 +03:00
Rémi Denis-Courmont 7721510638 rc: pass intf_thread_t rather than vlc_object_t pointer 2019-05-28 19:56:21 +03:00
Rémi Denis-Courmont 23a7951266 rc: don't name macro and function the same 2019-05-28 19:56:18 +03:00
Rémi Denis-Courmont 0c99962f65 rc: don't block input/playlist commands when paused
Lua RC does allow them.
2019-05-28 19:56:08 +03:00
Rémi Denis-Courmont d3af793572 rc: use a table for commands with parameters 2019-05-28 19:56:08 +03:00
Rémi Denis-Courmont 1133a865e0 rc: use a table for parameter-less commands 2019-05-28 19:56:08 +03:00
Rémi Denis-Courmont 5458013bf8 rc: move command processing to separate function 2019-05-28 19:56:08 +03:00
Rémi Denis-Courmont 2aee653993 rc: add missing static qualifier 2019-05-28 19:56:08 +03:00
Rémi Denis-Courmont 16011d3745 rc: reorder to avoid forward declarations 2019-05-28 19:56:08 +03:00
Rémi Denis-Courmont 24c528d2fd oldrc: remove unused return values 2019-05-19 20:19:43 +03:00
Rémi Denis-Courmont 872f721a95 oldrc: inline Quit() 2019-05-19 20:19:43 +03:00
Rémi Denis-Courmont 2dced88706 oldrc: inline statistics update 2019-05-19 20:19:43 +03:00
Rémi Denis-Courmont ac3bb239ae oldrc: remove unused oldval and data arguments 2019-05-19 20:19:43 +03:00
Rémi Denis-Courmont 12900e5e7b oldrc: command call handler functions directly
...instead of going through the variable subsystem.
2019-05-19 20:19:43 +03:00
Rémi Denis-Courmont 16f4ac4701 oldrc: remove dead code
There are no "command" variables on the LibVLC instance object left.
2019-05-19 20:19:43 +03:00
Thomas Guillem 800a530f3e hotkeys: re-indent after last commit 2019-05-10 09:22:51 +02:00
Thomas Guillem aa6d395b62 player: change vout events
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.
2019-05-10 09:22:51 +02:00
Rémi Denis-Courmont c182eacdad dbus: avoid precedence warning 2019-05-08 18:41:20 +03:00
Romain Vimont 50c0fa5d65 player: pass old_caps to on_capabilities_changed
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>
2019-05-03 09:52:31 +02:00
FeRD (Frank Dana) 48e593f164 dbus: Correct introspection data
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>
2019-04-30 10:26:48 +02:00
FeRD (Frank Dana) 3b7e27afc6 dbus: Reorder introspection to match spec
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>
2019-04-30 10:26:48 +02:00
Rémi Denis-Courmont 0fc1c56d66 oldrc: fix warning 2019-04-14 10:15:47 +03:00
Rémi Denis-Courmont 318a2102ea oldrc: fix format strings
Fix support for 32-bits platforms.
Regression from 46ea30cd17.
2019-04-14 10:15:47 +03:00
Victorien Le Couviour--Tuffet 46ea30cd17 oldrc: use new playlist / player
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-04-10 14:11:52 +02:00
Victorien Le Couviour--Tuffet f9c971daef hotkeys: use new playlist / player and refactor
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-04-10 14:11:52 +02:00
Victorien Le Couviour--Tuffet 06e4e42bf7 actions: reorder into relevant sections
This is used by the next commit for refactor purposes.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-04-10 14:11:52 +02:00
Victorien Le Couviour--Tuffet fe676e9d1d gestures: enhance gesture detection
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-04-10 14:11:52 +02:00
Victorien Le Couviour--Tuffet be98642508 gestures: use new playlist / player
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-04-10 14:11:52 +02:00
Victorien Le Couviour--Tuffet b9c656d103 dbus: fix MPRIS MediaPlayer2 interface properties
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>
2019-04-10 14:11:52 +02:00
Victorien Le Couviour--Tuffet 688bc9ec9b dbus: use new playlist / player
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-04-10 14:11:51 +02:00
Thomas Guillem 802ec079d2 win_msg: use new playlist / player 2019-04-10 14:11:51 +02:00
Thomas Guillem ea87e14247 netsync: disable for now 2019-04-10 14:11:51 +02:00
Steve Lhomme 987e7371bb ntservice: don't use a temporary conversion to printf a wide char string 2019-04-03 10:44:55 +02:00
Steve Lhomme 2f7271eaff modules: use WCHAR when calling wide char Win32 APIs 2019-04-03 10:28:49 +02:00
Steve Lhomme 2388076261 modules: use TEXT() for strings calling wide char Win32 APIs
_T() is for TCHAR
2019-04-03 09:55:34 +02:00
Thomas Guillem 42e344eb87 intf: change intf_Create argument
Use a libvlc_int_t *. This will ease the playlist_t => vlc_playlist_t
transition.
2019-03-08 09:34:31 +01:00
Rémi Denis-Courmont d2c1bc4433 aout: introduce aout_Hold() and aout_Release()
Type-safe replacements for vlc_object_hold() and vlc_object_release()
(as discussed during the last workshop).
2019-03-06 22:53:24 +02:00
Rémi Denis-Courmont a990818d1a vout: introduce vout_Hold() and vout_Release()
Type-safe replacements for vlc_object_hold() and vlc_object_release()
(as discussed during the last workshop).
2019-03-06 22:53:24 +02:00
Rémi Denis-Courmont d55765b605 input: introduce input_Hold() and input_Release()
Type-safe replacements for vlc_object_hold() and vlc_object_release()
(as discussed during the last workshop).
2019-03-06 22:53:23 +02:00
Rémi Denis-Courmont 2be48939dc playlist: playlist_GetAout returns an audio_output_t *
Remove casts to vlc_object_t.
2019-03-06 22:52:57 +02:00
Rémi Denis-Courmont 3e8986472a Rename vlc_error() to vlc_error_string()
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.
2019-03-04 22:02:35 +02:00
Rémi Denis-Courmont 99232e607b motion: remove control interface
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.
2019-03-04 17:38:49 +02:00
Victorien Le Couviour--Tuffet 4b584f2cc3 hotkeys: fix mouse wheel down event
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2019-03-04 11:19:42 +01:00
Rémi Denis-Courmont 1e37912ef3 dbus: remove unused variables 2019-03-02 21:28:26 +02:00
Rémi Denis-Courmont 9fc98d6125 dbus: remove useless hold/release
The code assumes that the input is valid in the first place.
2019-02-28 21:20:32 +02:00
Rémi Denis-Courmont e48a8a9eb2 objects: add vlc_object_instance()
...instead of open-coded access to obj->obj.libvlc
2019-02-19 18:05:35 +02:00
Thomas Guillem 797a8dce4e input: change INPUT_RATE_MAX/INPUT_RATE_MIN
Inverse them. Indeed, INPUT_RATE_MAX was the min and INPUT_RATE_MIN was the
max. The dbus module did the mistake.
2019-02-15 16:34:55 +01:00
Thomas Guillem c42f3d1bc6 dbus: remove "Getting All properties" log
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
2019-02-15 15:39:09 +01:00
Steve Lhomme 5363279805 remove the $Id$ in the source code 2019-01-17 12:21:18 +01:00
Thomas Guillem 034a3f75a2 core: move playlist to playlist_legacy
To make room for the new playlist.
This playlist_legacy will be removed once all modules are using the new
playlist.
2018-11-15 14:54:00 +01:00
Rémi Denis-Courmont 61ee6ca1c0 oldrc: factor message formatting 2018-11-11 17:32:01 +02:00
Francois Cartegnie d20f77eb38 hotkeys: change text scale increments (refs #21432) 2018-11-08 14:05:13 +01:00
Rémi Denis-Courmont cef290c89d dbus: use playlist_IsEmpty()
...rather than playlist_CurrentSize().
2018-10-20 23:50:21 +03:00
Thomas Guillem 130d97d7cc control/oldrc: remove abort() usage
And add a goto error since a new check will be needed with the future
player/playlist.
2018-09-28 16:45:04 +02:00
Steve Lhomme 020df32e5b hotkeys: the jump value is not an vlc_tick_t but a number of seconds 2018-09-20 11:31:59 +02:00
Steve Lhomme 88b7d85136 input: use vlc_tick_t for the input "length" variable 2018-09-20 11:31:37 +02:00
Steve Lhomme f04e6ce332 input: use vlc_tick_t for the input "time" variable 2018-09-20 11:31:37 +02:00
Steve Lhomme b3f5af2dd7 modules: transform vlc_tick_t value to seconds with SEC_FROM_VLC_TICK 2018-09-19 13:22:52 +02:00
Steve Lhomme 5c96b764a9 hotkeys: init/reset the subtitle/audio delay with VLC_TICK_INVALID 2018-09-19 11:57:27 +02:00
Steve Lhomme edc5babc16 modules: transform vlc_tick_t value to milliseconds with MS_FROM_VLC_TICK 2018-09-19 11:57:21 +02:00
Romain Vimont 53009d018b vlc_arrays: refactor foreach loop
Replace:

    FOREACH_ARRAY(item, array)
       // ...
    FOREACH_END()

by:

    ARRAY_FOREACH(item, array)
    {
        // ...
    }

Note that it is not possible to declare the iteration variable directly
anymore:

    ARRAY_FOREACH(void *item, array)

Instead, use:

    void *item;
    ARRAY_FOREACH(item, array)

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2018-08-29 11:59:41 +02:00
Steve Lhomme 72466c75ec vlc_input_item: rename INPUT_DURATION_UNKNOWN to INPUT_DURATION_INDEFINITE
For sources with no exact time limits, therefore it should not be used as such.
2018-07-30 07:15:30 +02:00
Filip Roséen 91450e0f82 control: oldrc: make it possible to adjust volume without playback
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>
2018-07-25 11:15:57 +02:00
Hugo Beauzée-Luyssen d36e369e6a core: Remove old medialibrary 2018-07-17 23:53:01 +02:00
Pierre Lamot 09003c7627 ntservice: fix service command line truncated when using very long arguments
Close #20823

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2018-07-13 13:50:00 +02:00
Jean-Baptiste Kempf b007abf4c3 Remove RealRTSP plugin
Move to 21st century!
2018-07-11 18:50:49 +02:00
Steve Lhomme 51cb7df9ed modules: make use of the special duration value INPUT_DURATION_UNKNOWN
Instead of a hardcoded value (which is not VLC_TICK_INVALID)
2018-07-07 10:16:25 +02:00
Rémi Denis-Courmont 674aa28b6f hotkeys: fix format string
Regression from tick rework.
2018-07-06 19:44:32 +03:00
Steve Lhomme 18449933c8 modules: transform vlc_tick_t value to milliseconds with MS_FROM_VLC_TICK 2018-07-06 15:40:12 +02:00
Steve Lhomme 09d07968d6 hotkeys: replace hardcoded CLOCK_FREQ fractions by VLC_TICK_FROM_MS()
Easier to read and more explicit.
2018-07-05 16:41:41 +02:00
Steve Lhomme 641fb7d958 dbus_player: return the ticks in microseconds 2018-07-05 08:10:54 +02:00
Steve Lhomme 810840157d hotkeys: the audio/subtitle time are vlc_tick_t
They either get 0 or vlc_tick_now().
2018-07-03 16:13:30 +02:00
Steve Lhomme 026e60e342 core: the "spu-delay" is stored in vlc_tick_t
Convert the read/writes accordingly
2018-07-03 16:13:30 +02:00
Steve Lhomme 911569be2c modules: convert variables in seconds to ticks using vlc_tick_from_sec() 2018-07-03 15:28:24 +02:00
Steve Lhomme 1f17997348 rename VLC_TS_INVALID to VLC_TICK_INVALID 2018-07-03 07:10:07 +02:00
Steve Lhomme b4dfbc6283 rename mdate() to vlc_tick_now()
The lua "mdate" remains the same.
2018-06-22 13:32:10 +02:00
Steve Lhomme 8b0c6bb9fa rename msleep() to vlc_tick_sleep() 2018-06-22 13:29:09 +02:00
Steve Lhomme a6149e2c1e include: rename vlc_mtime.h to vlc_tick.h 2018-06-22 13:26:57 +02:00
Steve Lhomme ff56c92a5e rename mtime_t to vlc_tick_t
Keep a copy of vlc_tick_tfor backward compatibility.
2018-06-22 13:19:24 +02:00
Rémi Denis-Courmont d03f37b50d hotkeys: fix logic, copy-paste error
Regression from 73e4a2e888.
2018-06-17 11:25:36 +03:00
Steve Lhomme 5bb86a0cb4 oldrc: the value read from atoi is in seconds not mtime_t 2018-06-14 16:40:32 +02:00
Steve Lhomme 73e4a2e888 hotkeys: the delay up/down are processed in mtime_t
And with 50ms inc/decrements
2018-06-14 16:15:20 +02:00
Rémi Denis-Courmont 517a7e7b3f input item: use vlc_list for per-category infos 2018-06-13 19:30:19 +03:00
Erwan Tulou d1a4415266 hotkeys: fix crash when zooming 2018-06-11 23:08:48 +02:00
Rémi Denis-Courmont 0b3b1edf14 variables: use table of vlc_value_t for VLC_VAR_GETCHOICES
This simplifies the notation. No function differences.
2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont 7a51579af2 hotkeys: separate immediate and string list handling 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont d5e48f174c hotkeys: remove tautology test 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont 93b9545fe0 hotkeys: simplify 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont 5882b2590f hotkeys: appropriate var_FreeList() 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont 7048874668 variables: inline var_FreeList() in simple loops
This works like config choices.
2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont 5d31da4eca variables: replace var_FreeList() with free()
...where applicable.
2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont 5e50399a45 variables: add count parameter for VLC_VAR_GETCHOICES 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont 34925c7cb5 variables: use char *** for VLC_VAR_GETCHOICES texts 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont 1b380f31b1 variables: use char ** for VLC_VAR_GETTEXT 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont 1fd0844ee7 oldrc: fix leak 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont 2d605364a6 hotkeys: don't query unused texts 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont abfcbbbcee gestures: don't query unused texts 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont 63ce436225 variables: pass vlc_list_t directly with VLC_VAR_GETCHOICES 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont fe5fbf4349 variables: remove useless VLC_VAR_GETTEXT parameter 2018-06-10 13:08:44 +03:00
Rémi Denis-Courmont c95ca64e31 hotkeys: fix race on sys.vrnav.b_can_change 2018-06-06 19:58:34 +03:00
Rémi Denis-Courmont 027d4c43bd hotkeys: missing vout events (refs #20617) 2018-06-06 19:58:34 +03:00
Rémi Denis-Courmont 62fc1d1f86 hotkeys: take care of mouse wheel "key" events 2018-05-31 21:34:59 +03:00
Rémi Denis-Courmont bd00749be9 playlist: move pop-up menu variable 2018-05-31 21:07:31 +03:00
Rémi Denis-Courmont d0a4204fb2 hotkeys: handle pop-up menu setting 2018-05-31 21:04:34 +03:00
Rémi Denis-Courmont 4cedca0714 playlist: move FSC trigger and make it void 2018-05-31 21:00:14 +03:00
Rémi Denis-Courmont 0dbffe88b7 hotkeys: handle FSC toggling 2018-05-31 20:56:19 +03:00
Rémi Denis-Courmont 80acfd8982 hotkeys: use MOUSE_BUTTON_LEFT 2018-05-31 20:53:57 +03:00
Rémi Denis-Courmont 6f485a389b playlist: move intf-boss variable 2018-05-31 20:06:41 +03:00
Rémi Denis-Courmont 4c1816844e playlist: move intf-show and make it void 2018-05-31 20:06:41 +03:00
Romain Vimont bb21396e96 hotkeys: fix first subtitles toggle
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>
2018-05-05 14:18:23 +02:00
Rémi Denis-Courmont d979cceee9 dbus: do not subtract VLC_TS_INVALID 2018-05-04 19:16:27 +03:00
Steve Lhomme 04db84cd9c modules: replace use of 1000000 on time values by CLOCK_FREQ
Modified-by: Thomas Guillem <thomas@gllm.fr>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2018-05-04 11:29:09 +03:00
Rémi Denis-Courmont e3eddd4f7a mtime: remove LAST_MDATE
Almost every existing use cases uses INT64_MAX directly already. Also,
the signedness was wrong.
2018-05-02 18:57:00 +03:00
Romain Vimont 35a5a0ab24 hotkeys: fix SPU scaling limits
Otherwise it's impossible to reset the value to 100%
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2018-04-19 13:07:06 +02:00
Rémi Denis-Courmont 3ddb87f88a oldrc: fix assertion failure (fixes #20123) 2018-03-23 06:43:58 +02:00
Hugo Beauzée-Luyssen dab13a3c28 intromsg: Ensure non-ascii characters are properly displayed on win32 2018-03-21 10:29:44 +01:00
Hugo Beauzée-Luyssen b349484398 dummy intf: Deprecate dummy-quiet option 2018-03-21 10:29:13 +01:00
Hugo Beauzée-Luyssen 2bc26eb597 dummy: Never show intromsg 2018-03-21 10:21:03 +01:00
Hugo Beauzée-Luyssen f729d67bfa oldrc: Handle non-ascii character
And revector a bit
refs #19874

(cherry picked from commit c1becb6c89f222f4d16b4ffd970ce5394d599938)
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2018-03-14 09:54:38 +01:00
Rémi Denis-Courmont 52341c8b3d config: remove unused config_PutPsz() parameter 2018-02-28 20:07:26 +02:00
Hugo Beauzée-Luyssen 8c1c9a4322 oldrc: Accept backward compatible hosts
Fix #19871
2018-02-28 17:52:49 +01:00
Thomas Guillem 9c146272d0 dbus: don't spam dbus events
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.
2018-02-09 09:24:04 +01:00
Thomas Guillem 52355cde73 dbus: don't send twice the same event
And don't wake up the main loop if the event was a duplication.
2018-02-09 09:23:59 +01:00
Rémi Denis-Courmont 0a74b077bc Old RC: fix assertion on "stats" 2017-12-12 20:53:01 +02:00
Rémi Denis-Courmont 3fccdd190b Old RC: do not show nonexistent sout stats 2017-12-12 20:36:01 +02:00
Rémi Denis-Courmont cc70e92424 stats: remove the lock
The containing input item lock already must be held while reading or
writing statistics, so this is redundant.
2017-12-11 21:34:14 +02:00
Hugo Beauzée-Luyssen 75de9dccf5 dbus: Add missing error check
CID #1211816
2017-11-24 16:29:29 +01:00
Hugo Beauzée-Luyssen cb96ac02ce dbus_player: Fix leaks on error
CID #1048913
2017-11-22 17:37:56 +01:00
Rémi Denis-Courmont b8a7536f85 ntservice: do not use MODULE_STRING 2017-11-18 21:41:31 +02:00
Thomas Guillem a76091852d win_msg: use vlc_alloc helper 2017-11-11 18:59:19 +01:00
Francois Cartegnie 9314bb489c vlc_arrays: split array_append in checked and w/abort 2017-10-25 12:33:02 +02:00
Rémi Denis-Courmont 82ace8beb0 xcb/globalhotkeys: fix variable shadowing 2017-09-07 22:02:20 +03:00
Thomas Guillem 0154e2485d hotkeys: remove viewpoint handling from navigation 2017-09-05 10:19:32 +02:00
Thomas Guillem d6bf647e3c actions: add vlc_actions_get_keycodes
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2017-08-09 10:50:37 +02:00
Thomas Guillem c46cbfef3a actions: replace libvlc->p_hotkeys
Use vlc_actions_get_key_names instead

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2017-08-09 10:48:29 +02:00
Thomas Guillem 327ecc39de actions: rename vlc_GetActionId to vlc_actions_get_id
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2017-08-09 10:48:12 +02:00
Thomas Guillem c0d287e72f core: rename vlc_keys.h to vlc_actions.h
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2017-08-09 10:48:01 +02:00
Thomas Guillem 324c1770eb core: rename vlc_action_t to vlc_action_id_t
Since we'll need vlc_actions_t

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2017-08-09 10:47:56 +02:00
Thomas Guillem f832fa6870 hotkeys: fix unused warning 2017-07-25 17:55:55 +02:00
Steve Lhomme e62a4aadad hotkeys: handle viewpoint changes from the vout
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2017-07-25 16:40:51 +02:00
Thomas Guillem e61dee0091 core: move viewpoint to vlc_viewpoint.h 2017-07-25 16:40:51 +02:00
Rémi Denis-Courmont 2d40d070fd dbus: remove antilogy
This avoids bogus return-type warnings.
2017-07-23 17:26:43 +03:00
Rémi Denis-Courmont edc33fede5 globalhotleys/xcb: fix variable shadowing 2017-07-23 17:26:43 +03:00
Rémi Denis-Courmont 1ce92ecf72 oldrc: avoid shadowing 2017-07-23 17:26:43 +03:00
Rémi Denis-Courmont 3b2f515844 hotkeys: remove duplicated variable 2017-07-23 17:26:43 +03:00
Rémi Denis-Courmont f4282ec4be hotkeys: comment intended fall-throughs 2017-07-23 17:26:43 +03:00
Rémi Denis-Courmont a465a23473 hotkeys: missing break 2017-07-23 17:26:43 +03:00
Francois Cartegnie 7d49b1c033 vlc_vout: channels disambiguation 2017-06-23 14:09:20 +02:00
Francois Cartegnie 68588c1b84 vlc_arrays: add vlc_dictionary_is_empty
avoids walking every key/entry
2017-06-22 10:58:47 +02:00
David Fuhrmann d3e682d299 hotkeys: Set sub-text-scale variable on playlist level
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.
2017-06-18 22:50:21 +02:00
Rémi Denis-Courmont 05b779fb31 dbus: fix naming of multiple instances
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.
2017-06-18 18:58:25 +03:00
Rémi Denis-Courmont 2699b1d5d1 dbus: add variable to expose register bus name 2017-06-18 17:51:41 +03:00
Hugo Beauzée-Luyssen 942e24065a Revert "hotkeys: Reset scale to screen when zooming"
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
2017-06-15 16:48:44 +02:00
Filip Roséen 7aa4bec741 playlist: playlist_NodeDelete: privatize forceful delete
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>
2017-05-21 22:20:14 +03:00
Filip Roséen d2e4278b53 control/dbus: dbus_tracklist: simplify PropertiesChangedSignal
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>
2017-05-18 18:56:56 +03:00
Filip Roséen adc31fd144 control/dbus: dbus_root: simplify PropertiesChangedSignal
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>
2017-05-18 18:56:56 +03:00
Filip Roséen a8a4b7fb0f control/dbus: dbus_player: clean PropertiesChangedSignal
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>
2017-05-18 18:56:56 +03:00
Rémi Denis-Courmont 4d2fb7d36f playlist: remove mode parameter from playlist_NodeAddInput() 2017-05-14 18:44:14 +03:00
Rémi Denis-Courmont f7770d42a8 dbus: use playlist_ViewPlay() instead of PLAYLIST_GO 2017-05-14 18:44:14 +03:00
Rémi Denis-Courmont 01381e2190 oldrc: use playlist_ViewPlay() 2017-05-14 18:44:13 +03:00
Rémi Denis-Courmont 0b41b45504 hotkeys: use playlist_ViewPlay(), fix aliasing
(The node parameter must be a playlist_item_t *, cannot be a void *.)
2017-05-14 18:44:13 +03:00