]> git.ipfire.org Git - thirdparty/tvheadend.git/log
thirdparty/tvheadend.git
2 years ago - fixed bug with _lang3_to_lang2() 1527/head
Gene C [Mon, 17 Apr 2023 12:55:50 +0000 (08:55 -0400)] 
 - fixed bug with _lang3_to_lang2()
    Typo made using lang instead of lang3 in lookup map
 - clean by running through autopep8
 - Add more exception handling to prevent it crashing
   Still needs some improvements with exception types
 - tidy up for pylint
 - python 2 is deprecated - simplify for python 3

2 years agoupdate pict_type from AVPacket to AVFrame
uknunknown [Fri, 14 Apr 2023 17:25:41 +0000 (10:25 -0700)] 
update pict_type from AVPacket to AVFrame

- remove deprecated FF_API_CODED_FRAME
- remove pict_type from AVPacket_SideData
- use AVFrame->pict_type (same like ffmpeg 5.1.2 - ffprobe.c line 2595)
- remove patch for vaapi_encode

2 years agoupdate to ffmpeg 5.1.3
uknunknown [Fri, 14 Apr 2023 22:26:58 +0000 (15:26 -0700)] 
update to ffmpeg 5.1.3

update to ffmpeg 5.1.3

2 years agoupdate to ffmpeg 5.1.2
alingherghescu [Sun, 2 Apr 2023 18:38:35 +0000 (11:38 -0700)] 
update to ffmpeg 5.1.2

- ffmpeg_static will always compile with ffmpeg 5.1.2
- Makefile.ffmpeg added to 5.1.2
- src/muxer/muxer_libav.c: update 'AVOutputFrmat' to 'const AVOutputFrmat'
- src/transcoding/transcode/hwaccels/vaapi.c --> incorporated the struct from libavcodec/vaapi.h
- src/transcoding/transcode/video.c: update type for qdata_size

2 years agotv_meta_tvdb.py: Fix 'languague' typo.
James Bevan [Sat, 8 Apr 2023 11:38:00 +0000 (12:38 +0100)] 
tv_meta_tvdb.py: Fix 'languague' typo.

Typo 'languague' prevents the script from fetching poster art.

Fixes #6262.

2 years agotvhmeta: Fix tvhmeta authentication to the tvheadend API.
James Bevan [Sat, 1 Apr 2023 07:40:46 +0000 (08:40 +0100)] 
tvhmeta: Fix tvhmeta authentication to the tvheadend API.

Construct and add an Authorization header to the request, when a
username and password are provided to tvhmeta.

This fixes #6260.

2 years agoRemove references to CLA which is no longer available
Flole998 [Sun, 2 Apr 2023 00:17:47 +0000 (02:17 +0200)] 
Remove references to CLA which is no longer available

2 years agoupdated 'AVCodec' to 'const AVCodec'
alingherghescu [Wed, 22 Mar 2023 04:51:42 +0000 (21:51 -0700)] 
updated 'AVCodec' to 'const AVCodec'

- updated 'AVCodec' to 'const AVCodec'
- "avctx->refcounted_frames = 1;" deprecated (not required with: avcodec_receive_frame())

2 years agoremove deprecate struct vaapi_context and the vaapi.h
alingherghescu [Wed, 29 Mar 2023 03:45:51 +0000 (20:45 -0700)] 
remove deprecate struct vaapi_context and the vaapi.h

- remove deprecate struct vaapi_context and the vaapi.h

2 years agoRemove deprecated get_best_effort_timestamp() call
Flole998 [Fri, 24 Mar 2023 00:06:24 +0000 (00:06 +0000)] 
Remove deprecated get_best_effort_timestamp() call

2 years agoremove ffmpeg component avresample
alingherghescu [Thu, 23 Mar 2023 03:23:50 +0000 (20:23 -0700)] 
remove ffmpeg component avresample

