Steve Lhomme
0c7add0995
cli: mark CLI thread as never returning
The thread never exits on its own. It's cancelable during net_Accept().
Ref. #28650
2 years ago
Alaric Senat
fff2ccbe18
cli: remove unused variable
The volume value isn't used anywhere and specifying NULL is allowed by
`vlc_player_aout_IncrementVolume`.
3 years ago
Alaric Senat
0abc313d0e
cli: remove incorrect unused mention
The variable is actually used in the function body.
3 years ago
Alaric Senat
fd72da1bd7
cli: fix various unnecessary narrowing conversions
3 years ago
Alaric Senat
32fb490288
cli: refuse wrong volume values
Disallow values that aren't between 0. and 2. as the audio output
documentation requires it.
3 years ago
Alaric Senat
933ce08544
cli: replace `atof` with `strtof`
`strtof` directly parses into a float (`atof` actually parses into
doubles) and allows us to handle overflows as ranges error.
3 years ago
Alaric Senat
ce70f053bc
cli: switch to signed iov len for `cli_writev`
Both `vlc_writev` and `writev` take signed parameters to describe the
count of buffers to write.
3 years ago
Steve Lhomme
f4ce11579a
cli: fix unused warnings
4 years ago
Romain Vimont
b7eeec2c06
cli: fix possible uninitialized read
On Android:
../../modules/control/cli/cli.c:335:9: warning: variable 'ret' is
used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
if (count > 0)
^~~~~~~~~
../../modules/control/cli/cli.c:359:12: note: uninitialized uses
occurs here
return ret;
^~~
Return an error if count == 0 in the `#ifdef HAVE_WORDEXP` branch, and
replace the if-condition by an assertion.
4 years ago
Johannes Kauffmann
5b79e0f9d0
cli: fix psz_unix_path leak
2 years ago
Rémi Denis-Courmont
ebffbb5d1d
cli: use stdc_trailing_zeros()
3 years ago
Rémi Denis-Courmont
1d4a993bb2
cli: use stdc_leading_ones()
3 years ago
Steve Lhomme
e847a77fbb
cli: use WINAPI_FAMILY to disable non-quiet mode
It's using freopen("CONOUT$") which is not supported in UWP.
3 years ago
Steve Lhomme
427484380c
cli: allow using the console width in UWP 10.0.16299
3 years ago
Steve Lhomme
55eba1ae2e
modules: include vlc_threads.h when using vlc_savecancel()
3 years ago
Johannes Kauffmann
35209fff7c
Remove double trailing semicolons
Only matching ";;\n", replaced with:
grep -lIR --include=*.{c,h,cpp,hpp} ";;\$" | xargs sed -i 's/;;\{1,\}$/;/'
3 years ago
Alexandre Janniaux
076641dceb
control: cli: copy va_list before usage
The va_list will be used multiple times, so it needs to be copied before
each usage. Without this, it crashes when doing stop / play.
3 years ago
Thomas Guillem
1c5d29d1f7
player: add a dir_path to vlc_player_SetRecordingEnabled
4 years ago
Johannes Kauffmann
67bcd48102
cli: fix unused parameter warning on Windows
/home/videolan/vlc/extras/package/win32/../../../modules/control/cli/cli.c:212:38: warning: unused parameter 'cl' [-Wunused-parameter]
static int LogOut(struct cli_client *cl, const char *const *args, size_t count,
^
4 years ago
Thomas Guillem
c0de748a3b
player: use double for the position
4 years ago
Rémi Denis-Courmont
2390f360d6
cli: print item extra meta data ( fixes #24986 )
4 years ago
Rémi Denis-Courmont
f2b463f98d
cli: print item meta data (refs #24986 )
Note that item->p_meta cannot be NULL.
4 years ago
Rémi Denis-Courmont
0b74dc4fa3
cli: factor strings
4 years ago
Rémi Denis-Courmont
85772a0e65
cli: print infos of playlist items (refs #24986 )
This matches the Lua RC info semantics. If there is an argument print
the infos of the item with that index, rather than the playing item.
4 years ago
Rémi Denis-Courmont
fd0cc5d3bb
cli: make info a playlist command
4 years ago
Rémi Denis-Courmont
82e0b9704e
cli: factor out item printing
4 years ago
Steve Lhomme
36017f9c3a
modules: add a fancy name to internal threads
4 years ago
Rémi Denis-Courmont
64f98d32c9
cli: disable tracks whence toggling ID -1
This matches the pre-4.0 behaviour expected of the track commands.
Fixes #26938 .
4 years ago
Steve Lhomme
b469857dec
vlc_threads: remove the thread priority when creating a thread
It is not used in POSIX systems. On other system it probably don't make a
difference anymore, only Windows has actual useful values for
VLC_THREAD_PRIORITY_XXX. The synchronization is more important than having some
threads called more often than others.
4 years ago
Thomas Guillem
80dd05f921
input_item: category: use a vlc_list
Instead of the legacy array.
4 years ago
Lyndon Brown
4d89ef900d
fix mis-spelling of overridden
a followup to !1044 .
4 years ago
Alexandre Janniaux
6b7a57f984
modules: fix typos
Typos found and reworked from codespell.
4 years ago
Lyndon Brown
6f68f89498
plugins: purge use of set_category()
see e967f81f6a .
note, this does **not** affect cat-based module selection items
(of which there are just three in use by the core), since that
mechanism uses subcats not cats.
7 years ago
Thomas Guillem
46f4ab44dc
cli: don't show hidden info categories
4 years ago
Steve Lhomme
3475f8e972
ticks: rename secstotimestr() to vlc_tick_to_str()
5 years ago
Steve Lhomme
a59cb66257
ticks: use a vlc_tick_t with secstotimestr()
This is what it's always used with. No need for lossy conversions to int.
5 years ago
Marvin Scholz
347f73b9a7
Only define VLC_WINSTORE_APP if true
This makes it consistent with all the other uses of such defines in
the source code, which are tested for their existence rather than the
actual value.
5 years ago
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.
5 years ago
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.
5 years ago
KO Myung-Hun
4ce56f456b
cli: fix SIGSEGV when command has an argument
Co-authored-by: Zhao Zhili <zhilizhao@tencent.com>
5 years ago
Romain Vimont
3716a7da5b
config: remove remaining "advanced" flags
The config "advanced" flag was unused and has been removed by
6a7a137f7b .
It has been removed from many add_*() macros, but not all. Remove it
from the remaining macros.
5 years ago
KO Myung-Hun
6a5e26b477
control: cli: fix 'quit' does not quit on OS/2
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
5 years ago
Rémi Denis-Courmont
a4ca0de9e0
cli: use vlc_dup2()
5 years ago
Rémi Denis-Courmont
9095693cd4
cli: don't wait for exit to reap dead clients
5 years ago
Rémi Denis-Courmont
8cf92acf06
cli: don't mess with stdout
If we don't use stdout, we should not reconfigure it.
5 years ago
Rémi Denis-Courmont
493568b3e0
cli: allow console and Unix socket modes simultaneously
This allows the interface to process commands both from the standard
input and from incoming Unix socket clients.
This also fixes a bug where socket mode would only start if the
standard input was a TTY or --rc-fake-tty was passed.
5 years ago
Rémi Denis-Courmont
44bd5fccbc
cli: simplify deleting the Unix socket
5 years ago
Rémi Denis-Courmont
b80e1b77c8
cli: simplify initialising Unix socket address
5 years ago
Rémi Denis-Courmont
6daa9c487b
cli: register commands before clients
5 years ago
Rémi Denis-Courmont
a494178e7f
cli/player: remove useless initial call
There are no clients at the time of registration; this does nothing.
5 years ago