Commit Graph

6301 Commits

Author SHA1 Message Date
Martin Pulec
f07dc52e77 v4l2: optimize includes
do not rely on config_unix.h
2024-01-22 16:52:35 +01:00
Martin Pulec
679acd007c video_codec: added pair of assertions
As resolved in previous commit, due to the error there may be incorrect
pixel format queried, which may lead to segfault.
2024-01-22 16:52:35 +01:00
Martin Piatka
8c1b1d3a37 control_socket: Make reported audio ch count configurable
And raise the default to 16. Refers to GH-366
2024-01-22 14:56:19 +01:00
Martin Pulec
9622095d4c display_gl_get_property: fixed codec array size
The source array size was returned, but the codec list is filtered so
the actual number may be lower.
2024-01-22 12:53:14 +01:00
Martin Pulec
45f51f8bb0 display_gl_get_property: assert correct size
Enough space is rather assumed because in the oppiste case, hard-to-detect
behavior may occur, especially while the problem is not reported.
2024-01-22 12:53:14 +01:00
Martin Pulec
a39408d231 display_gl_get_property: reformat
- reindent
- DISPLAY_PROPERTY_CODECS - early return if low size
- return in the individual switch cases immediately than later
2024-01-22 12:53:14 +01:00
Martin Pulec
0074f52b8e dshow: capture NV12
refers to GH-369
2024-01-19 16:49:59 +01:00
Martin Pulec
0c0a4036c0 dshow: print mode pName instead of ug name
NV12 will be mapped to UYVY, so instead of NV12, there will be
misleadingly written UYVY.

Actually, the FourCC stored in &pSubtype->Data could be used, because
it mostly match. Chosen approach is, however, more conservative if the
name doesn't match, because the "old-style" init with the codec name
requires the mapping back from name to subtype and there doesn't seem
to be a way to find a subtype from FourCC in genral.
2024-01-19 16:49:59 +01:00
Martin Pulec
604bbf94c5 dshow: generic error handling in init
Handle eventual error generically, currently only in init.

Print also error description (will be perhaps just a code for DShow
for now).
2024-01-19 16:49:58 +01:00
Martin Pulec
1fa19a6844 dshow: print error info 2024-01-19 16:49:58 +01:00
Martin Pulec
ee687e6ad6 dshow: do not attempt to capture on unsupp fmt
\+ ignore explicitly specified pixfmt if mode given expliclty (but issue
a warning)
2024-01-19 16:49:58 +01:00
Martin Pulec
66b17a42d6 dshow: compact BitCountMap + add VC_NONE
VIDEO_CODEC_NONE seems to be needlessly long, especially when used
mutiple times like in the struct BitCountMap being compacted.
2024-01-18 17:02:20 +01:00
Martin Pulec
f3fb8afdc0 tx_send_base (video): simplified sending (mult)
see also similar change for audio in commit 6c07a3e43 (2023-07-27)

The previous solution was using some cumbersome solution, perhaps
repeating the sequence (with mult:3) like `111222333444`.

Rewritten to be easier; also nwo the multiplication is as follows:
`123412341234`, which is perhaps better than the previous variant.
2024-01-17 16:50:05 +01:00
Martin Pulec
cf6f7cbe9d transmit vid.: comp last pkt sz in get_packet_sizes
Correctly set last packet size from get_packet_sizes() so that it doesn't
need to be adjusted later.
2024-01-17 16:50:05 +01:00
Martin Pulec
e22c97bd54 transmit: packet count - multiply always
simplification
2024-01-17 16:50:02 +01:00
Martin Piatka
c8d16f26e2 pano_gl: Recycle frames when returning to free queue 2024-01-17 16:25:55 +01:00
Martin Piatka
05864585a3 vdpau: Fix not uninitializing properly 2024-01-17 16:25:54 +01:00
Martin Pulec
0db80ba471 JPEG read_dqt: improvements
- allow reading up to 4 quantization tables (extended mode)
- check errors (unsupported/wrong precision)
2024-01-16 14:45:50 +01:00
Martin Pulec
bbbf0bc7db JPEG reader: handle quant tables more generically
- do not assume in reader indices 0 for Y a 1 for Cb/Cr
- check the RTP egligibility later
- handle lavc-compressed JPEG (using only table 0) properly, not as a
hack until today
2024-01-16 14:45:50 +01:00
Martin Pulec
5c35bddd4d jpeg reader: RTP compatibility check to sep fn 2024-01-16 14:45:49 +01:00
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