Commit Graph

6281 Commits

Author SHA1 Message Date
Martin Pulec
26ea9b5cff h264_rtp: print error if receiving video not H.264 2024-01-16 12:22:55 +01:00
Martin Pulec
e74f100d5d fixed CID 434949 2024-01-16 09:01:26 +01:00
Martin Pulec
c3bb31928e vrxtx/rtsp subsessions: do not send msgs on exit
When destroying the state, ServerMediaSubsession::deleteStream callbacks
are called but we are already deconfiguring so do not send messages to
change destination (eg. audio is already destroyed so the message wont
be delivered causing warnings like:
```
Receiver audio.sender does not exist.
Receiver audio.sender does not exist.
Warning: Message queue not empty!
```

Currently this is just a dirty fix, rtsp_serv::watch would be better to
pass.
2024-01-15 16:35:30 +01:00
Martin Pulec
5017c34265 vrxtx/h264_rtp.cpp: removed conditionally rtsp compile
the file is compiled only if used, so no need for ifdef
2024-01-15 16:00:08 +01:00
Martin Pulec
f08c736ff3 audio: log receiver/port change 2024-01-15 16:00:08 +01:00
Martin Pulec
e5ef4d512e audio_*_process_message: reindent
just a reindention and small warning fixes (like NULL->nullptr), no
functional change
2024-01-15 16:00:08 +01:00
Martin Pulec
2a31adbe1e vrxtx/rtp: return error on wrong msg type
Until now, just a warning was issued for known but unsupported messages,
now all unknown/unsupported is handled and the error is returned via
the control.
2024-01-15 16:00:07 +01:00
Martin Pulec
c2eaa1c1fe rtp_video_rxtx::process_sender_message: reindent
The indention was needlesly big - indented case branch and also block
iside it (when present). Just the reindent, no func change.
2024-01-15 16:00:02 +01:00
Martin Pulec
180a030268 video_rxtx/rtp: change logging prefix
"[control] " was used to reflect that the commands get from the control
channel but it is slightly misleading so replace it with module-specific
prefix (consistent with other modules).
2024-01-15 14:04:34 +01:00
Martin Pulec
2ea590884b RTP RXTX: reformat includes/using 2024-01-15 14:00:45 +01:00
Martin Pulec
6012ecd631 GL: set win limits noresizable for Windows
Unfortunately when the window is bigger than the desktop size, the
behavior is different in Windows and Wayland:

1. in Windows, it is needed to set the limits and not to set
GLFW_RESIZE=GLFW_FALSE

2. in Wayland, GLFW_RESIZE must be set to GLFW_FALSE (calling
glfwSetWindowSizeLimits() and not setting GLFW_RESIZE=GLFW_FALSE is
not enough)
2024-01-15 13:24:14 +01:00
Martin Pulec
5bc37c4aad GL: added noresizable option
This option is (besides the obvious use-case) particularly useful when
window is bigger than active display resolution, in which case GLFW tend
to resize the window to fit the screen, which may not be always desired.
2024-01-15 13:24:12 +01:00
Martin Pulec
e9eeec2d0f GL: store some hints in map 2024-01-15 10:25:28 +01:00
Martin Pulec
aac018a90b GL: refubrished fixed_size
Print in help and do not write deprecation notice - it can be still be
used without dimensions to ensure that window will not be resized.
2024-01-15 10:09:11 +01:00
Martin Pulec
a033fe2f2f GL: fixed includes/macros
Avoid using UG-specific platform macros (HAVE_LINUX/MAVE_MACOSX/WIN32)
and use a generic ones instead. This allows removeing config_*.h.

Also removed unused includes and sorted.
2024-01-15 09:55:01 +01:00
Martin Pulec
d4f80efa56 dshow: fail on unknown opt + opt prefixes 2024-01-12 14:45:14 +01:00
Martin Pulec
72c0354061 dshow get_friendly_name: print failed idx
Print failed device index in help.
2024-01-12 14:29:15 +01:00
Martin Pulec
c53a4889ba dshow: print capturing device name
factor out the common code
2024-01-12 14:20:16 +01:00
Martin Pulec
48cbffa345 debug.h: include config.h
DEBUG macro is usedi in this file and it is defined with autoconf in
config.h.
2024-01-12 08:52:22 +01:00
Martin Pulec
6ff7d1e347 resize: fixed missing NEAREST_EXACT in U20.04 2024-01-11 16:47:38 +01:00
Martin Pulec
3423636c41 resize: fixed clang-tidy complains 2024-01-11 16:47:38 +01:00
Martin Pulec
3425746ed7 resize: accept also decimal point resize factor 2024-01-11 16:47:38 +01:00
Martin Pulec
3996ed6d8a resize: print autoselected interpolation algorithm
\+ fixed mapping "nearest_exact" (was mapped to INTERNEAREST)
2024-01-11 16:47:37 +01:00
Martin Pulec
bfd34006d0 resize: refactor + simplified
Expose the struct with parameters passed to acutal resize than passing
individual parameters.

\+ measure duration also for resize defined with a ratio (only if DEBUG
is specified)
2024-01-11 16:47:37 +01:00
Martin Pulec
7e46764e87 resize cap. f.: support for algorithm spec 2024-01-11 14:59:05 +01:00
Martin Pulec
36b0b01d5b resize: moved opt parsing to parse_fmt 2024-01-11 11:53:05 +01:00
Martin Pulec
0cfdd0f2af resize_utils: removed unneeded config.h 2024-01-11 10:11:36 +01:00
Martin Pulec
1528b504ea RTSP: fixed leaked Destination on TEARDOWN/timeout
attributes were set to NULL without deleting the content
2024-01-09 16:20:58 +01:00
Martin Pulec
1ad7722a67 RTSP: support stream redirect
When the client doesn't call TEARDOWN (like ffplay doesn't),
the stream could not have been played until the timeout (given by
`reclamationTestSeconds`). After that (or when TEARDOWN was called),
`BasicRTSPOnlySubsession::deleteStream()` is called allowing the new
stream.

