* renamed 's=' option to 'strip=' (it is currently defunct, anyways)
* parse 'strip=' after 'size=', effectivelly allowing '-t testcard:s=VGA'
('s=' shortcutting size, not strip)
Fixes potential problems (not always reproducible) when running:
uv -sembedded -tswitcher:fallback -ttestcard -ttestcard:m=VGA -c lavc
Because the fallback mode calculates expected frame time - there is a race
condition when testcard's grab doesn't yet returns a frame but subsequent
check in switcher determines that the frame time already passed.
\+ fixed device names not being stored except first device with excl_init
see also commit a24e194d fixing the issue without that option
refers to GH-336
- use just one AVPacket
- free audio encoder context
\+ NOLINT(clang-analyzer-core.NullDereference) - this cannot happen -
either audio is enabled and then tmp_frm cannot be NULL here or this
branch wouldn't be entered (display_file_put_audio_frame() is never called)
allows user to fiddle max allowed A/V desync interval before frame drop/dup
\+ moved parsing to a separate function
\+ destroy pthread-related things only if thread started (initialized)
handle 1 byte case, which is unsigned and thus mus be handled separately
\+ divide the other cases with -INT32_MIN instead of INT32_MAX, to avoid
value < -1.0 if the sample value is INT32_MIN (but as the computation is
done in floats, both values will likely to be rounded to the same number)
We advertise support for 16-bit audio only (DISPLAY_PROPERTY_AUDIO_FORMAT),
so it is better to use it directly without short->float conversion if possible.
Currently, the first parameter is taken positionally, which is not
consistent with file display (and key/val parameters are preferred over
positional ones) so accept also "name=" for file name.
Make working compressions other than Opus, taking sample format other
than S16 (interleaved).
Accept also S16P and FLTP (needed for AAC, MP3, Vorbis).
\+ also process stereo input (as currently only mono are accepted)
If codec doesn't specify AV_CODEC_CAP_VARIABLE_FRAME_SIZE, all frames
(except the last one) passed should equal exactly the codec-specified
frame_size. That flag doesn't specify almost none compression, except PCM.
- not used
- in documentation there was incorrectly stated that in and out can
overlap; perhaps a C&P from int2float doc because it doesn' seem to be
true - first written float overrides second read short so on
Keeping A/V sync may be important - not only because A/V clock drift
but also due to dropped frames, that would cause A/V desync.
+ renamed cur_pts to next_pts (consistent with mux.c)
Write uncompressed output only if user explicitly specifies NUT container
to avoid unexpected results when `-d file` is writing overwhelming amount
of data.