Where the PACKAGE_BUGREPORT is the only used item from config.h,
use bug_msg(), which can be then removed.
Improved bug_msg() to allow printf-like fomat + arguments.
- print the direct RTP stream URLs only once (== do not repeat with
every printed address)
- print only if autorun was not specifiec
- take the IP version from the state
Since the rtpmap line is now generated also for static packet types,
the condition must have been updated to check the packet type rather
than the presence of rtpmap line.
Generate rtpmap lines even for formats with statically assigned PT -
bluenviron/mediamtx does it as well and it is nicer, although not
necessary.
RFC 3555
Although RFC 2435 supports YUV 422, it has to have sampling factors
h: 2,1,1 v: 1,1,1
FFmpeg built-in JPEG encoder generates h: 2,1,1 v: 2,2,2 and
it cannot changed (set by function ff_mjpeg_init_hvsample() in
libavcodec/mjpegenc_common.c).
STR_LENGTH was very similar name to STR_LEN, even set to the same value
so replace its ocuurences simply by STR_LEN.
This also allows putting it to headers because the constant is public.
- added RFC 2435 JPEG decoder
- added JPEG interchange format writer (JFIF in particular)
Decode RFC encoded JPEG (abbreviated) and create a JFIF, which can be then
passed to further processing (decode in the end).
The testing JPEG stream played with bluenviron/mediamtx as defined in the
beginning of video_capture/rtsp.c can be now sucessfully played.
moved compat functions from config_*h, namely:
- localtime_s/gmtime_s
- strerror_s
- mkdir Windows compat
- removed str[n]cmp from compat/misc (already in compat/strings,h,
which is the better location)
Do not use config*.h in export.c (motivation for the above changes).
The guard value should be used only for one pair of
com_initialize/uniniialize call, so ensure it by checking if the value
is initialized to false.
It should be possible to use an int instead but there is currently
no need.
Set the occurences to false explicitly (in the case of vcap/deck change
from true to false).
The pointer ifa_addr in struct ifaddrs can be NULL and indeed it occurs
(perhaps with interfaces without assigned addrs?). Steps to reproduce:
```
uv -x sdp -t testcard -c lavc:subs=420
````
ULTRAGRID_COLOR_OUT env variable didn't set the internal flag, just
caused color_output_init to return true. Rather moved the check to
separate funcction to avoid this.
Removed array template arguments deduction. Is not supported eg. by
clang 10 on macOS (Xcode 10.1) - perhaps not a big deal but the fix is
quite undemanding.
- use custom IPv6 black hole address 100::556C:7472:4772:6453 instead
of 100::1, which a user may use explicitly to signalize server mode
- check just the one address, not the black hole prefix in general
(again, the user may select the discard address intentinally without
knowing our semantics)
- removed the black hole handling functions (no longer needed)
- compute the actual in6_addr from the string with inet_pton instead of
hard coding the value
Send RTCP correctly in the server mode to a client if we have the RTCP
connection (== receiving RTCP from the client).
It is done in the same way as it is currently implemented when UG is in
receiver-only mode without explicit remote address.
- if skipped, the mediaType was not deallocated
- use own mode variable instead of 'i', because otherwise there would be holes
+ print the id, not the ordinal numeber of the mode (now it doesn't match)
- last mode must be zero (the show_help expects zero-termination) even
if there are not enough space
Actually the value MAX_PATH doesn't contain terminating NULL byte
according to the MSDN documentation for GetTempPathA. Perhaps not
a big deal but since the MAX_PATH_SIZE is generic, it is nicer to
have it correct.
Do not issue the warning over PowerShell or cmd legacy terminal emulators
in Windows 11. In Window the check doesn't work, because the process
tree is different - the Windows Terminal doesn't have its own process
and it is uv.exe->powershell.exe->exporer.exe.
This improves commit bb2a72f67f.
Print RTP URLs for statically mapped packet types that do not require
SDP description.
It seems like just ffplay is capable to handle the stream(s), mpv and
vlc doesn't (vlc supports at least audio).
On ARM64 macs, the loader refuses to load the library installed with
Homebrew in /opt/homebrew/lib, even when added to DYLD_LIBRARY_PATH. Error
message is:
```
JACK library "libjack.dylib" opening failed: dlopen(libjack.dylib,
0x0002): tried: 'libjack.dylib' (relative path not allowed in hardened
program), '/System/Volumes/Preboot/Cryptexes/OSlibjack.dylib' (no such
file), '/Volumes/ULTRAGRID/uv-qt.app/Contents/libs/libjack.dylib' (no
such file), '/Volumes/ULTRAGRID/uv-qt.app/Contents/libs/libjack.dylib'
(no such file), '/usr/lib/libjack.dylib' (no such file, not in dyld
cache), 'libjack.dylib' (relative path not allowed in hardened program)
```
As a solution, the absolute path `/opt/homebrew/lib/libjack.dylib`
is loaded.
Other changes:
- try array of candidate JACK library paths
- increased STR_LEN to 2048 - for the error messages from the JACK, 1024
could be too little (errs stored and printed only if no library usable)
- MOD_NAME defined in the header, so that MOD_NAME cannot be defined in
the source prior include; undefined at the end of the header
- use snprintf instead of strncat (better behavior - always appends \0 and
no need to subtract 1 from len /and expecting that there is \0 at the end)
- use actual string length with sizeof than STR_LEN (which may get
removed because it is misleading in respect to global STR_LENi value)