- remove ffmpeg component avresample. Is deprecated and replaced by swresample. I verified that all functions from this component are not used in tvh (https://www.ffmpeg.org/doxygen/2.3/group__lavr.html)

2 years agoiconv: Allow using GNU libiconv
Olliver Schinagl [Thu, 23 Feb 2023 17:49:44 +0000 (18:49 +0100)] 
iconv: Allow using GNU libiconv

TVHeadend has a hard-dependency on libiconv. Lets make this a little bit
more flexible by also allowing gnu-libiconv.

This helps with musl-based systems, such as Alpine Linux.

Contributes to #4940.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2 years agoremove unused function and migrate from AVBitStreamFilterContext to AVBSFContext
alingherghescu [Thu, 16 Mar 2023 19:13:05 +0000 (12:13 -0700)] 
remove unused function and migrate from AVBitStreamFilterContext to AVBSFContext

- migrate from AVBitStreamFilterContext to AVBSFContext
- update AVCodec to 'const AVCodec'
- remove unused function: libav_is_encoder()
- remove deprecated functions:
-- AVFormatContext->filename
-- av_register_all() --> https://github.com/FFmpeg/FFmpeg/blob/master/doc/APIchanges (2018-02-06 - 0694d87024 - lavf 58.9.100 - avformat.h)
-- avfilter_register_all() --> https://github.com/FFmpeg/FFmpeg/blob/master/doc/APIchanges (2018-04-01 - f1805d160d - lavfi 7.14.100 - avfilter.h)

2 years agoupdate to ffmpeg codecpar
alingherghescu [Tue, 21 Mar 2023 16:52:40 +0000 (09:52 -0700)] 
update to ffmpeg codecpar

- update to ffmpeg codecpar

2 years agoRevert "fix for 64bit time_t on 32bit systems"
Flole998 [Sun, 12 Mar 2023 11:50:27 +0000 (12:50 +0100)] 
Revert "fix for 64bit time_t on 32bit systems"

This reverts commit 76a6263f1be4e3ccff968b47155b050fcc15f042.

2 years agofix for 64bit time_t on 32bit systems
pykpkg47 [Sun, 5 Mar 2023 02:43:18 +0000 (02:43 +0000)] 
fix for 64bit time_t on 32bit systems

2 years agoupdate NASM to 2.16.01
alingherghescu [Mon, 6 Mar 2023 01:35:53 +0000 (17:35 -0800)] 
update NASM to 2.16.01

- update NASM to 2.16.01

2 years agoupdate vaapi
alingherghescu [Mon, 6 Mar 2023 01:03:37 +0000 (17:03 -0800)] 
update vaapi

- update the code to match the format from vnenc.c (unify format)
- update the default value for level to match software encoding (3.0)

2 years agoDon't attempt to approve PRs automatically
Flole998 [Mon, 6 Mar 2023 01:09:08 +0000 (02:09 +0100)] 
Don't attempt to approve PRs automatically

2 years agoCodeball should also label PRs that need review
Flole998 [Sun, 5 Mar 2023 02:57:06 +0000 (03:57 +0100)] 
Codeball should also label PRs that need review

2 years agoFix for DVB Grabber and IPTV Stream
barzog [Mon, 13 Feb 2023 08:27:48 +0000 (11:27 +0300)] 
Fix for DVB Grabber and IPTV Stream

2 years agoRTSP redirect support fix and moved to http client
spdfrk [Sun, 4 Dec 2022 10:23:58 +0000 (11:23 +0100)] 
RTSP redirect support fix and moved to http client

2 years agoUse codeball for PRs
Flole998 [Tue, 21 Feb 2023 04:13:18 +0000 (05:13 +0100)] 
Use codeball for PRs

2 years agoupdate to ffmpeg codecpar
alingherghescu [Fri, 17 Feb 2023 04:20:28 +0000 (20:20 -0800)] 
update to ffmpeg codecpar

- update to ffmpeg codecpar

2 years agoupdate ffmpeg from 4.4.1 to 4.4.3
alingherghescu [Fri, 10 Feb 2023 04:49:15 +0000 (20:49 -0800)] 
update ffmpeg from 4.4.1 to 4.4.3

- update ffmpeg from 4.4.1 to 4.4.3

2 years agoupdate vaapi
alingherghescu [Mon, 6 Feb 2023 20:01:55 +0000 (12:01 -0800)] 
update vaapi

- added denoise_vaapi
- added sharpness_vaapi

2 years agoupdate vaapi
alingherghescu [Tue, 31 Jan 2023 00:15:04 +0000 (16:15 -0800)] 
update vaapi

- update libvpx to ver. 1.12.0
- replaced tvherror() with tvhinfo for bitrate report
- converted from bps to kbps
- reduced B frame to max 3 (4 is generating artifacts on my system)
- I had to set also bf otherwise will be set later in profile_video_class() with 3
- when low power is enabled max B frame will be disabled (because codec is not using B frames in low power mode)
- h264_vaapi and hevc_vaapi have also dynamic enable/disable for max B frame
- vp9 super frames can be enabled/disabled from the interface
- clean-up some javascript code

2 years agoFix Coverity-Build (#1499)
Flole998 [Sat, 28 Jan 2023 23:40:03 +0000 (00:40 +0100)] 
Fix Coverity-Build  (#1499)

* Add omx dependency for Coverity-Build

* Add libva-dev dependency for Coverity-Build

* Add nvidia-cuda-dev dependency for Coverity-Build

* Enable tvhcsa and memoryinfo for Coverity-Build

* Disable mmal due to unavailability for Coverity-Build

2 years agoRevert "Update debian/compat to version 10"
Flole998 [Sat, 28 Jan 2023 18:29:00 +0000 (19:29 +0100)] 
Revert "Update debian/compat to version 10"

This reverts commit 2a370dd17fcac7e587d45fd9971e346536379ea3.

2 years agoIgnore title mismatch if dup checking by CRID
dave-p [Sun, 15 Jan 2023 10:09:31 +0000 (10:09 +0000)] 
Ignore title mismatch if dup checking by CRID

Some channels add "New: " to the title if this is the first showing, so a title match with repeats will fail.

2 years agoUpdate debian/compat to version 10
Michał Janiszewski [Sun, 4 Dec 2022 22:45:20 +0000 (23:45 +0100)] 
Update debian/compat to version 10

Compat version 10 was declared recommended in 2016.

An important change introduced in 10 was change of default to target
parallel builds

While version 13 is the currently recommended one, it is too new for
systems in use

https://github.com/Debian/debhelper/blob/5d1bb29841043d8e47ebbdd043e6cd086cad508e/debhelper.pod#compatibility-levels

2 years agoUnify command time range to 10-300 ms
Peter Bašista [Tue, 17 Jan 2023 20:08:15 +0000 (21:08 +0100)] 
Unify command time range to 10-300 ms

Unify the allowed range of command time
for rotors, switches and unicable devices.

2 years agoUnify power up time range to 10-500 ms
Peter Bašista [Tue, 17 Jan 2023 08:39:59 +0000 (09:39 +0100)] 
Unify power up time range to 10-500 ms

Unify the allowed range of power up time
for rotors, switches and unicable devices.

2 years agoAdd configurable delays after Unicable operations
Peter Bašista [Tue, 17 Jan 2023 07:48:43 +0000 (08:48 +0100)] 
Add configurable delays after Unicable operations

Allow user to adjust the length of time delays
after the Unicable device is powered up
and after a DiSEqC command is sent to it

2 years agoUnify names and order of Unicable-specific configuration fields
Peter Bašista [Tue, 17 Jan 2023 07:48:43 +0000 (08:48 +0100)] 
Unify names and order of Unicable-specific configuration fields

2 years agoAdd descriptions to the existing Unicable configuration fields
Peter Bašista [Tue, 17 Jan 2023 07:46:08 +0000 (08:46 +0100)] 
Add descriptions to the existing Unicable configuration fields

2 years agoupdate vaapi
alingherghescu [Mon, 23 Jan 2023 06:54:06 +0000 (22:54 -0800)] 
update vaapi

- updated function _video_filters_get_filters() due to a bug hidden by previous bug (Bug #6247)
- fixed Decoder HW + Encoder HW --> was generating download / upload that increase CPU usage
- remove vp9 profile0 to 3 (ffmpeg vaapi is not supporting profiles for vp9)
- improve 'tier' and added: level, qmin, qmax, desired_b_depth
- printing Bitrate, Buffer size, Max bitrate (for each transcoding start)
- added superframe for vp9

2 years agodescrambler: cccam: move send keepalive message to traces
Jaroslav Kysela [Mon, 23 Jan 2023 11:08:00 +0000 (12:08 +0100)] 
descrambler: cccam: move send keepalive message to traces

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agodescrambler: cccam - simplify cccam_handle_keys()
Jaroslav Kysela [Mon, 23 Jan 2023 09:56:28 +0000 (10:56 +0100)] 
descrambler: cccam - simplify cccam_handle_keys()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agodescrambler: cclient: optimization for multiple key clients
Jaroslav Kysela [Mon, 23 Jan 2023 08:39:51 +0000 (09:39 +0100)] 
descrambler: cclient: optimization for multiple key clients

Do not use client when other handles requests.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agodescrambler: cosmetic cleanups, more CAID logs
Jaroslav Kysela [Mon, 23 Jan 2023 08:33:54 +0000 (09:33 +0100)] 
descrambler: cosmetic cleanups, more CAID logs

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agodescrambler: cwc: do not register bad provider numbers for betacrypt and irdeto
Jaroslav Kysela [Sun, 22 Jan 2023 16:11:05 +0000 (17:11 +0100)] 
descrambler: cwc: do not register bad provider numbers for betacrypt and irdeto

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agodescrambler: cwc: Fix the additional card registration (mgclient option in o*s*c...
Jaroslav Kysela [Sun, 22 Jan 2023 15:51:24 +0000 (16:51 +0100)] 
descrambler: cwc: Fix the additional card registration (mgclient option in o*s*c*a*m)

It's expected that new CAIDs and providers are added to the current list rather
than to overwrite the previous fetched providers.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2 years agogrammar: Replace "then" with "than"
Peter Bašista [Sun, 15 Jan 2023 19:45:25 +0000 (20:45 +0100)] 
grammar: Replace "then" with "than"

2 years agoPreserve existing Unicable idnode during the set operation
Peter Bašista [Sun, 15 Jan 2023 19:31:55 +0000 (20:31 +0100)] 
Preserve existing Unicable idnode during the set operation

Currently, the Unicable settings are always cleared
when enabling or disabling the corresponding satellite position
or its owning adapter. The reason is that the idnode with Unicable
configuration is always unconditionally deleted
during the "set" operation.

This change adds a check for the existing Unicable configuration
and preserves the existing idnode if its type remains the same.

The same logic is already used when changing the configuration
related to LNB, switch and rotor.

2 years agoupdated function _video_filters_get_filters()
alingherghescu [Sat, 14 Jan 2023 03:46:19 +0000 (19:46 -0800)] 
updated function _video_filters_get_filters()

- fixed Decoder HW + Encoder SW --> not working (with VAAPI) - Bug #6247
- fixed resize and deinterlace (*_vaapi for hw and ffmpeg for sw)

2 years agoprofile video resize improvements
alingherghescu [Tue, 10 Jan 2023 20:47:10 +0000 (12:47 -0800)] 
profile video resize improvements

- provide the ability to specify if scaling should be performed Up and Down, Up (only) or Down (only)

profile video resize improvements

- provide the ability to specify if scaling should be performed Up and Down, Up (only) or Down (only)

2 years agoAdd autorec duplicate handling default to dvr config.
dave-p [Sun, 25 Dec 2022 10:07:13 +0000 (10:07 +0000)] 
Add autorec duplicate handling default to dvr config.
Default will be applied to new autorecs unless overridden.
duplicate_handling.md: Add details of "Record if Unique" option.

2 years agoupdate vaapi
alingherghescu [Sat, 7 Jan 2023 02:09:28 +0000 (18:09 -0800)] 
update vaapi

- added new settings: platform, bitrate scale factor, low power, loop filter level, loop filter sharpness, async depth
- implemented new (dynamic) settings adjustment (in js)
- added new parameters: b, low_power, loop_filter_level, loop_filter_sharpness, async_depth
- tvhva_context_check_profile() will change TVHVAContext->entrypoint from VAEntrypointEncSlice into VAEntrypointEncSliceLP if VAEntrypointEncSlice is not available for that CODEC (according to VAAPI info)
- moved low_power to tvh_codeo_profile in order to initialize properly the entrypoint
- many error reporting improvements
- separated some bundled conditions

2 years agoremove libavresample from build scripts
Pim Zandbergen [Fri, 30 Dec 2022 00:46:43 +0000 (01:46 +0100)] 
remove libavresample from build scripts

2 years agoAdd amd64 jammy to builds
Flole998 [Wed, 4 Jan 2023 14:48:38 +0000 (14:48 +0000)] 
Add amd64 jammy to builds

2 years agoFix a few more builds, add kinetic support
Flole998 [Wed, 21 Dec 2022 18:37:10 +0000 (18:37 +0000)] 
Fix a few more builds, add kinetic support

2 years agoAllow old builds to pass
Flole998 [Wed, 21 Dec 2022 00:57:32 +0000 (01:57 +0100)] 
Allow old builds to pass

2 years agoBuild for kinetic instead of impish
Flole998 [Wed, 21 Dec 2022 00:34:08 +0000 (01:34 +0100)] 
Build for kinetic instead of impish

2 years agoRemove variable declaration from for-loop
Flole998 [Sat, 17 Dec 2022 18:54:07 +0000 (19:54 +0100)] 
Remove variable declaration from for-loop

2 years agoDon't fail on strict aliasing violations
Flole998 [Sat, 17 Dec 2022 18:46:41 +0000 (19:46 +0100)] 
Don't fail on strict aliasing violations

2 years agoDon't confuse GCC with zero-length array
Cédric Schieli [Sat, 10 Dec 2022 13:45:10 +0000 (14:45 +0100)] 
Don't confuse GCC with zero-length array

Fix FTBFS introduced by 7b95ba4cf9113ae8808b3e4a9425010b607dbaca

Link: https://tvheadend.org/issues/6173
Link: https://tvheadend.org/issues/6226
References: 7b95ba4cf9113ae8808b3e4a9425010b607dbaca
Signed-off-by: Cédric Schieli <cschieli@gmail.com>
2 years agoconfig: Enable HbbTV parser by default
Kacper Michajłow [Mon, 28 Nov 2022 20:00:47 +0000 (21:00 +0100)] 
config: Enable HbbTV parser by default

It make sense to include it always when available

Link: https://tvheadend.org/issues/6223
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2 years agodvb_psi_pmt: Recognize AC-4 audio descriptor
Kacper Michajłow [Mon, 28 Nov 2022 19:59:26 +0000 (20:59 +0100)] 
dvb_psi_pmt: Recognize AC-4 audio descriptor

This allows pass-through of AC-4 audio stream.

Will need adjustment when AC-4 gets support in FFmpeg to enable
transcode.

Link: https://tvheadend.org/issues/6222
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2 years agoAdd South Africa to Countries list.
dave-p [Mon, 28 Nov 2022 09:46:10 +0000 (09:46 +0000)] 
Add South Africa to Countries list.

dtv-scan-tables commit 28414c7 added muxes for South Africa.
Add the country to the country codes list.

2 years agoBuild various targets and prepare new repository (#1476)
Flole998 [Sun, 27 Nov 2022 21:03:38 +0000 (22:03 +0100)] 
Build various targets and prepare new repository  (#1476)

Some builds still need a newer python version

2 years agoAvoid breaking strict aliasing in IP_AS_V{4,6}
David Kalnischkies [Wed, 23 Nov 2022 11:11:26 +0000 (12:11 +0100)] 
Avoid breaking strict aliasing in IP_AS_V{4,6}

GCC complains (one example, more in tcp.h):

In file included from src/main.c:41:
src/tcp.h: In function ‘ip_check_equal_v4’:
src/tcp.h:29:31: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
   29 | #define IP_AS_V4(storage, f) ((struct sockaddr_in *)&(storage))->sin_##f
      |                              ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/tcp.h:67:14: note: in expansion of macro ‘IP_AS_V4’
   67 |     { return IP_AS_V4(a, addr).s_addr == IP_AS_V4(b, addr).s_addr; }
      |              ^~~~~~~~

storage (a) here is a pointer to sockaddr_storage which is either backed
by a sockaddr_in or sockaddr_in6 struct (here, it would be good if it is
the former, we decided based on sa_family in ip_check_equal). Referencing
it means we have a pointer to a pointer to sockaddr_storage here, which
we then cast to a pointer to sockaddr_in. Our so type-punned pointer is
then dereferenced breaking strict-aliasing as this pointer as well as
our original pointer share a memory location and both could be used to
change it even through they are of different types.

We can avoid this situation simply by removing the reference as then it
is just casting a pointer to a different type (which in this case is
legal as storage is really a sockaddr_in).

Removing the reference breaks users of the macro who do not feed it a
pointer to a sockaddr_storage, so while the warnings were all produced
by tcp.h, we end up changing code everywhere else to resolve them –
usually by just taking a reference or not dereferencing there.

As this is the only instance of (detected) strict-aliasing breakage
the Makefile is also changed to no longer build the entirety of
tvheadend with strict-aliasing rules disabled. Similar for the disabled
stringop warnings which weren't (correctly) triggered in the current
code.

As a small bonus, this also prevents gcc-11 from tripping with a false
positive over the previous tcp change in c0f616e / #1473.

2 years agoRemove always-true checks
Flole998 [Mon, 21 Nov 2022 19:47:29 +0000 (20:47 +0100)] 
Remove always-true checks

2 years agoReduce ADTS header size for better compatibility
Flole998 [Mon, 21 Nov 2022 13:03:00 +0000 (14:03 +0100)] 
Reduce ADTS header size for better compatibility

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