Commit Graph

1656 Commits

Author SHA1 Message Date
Martin Pulec
4259998a9c vcap/screen_win: IWYU 2025-08-25 14:16:40 +02:00
Martin Pulec
5755ce818f video_capture/*: IWYU 2025-08-25 13:01:54 +02:00
Martin Pulec
a1f3e08ad4 remove module.priv_data to simplify
seldom used and the modules can keep their 'magic' by themselves
2025-06-17 12:35:41 +02:00
Martin Pulec
dd4e68001c bitflow: use MOD_NAME in errors
(via MSG)
2025-06-17 11:42:34 +02:00
Martin Pulec
497d6f5b17 fix other occurences of missing NL 2025-06-17 11:37:30 +02:00
Martin Pulec
b0ec1dc765 Merge pull request #459 from benroeder/fix-spelling-errors
Fix spelling errors throughout codebase
2025-06-04 08:14:02 +02:00
Martin Pulec
023991ddf5 vcap/rtsp: suppress arg type warning
libcurl has some weird typecheck that triggers a warning if argument of
type int is passed to long
2025-06-03 10:19:59 +02:00
Ben Roeder
a62fe80c3f Fix spelling errors throughout codebase
Corrected various spelling mistakes in comments, documentation, and
variable names across the project. Changes include:
- Documentation files (CONTRIBUTING.md, README.md, etc.)
- Source code comments in C/C++ files
- Function parameter names and descriptions

No functional changes were made.
2025-06-01 18:03:40 +01:00
Martin Pulec
971b1463da vcap/ximea: IWYU 2025-05-21 13:42:50 +02:00
Martin Pulec
96fc3a5d79 vcap/ximea: avoid gcc warning
```
ultragrid/src/video_capture/ximea.c:100:27: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
  100 |                 char path[strlen(XIMEA_LIBRARY_PATH) + 1 + strlen(XIMEA_LIBRARY_NAME) + 1];
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
```

Both XIMEA_LIBRARY_PATH and XIMEA_LIBRARY_NAME are actually char[]
defined in config.h.
2025-05-21 13:01:18 +02:00
Martin Pulec
319cfdeef6 decklink: deprecate PsF in/out options
Since now the options can be specified generically by FourCC 'cfpr' (capture) and 'pfpr'
(display), there is no need to have this explicitly.

Also it doesn't seem to be much useful (at least with the PsF stream from
XDCAM, the stream is detected to be interlaced, not progressive, even
though decklink reports BMDDeckLinkSupportsAutoSwitchingPPsFOnInput=yes).
2025-05-06 12:28:30 +02:00
Martin Pulec
a044f90793 fix some warnings (gcc 15.1.1)
(the problem with color_printf was passing unsigned char literal as the
char* parameter of color_printf)
2025-05-05 12:37:07 +02:00
Martin Pulec
d5a42c5d0c vcap,vdisp/deltacast: add ch_layout option
For cards with bidirectional channels, it allow setting RX/TX layout
(actually the ratio of RX/TX channel count, not arbitrary selection).
2025-04-30 10:52:04 +02:00
Martin Pulec
858453d765 vcap/deltacast_dvi: accept fullhelp
+ improved cfg handling
2025-04-30 10:50:12 +02:00
Martin Pulec
f423d75b4a vcap,vdisp/deltacast: print option help 2025-04-30 10:50:10 +02:00
Martin Pulec
5343f81935 deltacast (all): print avail devs more reasonably
Print separate seaction with deveices in :help as it is common in other
modules (eg. decklink). Previously, this was written as a part of the
option describing "device:", but it doesn't seem appropriate.

+ 2 tab indent for (optional) device channel listing (parent 1 tab)
2025-04-30 10:49:29 +02:00
Martin Pulec
c44d3030ae vcap,vdisp/deltacast: VHD_OpenStreamHandle once
in multiple branches, the call of VHD_OpenStreamHandle differs only by
the ProcessingMode function parameter -> simplify
2025-04-30 10:45:49 +02:00
Martin Pulec
96084447b5 vcap/deltacast: request channel idx + 1 RX channels
For bidirectional cards (eg. deltacast hd elp-d 80), the channels can be
configured in a layout that lower indices are assigned to RX and higher
to TX (so 0-8 lower-indexed pins are RX and the rest is TX).

So if using RX channel=2 (zero-indexed), at least 3 RX channels need
to be taken in order for the 3rd channel to be RX.
2025-04-30 10:45:49 +02:00
Martin Pulec
96e0ae2ef1 vcap/deltacast: attempt to fix/improve quad-chan
- if quad channel not enabled, do not disable bypass relay on channel
other than selected
- assume that quad-channel starts from channel=0 (== channel is not
explicitly specified)
- delta_set_nb_channels called with 4 rx channels, not one (as in
Sample_RX4K.cpp)
2025-04-30 10:45:48 +02:00
Martin Pulec
2ba741b232 vcap/deltacast: if parse_fmt fails, call _done
s->frame needs to be also deallocated
2025-04-30 10:39:27 +02:00
Martin Pulec
8c81a3687b vcap,vdisp/deltacast: add SDK reference 2025-04-30 10:39:27 +02:00
Martin Pulec
eed4f25ed8 vcap/deltacast: support also different channel than the 1st 2025-04-30 10:39:25 +02:00
Martin Pulec
1e2d092d62 vcap/deltacast: avoid goto 2025-04-30 10:27:43 +02:00
Martin Pulec
e03fa9f815 vcap/deltacast: parse_fmt: small updates
- use MSG()
- print incorrect codec entered
- print usage if unknown opt passed
2025-04-30 10:27:38 +02:00
Martin Pulec
3f57f9feea vcap/deltacast: move opt parsing to parse_fmt 2025-04-30 09:52:05 +02:00
Martin Pulec
54ddd869af vcap/deltacast_dvi: move ch to stream t to fn
moved to common function to be used otherwise

Also increase the maximal index from 3 to 7.
2025-04-30 09:52:05 +02:00
Martin Pulec
59aefbc78d vcap/deltacast: accept option prefixes 2025-04-30 09:52:05 +02:00
Martin Pulec
181cd8db33 vcap/deltacast: add fullhelp to print avail channels 2025-04-30 09:52:04 +02:00
Martin Pulec
20707b3d23 vcap/deltacast: IWYU 2025-04-25 12:37:25 +02:00
Martin Pulec
730e047b6c vcap,vdisp/aggregate: fix a leak
subissue of CID 472157, 472127
2025-04-16 12:47:22 +02:00
Martin Pulec
d7f9924e08 vcap/aggregate fixes
- fixed a leak of s->devices (CID 472157)
- fix partial display_done (when eg. second device from 2 fail to init,
do not call the vidcap_done on this - assumes non-NULL)
- remove s!=NULL after assertion on that
2025-04-16 12:47:21 +02:00
Martin Pulec
c10909dd66 vcap/ximea: fix CID 472150 2025-04-16 12:47:21 +02:00
Martin Pulec
4b1c5f92a5 vcap/ndi: CID 472149
fixed improbable leak when user enters extra_ips= twice
2025-04-16 12:47:21 +02:00
Martin Pulec
509d50f0c7 vcap/rtsp: fix a leak in init
a typo, also a CID 472135
2025-04-16 12:47:20 +02:00
Martin Pulec
e4d5443336 vcap/testcard: if fail, del alloc data with _done
fixes CID 472124
2025-04-16 12:47:16 +02:00
Martin Pulec
3daae72f92 vcap/screen_x11: fixed a leak
CID 472109
2025-04-15 10:00:53 +02:00
Martin Pulec
3d3151e184 vcap/screen_x11: IWYU 2025-04-15 09:59:00 +02:00
Martin Pulec
e3c5f3f92d fix CID 472161
remaining 2 occurences
2025-04-14 15:44:12 +02:00
Martin Pulec
b7b1d5bf23 vcap/ximea: fix CID 472112
a leak if sym not found
2025-04-11 15:35:05 +02:00
Martin Pulec
c488aa8bcc vcap/ndi: fix CID 472161
a leak on wrong option given by user
2025-04-11 15:19:20 +02:00
Martin Pulec
192252c102 vo_pp/text: load available system font
If font is not set explicitly, MagickQueryFontMetrics fails with:
```
[text vo_pp.] MagickQueryFontMetrics failed: unable to read font `helvetica' @ error/annotate.c/RenderFreetype/1658!
```
(using ImageMagick 7.1.1)
2025-04-04 22:41:43 +02:00
Martin Pulec
37e2298ffd decklink: warn if IP addr given but DHCP=no not 2025-04-03 11:54:52 +02:00
Martin Pulec
c7bf90fdf6 decklink fcc opt parse unified + moved to common 2025-04-03 11:54:52 +02:00
Martin Pulec
26794a1971 decklink: fix FourCC opts without val
fixes the regression by commit d71c28eef (2024-11-18)
2025-04-03 11:54:52 +02:00
Martin Pulec
fa764db2d6 share some more convs between sdl3, to_lavc, testc
1. to SDL3 nv12 (not supported before)

2. to_lavc - use rgba_to_bgra - the vc_copyline version was not keeping alpha
(if ever used - this may cause regressions, unfortunately, if alpha is
assumed to be 100%, because the orig version set it always)

3. uyvy_to_i420 use by testcard and to_lavc

uyvy_to_i420: do not write out of bounds

If width % 2 = 1, 1 extra luma on first line of pair will override the
first luma on the second.
2025-04-01 14:02:30 +02:00
Martin Pulec
10059f9e71 mixer+ttf compat with SDL3 2025-04-01 14:02:27 +02:00
Martin Pulec
16943b4406 vcap/rtsp: includ H.265 in support list in help 2025-03-28 14:11:01 +01:00
Martin Pulec
707422d291 h264_stream: compat with 444 subsampling
Sync the h264_stream source with [upstream] (commit 70124d30) because
the decoding of 4:4:4 subsampled H.264 video fails. Problematic stream
can be generated with:
```
docker run --rm -it --network=host bluenviron/mediamtx
ffmpeg -re -f lavfi -i smptebars=s=1920x1080 -pix_fmt yuv444p \
     -vcodec libx264 -f rtsp rtsp://localhost:8554/mystream
```

For that the read_seq_parameter_set_rbsp() called on PPS NALU from SDP
(sprop-parameter-sets) gave completly wrong resolution 16x160 - evidently
the header was misinterpreted.

The code is taken mostly unmodified (just internal functions set static
in prototype).  debug_sps() not updated (no longer compiles so commented
out).

[upstream]: https://github.com/aizvorski/h264bitstream
2025-03-28 11:50:37 +01:00
Martin Pulec
90ee52db0e rtpdec_h2645: use common decode_frame function
the handling is mostly the same

+ change MOD_NAME to rtpdec_h2645 (HEVC inclusive)
2025-03-27 13:43:29 +01:00
Martin Pulec
07715c62e2 rtpdec_hevc: implement FU packets 2025-03-27 13:43:29 +01:00