Using `cmake --build . --parallel` actually doesn't limit the number
of processes because it just passes the number (here none) to make,
resulting in `make -j`.
This is a possible explanations of macOS runner freezes, as eg. here:
<https://github.com/MartinPulec/UltraGrid/actions/runs/7641831068>
(last relevant message in log is `[100%] Built target joysticks`).
added resolve_fourcc to utils/string
- fixed wrong signal.h include guard (it should be definitely included
in mac, it was perhaps meant to be MSW, but it is needed there too)
- removed config*h
It seems like the first DWORD of subtype GUID
(mediaType->subtype.Data1[0-3]) doesn't always contain FourCC, namely for RGB types, eg.
MEDIASUBTYPE_RG24 (the others seem to be be mostly OK).
Instead of getting full format from vidcap_dshow_get_video_desc(), which
translates the source pixel format to UG one, use the FourCC directly. Do
write just the format, the same for grabber and then the complete output
format (after eventual UG conversion). Except of the format, every other
parameters should be currently the same.
The previous approuach didn't work when there was either no VFW->UG
mapping (I420 etc.) or there was not 1:1 mapping, eg. NV12 was displayed
as UYVY because the conversion is such, which might be misleading.
we can accept all codecs, not only BGR or YUYV/YUY2
Note that the codec is used as both streaming and grabber codecs,
the converting logic doesn't seem to have been working in the past,
although Pavel Troubil's original code had RGB fixed as the codec.
Commented out the block setting the mediaformat - now the matching format
is already set, unsure about semantic of this block.
Respect RGB for key/value syntax as indicated in help.
This can be particularly useful when capturing eg. MJPEG, which we want
to recompress or process later.
OpenCV in Buster (Linux armhf build) doesn't have
INTER_LINEAR_EXACT. Similarly to INTER_NEAREST_EXACT, this doesn't seem
to be necessary so enable it for now (althoug compat macros should be
possible as well).
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.
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.
- 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
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.