Commit Graph

94 Commits

Author SHA1 Message Date
Martin Pulec
7fc14c3d51 control: added commands to (un)mute audio
In addition to already existing "mute", that toggled mutte for the
receiver, [un]mute-{sender,receiver} was added, which mutes or unmutes
the sender or receiver.
2023-09-27 09:24:47 +02:00
Martin Pulec
4f362ac85f keycontrol interactive help: pretty-print
\+ render footnote at the end instead of inline
2023-09-25 16:29:04 +02:00
Martin Pulec
8a50ff4d2e audio messages: rename MUTE->MUTE_TOGGLE
* the MUTE commands are actually mute-toggle
2023-09-25 16:29:03 +02:00
Martin Pulec
9c015f96ad audio control: refactorize a bit
Moved all audio commands handled by control socket to single function.
2023-09-25 16:28:48 +02:00
Martin Pulec
fc491d02ec removed play/pause stuff
this stuff is no longer used (has been used by CoUniverse)
2023-06-29 16:30:30 +02:00
Martin Pulec
602095e38a fixed some further snprintf warns
fixes warnings with Xcode 14.3 as in previous commit

+ allocate +1 in Log_output buffer - snprintf(MULL, 0...) returns number
  of bytes without terminating '\0'. std::string storage isn't guaranteed
  to be NULL-terminated (std::string("").at(0) throws an exception). The
  buffer is somewhere preallocated 256 which prevents problem but it's
  better not to rely upon it.
+ comment out some unused function in LDGM that also triggered the
  warning but looked a bit suspicious so it was not clear how to fix
