At the beginning, there may be several audio frames decoded prior to
first video frame successfully decoded, which is unnecessary after the
seek.
see also GH-322
mostly refactoring - moved video init code to a function. Only change is
that video AVCodec is now not set by av_find_best_stream() but
avcodec_find_decoder() (but it is consistent how the original FFmpeg
demux_decode.c example does it).
libavcodec audio decoder has assertion on channel non-emptiness (which
is perhpas correct - there cannot be anything done there) so do not pass
emtpy channels.
refer to GH-316
screen_pw uses generic indicator but whe initialized with `-t screen`,
it won't be used
+ updated the description for generic_fps_indicator_prefix (the
semantics changed slightly)
Mac OS X 10.5 is unsupported by Apple for more than 10 years and it is
questionable if UltraGrid even compiles there. There is no indication
(requests, questions) that anyone uses that.
See also a24e194d (similar change for switcher). This patch is slightly
different because the slaves are connected to aggregate parent (it
doesn't initialize own module) whereas switcher has the state and acts
as a parent to its slaves. Shouldn't make much difference if path to the
module isn't important.
This fixes vidcap _file_ requiring root to register keybindings.
When specified:
1. `uv -t embedded -t switcher -t testcard -t testcard`
2. `uv -t embedded -t switcher -t testcard -s analog -t decklink`
First example set the _embedded_ audio connection to both testcards. In
the second example, _embedded_ is set only for the first device
(testcard) whereas for decklink the user specified _analog_ is not
overriden.
Previous commit modified the behavior that audio connection (embedded et
al.) specification is applied to following capture. To be more
user-friendly when there is only one vidcap device, set the audio also
to previous device (similarly it has been done for -F), so:
uv -s embedded -t testcard
uv -t testcard -s embedded # <- this now works again
uv -t switcher -t testcard -s embedded # this doesn't (ambigous)
`-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
set fps and color spec to 0 and set to default if not changed by
command-line
- this allows setting mode=4k (which doesn't set FPS)
- pixfmt_default variable is no longer needed
OpenCV 2 (at least in CentOS 7) has the imgproc.hpp header in
(opencv2/)imgproc/ subdirectory. Instead of tweaking the location,
include opencv.hpp directly if available (as it was before 2db2a73803).
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.
The parameter name is slightly misleading, because user (although params
are not intended for end users) may deduce that this option is global
for all hw accelerations, which is incorrect (standalone hw-accelerated
FF encoders/decoders, GPUJPEG etc.).
So improve at least the option description.
When on Linux, UG might have been installed either to /usr/local prefix,
in which case neither of hard-codec suffixes would match system
SoundFont. Or UG may be run from within build directory directly, in
which case even less likely system sound font could be found.
So add /usr as a fallback (note that it seems to be needed specifically
for Arch Linux, in Ubuntu, Mix_GetSoundFonts() finds the path to system
sound font, so guessing the path is not needed).