]> git.ipfire.org Git - thirdparty/tvheadend.git/log
thirdparty/tvheadend.git
2 years agoSimplify IPv6 compare functions to unconfuse gcc compiler
David Kalnischkies [Thu, 3 Nov 2022 22:53:30 +0000 (23:53 +0100)] 
Simplify IPv6 compare functions to unconfuse gcc compiler

In file included from src/tcp.c:32:
In function ‘ip_check_is_any_v6’,
    inlined from ‘ip_check_is_any’ at src/tcp.h:110:46,
    inlined from ‘ip_check_is_local_address’ at src/tcp.c:89:17:
src/tcp.h:105:57: warning: array subscript 1 is outside array bounds of ‘const struct sockaddr_storage[0]’ [-Warray-bounds]
  105 |   { return ((uint64_t *)IP_AS_V6(address, addr).s6_addr)[0] == ((uint64_t *)(&in6addr_any.s6_addr))[0] &&
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
src/tcp.h: In function ‘ip_check_is_local_address’:
src/tcp.h:108:19: note: at offset 8 into object ‘address’ of size 8
  108 | static inline int ip_check_is_any(const struct sockaddr_storage *address)
      |                   ^~~~~~~~~~~~~~~

And more for the other half of the function and its three-times more or
less copy-paste instances. sockaddr_storage is not an array, but what
we actually do here is access s6_addr – which is an array of uint8_t.
Accessing the 16 uint8_t as 2 uint64_t apparently works, but not doing
it results in hopefully simpler to understand code for both humans and
compilers alike.

2 years agoDon't call epg_broadcast_set_description twice
David Kalnischkies [Thu, 3 Nov 2022 02:53:11 +0000 (03:53 +0100)] 
Don't call epg_broadcast_set_description twice

2 years agoDon't crash the wizard if tvh has no inputs
David Kalnischkies [Sat, 22 Oct 2022 11:17:50 +0000 (13:17 +0200)] 
Don't crash the wizard if tvh has no inputs

If you have e.g. all but dvb disabled and forgot to plug in your usb
adapter the wizard would crash upon you as no inputs are defined and the
looping assumes there is at least one. Ideally a message should be shown
to indicate that you need inputs, but a wizard displaying a mostly empty
page is far better than a crash to discover your mistake.

2 years agoServe static html files with mimetype text/html
David Kalnischkies [Mon, 17 Oct 2022 14:48:52 +0000 (16:48 +0200)] 
Serve static html files with mimetype text/html

2 years agoUse application/json instead of text/x-json as mimetype
David Kalnischkies [Mon, 17 Oct 2022 14:46:39 +0000 (16:46 +0200)] 
Use application/json instead of text/x-json as mimetype

The web has mostly agreed on this standardized mimetype and e.g.
trying to open an API URI with Firefox is now opened in its friendly
JSON viewer rather than downloaded.

2 years agoepgdb: Resolve symlinks before using file location
David Kalnischkies [Mon, 24 Oct 2022 11:44:29 +0000 (13:44 +0200)] 
epgdb: Resolve symlinks before using file location

The new epgdb is written to a temporary file and later renamed to
override the old epgdb file atomically. If you diverted the epgdb
to a different place away from your usual configuration (e.g. for
space and/or disk usage reasons like on an OpenWrt router) this
leads to overriding the symlink with a real file defeating the point.

By applying realpath on the path first we can resolve any symlink
along the path, while not considering it a failure if the epgdb
file doesn't exist yet. If on the other hand the path up to the file
doesn't exist we default to the old way of just taking the path
verbatim and let them be created by hts_settings_makedirs as before.

Note that this relies on the paths being sized PATH_MAX, which as the
manpage notes is POSIX.1-2001 conform, but broken by design as PATH_MAX
can't be relied upon, but the entire codebase makes heavy use of PATH_MAX
and there is a pre-existing usage of realpath() in this way so lets
pretend its okay for now.

References: b23686a55323625b15d4f99fd7af55259fa21828

2 years agoIncrease maximum ADTS packet size to match FFMPEG
Flole998 [Thu, 10 Nov 2022 17:31:18 +0000 (18:31 +0100)] 
Increase maximum ADTS packet size to match FFMPEG

2 years agoiptv_auto: Add support for m3u "channel-number" tag
Michael Marley [Thu, 27 Oct 2022 21:48:46 +0000 (17:48 -0400)] 
iptv_auto: Add support for m3u "channel-number" tag

SiliconDust recently added m3u playlist generation support to the
HDHomeRun products.  They use "channel-number" for the channel
number, so add support for that value to TVHeadend.  It is used as
a fallback only if the previously-supported "tvh-chnum" and
"tvg-chno" tags aren't present.  This should be particularly useful
for usage with ATSC 3.0 channels, as those aren't supported in the
libhdhomerun library that TVHeadend normally uses for HDHomeRun
devices.  Without this, the channel number for all channels
imported from the HDHomeRun m3u is "0".

2 years agoFix race condition/data corruption in imagecache
Flole998 [Thu, 27 Oct 2022 20:01:31 +0000 (22:01 +0200)] 
Fix race condition/data corruption in imagecache

2 years agoFix bad mono2sec usage
Flole998 [Thu, 27 Oct 2022 03:30:10 +0000 (05:30 +0200)] 
Fix bad mono2sec usage

2 years agoAttempt to fix profile sharer memory leak
Flole998 [Thu, 27 Oct 2022 00:37:00 +0000 (02:37 +0200)] 
Attempt to fix profile sharer memory leak

May or may not works, let's see....

2 years agoAttempt to fix HBBTV memory leak
Flole998 [Wed, 26 Oct 2022 23:56:57 +0000 (01:56 +0200)] 
Attempt to fix HBBTV memory leak

2 years agoFix typo
Flole998 [Wed, 26 Oct 2022 22:59:59 +0000 (00:59 +0200)] 
Fix typo

2 years agoRevert 4355488b8e1e868cb434bf95676c0944b44e88b3
Flole998 [Wed, 26 Oct 2022 22:58:18 +0000 (00:58 +0200)] 
Revert 4355488b8e1e868cb434bf95676c0944b44e88b3

Better fix was implemented in previous commit

2 years agoClose FDs even if no UDP connection is used
Flole998 [Wed, 26 Oct 2022 22:56:01 +0000 (00:56 +0200)] 
Close FDs even if no UDP connection is used

2 years agoFixed typo
Flole998 [Wed, 26 Oct 2022 22:07:46 +0000 (00:07 +0200)] 
Fixed typo

2 years agoUpdate regexps for the finnish EIT scraping
garyttirn [Sun, 16 Oct 2022 10:37:04 +0000 (13:37 +0300)] 
Update regexps for the finnish EIT scraping

2 years agompegts dvb: Add support for LCN for provider DigiTV
Nicolae Farmache [Thu, 13 Oct 2022 23:00:53 +0000 (01:00 +0200)] 
mpegts dvb: Add support for LCN for provider DigiTV

2 years agooutput: UDP streaming
innes-labs [Thu, 5 Sep 2019 14:19:00 +0000 (16:19 +0200)] 
output: UDP streaming

2 years agoFix potential memory leak
Flole998 [Fri, 7 Oct 2022 18:59:52 +0000 (20:59 +0200)] 
Fix potential memory leak

2 years agoIgnore PCRE2 illegal accesses
Flole998 [Fri, 7 Oct 2022 18:20:10 +0000 (20:20 +0200)] 
Ignore PCRE2 illegal accesses

See https://lists.exim.org/lurker/message/20160113.163710.006b34b9.en.html

2 years agoAvoid leaking iptv fd's
Flole998 [Fri, 7 Oct 2022 16:25:13 +0000 (18:25 +0200)] 
Avoid leaking iptv fd's

2 years agoAdded support for ATSC text mode == 0x3F
Jumper78 [Wed, 21 Sep 2022 15:52:55 +0000 (17:52 +0200)] 
Added support for ATSC text mode == 0x3F

Added support for ATSC text mode == 0x3F

handling of ATSC text mode == 0x3F (Select Unicode, UTF-16 Form) is added by calling atsc_utf16_to_utf8

+ change to bytecount instead of  srclen

2 years agoFix FTBFS introduced by 86f3617c8972c5362e51cee7d34cc2d69d799126
Michael Marley [Thu, 15 Sep 2022 10:49:46 +0000 (06:49 -0400)] 
Fix FTBFS introduced by 86f3617c8972c5362e51cee7d34cc2d69d799126

2 years agoFix crash when mpegts_service_refresh tries to open the CAT again
Flole998 [Thu, 15 Sep 2022 00:31:24 +0000 (02:31 +0200)] 
Fix crash when mpegts_service_refresh tries to open the CAT again

2 years agoAdded more 'text modes' to the ATSC Multiple String Structure decoder and convert...
Norm Raden [Mon, 12 Sep 2022 17:30:30 +0000 (13:30 -0400)] 
Added more 'text modes' to the ATSC Multiple String Structure decoder and convert text to UTF-8. (Fixes #5162)

 - Added support for decoding ATSC's "Multiple String Structure" text modes 0x1-0x6, 0x9-0x10, 0x20-0x27, 0x30-0x33.
 - Convert decoded text to UTF-8 instead of ISO-8859-1.
 - For unsupported 'compression types' or 'text modes' return a text string "[comptype=0x??,mode=0x??]" indicating
   the attempted compression type and text mode instead of the text segment.

Text output from ATSC's "Multiple String Structure" decoder should properly render in web browsers, specifically Unicode characters >= 0x80.

2 years agoAllow network scan to modify muxes
Damien Fouilleul [Thu, 22 Apr 2021 12:40:58 +0000 (13:40 +0100)] 
Allow network scan to modify muxes

When 'change muxes' option for network discovery is enabled, allow network scan to modify muxes rather than duplicate them on minor changes such as FEC

2 years agoFixed and cleanup the "PSIP: ATSC Grabber" module (Fixes #5610)
Norm Raden [Tue, 10 May 2022 18:00:30 +0000 (14:00 -0400)] 
Fixed and cleanup the "PSIP: ATSC Grabber" module (Fixes #5610)

 - Bumped up limit on number of supported EIT/ETT tables from 5 to 256 (this is the max number of EIT/ETT tables in the ATSC specification)
 - Remove table type 4 as a valid ETT table, there is no support for this table here and table type 4 doesn't supply any EPG data--just long names for channels/services, etc.
 - Removed the very rapid toggling between mpegts_table_{add,destroy}(...) calls on EIT/ETT tables that caused continuous enabling/disabling of EIT and ETT PIDs.
 - Added an 'ETM Location' check to EIT table handling to ensure that an event's extra text is cleared in the EPG database if there is no matching ETT.
 - Removed epg_broadcast_change_finish(...) because it was erasing the extra text field in EPG database when updating title in EPG database (in EIT handler).
 - Added the ability for receiving ETT tables with the same version ID.  ETT tables use the same version ID for long runs of event IDs and 'Extra text's.
 - Fix bug in retrieving the number of tables EIT/ETT tables listed in the MGT table.

 - Removed the psip_{find,remove,add}_desc(...) functions (and supporting code) that stored ETT extra texts before
   there was a matching EIT event and then would try to match up the ETT extra texts when the EIT event showed up.
   However, the psip_*_desc(..) functions didn't keep track of the channel and would match up the ETT 'Extra text' with the wrong EIT event.

 - Removed some non-functional code.
 - Removed old commented out test code.

 - Added placeholder support for 'stop' and 'done' functions of this module for future development.

The "Over-the-air: PSIP: ATSC Grabber" module now quickly and correctly populates 'Title', 'Extra text', 'Start time', 'End time', 'Duration', etc... fields in the EPG Database.

3 years agoRegexps for the finnish EIT scraping
Kari Tiirikainen [Wed, 13 Jul 2022 14:40:49 +0000 (17:40 +0300)] 
Regexps for the finnish EIT scraping

 Changes to be committed:
new file:   fi

3 years agoextending the regexps for the italian EIT scraping
Mario [Thu, 7 Jul 2022 11:15:49 +0000 (13:15 +0200)] 
extending the regexps for the italian EIT scraping

3 years agoFix use-after-free
dave-p [Fri, 1 Jul 2022 13:56:09 +0000 (14:56 +0100)] 
Fix use-after-free

Building Tvheadend on Raspberry Pi with gcc 12 fails with this error

src/misc/json.c: In function ‘json_parse_string’:
src/misc/json.c:120:31: error: pointer ‘r’ used after ‘free’ [-Werror=use-after-free]
  120 |                   *failp = (a - r) + start;
      |                            ~~~^~~~
src/misc/json.c:118:19: note: call to ‘free’ here
  118 |                   free(r);
      |                   ^~~~~~~

This PR appears correct and fixes the gcc error but has not been tested as it is an error path.

3 years agoNo longer use git-protocol
Flole998 [Fri, 17 Jun 2022 23:07:13 +0000 (01:07 +0200)] 
No longer use git-protocol

3 years agoadd Access-Control-Allow-Headers content-length
stephengeorgewest [Fri, 22 Apr 2022 12:20:47 +0000 (06:20 -0600)] 
add Access-Control-Allow-Headers content-length

3 years agoUpdate Copyright year
Flole998 [Thu, 14 Apr 2022 13:39:34 +0000 (15:39 +0200)] 
Update Copyright year

3 years agoTravis CI is dead, use GitHub actions for badge
Flole998 [Mon, 11 Apr 2022 04:22:19 +0000 (06:22 +0200)] 
Travis CI is dead, use GitHub actions for badge

3 years agoGitHub actions improvements
Flole998 [Mon, 11 Apr 2022 04:01:18 +0000 (06:01 +0200)] 
GitHub actions improvements

3 years agoUse GitHubs CI for Building
Flole998 [Mon, 11 Apr 2022 03:09:53 +0000 (05:09 +0200)] 
Use GitHubs CI for Building

3 years agoAdd HMF_UUID to htsmsg_binary_write
Flole998 [Mon, 11 Apr 2022 03:00:07 +0000 (05:00 +0200)] 
Add HMF_UUID to htsmsg_binary_write

3 years agoPrevent deadlock-detector leaking memory
Flole998 [Fri, 8 Apr 2022 04:23:26 +0000 (06:23 +0200)] 
Prevent deadlock-detector leaking memory

3 years agoRemove useless null-check on an array
Flole998 [Fri, 8 Apr 2022 04:18:55 +0000 (06:18 +0200)] 
Remove useless null-check on an array

3 years agoFix potential null-pointer-dereference
Flole998 [Fri, 8 Apr 2022 03:58:34 +0000 (05:58 +0200)] 
Fix potential null-pointer-dereference

3 years agoFix FTBFS in utils.c
Michael Marley [Thu, 7 Apr 2022 01:47:49 +0000 (21:47 -0400)] 
Fix FTBFS in utils.c

U+0020 SPACE and U+00A0 NO-BREAK SPACE look the same, but they
aren't the same.

3 years agofix build with libressl
Fabrice Fontaine [Wed, 6 Apr 2022 19:54:25 +0000 (21:54 +0200)] 
fix build with libressl

Fix the following build failure with libressl raised since
https://github.com/tvheadend/tvheadend/commit/e61acb8ad4a3411f4e7acfd8133d222299f6d47e:

utils.c:(.text+0x1614): undefined reference to `EVP_sha512_256'

Fixes:
 - http://autobuild.buildroot.org/results/cb18f6533806f3729f9718bdcc719384be375b66

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3 years agoAlways parse 'src' in RTSP-requests
Nita Vesa [Wed, 23 Feb 2022 19:45:52 +0000 (21:45 +0200)] 
Always parse 'src' in RTSP-requests

Originally, the code did not parse 'src' in RTSP-requests for
DVB-C tuners. This patch moves to always parse the parameter,
allowing e.g. Plex and possibly other SAT>IP-clients to work.

Signed-off-by: Nita Vesa <werecatf@outlook.com>
3 years agodvr_disk_space_cleanup() - do not return error if called again too soon (#1)
dave-p [Mon, 4 Apr 2022 09:49:37 +0000 (10:49 +0100)] 
dvr_disk_space_cleanup() - do not return error if called again too soon (#1)

* Rework disk space check and cleanup

* Update dvr.h

* Update dvr_vfsmgr.c

3 years agoUpdate for VAAPI transcoding
Ovaron [Mon, 21 Mar 2022 18:47:08 +0000 (19:47 +0100)] 
Update for VAAPI transcoding

VAAPI: Buffer factor (buffersize manipulation) now configurable at WebUI.
VAAPI: Added rc_mode (h264/hevc) and tier (hevc), both configurable via WebUI.
VAAPI: Removed B-Frame workaround from the past at HEVC.
VAAPI: Added an option for ignore b-frames because some drivers needs this (AMD).
VAAPI: Also updated VP8 and VP9 encoding.
VAAPI: VP8 and VP9 now also reacts on options for "Buffer factor" and "Ignore B-Frames" and got the "force_key_frames" expression to increase picture quality.
VAAPI: Added destroy option for h264 codec (might have created memory issues)

3 years agoSAT>IP client: UPnP header field names are case insensitive
Matthieu Poullet [Tue, 15 Mar 2022 09:40:44 +0000 (10:40 +0100)] 
SAT>IP client: UPnP header field names are case insensitive

- SAT>IP Protocol Specification 1.2.2: 3.3.2 Server Advertisements

3 years agoMore doozer build fixes
Flole998 [Mon, 14 Feb 2022 14:45:48 +0000 (15:45 +0100)] 
More doozer build fixes

3 years agoFix doozer CentOS build
Flole998 [Mon, 14 Feb 2022 03:51:04 +0000 (04:51 +0100)] 
Fix doozer CentOS build

3 years agoFix sid doozer build
Flole998 [Mon, 14 Feb 2022 01:08:18 +0000 (02:08 +0100)] 
Fix sid doozer build

3 years agoUpdate Python shebangs to python3
Ruben De Smet [Sun, 13 Feb 2022 07:05:02 +0000 (08:05 +0100)] 
Update Python shebangs to python3

3 years agoUpdate RPM to python3
Flole998 [Sun, 13 Feb 2022 02:11:21 +0000 (03:11 +0100)] 
Update RPM to python3

3 years agoDoozer fixes
Flole998 [Sun, 13 Feb 2022 02:09:48 +0000 (03:09 +0100)] 
Doozer fixes

3 years agoFix doozer builds
Flole998 [Sun, 13 Feb 2022 01:16:58 +0000 (02:16 +0100)] 
Fix doozer builds

3 years agoFix some failing builds
Flole998 [Sun, 13 Feb 2022 00:07:22 +0000 (01:07 +0100)] 
Fix some failing builds

3 years agoAdd --nowerror to build for RPM packages
Flole998 [Sun, 13 Feb 2022 00:04:04 +0000 (01:04 +0100)] 
Add --nowerror to build for RPM packages

3 years agoFix failing builds again
Flole998 [Sat, 12 Feb 2022 18:55:29 +0000 (19:55 +0100)] 
Fix failing builds again

3 years agodoozer: Migrate to Fedora 34 and 35
Ruben De Smet [Sat, 12 Feb 2022 13:40:39 +0000 (14:40 +0100)] 
doozer: Migrate to Fedora 34 and 35

3 years agoUpdate buffer size for h264 and hevc
Ovaron [Thu, 10 Feb 2022 20:51:21 +0000 (21:51 +0100)] 
Update buffer size for h264 and hevc

Increased buffer for h264 and hevc transcoding (from ((self->bit_rate) * 1000) * 2 to ((self->bit_rate) * 1000) * 3).
With bigger buffer picture creates less artefacts on lower bitrates.

3 years agoChanged debian package version to 7
Ovaron [Thu, 10 Feb 2022 20:46:52 +0000 (21:46 +0100)] 
Changed debian package version to 7

Debian Testing does not support versions <7

3 years agoepg: ignore past events when matching on eid
James Hutchinson [Mon, 31 Jan 2022 10:04:24 +0000 (10:04 +0000)] 
epg: ignore past events when matching on eid

3 years agohttpc: Fix multi-value "Connection" header checks
Jacek Tomasiak [Sat, 5 Feb 2022 00:03:44 +0000 (01:03 +0100)] 
httpc: Fix multi-value "Connection" header checks

Connection header was checked for exact "close" or "upgrade" values
while it could contain multiple values delimited with commas.
New function was added for checking such cases.

Code is based on kv_find_value() function from:
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/relayd/relayd.c

This fixes #6090

3 years agoEpisode number regexp 1416/head
tanakaPD [Wed, 12 Jan 2022 09:09:33 +0000 (10:09 +0100)] 
Episode number regexp

Proposed change to get also episode numbers given like "EP. nnn" (italian channels like Rai Gulp, Rai YoYo)

3 years agoFix some issues introduced in #0165f365cd58bbcc3734e4ec9ce696b42870ff8e
Flole [Mon, 10 Jan 2022 02:59:37 +0000 (03:59 +0100)] 
Fix some issues introduced in #0165f365cd58bbcc3734e4ec9ce696b42870ff8e

3 years agoFix "as: invalid option" during libvpx compilation
Flole998 [Sun, 9 Jan 2022 16:33:38 +0000 (17:33 +0100)] 
Fix "as: invalid option" during libvpx compilation

3 years agonvenc: Fix Werror=int-conversion FTBFS (and likely bug)
Michael Marley [Sun, 2 Jan 2022 19:09:51 +0000 (14:09 -0500)] 
nvenc: Fix Werror=int-conversion FTBFS (and likely bug)

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.

3 years agonvenc: Fix Werror=misleading-indentation FTBFS
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.)

3 years agosome changes to nvenc
fat-fred [Wed, 1 Dec 2021 10:25:51 +0000 (11:25 +0100)] 
some changes to nvenc

  -cleanup of profiles

  -include level selection for nvenc

3 years agoUpdate Makefile.ffmpeg
fat-fred [Tue, 30 Nov 2021 07:37:09 +0000 (08:37 +0100)] 
Update Makefile.ffmpeg

3 years agoconfigure: add execinfo option
Fabrice Fontaine [Sat, 1 Jan 2022 15:53:29 +0000 (16:53 +0100)] 
configure: add execinfo option

Add execinfo option to allow the user to disable the feature even if
execinfo.h is found on the system

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3 years agoiptv: Fix stream limit starting a new input on a running mux
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.

3 years agoCheck the return code of snprintf in utils.c:rmtree
Michael Marley [Sun, 12 Dec 2021 01:56:54 +0000 (20:56 -0500)] 
Check the return code of snprintf in utils.c:rmtree

And return -ENAMETOOLONG if the string overflowed.  This fixes the
FTBFS on s390x with recent glibc/gcc versions.

This fixes #5949.

3 years agoUse clock_gettime() instead of time() in epggrab.c
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.

This solves #5545 and #5364.

3 years agoImprove the performance of updating the pid filter table in hdhomerun digital tuners.
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).

3 years agoFixed parsing w_scan format
Andrei Popescu [Sat, 13 Nov 2021 00:25:28 +0000 (16:25 -0800)] 
Fixed parsing w_scan format

3 years agoopentv: fix missing summary data on rescrape, #5995
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.

3 years agoopentv: fix incorrect summaries for skyuk epg, fixes #5995
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.

3 years agoRevert "Remove unnecessary conversion"
Flole998 [Tue, 7 Sep 2021 17:14:14 +0000 (19:14 +0200)] 
Revert "Remove unnecessary conversion"

This reverts commit 7757f066582bdb244c56e658c4a99f8e1d5832cd.

3 years agoRemove unnecessary conversion
hochwasser [Tue, 4 May 2021 15:28:39 +0000 (17:28 +0200)] 
Remove unnecessary conversion

The conversion from unsigned long to long long is not necessary.
Corrected the print statement uses the format code %lu.

3 years agoExpose RDS flag via HTSP.
Kai Sommerfeld [Thu, 19 Aug 2021 07:50:54 +0000 (09:50 +0200)] 
Expose RDS flag via HTSP.

3 years agoAdd support for SCT_RDS
Kai Sommerfeld [Thu, 5 Aug 2021 21:15:56 +0000 (23:15 +0200)] 
Add support for SCT_RDS

4 years agoUpgrade to libhdhomerun_20210624
Pablo [Sun, 25 Jul 2021 11:16:14 +0000 (13:16 +0200)] 
Upgrade to libhdhomerun_20210624

There is a new version of libhdhomerun

4 years agoFix ffmpeg jessie build error
Flole998 [Sat, 24 Jul 2021 21:40:03 +0000 (23:40 +0200)] 
Fix ffmpeg jessie build error

4 years agoAttempt to fix jessie build
Flole998 [Fri, 23 Jul 2021 18:15:38 +0000 (20:15 +0200)] 
Attempt to fix jessie build

4 years agoAttempt to fix jessie build
Flole998 [Fri, 23 Jul 2021 17:16:48 +0000 (19:16 +0200)] 
Attempt to fix jessie build

4 years agoAttempt to fix trusty and centos builds
Flole998 [Fri, 23 Jul 2021 16:36:19 +0000 (18:36 +0200)] 
Attempt to fix trusty and centos builds

4 years agoAutobuild: Add arm64, armhf and armel for bullseye and buster.
mpmc [Thu, 22 Jul 2021 13:51:21 +0000 (14:51 +0100)] 
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.

4 years agoDoozer.io: Add build targets for Debian, Bullseye & Sid
mpmc [Tue, 20 Jul 2021 17:51:15 +0000 (18:51 +0100)] 
Doozer.io: Add build targets for Debian, Bullseye & Sid

4 years agoFix slow loading bandwidth monitor graph in status tab
Flole998 [Wed, 21 Jul 2021 14:13:09 +0000 (16:13 +0200)] 
Fix slow loading bandwidth monitor graph in status tab

4 years agoAs we no longer have access to #hts on freenode swap to using libera - see https...
mpmc [Sat, 12 Jun 2021 12:32:00 +0000 (13:32 +0100)] 
As we no longer have access to #hts on freenode swap to using libera - see https://tvheadend.org/issues/6054

4 years agoAdd NVIDIA Hardware accelerated decoding for transcoding
Flole [Wed, 5 May 2021 14:45:37 +0000 (16:45 +0200)] 
Add NVIDIA Hardware accelerated decoding for transcoding

4 years agoFix EN50211 size for large messages
Flole [Mon, 31 May 2021 21:07:45 +0000 (23:07 +0200)] 
Fix EN50211 size for large messages

4 years agoUpdate ffmpeg to 4.4
Flole998 [Wed, 5 May 2021 14:38:29 +0000 (16:38 +0200)] 
Update ffmpeg to 4.4

4 years agoFix missing } from previous commit
Flole998 [Wed, 5 May 2021 14:12:21 +0000 (16:12 +0200)] 
Fix missing } from previous commit

4 years agoAllow PMT Parsing when PMT shares a PID with another table
Flole998 [Wed, 5 May 2021 14:07:56 +0000 (16:07 +0200)] 
Allow PMT Parsing when PMT shares a PID with another table

As proposed in #1403

4 years agoSAT>IP-Client: Add option for 16, 24 and 32-channel DVB-C tuners
Flole998 [Tue, 4 May 2021 17:37:47 +0000 (19:37 +0200)] 
SAT>IP-Client: Add option for 16, 24 and 32-channel DVB-C tuners

4 years agoseen is a unsigned type
hochwasser [Mon, 3 May 2021 20:16:22 +0000 (22:16 +0200)] 
seen is a unsigned type

Change the format string from d to u. seen is uint32_t -> line 1192

4 years agoelse is missing
hochwasser [Mon, 3 May 2021 20:10:46 +0000 (22:10 +0200)] 
else is missing

While locking into the code, there seems to miss an else statement. The indentation seems so.

4 years agoUpdate .gitignore
Jumper78 [Wed, 21 Apr 2021 21:38:08 +0000 (23:38 +0200)] 
Update .gitignore

4 years agoDelete .DS_Store
Jumper78 [Wed, 21 Apr 2021 21:34:41 +0000 (23:34 +0200)] 
Delete .DS_Store