After this change, the stream can be redirected withot explicit TEARDOWN
or timeout.
2024-01-09 16:20:18 +01:00
Martin Pulec
64d088f5e7 SDP: set audio ch count 2 for Opus
According to RFC 7587, channel count must be set always to 2 (actual
channel count like mono is signalized in-band in Opus)
2024-01-08 17:18:31 +01:00
Martin Pulec
edc39dbe90 set default audio ch count to 1 for RTSP/SDP
needed for SDP
2024-01-08 17:06:54 +01:00
Martin Pulec
2e4040bc8c RTSP: disable streaming over TCP
Not implemented by UG and eg. mpv (0.36.0) requests TCP (if
`--rtsp-transport=udp` is not specified).
2024-01-08 14:57:28 +01:00
Martin Pulec
dbbb6d0963 fixed BasicRTSPOnlySubsession snprintf
Fixes the commit 580ac72e from 13th Apr 2023.
2024-01-08 14:57:09 +01:00
Martin Pulec
6e637c37cb opt protocol: old protocol opts fixes
fixed legacy --video-protocol and --audio-protocol handling
2024-01-08 11:36:16 +01:00
Martin Pulec
5b0b996164 transmit: prefix FEC ss printout with MOD_NAME 2024-01-04 10:51:32 +01:00
Martin Pulec
aaa59980a9 transmit: print symbol size always in debug2
The symbol size is printed only once (or more precisely few times,
because it is guarded by a thread-local variable and the sending may
pick a different runner). This, however, doesn't give representative
numbers when frame sizes differ (== compressed) because then may also FEC
symbol sizes so print it unconditionally at least with debug2 log level.

refers to GH-361
2024-01-04 10:44:56 +01:00
Martin Pulec
0bba07ca30 video switcher: rebased includes
- do not use confg*h (not needed)
- include sys hdrs first
2024-01-03 16:48:52 +01:00
Martin Pulec
9a2d984163 video switcher help: improve desc
wrap + notice how to actually switch
2024-01-03 16:45:47 +01:00
Martin Pulec
7bea8c0553 video switcher help: notice about pos args
Added notice about video-related positional arguments as capture filter
or audio.

\+ use color_printf where formatting macros were used (otherwise ANSI
esc sequences won't be stripped if output is not a tty)
2024-01-03 16:40:17 +01:00
Martin Pulec
6f72e8b746 video switcher: use logger instead of printfs 2024-01-03 15:41:31 +01:00
Martin Pulec
76092a31ee video switcher: refactor init
moved parse_fmt to separate fn
2024-01-03 15:39:05 +01:00
Martin Pulec
0e97fba40e lavc video: fixed crash when reinit fails
Fixed a crash in situation where compressing stream with properties A,
then B but init fails and then again A.

This can occur when using switcher for 1->2->1 when compress reconf
fails for 2. But because `saved_desc` is set if reconf succeeds and
was already set on first configure, the state is inconsistent because
partially de/configured for 2 but it looks like it is still correctly
configured to input 1 because `saved_desc` was not cleared.

refers to GH-365
2024-01-03 14:49:21 +01:00
Martin Piatka
20648d944a lavd: Fix SEGV on unknown sw_pix_fmt (libdav1d)
avcodec only guarantees that sw_pix_fmt is set before calling the
get_format callback. However for libdav1d the callback is for some
reason never called and sw_pix_fmt is not set.

So just use the pix_fmt if sw_pix_fmt is unset. Not sure if this is the
best fix, but it works in this case and doesn't break anything.
2023-12-18 12:55:00 +01:00
Martin Piatka
03706bc2e1 vulkan_sdl2: Size autodetect when :size=-1x-1
Useful when running without WM (#364). Perhaps we could eventually use
this behaviour for fullscreen by default (since we already do something
similar in the glfw display).
2023-12-06 13:19:57 +01:00
Martin Pulec
9575c24b79 lavc: include config.h unconditionally
needed for PACKAGE_BUGREPORT
2023-12-04 13:06:16 +01:00
Martin Pulec
574a33da0a lavc: enable header_inserter for h264_amf
AMD RX 7600 needs this even though header_spacing is set to 1. RX 580
didn't need this.
2023-12-04 12:43:25 +01:00
Martin Pulec
acf3320143 lavc header_inserter: fixed inverted condition 2023-12-04 12:34:01 +01:00
Martin Pulec
a6088cc26c vidcap Syphon: improved includes 2023-12-04 12:34:01 +01:00
Martin Pulec
4b981ddb50 swmix: Coverity fixes
- suppressed CID 424203 - move old audio data free outside the lock
(to indicate that network_audio_buffer is not needed to be guarded by
the lock)

- suppressed CID 424228 - assign video frame data from network buffer
in the locked section - similarly as for the above, it is actually not
guarded by the lock but this is just done to suppress the warning (and
is also shorter to assign on single line)
2023-12-01 16:02:52 +01:00
Martin Pulec
248a8e0e9a swmix: fixed including 2023-12-01 16:02:49 +01:00