2023-04-12 12:52:07 +02:00
Martin Pulec
21b8e2e40f control socket: moved a init msg to control_start
When in control_init, it has been displayed eg. even on '-d gl:help'
while it was not accurate since the control_thread was newer run,
anyways.
2022-10-24 08:09:08 +02:00
Martin Pulec
0b157dae41 control socket: removed a duplicite function
already defined in utils/net.c
2022-10-21 09:07:42 +02:00
Martin Piatka
3acc296291 control_socket: Print listening port
This is useful when binding to a random port (--control-port 0)
2022-10-18 12:11:10 +02:00
Martin Pulec
a56a8c9c0b Fixed MSG_NOSIGNAL compat (defined in macOS 2022-03-30 16:51:34 +02:00
Martin Piatka
668df44a8e control_socket: Disallow "port n compress" messages 2022-02-02 13:47:39 +01:00
Martin Pulec
1b3b27eb7c Updated copyright dates for modified files 2021-11-08 15:43:14 +01:00
Martin Pulec
e90cdeb647 Removed msg_change_fec_data, use msg_universal
Removed msg_change_fec_data, use msg_universal instead.

This is a more versatile solution allowing further extensions without
a need to modify the global structure at an expese of worse type control.
As a replacement, a tag starting msg_universal::text is used/suggested.
2021-10-05 09:16:59 +02:00
Martin Piatka
eab94c12c0 Remove some unused includes
Removes some unused includes reported by include-what-you-use
2021-06-08 15:22:25 +02:00
Martin Pulec
efd2c70235 Platform pipe: use plain pipe if TCP compat fails
Use plain pipe if the TCP compat fails in Linux. This fixes a problem
when there is unavailable loopback connection (eg. running in a separate
network namespace with unassigned loopback address).
2020-11-10 14:04:28 +01:00
Martin Pulec
4132666cf2 Control socket: fixes
Fixed Win + fail on all errors
2020-08-24 16:17:01 +02:00
Martin Pulec
aa03b5d26f Control socket: perror->socket_error 2020-08-24 16:16:10 +02:00
Martin Pulec
48895b0783 ADD_TO_PARAM: salt is no longer needed
UNIQUE_NAME is used instead of the salt
2020-06-09 14:02:37 +02:00
Martin Pulec
07309035a5 Control: warn about unknown command 2020-04-21 18:27:57 +02:00
Martin Pulec
236f5b0589 Make: added target check and distcheck
+ added check for CppUnit
2019-11-19 08:22:50 +01:00
Martin Pulec
4c71573a89 Fixed first series of Coverity bugs 2019-11-09 17:20:37 +01:00
Martin Pulec
31d9809fcd Updated documentation
Updated authors, copyright to 3-clause BSD (where possible) and file-level Doxygen
2019-11-09 13:47:11 +01:00
Martin Pulec
822e8bf226 Print control help 2019-06-26 16:25:49 +02:00
Martin Pulec
6af07ef3e1 Allow control commands from UG terminal 2019-06-26 16:25:49 +02:00
Martin Pulec
ba632fe791 Main: improved help printing 2019-06-26 16:25:49 +02:00
Martin Pulec
087d9242cd Control socked: fixed socklen 2019-06-26 13:27:41 +02:00
Martin Pulec
cba809e293 Control socket: respect IP version selection
If user requests either -4 or -6 from command-line, the same value is
used for the control socket.
2019-06-07 15:13:08 +02:00
Martin Pulec
467cb49bd0 Control socket: use IPv4 if IPv6 not available 2019-06-07 15:12:59 +02:00
Martin Pulec
7db96528cf Name threads 2019-05-30 11:38:05 +02:00
Milos Liska
19938cfb79 Trivial compilation warning fix
src/control_socket.cpp: In function ‘void* control_thread(void*)’:
src/control_socket.cpp:574:44: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1009 [-Wformat-truncation=]
                 snprintf(buf, sizeof(buf), "(unknown path: %s)", path);
                                            ^~~~~~~~~~~~~~~~~~~~  ~~~~
src/control_socket.cpp:574:25: note: ‘snprintf’ output between 17 and 1040 bytes into a destination of size 1024
                 snprintf(buf, sizeof(buf), "(unknown path: %s)", path);
2018-10-17 19:32:42 +02:00
Martin Pulec
af700a8c8e Another small fixes 2018-08-28 10:08:56 +02:00
Martin Pulec
5567493bc6 Changed prototype of is_addr_loopback() 2018-08-24 09:13:06 +02:00
Martin Pulec
a7830d3bc2 Fixed few warnings 2018-07-24 09:38:47 +02:00
Martin Pulec
1e1017ec1a Control socket: make remote connections nonblock.
Use non-blocking socket for network connections since all sockets are
written sequentially. When one gets stuck it blocks the whole stack
(can be a case when a lot of data is produced - eg. statistics).
2018-04-24 10:51:49 +02:00
Martin Pulec
d30fb765a8 Control: report stats for audio 2018-04-24 09:59:32 +02:00
Martin Pulec
c65a90d7c5 Keyboard control: show port of control socket 2017-06-21 10:12:14 +02:00
Martin Pulec
4cd91b5387 Control socket: better error check 2017-03-17 12:21:55 +01:00
Martin Pulec
feae858c65 Validate optional commandline parameters 2017-02-23 16:30:43 +01:00
Martin Pulec
1c02c5e8b0 New way of documenting additional params (--param)
All parameters can now be listed with '--params help'.
2017-02-20 11:27:30 +01:00
Martin Pulec
c16a74d135 MSW: compat
Cleared mainly harmless warnings.
2017-02-15 10:19:12 +01:00
Martin Pulec
8ebc74eaf9 Allow set AV delay from control socket 2017-01-25 11:02:55 +01:00
Martin Pulec
116f99fd4d Main: use Jumbos when sending to ourselves
Use Jumbos when sending and receirver run in one process and communicate
through loopback.
2016-10-12 16:41:18 +02:00
Martin Pulec
f5238d8b42 Modules: added name field and allow indexing with
* Modules can now be addressed by their (optional) name identifier
  instead of numerical indices.
* This applies namely to port indexing (reflector) - ports can be now
  indexed by <host>:<port> identifiers. If <host> is a colon-separated
  IPv6 address, it is enclosed in pair of square brackets.
2016-10-10 20:44:37 +02:00
Martin Pulec
5197a11c85 Video postprocess: moved from decoder to display
This allows postprocess replacement without reconfiguring the whole
decoder (under smoe circumstances).
2016-10-10 20:44:37 +02:00
Martin Pulec
226a69de10 Fixed dynamic audio port reconfiguration 2016-07-26 15:06:11 +02:00
Martin Pulec
5e81c513a6 Control socket: communicate on loopback only
From now, communicates on loopback addresses only by default (security).
2016-06-30 11:23:14 +02:00
Martin Pulec
9153ed8e60 Control socket: extended port setting
Allow to configure also src port for the sender and ports for audio.
2016-06-29 10:37:00 +02:00
Martin Pulec
da23b458e5 Control socket: send event exit on close 2016-06-28 17:33:24 +02:00
Martin Pulec
08be232a19 Control socket: report when video prop change 2016-06-28 17:33:24 +02:00
Martin Pulec
892883df02 Fixed some Coverity bugs 2016-06-28 17:33:24 +02:00