Commit 0165f365cd58bbcc3734e4ec9ce696b42870ff8e introduced an FTBFS
when -Werror=int-conversion is passed to the compiler. For
reasons unknown to me, the "value" argument to AV_DICT_SET_INT was
written as a string (const char *) rather than the int64_t that
the function behind the macro was expecting in the "Set Defaults"
statements. This was resulting in the value of the pointer to the
character array getting used as the argument rather than the
integer itself, which appears to be what was intended. This
triggers the Werror=int-conversion error and also probably results
in unexpected behavior from passing the pointer values.
Michael Marley [Sun, 2 Jan 2022 17:38:17 +0000 (12:38 -0500)]
nvenc: Fix Werror=misleading-indentation FTBFS
Commit 0165f365cd58bbcc3734e4ec9ce696b42870ff8e introduced an FTBFS
when -Werror=misleading-indentation is passed to the compiler. It
appears from changes elsewhere in the file (around line 450) that
the "Set Defaults" statements were not intended to be included in
the if block, so this commit reformats it to make that obvious (and
also add curlybrackets as was done around 450.)
Michael Marley [Sun, 12 Dec 2021 02:01:08 +0000 (21:01 -0500)]
iptv: Fix stream limit starting a new input on a running mux
In iptv.c:iptv_input_is_free(), if all the conf arguments are 0
(when called from input_is_enabled()), return null if the mux
associated with the input is already running. If the mux is
already running, starting a new input on it isn't going to create
a new input stream or break any bandwidth limit. This fixes an
issue where starting a new channel/input on a mux that is already
active when the maximum number of input streams are in use would
result in failure.
This function is rather dense and appears to perform multiple
different functions depending on who called it, so I had a hard
time understanding exactly what is going on. Therefore, I made
this patch in a way to be sure that it wouldn't affect how it works
in other cases than input_is_enabled(). If there is a better way
to do this, please do tell me.
Michael Marley [Sat, 11 Dec 2021 23:09:47 +0000 (18:09 -0500)]
Use clock_gettime() instead of time() in epggrab.c
time() appears to return a slightly-rounded value as compared to
functions that return higher-precision time like gettimeofday() and
timespec_get(). Specifically, when gettimeofday() would return a
value with a low number in tv_usec, time() will return one fewer
seconds than tv_sec from gettimeofday(). The difference is minute
and probably doesn't cause an issue in most cases, but here in
epggrab.c the time of the next cron run is calculated immediately
after the previous run fires. In this case, the value of time()
is actually one second lower than the specified cron run time. This
value is then passed into cron_multi_next(), which correctly sets
the next cron run to the current time. Therefore, as soon as the
EPG grab completes, cron triggers again and re-runs it. Using the
more precise values from gettimeofday() (by way of clock_gettime())
solves this problem and ensures that cron runs only once.
Norm Raden [Tue, 14 Sep 2021 15:28:08 +0000 (11:28 -0400)]
Improve the performance of updating the pid filter table in hdhomerun digital tuners.
- Construct the compact list of pids formatted for the hdhomerun and handle edge cases.
- For each call to tvhdhomerun_frontend_update_pids(...), only issue one set_tuner_filter call to the hdhomerun.
- Turn off pids when done using them.
- Handle the rare case where the requested list of pids does not fit in to the fixed length buffer by enabling all pids, excluding the NULL pid.
Previously, calls to update the pids would generate get_tuner_filter and set_tuner_filter calls for each individual pid.
Also, while a tuner was allocated, pids would never be freed up from the hdhomerun filter table even when they were no longer needed.
And if the list of requested pids had exceeded the fixed length buffer, then not all the requested pids would be properly enabled.
Very noticeably, in cases where the number of pids is large enough, very frequent pid updates would overload the hdhomerun causing it to
drop bursts of program data (mpegts broadcast packets) every several seconds on all tuners for the duration of the rapid pid updates
(reproducible on the HDHR4-2US model).
James Hutchinson [Tue, 19 Oct 2021 14:35:27 +0000 (15:35 +0100)]
opentv: fix missing summary data on rescrape, #5995
Chunks of events within the OpenTV data can contain blank summaries
following a re-scrape.
The issue of blank summary data occurs when the event in question
already exists in the guide, and upon rescrape the summary record for
the event in question is procesed before the title record.
In this scenario we should merge the data to avoid blanking out the
summary data.
James Hutchinson [Sun, 26 Sep 2021 18:30:40 +0000 (19:30 +0100)]
opentv: fix incorrect summaries for skyuk epg, fixes #5995
Events within the OpenTV SkyUK data can contain the same Event ID as
another event on a different channel.
This resulted in missing or incorrect summary data, since matching was
based solely on the Event ID.
This commit adjusts the opentv _entry_cmp function to match based on a
combination of Event ID and Channel ID. This enables the RB_FIND &
RB_INSERT_SORTED functions used within the OpenTV module to reliably
insert and uniquely find the correct entry.
Autobuild: Add arm64, armhf and armel for bullseye and buster.
This is mainly for building packages on the Pi running plain-ol Debian and not Raspbian/Raspberry Pi OS, images are available at https://raspi.debian.net.
spdfrk [Sat, 13 Jun 2020 14:26:30 +0000 (16:26 +0200)]
iptv: new features for multicast, rtsp & rtcp
- Implement RTCP Negative Acknowledge (a.k.a. Retransmission) support for RTP streams.
When packet loss is detected the client will send a RTCP Generic Feedback report to the server. The server can than resend these lost packets.
Retransmitted packets are send through a second connection or as part of the main stream, both cases are supported.
For Multicast manual setup of the RTCP server is required, for RTSP automatic setup (was already implemented for Receiver Reports) or manual override is possible.
- General clean-up of unused RTCP code and restructure to allow for easy implementation of different types of RTCP messages.
- Make RTCP Receiver Reports optional.
- RTSP start session with DESCRIBE and parse response content.
- RTSP DESCRIBE redirect support.
- Parse DESCRIBE response for AVPF support (required for Retransmission).
- Implement remote time shift support for RTSP streams.
This option can be enabled for a channel to pass-through time shift commands to the RTSP server, the internal time shift buffer is then disabled.
Alex Deryskyba [Wed, 16 Dec 2020 11:49:19 +0000 (13:49 +0200)]
Fix possible deadlock when using tvh_mutex_trylock()
Fixes possible deadlock when using tvh_mutex_trylock() macro in thread non-debug mode.
The macro expands to call pthread_mutex_lock() instead of pthread_mutex_trylock(),
which most likely is a result of copy/paste.
fat-fred [Thu, 8 Oct 2020 20:27:12 +0000 (22:27 +0200)]
Fix NVENC
- corrected "Rate Control" Settings:
- removed Deprecated Settings
- include new Settings
- corrected "Profile":
- include missing hevc profile "Rext"
- fixed profile selection: before we always had a profile higher as we choose (order is different then in other h264/hevc encoder)