modernized video display, audio playback and vo postprocess APIs
THe APIs were already recently updated so modernize it by using bool
where the return value is semantically boolean value. Using TRUE/FALSE is
inherently ambiguous because it is not obvious from the prototype if
success is 0 or TRUE (1).
Semantics of '-A' parameters has changed from audio receiver address
(distinct than video) to audio codec. It is, however, doubful if someone
uses it, but just in case.
This compat message could (and should) be deleted later.
'A' seems to be better but it was originally used by --audio-host. This
argument isn't supposed to be important and isn't perhaps used, anyways,
so use this and for the --audio-host keep only the long opt.
`-s` parameter now sets audio only to following video capture, just like
`-F` (capture filter) does.
This allows different setting for different audio connectors for
different video sources, namely for switcher, eg.:
uv -t switcher -s analog -t decklink:device=1 -s embedded -t \
decklink:device=2
refer to GH-318
Print available shortopts when recommending replacement for deprecated
opts. With short opts, the new version is actually shorter than the
original (--audio-capture-channels -> -a channels), while with the long
opt (--audio-capture-format) it was not. Similarly for --rtsp-server.
- 'a' - audio-capture-format
- 'e' - encryption
- 'D' - cuda-device
- 'H' - fullhelp
- rtsp-server was set for long getopt value 'H' but was reused by
fullhelp. It wasn't allowed as a short getopt anyways.
UltraGrid cannot handle multiple displays anyways and since only the
last one is used, it is perhaps better to notice user on this error.
Also, user might have given something like '-d decklink:device=2' and
then '-d decklink', supposing that the second is correct but decklink
would use device #2, although it was given in first decklink setting
(opts are not overriden by the second decklink specification).
Until now, `uv -s testcard --protocol sdp` didn't generate the SDP file
(nor output) because the all SDP state initialization was handled in
video_rxtx/h264_sdp.
For audio codecs, we respect its native capitalization of letters, eg.
AAC, speex. So do it also for Opus. This should not affect existing
applications since the Opus name is parsed case-insensitively.
Only exception is SDP (rtpmap) where is usually used lower-case (at
least in rfc7587).
The management of should_exit events should be also be shared with the
transcoding reflector that uses some parts that may depend upon this
functionality.
This is not purely a refactorization but slightly changes behavior,
namely the shared state cleanup is done in a destructor, not by
`uv.stop()` as it used to be.
see GH-307
If registering a should_exit callback but should_exit has already been
broadcasted, it wasn't ever run, leading likely to a freeze.
Steps to reproduce the fixed problem:
uv -t swmix:512:512:2 -t invalid
Fixed by immediately calling the registered callback if should_exit has
been already issued.
Query directly, without help from GPUJPEG (although the code is actually
borrowed from there).
This enables device listing also if GPUJPEG is not compiled in and it
simplifies main.
- removed `needs_mainloop` attribute and deduce if mainloop is needed
from the presence of _run callback (the information is now redundant
only displays needing/running mainloop should announce _run callback)
- run the custom mainloop (currently only Syphon!) only when display
doesn't run its mainloop. This allows running Syphon and GL/SDL
display because it connects to the display mainloop.
Using short getopt options, a user may make a mistake in parameter name
resulting in passing a non-numeric string to stoi, which leads to crash
on not-nice uncaught exception crash.
+ remove try/catch from parse_port (no longer needed due the above)
It is perhaps unnecessary to run this early now. Also it won't
spoil the output of '-c libavcodec:help' with unrelated message that
control socket was started.
Hidden port, cuda-device and rate limiter in basic view. Those are not
more important than many of already hidden.
- cuda device - slightly changed description 's/CUDA device/GPU' - it
actually selects a card also for NVENC, in the end
Since display FPS indicator has set background color, using something
like "[Decklink display] " caused also the trailing space background to
be colored, which doesn't look nice.