From b0cbd748544e3937930ae90d5927f4610fd0999f Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Sat, 4 Oct 2025 09:00:05 +0000 Subject: [PATCH] Convert GPL license headers to SPDX format throughout codebase Signed-off-by: Christian Hewitt --- lib/py/tvh/htsmsg.py | 16 +--- lib/py/tvh/htsp.py | 17 +--- lib/py/tvh/log.py | 17 +--- lib/py/tvh/tv_meta_tmdb.py | 16 +--- lib/py/tvh/tv_meta_tvdb.py | 19 +--- src/access.c | 17 +--- src/access.h | 36 +++++--- src/api.c | 18 +--- src/api.h | 18 +--- src/api/api_access.c | 18 +--- src/api/api_bouquet.c | 18 +--- src/api/api_caclient.c | 20 ++--- src/api/api_channel.c | 18 +--- src/api/api_codec.c | 19 +--- src/api/api_config.c | 18 +--- src/api/api_dvr.c | 18 +--- src/api/api_epg.c | 18 +--- src/api/api_epggrab.c | 18 +--- src/api/api_esfilter.c | 18 +--- src/api/api_idnode.c | 18 +--- src/api/api_imagecache.c | 18 +--- src/api/api_input.c | 18 +--- src/api/api_intlconv.c | 18 +--- src/api/api_language.c | 18 +--- src/api/api_mpegts.c | 24 ++---- src/api/api_profile.c | 21 ++--- src/api/api_ratinglabel.c | 20 +---- src/api/api_raw.c | 18 +--- src/api/api_satip.c | 18 +--- src/api/api_service.c | 18 +--- src/api/api_status.c | 18 +--- src/api/api_timeshift.c | 18 +--- src/api/api_wizard.c | 18 +--- src/atomic.h | 17 +--- src/avahi.c | 17 +--- src/bitops.h | 17 +--- src/bonjour.c | 17 +--- src/bouquet.c | 17 +--- src/bouquet.h | 17 +--- src/channels.c | 17 +--- src/channels.h | 17 +--- src/clock.h | 17 +--- src/compat.h | 19 +--- src/config.c | 17 +--- src/config.h | 17 +--- src/cron.c | 27 +++--- src/cron.h | 18 +--- src/dbus.c | 17 +--- src/dbus.h | 17 +--- src/descrambler/algo/libaes128dec.c | 1 + src/descrambler/algo/libaesdec.c | 1 + src/descrambler/algo/libdesdec.c | 1 + src/descrambler/caclient.c | 18 +--- src/descrambler/caclient.h | 17 +--- src/descrambler/caid.c | 18 +--- src/descrambler/caid.h | 18 +--- src/descrambler/capmt.c | 17 +--- src/descrambler/cccam.c | 57 ++++++++---- src/descrambler/cclient.c | 19 +--- src/descrambler/cclient.h | 27 +++--- src/descrambler/constcw.c | 31 ++++--- src/descrambler/cwc.c | 19 +--- src/descrambler/descrambler.c | 29 +++---- src/descrambler/descrambler.h | 17 +--- src/descrambler/dvbcam.c | 19 +--- src/descrambler/dvbcam.h | 17 +--- src/descrambler/emm_reass.c | 19 +--- src/descrambler/emm_reass.h | 17 +--- src/descrambler/tsdebugcw.c | 17 +--- src/descrambler/tvhcsa.c | 18 +--- src/descrambler/tvhcsa.h | 17 +--- src/docs.h | 18 +--- src/download.c | 28 +++--- src/download.h | 18 +--- src/dvr/dvr.h | 17 +--- src/dvr/dvr_autorec.c | 17 +--- src/dvr/dvr_config.c | 19 +--- src/dvr/dvr_cutpoints.c | 14 +-- src/dvr/dvr_db.c | 19 +--- src/dvr/dvr_inotify.c | 31 +++---- src/dvr/dvr_rec.c | 19 +--- src/dvr/dvr_timerec.c | 17 +--- src/dvr/dvr_vfsmgr.c | 32 +++---- src/epg.c | 17 +--- src/epg.h | 17 +--- src/epgdb.c | 17 +--- src/epggrab.c | 17 +--- src/epggrab.h | 17 +--- src/epggrab/channel.c | 19 +--- src/epggrab/module.c | 17 +--- src/epggrab/module/eit.c | 17 +--- src/epggrab/module/eitpatternlist.c | 17 +--- src/epggrab/module/eitpatternlist.h | 21 ++--- src/epggrab/module/opentv.c | 17 +--- src/epggrab/module/psip.c | 20 +---- src/epggrab/module/xmltv.c | 17 +--- src/epggrab/otamux.c | 17 +--- src/epggrab/private.h | 17 +--- src/epggrab/support/freesat_huffman.c | 25 ++---- src/esfilter.c | 17 +--- src/esfilter.h | 17 +--- src/esstream.c | 43 ++++++---- src/esstream.h | 18 +--- src/extra/capmt_ca.c | 1 + src/file.c | 17 +--- src/file.h | 17 +--- src/filebundle.c | 17 +--- src/filebundle.h | 27 +++--- src/fsmonitor.c | 18 +--- src/fsmonitor.h | 18 +--- src/hts_strtab.h | 17 +--- src/htsbuf.c | 17 +--- src/htsbuf.h | 18 +--- src/htsmsg.c | 86 ++++++++++++++++--- src/htsmsg.h | 78 ++++++++++++++--- src/htsmsg_binary.c | 24 +++--- src/htsmsg_binary.h | 18 +--- src/htsmsg_binary2.c | 26 +++--- src/htsmsg_binary2.h | 17 +--- src/htsmsg_json.c | 23 ++--- src/htsmsg_json.h | 18 +--- src/htsmsg_xml.c | 17 +--- src/htsmsg_xml.h | 17 +--- src/htsp_server.c | 17 +--- src/htsp_server.h | 17 +--- src/htsstr.c | 20 ++--- src/http.c | 17 +--- src/http.h | 17 +--- src/httpc.c | 18 +--- src/huffman.c | 16 +--- src/huffman.h | 17 +--- src/idnode.c | 18 +--- src/idnode.h | 18 +--- src/imagecache.c | 20 +---- src/imagecache.h | 17 +--- src/input.c | 17 +--- src/input.h | 17 +--- src/input/mpegts.c | 25 +++--- src/input/mpegts.h | 18 +--- src/input/mpegts/dvb.h | 17 +--- src/input/mpegts/dvb_charset.c | 22 ++--- src/input/mpegts/dvb_charset.h | 17 +--- src/input/mpegts/dvb_psi.c | 17 +--- src/input/mpegts/dvb_psi_hbbtv.c | 18 +--- src/input/mpegts/dvb_psi_hbbtv.h | 17 +--- src/input/mpegts/dvb_psi_lib.c | 19 +--- src/input/mpegts/dvb_psi_pmt.c | 17 +--- src/input/mpegts/dvb_psi_pmt.h | 17 +--- src/input/mpegts/dvb_support.c | 17 +--- src/input/mpegts/en50221/en50221.c | 17 +--- src/input/mpegts/en50221/en50221.h | 24 +++--- src/input/mpegts/en50221/en50221_apps.c | 17 +--- src/input/mpegts/en50221/en50221_capmt.c | 17 +--- src/input/mpegts/en50221/en50221_capmt.h | 17 +--- src/input/mpegts/fastscan.c | 19 ++-- src/input/mpegts/fastscan.h | 17 +--- src/input/mpegts/iptv.h | 18 +--- src/input/mpegts/iptv/iptv.c | 18 +--- src/input/mpegts/iptv/iptv_auto.c | 18 +--- src/input/mpegts/iptv/iptv_file.c | 18 +--- src/input/mpegts/iptv/iptv_http.c | 20 +---- src/input/mpegts/iptv/iptv_libav.c | 23 ++--- src/input/mpegts/iptv/iptv_mux.c | 20 ++--- src/input/mpegts/iptv/iptv_pipe.c | 18 +--- src/input/mpegts/iptv/iptv_private.h | 18 +--- src/input/mpegts/iptv/iptv_rtcp.c | 17 +--- src/input/mpegts/iptv/iptv_rtcp.h | 18 +--- src/input/mpegts/iptv/iptv_rtsp.c | 27 +++--- src/input/mpegts/iptv/iptv_service.c | 19 +--- src/input/mpegts/iptv/iptv_udp.c | 18 +--- src/input/mpegts/linuxdvb.h | 18 +--- src/input/mpegts/linuxdvb/linuxdvb.c | 18 +--- src/input/mpegts/linuxdvb/linuxdvb_adapter.c | 18 +--- src/input/mpegts/linuxdvb/linuxdvb_ca.c | 21 +---- src/input/mpegts/linuxdvb/linuxdvb_ddci.c | 18 +--- src/input/mpegts/linuxdvb/linuxdvb_en50494.c | 26 +----- src/input/mpegts/linuxdvb/linuxdvb_frontend.c | 18 +--- src/input/mpegts/linuxdvb/linuxdvb_lnb.c | 18 +--- src/input/mpegts/linuxdvb/linuxdvb_private.h | 18 +--- src/input/mpegts/linuxdvb/linuxdvb_rotor.c | 18 +--- src/input/mpegts/linuxdvb/linuxdvb_satconf.c | 18 +--- src/input/mpegts/linuxdvb/linuxdvb_switch.c | 18 +--- src/input/mpegts/mpegts_dvb.h | 19 +--- src/input/mpegts/mpegts_input.c | 17 +--- src/input/mpegts/mpegts_mux.c | 18 +--- src/input/mpegts/mpegts_mux_dvb.c | 18 +--- src/input/mpegts/mpegts_mux_sched.c | 18 +--- src/input/mpegts/mpegts_mux_sched.h | 18 +--- src/input/mpegts/mpegts_network.c | 17 +--- src/input/mpegts/mpegts_network_dvb.c | 18 +--- src/input/mpegts/mpegts_network_scan.c | 18 +--- src/input/mpegts/mpegts_network_scan.h | 18 +--- src/input/mpegts/mpegts_pid.c | 17 +--- src/input/mpegts/mpegts_service.c | 18 +--- src/input/mpegts/mpegts_table.c | 21 ++--- src/input/mpegts/mpegts_tsdebug.c | 18 +--- src/input/mpegts/satip/satip.c | 18 +--- src/input/mpegts/satip/satip.h | 18 +--- src/input/mpegts/satip/satip_frontend.c | 18 +--- src/input/mpegts/satip/satip_private.h | 18 +--- src/input/mpegts/satip/satip_rtsp.c | 18 +--- src/input/mpegts/satip/satip_satconf.c | 18 +--- src/input/mpegts/scanfile.c | 17 +--- src/input/mpegts/scanfile.h | 17 +--- src/input/mpegts/tsdemux.c | 17 +--- src/input/mpegts/tsdemux.h | 17 +--- src/input/mpegts/tsfile.h | 18 +--- src/input/mpegts/tsfile/tsfile.c | 23 ++--- src/input/mpegts/tsfile/tsfile_input.c | 18 +--- src/input/mpegts/tsfile/tsfile_mux.c | 18 +--- src/input/mpegts/tsfile/tsfile_private.h | 18 +--- src/input/mpegts/tvhdhomerun/tvhdhomerun.c | 18 +--- src/input/mpegts/tvhdhomerun/tvhdhomerun.h | 18 +--- .../mpegts/tvhdhomerun/tvhdhomerun_frontend.c | 18 +--- .../mpegts/tvhdhomerun/tvhdhomerun_private.h | 18 +--- src/intlconv.h | 17 +--- src/lang_codes.c | 17 +--- src/lang_codes.h | 20 ++--- src/lang_str.c | 17 +--- src/lang_str.h | 24 +++--- src/libav.c | 9 ++ src/libav.h | 18 +--- src/lock.c | 15 +--- src/lock.h | 17 +--- src/main.c | 17 +--- src/memoryinfo.c | 17 +--- src/memoryinfo.h | 17 +--- src/misc/dbl.c | 20 +---- src/misc/json.c | 17 +--- src/misc/m3u.c | 23 ++--- src/muxer.c | 38 +++++--- src/muxer.h | 17 +--- src/muxer/ebml.c | 21 +---- src/muxer/muxer_audioes.c | 29 ++++--- src/muxer/muxer_audioes.h | 17 +--- src/muxer/muxer_libav.c | 30 ++++--- src/muxer/muxer_libav.h | 17 +--- src/muxer/muxer_mkv.c | 27 ++---- src/muxer/muxer_mkv.h | 17 +--- src/muxer/muxer_pass.c | 17 +--- src/muxer/muxer_pass.h | 17 +--- src/notify.c | 17 +--- src/notify.h | 17 +--- src/packet.c | 20 +---- src/packet.h | 17 +--- src/parsers/bitstream.c | 17 +--- src/parsers/bitstream.h | 17 +--- src/parsers/message.c | 17 +--- src/parsers/parser_h264.c | 1 + src/parsers/parser_h264.h | 17 +--- src/parsers/parser_latm.c | 1 + src/parsers/parser_latm.h | 17 +--- src/parsers/parser_teletext.c | 27 ++---- src/parsers/parser_teletext.h | 17 +--- src/parsers/parsers.c | 19 +--- src/parsers/parsers.h | 17 +--- src/plumbing/globalheaders.c | 33 +++---- src/plumbing/globalheaders.h | 19 +--- src/plumbing/tsfix.c | 38 ++++---- src/plumbing/tsfix.h | 19 +--- src/profile.c | 17 +--- src/profile.h | 17 +--- src/prop.c | 18 +--- src/prop.h | 18 +--- src/proplib.c | 18 +--- src/ratinglabels.c | 24 +----- src/ratinglabels.h | 19 +--- src/redblack.h | 41 ++++----- src/rtsp.c | 18 +--- src/satip/rtp.c | 29 +++---- src/satip/rtsp.c | 18 +--- src/satip/server.c | 18 +--- src/satip/server.h | 18 +--- src/sbuf.h | 20 ++--- src/service.c | 17 +--- src/service.h | 17 +--- src/service_mapper.c | 17 +--- src/service_mapper.h | 17 +--- src/settings.c | 33 ++++--- src/settings.h | 17 +--- src/spawn.c | 29 ++++--- src/spawn.h | 17 +--- src/streaming.c | 45 ++++++---- src/streaming.h | 17 +--- src/string_list.c | 17 +--- src/string_list.h | 19 ++-- src/subscriptions.c | 17 +--- src/subscriptions.h | 17 +--- src/tcp.c | 47 +++++++--- src/tcp.h | 17 +--- src/test.h | 2 + src/timeshift.c | 19 +--- src/timeshift.h | 17 +--- src/timeshift/private.h | 26 +++--- src/timeshift/timeshift_filemgr.c | 17 +--- src/timeshift/timeshift_reader.c | 19 +--- src/timeshift/timeshift_writer.c | 19 +--- src/tprofile.c | 17 +--- src/tprofile.h | 17 +--- src/transcoding/codec.h | 19 +--- src/transcoding/codec/codec.c | 19 +--- src/transcoding/codec/codecs/aac.c | 20 +---- src/transcoding/codec/codecs/flac.c | 19 +--- .../codec/codecs/libs/libfdk_aac.c | 19 +--- src/transcoding/codec/codecs/libs/libopus.c | 19 +--- src/transcoding/codec/codecs/libs/libtheora.c | 19 +--- src/transcoding/codec/codecs/libs/libvorbis.c | 19 +--- src/transcoding/codec/codecs/libs/libvpx.c | 19 +--- src/transcoding/codec/codecs/libs/libx26x.c | 19 +--- src/transcoding/codec/codecs/libs/nvenc.c | 19 +--- src/transcoding/codec/codecs/libs/omx.c | 19 +--- src/transcoding/codec/codecs/libs/vaapi.c | 19 +--- src/transcoding/codec/codecs/mp2.c | 19 +--- src/transcoding/codec/codecs/mpeg2video.c | 19 +--- src/transcoding/codec/codecs/vorbis.c | 19 +--- src/transcoding/codec/internals.h | 19 +--- src/transcoding/codec/module.c | 19 +--- src/transcoding/codec/profile.c | 19 +--- src/transcoding/codec/profile_audio_class.c | 19 +--- src/transcoding/codec/profile_class.c | 19 +--- src/transcoding/codec/profile_video_class.c | 19 +--- src/transcoding/codec/vainfo.c | 21 +---- src/transcoding/codec/vainfo.h | 36 ++++---- src/transcoding/memutils.c | 20 +---- src/transcoding/memutils.h | 20 +---- src/transcoding/transcode.h | 19 +--- src/transcoding/transcode/audio.c | 19 +--- src/transcoding/transcode/context.c | 19 +--- src/transcoding/transcode/helpers.c | 19 +--- src/transcoding/transcode/hwaccels/hwaccels.c | 18 +--- src/transcoding/transcode/hwaccels/hwaccels.h | 19 +--- src/transcoding/transcode/hwaccels/vaapi.c | 18 +--- src/transcoding/transcode/hwaccels/vaapi.h | 19 +--- src/transcoding/transcode/internals.h | 19 +--- src/transcoding/transcode/log.h | 19 +--- src/transcoding/transcode/module.c | 19 +--- src/transcoding/transcode/stream.c | 19 +--- src/transcoding/transcode/transcoder.c | 19 +--- src/transcoding/transcode/video.c | 18 +--- src/trap.c | 23 ++--- src/trap.h | 20 +---- src/tvh_endian.h | 15 +--- src/tvh_locale.c | 17 +--- src/tvh_locale.h | 18 +--- src/tvh_string.h | 20 ++--- src/tvh_thread.c | 1 + src/tvh_thread.h | 18 +--- src/tvheadend.h | 18 +--- src/tvhlog.c | 17 +--- src/tvhlog.h | 25 +++--- src/tvhpoll.c | 18 +--- src/tvhpoll.h | 19 +--- src/tvhregex.h | 17 +--- src/tvhtime.c | 4 + src/tvhtime.h | 18 +--- src/tvhvfs.c | 15 +--- src/tvhvfs.h | 17 +--- src/udp.c | 20 +---- src/udp.h | 19 +--- src/udp_stream.c | 20 +---- src/udp_stream.h | 17 +--- src/upnp.c | 22 ++--- src/upnp.h | 17 +--- src/url.c | 18 +--- src/url.h | 19 +--- src/utils.c | 15 +--- src/uuid.c | 18 +--- src/uuid.h | 37 ++++---- src/watchdog.c | 17 +--- src/watchdog.h | 17 +--- src/webui/comet.c | 17 +--- src/webui/doc_md.c | 29 ++++--- src/webui/extjs.c | 24 +++--- src/webui/html.c | 20 ++--- src/webui/simpleui.c | 17 +--- src/webui/statedump.c | 18 +--- src/webui/webui.c | 19 +--- src/webui/webui.h | 18 +--- src/webui/webui_api.c | 18 +--- src/webui/xmltv.c | 29 ++++--- src/wizard.c | 17 +--- src/wizard.h | 17 +--- src/wrappers.c | 1 + src/zlib.c | 17 +--- support/eitscrape_test.py | 16 +--- support/lib.sh | 33 +------ support/template/header.c | 27 +----- support/template/header.h | 29 ++----- support/template/header.py | 24 +----- support/template/header.sh | 25 +----- 390 files changed, 1895 insertions(+), 5651 deletions(-) diff --git a/lib/py/tvh/htsmsg.py b/lib/py/tvh/htsmsg.py index f74e6ef00..bad79f5c1 100644 --- a/lib/py/tvh/htsmsg.py +++ b/lib/py/tvh/htsmsg.py @@ -1,19 +1,7 @@ #!/usr/bin/env python -# +# SPDX-License-Identifier: GPL-3.0-or-later # Copyright (C) 2012 Adam Sutton -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# + """ Support for processing HTSMSG binary format """ diff --git a/lib/py/tvh/htsp.py b/lib/py/tvh/htsp.py index bab234bea..6d74ccdf7 100644 --- a/lib/py/tvh/htsp.py +++ b/lib/py/tvh/htsp.py @@ -1,19 +1,7 @@ #!/usr/bin/env python -# +# SPDX-License-Identifier: GPL-3.0-or-later # Copyright (C) 2012 Adam Sutton -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# + """ This is a very simple HTSP client library written in python mainly just for demonstration purposes. @@ -100,4 +88,3 @@ class HTSPClient(object): def disconnect(self): self._sock.close() - diff --git a/lib/py/tvh/log.py b/lib/py/tvh/log.py index 520fca206..57a5ec05e 100644 --- a/lib/py/tvh/log.py +++ b/lib/py/tvh/log.py @@ -1,19 +1,7 @@ #!/usr/bin/env python -# +# SPDX-License-Identifier: GPL-3.0-or-later # Copyright (C) 2012 Adam Sutton -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# + """ Some very basic logging routines """ @@ -64,4 +52,3 @@ def info(msg, **dargs): # def error(msg, **dargs): out('ERROR', msg, **dargs) - diff --git a/lib/py/tvh/tv_meta_tmdb.py b/lib/py/tvh/tv_meta_tmdb.py index c2657fc11..2406fdc3d 100755 --- a/lib/py/tvh/tv_meta_tmdb.py +++ b/lib/py/tvh/tv_meta_tmdb.py @@ -1,20 +1,8 @@ #! /usr/bin/env python3 -# Retrieve details for a movie from tmdb. +# SPDX-License-Identifier: GPL-3.0-or-later # +# Retrieve details for a movie from tmdb. # This product uses the TMDb API but is not endorsed or certified by TMDb. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . import os,sys import json diff --git a/lib/py/tvh/tv_meta_tvdb.py b/lib/py/tvh/tv_meta_tvdb.py index 9e9ccfadf..b68619bb0 100755 --- a/lib/py/tvh/tv_meta_tvdb.py +++ b/lib/py/tvh/tv_meta_tvdb.py @@ -1,28 +1,13 @@ #! /usr/bin/env python3 -# Retrieve details for a series from tvdb. +# SPDX-License-Identifier: GPL-3.0-or-later # +# Retrieve details for a series from tvdb. # Required options: # --tvdb-key XX # Option important options: # --tvdb-languages - a csv of 2-character languages to use such as en,nl -# # TV information and images are provided by TheTVDB.com, but we are # not endorsed or certified by TheTVDB.com or its affiliates -# -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - import os,sys import json import logging diff --git a/src/access.c b/src/access.c index 6015b14ee..7bd18e96d 100644 --- a/src/access.c +++ b/src/access.c @@ -1,19 +1,8 @@ /* - * tvheadend, access control - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, access control */ #include "tvheadend.h" diff --git a/src/access.h b/src/access.h index f85c7a3a7..79a7a0139 100644 --- a/src/access.h +++ b/src/access.h @@ -1,19 +1,8 @@ /* - * TV headend - Access control - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - Access control */ #ifndef ACCESS_H_ @@ -243,11 +232,13 @@ typedef struct access_ticket { /** * Create a new ticket for the requested resource and generate a id for it */ + const char* access_ticket_create(const char *resource, access_t *a); /** * Verifies that a given ticket id matches a resource */ + access_t *access_ticket_verify2(const char *id, const char *resource); int access_ticket_delete(const char *ticket_id); @@ -255,27 +246,32 @@ int access_ticket_delete(const char *ticket_id); /** * Free the access structure */ + void access_destroy(access_t *a); /** * Copy the access structure */ + access_t *access_copy(access_t *src); /** * Compare the access structures */ + int access_compare(access_t *a, access_t *b); /** * */ + char * access_get_lang(access_t *a, const char *lang); /** * */ + const char * access_get_theme(access_t *a); @@ -285,6 +281,7 @@ access_get_theme(access_t *a); * * Return 0 if access is granted, -1 otherwise */ + static inline int access_verify2(const access_t *a, uint32_t mask) { return a ? ((mask & ACCESS_OR) ? ((a->aa_rights & mask) ? 0 : -1) : @@ -295,6 +292,7 @@ int access_verify_list(htsmsg_t *list, const char *item); /** * Get the access structure */ + typedef int (*verify_callback_t)(void *aux, const char *passwd); access_t *access_get(struct sockaddr_storage *src, const char *username, @@ -303,36 +301,42 @@ access_t *access_get(struct sockaddr_storage *src, const char *username, /** * */ + access_t * access_get_by_username(const char *username); /** * */ + access_t * access_get_by_addr(struct sockaddr_storage *src); /** * */ + access_t * access_get_by_auth(struct sockaddr_storage *src, const char *id); /** * */ + access_entry_t * access_entry_create(const char *uuid, htsmsg_t *conf); /** * */ + void access_entry_destroy(access_entry_t *ae, int delconf); /** * */ + void access_destroy_by_profile(struct profile *pro, int delconf); void @@ -343,6 +347,7 @@ access_destroy_by_channel_tag(struct channel_tag *ct, int delconf); /** * */ + passwd_entry_t * passwd_entry_create(const char *uuid, htsmsg_t *conf); void @@ -351,18 +356,21 @@ passwd_entry_destroy(passwd_entry_t *ae, int delconf); /** * */ + ipblock_entry_t * ipblock_entry_create(const char *uuid, htsmsg_t *conf); /** * */ + void access_init(int createdefault, int noacl); void access_done(void); /** * */ + htsmsg_t *language_get_list ( void *obj, const char *lang ); htsmsg_t *language_get_ui_list ( void *obj, const char *lang ); htsmsg_t *theme_get_ui_list ( void *obj, const char *lang ); diff --git a/src/api.c b/src/api.c index 7e853aa95..f978ffd15 100644 --- a/src/api.c +++ b/src/api.c @@ -1,20 +1,8 @@ /* - * API - Common functions for control/query API + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - Common functions for control/query API */ #include "tvheadend.h" diff --git a/src/api.h b/src/api.h index 7a815b426..30804931a 100644 --- a/src/api.h +++ b/src/api.h @@ -1,20 +1,8 @@ /* - * API - Common functions for control/query API + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - Common functions for control/query API */ #ifndef __TVH_API_H__ diff --git a/src/api/api_access.c b/src/api/api_access.c index 24279b97b..955c2c298 100644 --- a/src/api/api_access.c +++ b/src/api/api_access.c @@ -1,20 +1,8 @@ /* - * API - access control + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - access control */ #include "tvheadend.h" diff --git a/src/api/api_bouquet.c b/src/api/api_bouquet.c index cbf196b73..fd6694249 100644 --- a/src/api/api_bouquet.c +++ b/src/api/api_bouquet.c @@ -1,20 +1,8 @@ /* - * API - bouquet calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - bouquet calls */ #ifndef __TVH_API_BOUQUET_H__ diff --git a/src/api/api_caclient.c b/src/api/api_caclient.c index ad24820d8..a2ba50a4e 100644 --- a/src/api/api_caclient.c +++ b/src/api/api_caclient.c @@ -1,20 +1,8 @@ /* - * tvheadend - API access to Conditional Access Clients + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - API access to Conditional Access Clients */ #include "tvheadend.h" @@ -26,6 +14,7 @@ /* * */ + static int api_caclient_list ( access_t *perm, void *opaque, const char *op, htsmsg_t *args, htsmsg_t **resp ) @@ -98,6 +87,7 @@ api_caclient_create /* * Init */ + void api_caclient_init ( void ) { diff --git a/src/api/api_channel.c b/src/api/api_channel.c index b67051da4..af37020b6 100644 --- a/src/api/api_channel.c +++ b/src/api/api_channel.c @@ -1,20 +1,8 @@ /* - * API - channel related calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - channel related calls */ #ifndef __TVH_API_CHANNEL_H__ diff --git a/src/api/api_codec.c b/src/api/api_codec.c index 23cfbd476..00e89e777 100644 --- a/src/api/api_codec.c +++ b/src/api/api_codec.c @@ -1,23 +1,10 @@ /* - * tvheadend - API access to Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - API access to Codec Profiles */ - #include "tvheadend.h" #include "access.h" #include "api.h" diff --git a/src/api/api_config.c b/src/api/api_config.c index 7887eada4..dedf8baf6 100644 --- a/src/api/api_config.c +++ b/src/api/api_config.c @@ -1,20 +1,8 @@ /* - * API - General configuration related calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; withm even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - General configuration related calls */ #include "tvheadend.h" diff --git a/src/api/api_dvr.c b/src/api/api_dvr.c index a39009258..8f6998526 100644 --- a/src/api/api_dvr.c +++ b/src/api/api_dvr.c @@ -1,20 +1,8 @@ /* - * API - DVR + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - DVR */ #include "tvheadend.h" diff --git a/src/api/api_epg.c b/src/api/api_epg.c index 35718cc27..8530b60b8 100644 --- a/src/api/api_epg.c +++ b/src/api/api_epg.c @@ -1,20 +1,8 @@ /* - * API - EPG related calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; withm even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - EPG related calls */ #include "tvheadend.h" diff --git a/src/api/api_epggrab.c b/src/api/api_epggrab.c index 656c3bfc7..963d356ca 100644 --- a/src/api/api_epggrab.c +++ b/src/api/api_epggrab.c @@ -1,20 +1,8 @@ /* - * API - epggrab related calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - epggrab related calls */ #include "tvheadend.h" diff --git a/src/api/api_esfilter.c b/src/api/api_esfilter.c index d612ec285..f1686d114 100644 --- a/src/api/api_esfilter.c +++ b/src/api/api_esfilter.c @@ -1,20 +1,8 @@ /* - * API - elementary stream filter related calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - elementary stream filter related calls */ #include "tvheadend.h" diff --git a/src/api/api_idnode.c b/src/api/api_idnode.c index 9096bfe9d..325dc1a87 100644 --- a/src/api/api_idnode.c +++ b/src/api/api_idnode.c @@ -1,20 +1,8 @@ /* - * API - idnode related API calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - idnode related API calls */ #include "tvheadend.h" diff --git a/src/api/api_imagecache.c b/src/api/api_imagecache.c index 35cda1e71..58b431417 100644 --- a/src/api/api_imagecache.c +++ b/src/api/api_imagecache.c @@ -1,20 +1,8 @@ /* - * API - Imagecache related calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; withm even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - Imagecache related calls */ #include "tvheadend.h" diff --git a/src/api/api_input.c b/src/api/api_input.c index 55896819d..2f9a23c59 100644 --- a/src/api/api_input.c +++ b/src/api/api_input.c @@ -1,20 +1,8 @@ /* - * API - channel related calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - channel related calls */ #ifndef __TVH_API_INPUT_H__ diff --git a/src/api/api_intlconv.c b/src/api/api_intlconv.c index fc7b27f04..421608a92 100644 --- a/src/api/api_intlconv.c +++ b/src/api/api_intlconv.c @@ -1,20 +1,8 @@ /* - * API - international character conversions + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - international character conversions */ #ifndef __TVH_API_INTLCONV_H__ diff --git a/src/api/api_language.c b/src/api/api_language.c index 8377c5cd4..e9e03aa82 100644 --- a/src/api/api_language.c +++ b/src/api/api_language.c @@ -1,20 +1,8 @@ /* - * API - international character conversions + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - international character conversions */ #ifndef __TVH_API_LANGUAGE_H__ diff --git a/src/api/api_mpegts.c b/src/api/api_mpegts.c index eacf07bab..bf05ec42b 100644 --- a/src/api/api_mpegts.c +++ b/src/api/api_mpegts.c @@ -1,20 +1,8 @@ /* - * tvheadend - API access to MPEGTS system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - API access to MPEGTS system */ #include "tvheadend.h" @@ -29,6 +17,7 @@ /* * Inputs */ + static int api_mpegts_input_network_list ( access_t *perm, void *opaque, const char *op, htsmsg_t *args, htsmsg_t **resp ) @@ -73,6 +62,7 @@ exit: /* * Networks */ + static void api_mpegts_network_grid ( access_t *perm, idnode_set_t *ins, api_idnode_grid_conf_t *conf, htsmsg_t *args ) @@ -228,6 +218,7 @@ exit: /* * Muxes */ + static void api_mpegts_mux_grid ( access_t *perm, idnode_set_t *ins, api_idnode_grid_conf_t *conf, htsmsg_t *args ) @@ -255,6 +246,7 @@ api_mpegts_mux_grid /* * Services */ + static void api_mpegts_service_grid ( access_t *perm, idnode_set_t *ins, api_idnode_grid_conf_t *conf, htsmsg_t *args ) @@ -287,6 +279,7 @@ api_mpegts_service_grid /* * Mux scheduler */ + static void api_mpegts_mux_sched_grid ( access_t *perm, idnode_set_t *ins, api_idnode_grid_conf_t *conf, htsmsg_t *args ) @@ -405,6 +398,7 @@ api_dvb_scanfile_list /* * Init */ + void api_mpegts_init ( void ) { diff --git a/src/api/api_profile.c b/src/api/api_profile.c index e07968d84..97bfd5fb1 100644 --- a/src/api/api_profile.c +++ b/src/api/api_profile.c @@ -1,20 +1,8 @@ /* - * tvheadend - API access to Stream Profile + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - API access to Stream Profile */ #include "tvheadend.h" @@ -27,6 +15,7 @@ /* * */ + static int api_profile_is_all(access_t *perm, htsmsg_t *args) { @@ -53,6 +42,7 @@ api_profile_find(access_t *perm, const char *uuid) /* * */ + static int api_profile_list ( access_t *perm, void *opaque, const char *op, htsmsg_t *args, htsmsg_t **resp ) @@ -130,6 +120,7 @@ api_profile_create /* * Init */ + void api_profile_init ( void ) { diff --git a/src/api/api_ratinglabel.c b/src/api/api_ratinglabel.c index 58e673be5..b404177b4 100644 --- a/src/api/api_ratinglabel.c +++ b/src/api/api_ratinglabel.c @@ -1,21 +1,9 @@ /* - * API - ratinglabel calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela (Original Bouquets) + * Copyright (C) 2023 DeltaMikeCharlie (Updated for Rating Labels) * - * Copyright (C) 2014 Jaroslav Kysela (Original Bouquets) - * Copyright (C) 2023 DeltaMikeCharlie (Updated for Rating Labels) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - ratinglabel calls */ #ifndef __TVH_API_RATINGLABEL_H__ diff --git a/src/api/api_raw.c b/src/api/api_raw.c index 75338d2e6..04ebfd663 100644 --- a/src/api/api_raw.c +++ b/src/api/api_raw.c @@ -1,20 +1,8 @@ /* - * API - idnode raw load/save related API calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Jaroslav Kysela * - * Copyright (C) 2017 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - idnode raw load/save related API calls */ #include "tvheadend.h" diff --git a/src/api/api_satip.c b/src/api/api_satip.c index cc1d3fc72..f3425a444 100644 --- a/src/api/api_satip.c +++ b/src/api/api_satip.c @@ -1,20 +1,8 @@ /* - * API - SAT>IP Server related calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; withm even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - SAT>IP Server related calls */ #include "tvheadend.h" diff --git a/src/api/api_service.c b/src/api/api_service.c index d74ba410e..d86191e2b 100644 --- a/src/api/api_service.c +++ b/src/api/api_service.c @@ -1,20 +1,8 @@ /* - * API - service related calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - service related calls */ #ifndef __TVH_API_SERVICE_H__ diff --git a/src/api/api_status.c b/src/api/api_status.c index cd48e88ba..ad6917e19 100644 --- a/src/api/api_status.c +++ b/src/api/api_status.c @@ -1,20 +1,8 @@ /* - * API - service related calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - service related calls */ #ifndef __TVH_API_SERVICE_H__ diff --git a/src/api/api_timeshift.c b/src/api/api_timeshift.c index c780eb776..2cb2c2d57 100644 --- a/src/api/api_timeshift.c +++ b/src/api/api_timeshift.c @@ -1,20 +1,8 @@ /* - * API - Timeshift related calls + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; withm even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - Timeshift related calls */ #include "tvheadend.h" diff --git a/src/api/api_wizard.c b/src/api/api_wizard.c index bc80f446f..1ee35384a 100644 --- a/src/api/api_wizard.c +++ b/src/api/api_wizard.c @@ -1,20 +1,8 @@ /* - * API - Wizard interface + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; withm even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * API - Wizard interface */ #include "tvheadend.h" diff --git a/src/atomic.h b/src/atomic.h index 76e842d4a..3213b4873 100644 --- a/src/atomic.h +++ b/src/atomic.h @@ -1,19 +1,8 @@ /* - * Atomic ops - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Atomic ops */ #pragma once diff --git a/src/avahi.c b/src/avahi.c index 8372c405d..6175b086d 100644 --- a/src/avahi.c +++ b/src/avahi.c @@ -1,19 +1,8 @@ /* - * AVAHI service publisher - * Copyright (C) 2009 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2009 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * AVAHI service publisher */ /*** diff --git a/src/bitops.h b/src/bitops.h index 18827bae0..cdb46689d 100644 --- a/src/bitops.h +++ b/src/bitops.h @@ -1,19 +1,8 @@ /* - * Bit ops - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Bit ops */ #pragma once diff --git a/src/bonjour.c b/src/bonjour.c index ac710fda8..e3376675a 100644 --- a/src/bonjour.c +++ b/src/bonjour.c @@ -1,19 +1,8 @@ /* - * Bonjour service publisher - * Copyright (C) 2014 Damjan Marion + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Damjan Marion * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Bonjour service publisher */ #include diff --git a/src/bouquet.c b/src/bouquet.c index 59d87f449..5af0c7aaf 100644 --- a/src/bouquet.c +++ b/src/bouquet.c @@ -1,19 +1,8 @@ /* - * tvheadend, bouquets - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, bouquets */ #include "tvheadend.h" diff --git a/src/bouquet.h b/src/bouquet.h index ceba6ec3d..16b5b9fc3 100644 --- a/src/bouquet.h +++ b/src/bouquet.h @@ -1,19 +1,8 @@ /* - * TV headend - Bouquets - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - Bouquets */ #ifndef BOUQUET_H_ diff --git a/src/channels.c b/src/channels.c index d06eacb23..c3a667f7c 100644 --- a/src/channels.c +++ b/src/channels.c @@ -1,19 +1,8 @@ /* - * tvheadend, channel functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, channel functions */ #include diff --git a/src/channels.h b/src/channels.h index 268e2fa81..50061f0a3 100644 --- a/src/channels.h +++ b/src/channels.h @@ -1,19 +1,8 @@ /* - * tvheadend, channel functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, channel functions */ #ifndef CHANNELS_H diff --git a/src/clock.h b/src/clock.h index 2be967c33..45c260dd3 100644 --- a/src/clock.h +++ b/src/clock.h @@ -1,19 +1,8 @@ /* - * Tvheadend - clock support - * Copyright (C) 2016 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - clock support */ #ifndef TVHEADEND_CLOCK_H diff --git a/src/compat.h b/src/compat.h index 24fac8062..e6b191221 100644 --- a/src/compat.h +++ b/src/compat.h @@ -1,20 +1,10 @@ /* - * Tvheadend - structures - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - structures */ + #ifndef TVH_COMPAT_H #define TVH_COMPAT_H @@ -93,4 +83,3 @@ #define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0 #endif /* COMPAT_IPTOS */ - diff --git a/src/config.c b/src/config.c index d8000085b..58b522cbc 100644 --- a/src/config.c +++ b/src/config.c @@ -1,19 +1,8 @@ /* - * TV headend - General configuration settings - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - General configuration settings */ #include diff --git a/src/config.h b/src/config.h index cc3afc46a..9af83513e 100644 --- a/src/config.h +++ b/src/config.h @@ -1,19 +1,8 @@ /* - * TV headend - General configuration settings - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - General configuration settings */ // TODO: expand this, possibly integrate command line diff --git a/src/cron.c b/src/cron.c index b2484070f..652cda8af 100644 --- a/src/cron.c +++ b/src/cron.c @@ -1,20 +1,8 @@ /* - * Tvheadend - cron routines + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Adam Sutton * - * Copyright (C) 2014 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - cron routines */ #include "build.h" @@ -33,6 +21,7 @@ /* * Parse value */ + static int cron_parse_val ( const char *str, const char **key, int *v ) { @@ -55,6 +44,7 @@ cron_parse_val ( const char *str, const char **key, int *v ) /* * Parse individual field in cron spec */ + static int cron_parse_field ( const char **istr, uint64_t *field, uint64_t mask, int bits, int off, @@ -106,6 +96,7 @@ cron_parse_field /* * Set value */ + int cron_set ( cron_t *c, const char *str ) { @@ -161,6 +152,7 @@ cron_set ( cron_t *c, const char *str ) /* * Set value */ + cron_multi_t * cron_multi_set ( const char *str ) { @@ -198,6 +190,7 @@ cron_multi_set ( const char *str ) /* * Check for leap year */ + static int is_leep_year ( int year ) { @@ -211,6 +204,7 @@ is_leep_year ( int year ) /* * Check for days in month */ + static int days_in_month ( int year, int mon ) { @@ -225,6 +219,7 @@ days_in_month ( int year, int mon ) /* * Find the next time (starting from now) that the cron should fire */ + int cron_next ( cron_t *c, const time_t now, time_t *ret ) { @@ -341,6 +336,7 @@ cron_next ( cron_t *c, const time_t now, time_t *ret ) /* * Find the next time (starting from now) that the cron should fire */ + int cron_multi_next ( cron_multi_t *cm, const time_t now, time_t *ret ) { @@ -364,6 +360,7 @@ cron_multi_next ( cron_multi_t *cm, const time_t now, time_t *ret ) * * gcc -g -DCRON_TEST -I./build.linux src/cron.c */ + #ifdef CRON_TEST static void print_bits ( uint64_t b, int n ) diff --git a/src/cron.h b/src/cron.h index 81a8cd051..87aca2ce6 100644 --- a/src/cron.h +++ b/src/cron.h @@ -1,20 +1,8 @@ /* - * Tvheadend - cron routines + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Adam Sutton * - * Copyright (C) 2014 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - cron routines */ #ifndef __TVH_CRON_H__ diff --git a/src/dbus.c b/src/dbus.c index 2f752ba70..a86465558 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -1,19 +1,8 @@ /* - * DBUS interface - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * DBUS interface */ #include diff --git a/src/dbus.h b/src/dbus.h index 2acd6c282..f641c2a78 100644 --- a/src/dbus.h +++ b/src/dbus.h @@ -1,19 +1,8 @@ /* - * tvheadend, UPnP interface - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, UPnP interface */ #ifndef DBUS_H_ diff --git a/src/descrambler/algo/libaes128dec.c b/src/descrambler/algo/libaes128dec.c index 5e5088d61..c3ac4f215 100644 --- a/src/descrambler/algo/libaes128dec.c +++ b/src/descrambler/algo/libaes128dec.c @@ -15,6 +15,7 @@ #include "libaes128dec.h" /* key structure */ + typedef struct aes128_priv { AES_KEY keys[2]; /* 0 = even, 1 = odd */ } aes128_priv_t; diff --git a/src/descrambler/algo/libaesdec.c b/src/descrambler/algo/libaesdec.c index 81374cb15..49c1d3ba5 100644 --- a/src/descrambler/algo/libaesdec.c +++ b/src/descrambler/algo/libaesdec.c @@ -14,6 +14,7 @@ #include "libaesdec.h" /* key structure */ + typedef struct aes_priv { AES_KEY keys[2]; /* 0 = even, 1 = odd */ } aes_priv_t; diff --git a/src/descrambler/algo/libdesdec.c b/src/descrambler/algo/libdesdec.c index 74880d607..484ffd868 100644 --- a/src/descrambler/algo/libdesdec.c +++ b/src/descrambler/algo/libdesdec.c @@ -12,6 +12,7 @@ #include "libdesdec.h" /* key structure */ + typedef struct des_priv { DES_key_schedule sched[2]; /* 0 = even, 1 = odd */ } des_priv_t; diff --git a/src/descrambler/caclient.c b/src/descrambler/caclient.c index 945206224..9e6214d94 100644 --- a/src/descrambler/caclient.c +++ b/src/descrambler/caclient.c @@ -1,19 +1,8 @@ /* - * Tvheadend - conditional access key client superclass - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - conditional access key client superclass */ #include "tvheadend.h" @@ -411,6 +400,7 @@ caclient_foreach(void (*cb)(caclient_t *)) /* * Initialize */ + void caclient_init(void) { diff --git a/src/descrambler/caclient.h b/src/descrambler/caclient.h index 397c86ac1..186da6d77 100644 --- a/src/descrambler/caclient.h +++ b/src/descrambler/caclient.h @@ -1,19 +1,8 @@ /* - * tvheadend, Conditional Access Client - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Conditional Access Client */ #ifndef __TVH_CACLIENT_H__ diff --git a/src/descrambler/caid.c b/src/descrambler/caid.c index fef27e9f1..1956ff8a4 100644 --- a/src/descrambler/caid.c +++ b/src/descrambler/caid.c @@ -1,19 +1,8 @@ /* - * Tvheadend - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend */ #include "tvheadend.h" @@ -122,6 +111,7 @@ name2caid(const char *s) * * based on the equivalent in sasc-ng */ + card_type_t detect_card_type(const uint16_t caid) { diff --git a/src/descrambler/caid.h b/src/descrambler/caid.h index 726999d74..e1af6daa4 100644 --- a/src/descrambler/caid.h +++ b/src/descrambler/caid.h @@ -1,19 +1,8 @@ /* - * Tvheadend - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend */ #ifndef __TVH_CAID_H__ @@ -22,6 +11,7 @@ /** * cards for which emm updates are handled */ + typedef enum { CARD_IRDETO, CARD_DRE, diff --git a/src/descrambler/capmt.c b/src/descrambler/capmt.c index f37a0c22a..320f6a257 100644 --- a/src/descrambler/capmt.c +++ b/src/descrambler/capmt.c @@ -1,19 +1,8 @@ /* - * tvheadend, CAPMT Server - * Copyright (C) 2009 + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2009 * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, CAPMT Server */ #include diff --git a/src/descrambler/cccam.c b/src/descrambler/cccam.c index f9a3230ed..5b557823b 100644 --- a/src/descrambler/cccam.c +++ b/src/descrambler/cccam.c @@ -1,20 +1,9 @@ /* - * tvheadend, CCCAM interface - * Copyright (C) 2007 Andreas Öman - * Copyright (C) 2017 Luis Alves + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman + * Copyright (C) 2017 Luis Alves * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, CCCAM interface */ #include @@ -26,6 +15,7 @@ /** * */ + #define CCCAM_KEEPALIVE_INTERVAL 0 #define CCCAM_NETMSGSIZE 1024 @@ -81,6 +71,7 @@ static const char *cccam_build_str[CCCAM_VERSION_COUNT] = { /** * */ + struct cccam_crypt_block { uint8_t keytable[256]; uint8_t state; @@ -91,6 +82,7 @@ struct cccam_crypt_block { /** * */ + typedef struct cccam { cclient_t; @@ -119,6 +111,7 @@ static void cccam_send_oscam_extended(cccam_t *cccam); /** * */ + static inline const char *cccam_get_version_str(cccam_t *cccam) { int ver = MINMAX(cccam->cccam_version, 0, ARRAY_SIZE(cccam_version_str) - 1); @@ -128,6 +121,7 @@ static inline const char *cccam_get_version_str(cccam_t *cccam) /** * */ + static inline const char *cccam_get_build_str(cccam_t *cccam) { int ver = MINMAX(cccam->cccam_version, 0, ARRAY_SIZE(cccam_version_str) - 1); @@ -137,6 +131,7 @@ static inline const char *cccam_get_build_str(cccam_t *cccam) /** * */ + static inline int cccam_set_busy(cccam_t *cccam) { if (cccam->cccam_extended) @@ -150,6 +145,7 @@ static inline int cccam_set_busy(cccam_t *cccam) /** * */ + static inline void cccam_unset_busy(cccam_t *cccam) { cccam->cccam_busy = 0; @@ -158,6 +154,7 @@ static inline void cccam_unset_busy(cccam_t *cccam) /** * */ + static inline void uint8_swap(uint8_t *p1, uint8_t *p2) { @@ -167,6 +164,7 @@ uint8_swap(uint8_t *p1, uint8_t *p2) /** * */ + static void cccam_crypt_xor(uint8_t *buf) { @@ -182,6 +180,7 @@ cccam_crypt_xor(uint8_t *buf) /** * */ + static void cccam_crypt_init(struct cccam_crypt_block *block, uint8_t *key, int32_t len) { @@ -203,6 +202,7 @@ cccam_crypt_init(struct cccam_crypt_block *block, uint8_t *key, int32_t len) /** * */ + static void cccam_decrypt(struct cccam_crypt_block *block, uint8_t *data, int32_t len) { @@ -224,6 +224,7 @@ cccam_decrypt(struct cccam_crypt_block *block, uint8_t *data, int32_t len) /** * */ + static void cccam_encrypt(struct cccam_crypt_block *block, uint8_t *data, int32_t len) { @@ -257,6 +258,7 @@ cccam_decrypt_cw(uint8_t *nodeid, uint32_t card_id, uint8_t *cws) /** * */ + static int cccam_oscam_check(cccam_t *cccam, uint8_t *buf) { @@ -278,6 +280,7 @@ cccam_oscam_check(cccam_t *cccam, uint8_t *buf) /** * */ + static int cccam_oscam_nodeid_check(cccam_t *cccam, uint8_t *buf) { @@ -299,6 +302,7 @@ cccam_oscam_nodeid_check(cccam_t *cccam, uint8_t *buf) /** * */ + static inline uint8_t * cccam_set_ua(uint8_t *dst, uint8_t *src) { @@ -309,6 +313,7 @@ cccam_set_ua(uint8_t *dst, uint8_t *src) /** * */ + static inline uint8_t * cccam_set_sa(uint8_t *dst, uint8_t *src) { @@ -318,6 +323,7 @@ cccam_set_sa(uint8_t *dst, uint8_t *src) /** * Handle reply to card data request */ + static int cccam_decode_card_data_reply(cccam_t *cccam, uint8_t *msg) { @@ -361,6 +367,7 @@ cccam_decode_card_data_reply(cccam_t *cccam, uint8_t *msg) /** * */ + static void cccam_handle_keys(cccam_t *cccam, cc_service_t *ct, cc_ecm_section_t *es, uint8_t *buf, int len, int seq) @@ -388,6 +395,7 @@ cccam_handle_keys(cccam_t *cccam, cc_service_t *ct, cc_ecm_section_t *es, /** * */ + static void cccam_handle_partner(cccam_t *cccam, uint8_t *msg) { @@ -415,6 +423,7 @@ cccam_handle_partner(cccam_t *cccam, uint8_t *msg) * Handle running reply * cc_mutex is held */ + static int cccam_running_reply(cccam_t *cccam, uint8_t *buf, int len) { @@ -468,6 +477,7 @@ cccam_running_reply(cccam_t *cccam, uint8_t *buf, int len) break; //case MSG_CMD_05: /* ? */ case MSG_ECM_REQUEST: { /* request reply */ + req: seq = cccam->cccam_extended ? buf[0] : 1; es = cc_find_pending_section((cclient_t *)cccam, seq, &ct); @@ -504,6 +514,7 @@ req: /** * */ + static int cccam_read_message0(cccam_t *cccam, const char *state, sbuf_t *rbuf, int timeout) { @@ -530,6 +541,7 @@ cccam_read_message0(cccam_t *cccam, const char *state, sbuf_t *rbuf, int timeout /** * */ + static int cccam_send_msg(cccam_t *cccam, cccam_msg_type_t cmd, uint8_t *buf, size_t len, int enq, @@ -568,6 +580,7 @@ cccam_send_msg(cccam_t *cccam, cccam_msg_type_t cmd, /** * Send keep alive */ + static void cccam_send_ka(void *cc) { @@ -586,6 +599,7 @@ cccam_send_ka(void *cc) /** * Send keep alive */ + static void cccam_send_oscam_extended(cccam_t *cccam) { @@ -600,6 +614,7 @@ cccam_send_oscam_extended(cccam_t *cccam) /** * */ + static void sha1_make_login_key(cccam_t *cccam, uint8_t *buf) { @@ -628,6 +643,7 @@ sha1_make_login_key(cccam_t *cccam, uint8_t *buf) /** * Login command */ + static int cccam_send_login(cccam_t *cccam) { @@ -675,6 +691,7 @@ cccam_send_login(cccam_t *cccam) /** * */ + static void cccam_send_cli_data(cccam_t *cccam) { @@ -693,6 +710,7 @@ cccam_send_cli_data(cccam_t *cccam) /** * */ + static void cccam_oscam_update_idnode(cccam_t *cccam) { @@ -715,6 +733,7 @@ cccam_oscam_update_idnode(cccam_t *cccam) /** * */ + static int cccam_init_session(void *cc) { @@ -755,6 +774,7 @@ cccam_init_session(void *cc) /** * */ + static int cccam_send_ecm(void *cc, cc_service_t *ct, cc_ecm_section_t *es, cc_card_data_t *pcard, const uint8_t *msg, int len) @@ -807,6 +827,7 @@ cccam_send_ecm(void *cc, cc_service_t *ct, cc_ecm_section_t *es, /** * */ + static void cccam_send_emm(void *cc, cc_service_t *ct, cc_card_data_t *pcard, uint32_t provid, const uint8_t *msg, int len) @@ -856,6 +877,7 @@ cccam_send_emm(void *cc, cc_service_t *ct, cc_card_data_t *pcard, /** * */ + static int cccam_read(void *cc, sbuf_t *rbuf) { @@ -882,6 +904,7 @@ cccam_read(void *cc, sbuf_t *rbuf) /** * */ + static void cccam_no_services(void *cc) { @@ -891,6 +914,7 @@ cccam_no_services(void *cc) /** * */ + static void cccam_conf_changed(caclient_t *cac) { @@ -907,6 +931,7 @@ cccam_conf_changed(caclient_t *cac) /** * */ + static int nibble(char c) { @@ -925,6 +950,7 @@ nibble(char c) /** * */ + static int caclient_cccam_nodeid_set(void *o, const void *v) { @@ -1047,6 +1073,7 @@ const idclass_t caclient_cccam_class = /* * */ + caclient_t *cccam_create(void) { cccam_t *cccam = calloc(1, sizeof(*cccam)); diff --git a/src/descrambler/cclient.c b/src/descrambler/cclient.c index 9f2e7c321..930f37535 100644 --- a/src/descrambler/cclient.c +++ b/src/descrambler/cclient.c @@ -1,20 +1,9 @@ /* - * tvheadend, card client interface - * Copyright (C) 2007 Andreas Öman - * (C) 2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman + * Copyright (C) 2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, card client interface */ #include diff --git a/src/descrambler/cclient.h b/src/descrambler/cclient.h index 7e3c27632..12eaebed7 100644 --- a/src/descrambler/cclient.h +++ b/src/descrambler/cclient.h @@ -1,20 +1,9 @@ /* - * tvheadend, network card client - * Copyright (C) 2007 Andreas Öman - * (C) 2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman + * Copyright (C) 2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, network card client */ #include "tvheadend.h" @@ -26,12 +15,14 @@ /** * */ + #define CC_KEEPALIVE_INTERVAL 30 #define CC_MAX_NOKS 3 /** * */ + typedef struct cc_ecm_section { LIST_ENTRY(cc_ecm_section) es_link; @@ -62,6 +53,7 @@ typedef struct cc_ecm_section { /** * */ + typedef struct cc_ecm_pid { LIST_ENTRY(cc_ecm_pid) ep_link; @@ -74,6 +66,7 @@ typedef struct cc_ecm_pid { /** * */ + typedef struct cc_service { th_descrambler_t; @@ -102,6 +95,7 @@ typedef struct cc_service { /** * */ + typedef struct cc_message { TAILQ_ENTRY(cc_message) cm_link; uint32_t cm_len; @@ -111,6 +105,7 @@ typedef struct cc_message { /** * */ + typedef struct cc_card_data { LIST_ENTRY(cc_card_data) cs_card; uint32_t cs_id; @@ -130,6 +125,7 @@ typedef struct cc_card_data { /** * */ + typedef struct cclient { caclient_t; @@ -190,6 +186,7 @@ typedef struct cclient { /* * */ + static inline int cc_must_break(cclient_t *cc) { return !cc->cc_running || !cc->cac_enabled || cc->cc_reconfigure; } diff --git a/src/descrambler/constcw.c b/src/descrambler/constcw.c index c84b36a74..a544d9c88 100644 --- a/src/descrambler/constcw.c +++ b/src/descrambler/constcw.c @@ -1,19 +1,8 @@ /* - * tvheadend, constant code word interface - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, constant code word interface */ #include @@ -25,6 +14,7 @@ /** * */ + typedef struct constcw_service { th_descrambler_t; LIST_ENTRY(constcw_service) cs_link; @@ -33,6 +23,7 @@ typedef struct constcw_service { /** * */ + typedef struct constcw { caclient_t; @@ -46,11 +37,13 @@ typedef struct constcw { uint8_t ccw_key_even[16]; /* DES or AES key */ uint8_t ccw_key_odd [16]; /* DES or AES key */ LIST_HEAD(, constcw_service) ccw_services; /* active services */ + } constcw_t; /* * */ + static const char * constcw_name(constcw_t *ccw) { @@ -61,6 +54,7 @@ constcw_name(constcw_t *ccw) /** * */ + static int constcw_algo(caclient_t *cac) { @@ -78,6 +72,7 @@ constcw_algo(caclient_t *cac) /** * */ + static int constcw_key_size(caclient_t *cac) { @@ -91,6 +86,7 @@ constcw_key_size(caclient_t *cac) /* * */ + static int constcw_ecm_reset(th_descrambler_t *th) { @@ -100,6 +96,7 @@ constcw_ecm_reset(th_descrambler_t *th) /** * s_stream_mutex is held */ + static void constcw_service_destroy(th_descrambler_t *td) { @@ -114,6 +111,7 @@ constcw_service_destroy(th_descrambler_t *td) /** * global_lock is held. Not that we care about that, but either way, it is. */ + static void constcw_service_start(caclient_t *cac, service_t *t) { @@ -179,6 +177,7 @@ constcw_service_start(caclient_t *cac, service_t *t) /** * */ + static void constcw_free(caclient_t *cac) { @@ -196,6 +195,7 @@ constcw_free(caclient_t *cac) /** * */ + static int nibble(char c) { @@ -214,6 +214,7 @@ nibble(char c) /** * */ + static void constcw_conf_changed(caclient_t *cac) { @@ -227,6 +228,7 @@ constcw_conf_changed(caclient_t *cac) /** * */ + static int constcw_class_key_set(void *o, const void *v, uint8_t *dkey) { @@ -606,6 +608,7 @@ const idclass_t caclient_ccw_aes128_ecb_class = /* * */ + caclient_t *constcw_create(void) { constcw_t *ccw = calloc(1, sizeof(*ccw)); diff --git a/src/descrambler/cwc.c b/src/descrambler/cwc.c index 4f89a5eaa..6513feaa4 100644 --- a/src/descrambler/cwc.c +++ b/src/descrambler/cwc.c @@ -1,20 +1,9 @@ /* - * tvheadend, CWC interface - * Copyright (C) 2007 Andreas Öman - * (C) 2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman + * Copyright (C) 2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, CWC interface */ #include diff --git a/src/descrambler/descrambler.c b/src/descrambler/descrambler.c index df7be5826..da6c86d28 100644 --- a/src/descrambler/descrambler.c +++ b/src/descrambler/descrambler.c @@ -1,21 +1,9 @@ /* - * Tvheadend - * Copyright (C) 2013 Andreas Öman - * Copyright (C) 2014,2015,2016,2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman + * Copyright (C) 2014,2015,2016,2017 Jaroslav Kysela * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend */ #include "tvheadend.h" @@ -70,6 +58,7 @@ static int ca_hints_quickecm; /* * */ + static inline int extractpid(const uint8_t *tsb) { return (tsb[1] & 0x1f) << 8 | tsb[2]; @@ -88,6 +77,7 @@ static inline const char *keystr(const uint8_t *tsb) /* * */ + static void descrambler_data_destroy(th_descrambler_runtime_t *dr, th_descrambler_data_t *dd, int skip) { @@ -232,6 +222,7 @@ descrambler_data_analyze(th_descrambler_runtime_t *dr, /* * */ + static void descrambler_destroy_ecmsec(descrambler_ecmsec_t *des) { @@ -278,6 +269,7 @@ descrambler_destroy_table( descrambler_table_t *dt, int emm ) /* * */ + static struct strtab ecmparitytab[] = { { "default", ECM_PARITY_DEFAULT }, { "standard", ECM_PARITY_80EVEN_81ODD }, @@ -287,6 +279,7 @@ static struct strtab ecmparitytab[] = { /* * */ + static void descrambler_load_hints(htsmsg_t *m) { @@ -328,6 +321,7 @@ descrambler_load_hints(htsmsg_t *m) /* * */ + void descrambler_init ( void ) { @@ -361,6 +355,7 @@ descrambler_done ( void ) /* * Decide, if we should work in "quick ECM" mode */ + static int descrambler_quick_ecm ( mpegts_service_t *t, int pid ) { @@ -389,6 +384,7 @@ descrambler_quick_ecm ( mpegts_service_t *t, int pid ) * a) start a new service * b) restart a running service with possible caid changes */ + void descrambler_service_start ( service_t *t ) { @@ -538,6 +534,7 @@ descrambler_notify_deliver( mpegts_service_t *t, descramble_info_t *di ) } /* it's called inside s_stream_mutex lock! */ + static void descrambler_notify_nokey( th_descrambler_runtime_t *dr ) { diff --git a/src/descrambler/descrambler.h b/src/descrambler/descrambler.h index ac5ff312c..6578d56d1 100644 --- a/src/descrambler/descrambler.h +++ b/src/descrambler/descrambler.h @@ -1,19 +1,8 @@ /* - * Tvheadend - * Copyright (C) 2013 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend */ #ifndef __TVH_DESCRAMBLER_H__ diff --git a/src/descrambler/dvbcam.c b/src/descrambler/dvbcam.c index 3fefecf12..a63f1519c 100644 --- a/src/descrambler/dvbcam.c +++ b/src/descrambler/dvbcam.c @@ -1,20 +1,9 @@ /* - * tvheadend, DVB CAM interface - * Copyright (C) 2014 Damjan Marion - * Copyright (C) 2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Damjan Marion + * Copyright (C) 2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, DVB CAM interface */ #include diff --git a/src/descrambler/dvbcam.h b/src/descrambler/dvbcam.h index 09107338e..20b2ec29c 100644 --- a/src/descrambler/dvbcam.h +++ b/src/descrambler/dvbcam.h @@ -1,19 +1,8 @@ /* - * tvheadend - CSA wrapper - * Copyright (C) 2013 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - CSA wrapper */ #ifndef __DVBCAM_H__ diff --git a/src/descrambler/emm_reass.c b/src/descrambler/emm_reass.c index 34a716b98..948ce3d83 100644 --- a/src/descrambler/emm_reass.c +++ b/src/descrambler/emm_reass.c @@ -1,20 +1,9 @@ /* - * tvheadend, EMM reassembly functions - * Copyright (C) 2007 Andreas Öman - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, EMM reassembly functions */ #include "emm_reass.h" diff --git a/src/descrambler/emm_reass.h b/src/descrambler/emm_reass.h index 5a5e92a30..f1d48faed 100644 --- a/src/descrambler/emm_reass.h +++ b/src/descrambler/emm_reass.h @@ -1,19 +1,8 @@ /* - * tvheadend, EMM reassemble functions - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, EMM reassemble functions */ #ifndef __TVH_EMM_REASS_H__ diff --git a/src/descrambler/tsdebugcw.c b/src/descrambler/tsdebugcw.c index 679c4e3c7..69ec71afa 100644 --- a/src/descrambler/tsdebugcw.c +++ b/src/descrambler/tsdebugcw.c @@ -1,19 +1,8 @@ /* - * tvheadend, tsdebug code word interface - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, tsdebug code word interface */ #include diff --git a/src/descrambler/tvhcsa.c b/src/descrambler/tvhcsa.c index 2c75f8969..e6f90bf48 100644 --- a/src/descrambler/tvhcsa.c +++ b/src/descrambler/tvhcsa.c @@ -1,19 +1,8 @@ /* - * tvheadend - CSA wrapper - * Copyright (C) 2013 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - CSA wrapper */ #include @@ -42,6 +31,7 @@ tvhcsa_empty_flush ( tvhcsa_t *csa, struct mpegts_service *s ) { /* empty - no queue */ + } static void diff --git a/src/descrambler/tvhcsa.h b/src/descrambler/tvhcsa.h index 17020f9fe..0fefffd5c 100644 --- a/src/descrambler/tvhcsa.h +++ b/src/descrambler/tvhcsa.h @@ -1,19 +1,8 @@ /* - * tvheadend - CSA wrapper - * Copyright (C) 2013 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - CSA wrapper */ #ifndef __TVH_CSA_H__ diff --git a/src/docs.h b/src/docs.h index d9581878d..bc38020f2 100644 --- a/src/docs.h +++ b/src/docs.h @@ -1,19 +1,8 @@ /* - * TVheadend - * Copyright (C) 2016 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TVheadend */ #ifndef __TVH_DOCS_H__ @@ -27,4 +16,3 @@ struct tvh_doc_page { extern const struct tvh_doc_page tvh_doc_markdown_pages[]; #endif /* __TVH_DOCS_H__ */ - diff --git a/src/download.c b/src/download.c index 5f2b6a958..b8e948ac4 100644 --- a/src/download.c +++ b/src/download.c @@ -1,20 +1,8 @@ /* - * Download a file from storage or network + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Download a file from storage or network */ #include "tvheadend.h" @@ -28,6 +16,7 @@ /* * */ + static int download_file(download_t *dn, const char *filename) { @@ -78,6 +67,7 @@ download_file(download_t *dn, const char *filename) /* * */ + static void download_fetch_done(void *aux) { @@ -92,6 +82,7 @@ download_fetch_done(void *aux) /* * */ + static int download_fetch_complete(http_client_t *hc) { @@ -138,6 +129,7 @@ out: /* * */ + static void download_pipe_close(download_t *dn) { @@ -154,6 +146,7 @@ download_pipe_close(download_t *dn) /* * */ + static void download_pipe_read(void *aux) { @@ -199,6 +192,7 @@ failed: /* * */ + static int download_pipe(download_t *dn, const char *args) { @@ -235,6 +229,7 @@ download_pipe(download_t *dn, const char *args) /* * */ + static void download_fetch(void *aux) { @@ -297,6 +292,7 @@ done: /* * */ + void download_init( download_t *dn, int subsys ) { @@ -309,6 +305,7 @@ download_init( download_t *dn, int subsys ) /* * */ + void download_start( download_t *dn, const char *url, void *aux ) { @@ -327,6 +324,7 @@ download_start( download_t *dn, const char *url, void *aux ) /* * */ + void download_done( download_t *dn ) { diff --git a/src/download.h b/src/download.h index 9f1f1dd9c..530e9a1c4 100644 --- a/src/download.h +++ b/src/download.h @@ -1,20 +1,8 @@ /* - * Download a file from storage or network + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Download a file from storage or network */ #ifndef __DOWNLOAD__ diff --git a/src/dvr/dvr.h b/src/dvr/dvr.h index d3692ab6e..f4f4d3e1a 100644 --- a/src/dvr/dvr.h +++ b/src/dvr/dvr.h @@ -1,19 +1,8 @@ /* - * Digital Video Recorder - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Digital Video Recorder */ #ifndef DVR_H diff --git a/src/dvr/dvr_autorec.c b/src/dvr/dvr_autorec.c index 9258e65ef..8bcb184a3 100644 --- a/src/dvr/dvr_autorec.c +++ b/src/dvr/dvr_autorec.c @@ -1,19 +1,8 @@ /* - * tvheadend, Automatic recordings - * Copyright (C) 2010 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2010 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Automatic recordings */ #include diff --git a/src/dvr/dvr_config.c b/src/dvr/dvr_config.c index b2eb76828..c9377844b 100644 --- a/src/dvr/dvr_config.c +++ b/src/dvr/dvr_config.c @@ -1,20 +1,9 @@ /* - * Digital Video Recorder - * Copyright (C) 2008 Andreas Öman - * Copyright (C) 2014,2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman + * Copyright (C) 2014,2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Digital Video Recorder */ #define _GNU_SOURCE diff --git a/src/dvr/dvr_cutpoints.c b/src/dvr/dvr_cutpoints.c index a6beed28e..c96be007a 100644 --- a/src/dvr/dvr_cutpoints.c +++ b/src/dvr/dvr_cutpoints.c @@ -1,17 +1,7 @@ /* - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * SPDX-License-Identifier: GPL-3.0-or-later */ + #include #include "tvheadend.h" diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c index 74cb834e6..7064246b1 100644 --- a/src/dvr/dvr_db.c +++ b/src/dvr/dvr_db.c @@ -1,20 +1,9 @@ /* - * Digital Video Recorder - * Copyright (C) 2008 Andreas Öman - * Copyright (C) 2014,2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman + * Copyright (C) 2014,2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Digital Video Recorder */ #include diff --git a/src/dvr/dvr_inotify.c b/src/dvr/dvr_inotify.c index 77ae87caf..d92e28866 100644 --- a/src/dvr/dvr_inotify.c +++ b/src/dvr/dvr_inotify.c @@ -1,19 +1,8 @@ /* - * Digital Video Recorder - inotify processing - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Digital Video Recorder - inotify processing */ #include @@ -26,6 +15,7 @@ #include "htsp_server.h" /* inotify limits */ + #define EVENT_SIZE (sizeof(struct inotify_event)) #define EVENT_BUF_LEN (5 * EVENT_SIZE + NAME_MAX) #define EVENT_MASK IN_DELETE | IN_DELETE_SELF | \ @@ -61,6 +51,7 @@ static int _str_cmp ( void *a, void *b ) /** * Initialise threads */ + pthread_t dvr_inotify_tid; void dvr_inotify_init ( void ) @@ -77,6 +68,7 @@ void dvr_inotify_init ( void ) /** * */ + void dvr_inotify_done ( void ) { int fd = atomic_exchange(&_inot_fd, -1); @@ -89,6 +81,7 @@ void dvr_inotify_done ( void ) /** * */ + static int dvr_inotify_exists ( dvr_inotify_entry_t *die, dvr_entry_t *de ) { dvr_inotify_filename_t *dif; @@ -102,6 +95,7 @@ static int dvr_inotify_exists ( dvr_inotify_entry_t *die, dvr_entry_t *de ) /** * Add an entry for monitoring */ + static void dvr_inotify_add_one ( dvr_entry_t *de, htsmsg_t *m ) { dvr_inotify_filename_t *dif; @@ -168,6 +162,7 @@ void dvr_inotify_add ( dvr_entry_t *de ) /* * Delete an entry from the monitor */ + void dvr_inotify_del ( dvr_entry_t *de ) { dvr_inotify_filename_t *f = NULL, *f_next; @@ -199,6 +194,7 @@ void dvr_inotify_del ( dvr_entry_t *de ) /* * return count of registered entries (for debugging) */ + int dvr_inotify_count ( void ) { dvr_inotify_filename_t *f; @@ -214,6 +210,7 @@ int dvr_inotify_count ( void ) /* * Find inotify entry */ + static dvr_inotify_entry_t * _dvr_inotify_find ( int fd ) @@ -228,6 +225,7 @@ _dvr_inotify_find /* * File moved */ + static void _dvr_inotify_moved ( int from_fd, const char *from, const char *to, int to_fd ) @@ -324,6 +322,7 @@ _dvr_inotify_moved /* * File deleted */ + static void _dvr_inotify_delete ( int fd, const char *path ) @@ -334,6 +333,7 @@ _dvr_inotify_delete /* * Directory moved */ + static void _dvr_inotify_moved_all ( int fd, const char *to ) @@ -356,6 +356,7 @@ _dvr_inotify_moved_all /* * Directory deleted */ + static void _dvr_inotify_delete_all ( int fd ) @@ -366,6 +367,7 @@ _dvr_inotify_delete_all /* * Process events */ + void* _dvr_inotify_thread ( void *p ) { int fd, i, len; @@ -452,4 +454,3 @@ void* _dvr_inotify_thread ( void *p ) return NULL; } - diff --git a/src/dvr/dvr_rec.c b/src/dvr/dvr_rec.c index 680e1c36b..9ac066d37 100644 --- a/src/dvr/dvr_rec.c +++ b/src/dvr/dvr_rec.c @@ -1,20 +1,9 @@ /* - * Digital Video Recorder - * Copyright (C) 2008 Andreas Öman - * Copyright (C) 2014,2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman + * Copyright (C) 2014,2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Digital Video Recorder */ #include diff --git a/src/dvr/dvr_timerec.c b/src/dvr/dvr_timerec.c index 1016b550f..98ad82f5d 100644 --- a/src/dvr/dvr_timerec.c +++ b/src/dvr/dvr_timerec.c @@ -1,19 +1,8 @@ /* - * tvheadend, Automatic time-based recording - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Automatic time-based recording */ #include diff --git a/src/dvr/dvr_vfsmgr.c b/src/dvr/dvr_vfsmgr.c index ed44f437a..77436ce92 100644 --- a/src/dvr/dvr_vfsmgr.c +++ b/src/dvr/dvr_vfsmgr.c @@ -1,20 +1,9 @@ /* - * Digital Video Recorder - file system management - * Copyright (C) 2015 Jaroslav Kysela - * Copyright (C) 2015 Glenn Christiaensen + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela + * Copyright (C) 2015 Glenn Christiaensen * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Digital Video Recorder - file system management */ #include @@ -43,6 +32,7 @@ static tasklet_t dvr_disk_space_tasklet; /* * */ + static dvr_vfs_t * dvr_vfs_find(dvr_vfs_t *old, tvh_fsid_t *id) { @@ -81,6 +71,7 @@ dvr_vfs_find1(dvr_vfs_t *old, htsmsg_t *m) /* * */ + void dvr_vfs_refresh_entry(dvr_entry_t *de) { @@ -128,6 +119,7 @@ rem: /* * */ + void dvr_vfs_remove_entry(dvr_entry_t *de) { @@ -152,6 +144,7 @@ dvr_vfs_remove_entry(dvr_entry_t *de) /* * */ + int64_t dvr_vfs_update_filename(const char *filename, htsmsg_t *fdata) { @@ -181,6 +174,7 @@ dvr_vfs_update_filename(const char *filename, htsmsg_t *fdata) * Only "Keep until space needed" recordings are deleted, starting with the oldest one * Return -1 on failure, -2 if disk stats unstable (no action taken), otherwise number of bytes cleaned */ + static int64_t dvr_disk_space_cleanup(dvr_config_t *cfg, int include_active) { @@ -304,6 +298,7 @@ finish: * Check for each dvr config if the free disk size is below the dvr_cleanup_threshold * If so and we are using the dvr config ATM (active recording), we start the cleanup procedure */ + static void dvr_disk_space_check() { @@ -383,6 +378,7 @@ checking: /** * */ + static void dvr_get_disk_space_update(const char *path, int locked) { @@ -409,6 +405,7 @@ dvr_get_disk_space_update(const char *path, int locked) /** * */ + static void dvr_get_disk_space_tcb(void *opaque, int dearmed) { @@ -449,6 +446,7 @@ dvr_get_disk_space_cb(void *aux) * Check the available disk space for a new recording. * If '0' (= error or below configured minimum), a new recording should not be started. */ + int dvr_vfs_rec_start_check(dvr_config_t *cfg) { @@ -487,6 +485,7 @@ dvr_vfs_rec_start_check(dvr_config_t *cfg) /** * */ + void dvr_disk_space_boot(void) { @@ -496,6 +495,7 @@ dvr_disk_space_boot(void) /** * */ + void dvr_disk_space_init(void) { @@ -508,6 +508,7 @@ dvr_disk_space_init(void) /** * */ + void dvr_disk_space_done(void) { @@ -526,6 +527,7 @@ dvr_disk_space_done(void) /** * */ + int dvr_get_disk_space(int64_t *bfree, int64_t *bused, int64_t *btotal) { diff --git a/src/epg.c b/src/epg.c index c8f160233..f9d1d9364 100644 --- a/src/epg.c +++ b/src/epg.c @@ -1,19 +1,8 @@ /* - * Electronic Program Guide - Common functions - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Electronic Program Guide - Common functions */ #include diff --git a/src/epg.h b/src/epg.h index da595fd39..16314b32a 100644 --- a/src/epg.h +++ b/src/epg.h @@ -1,19 +1,8 @@ /* - * Electronic Program Guide - Common functions - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Electronic Program Guide - Common functions */ #ifndef EPG_H diff --git a/src/epgdb.c b/src/epgdb.c index e8e21025f..5d0c87858 100644 --- a/src/epgdb.c +++ b/src/epgdb.c @@ -1,19 +1,8 @@ /* - * Electronic Program Guide - Database File functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Electronic Program Guide - Database File functions */ #include diff --git a/src/epggrab.c b/src/epggrab.c index 2ce352f04..f6ebdc5ca 100644 --- a/src/epggrab.c +++ b/src/epggrab.c @@ -1,19 +1,8 @@ /* - * Electronic Program Guide - Common functions - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Electronic Program Guide - Common functions */ #include diff --git a/src/epggrab.h b/src/epggrab.h index 590df45df..81d6e62f0 100644 --- a/src/epggrab.h +++ b/src/epggrab.h @@ -1,19 +1,8 @@ /* - * EPG Grabber - common functions - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * EPG Grabber - common functions */ #ifndef __EPGGRAB_H__ diff --git a/src/epggrab/channel.c b/src/epggrab/channel.c index 2bda67fd8..1886d014a 100644 --- a/src/epggrab/channel.c +++ b/src/epggrab/channel.c @@ -1,20 +1,9 @@ /* - * EPG Grabber - channel functions - * Copyright (C) 2012 Adam Sutton - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * EPG Grabber - channel functions */ #include "tvheadend.h" diff --git a/src/epggrab/module.c b/src/epggrab/module.c index e47c29c34..fe36967fd 100644 --- a/src/epggrab/module.c +++ b/src/epggrab/module.c @@ -1,19 +1,8 @@ /* - * EPG Grabber - module functions - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * EPG Grabber - module functions */ #include diff --git a/src/epggrab/module/eit.c b/src/epggrab/module/eit.c index e6213bee1..8a15c89c1 100644 --- a/src/epggrab/module/eit.c +++ b/src/epggrab/module/eit.c @@ -1,19 +1,8 @@ /* - * Electronic Program Guide - eit grabber - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Electronic Program Guide - eit grabber */ #include diff --git a/src/epggrab/module/eitpatternlist.c b/src/epggrab/module/eitpatternlist.c index 61176695b..8955eaa84 100644 --- a/src/epggrab/module/eitpatternlist.c +++ b/src/epggrab/module/eitpatternlist.c @@ -1,19 +1,8 @@ /* - * Electronic Program Guide - Regular Expression Pattern Functions - * Copyright (C) 2012-2017 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012-2017 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Electronic Program Guide - Regular Expression Pattern Functions */ #include diff --git a/src/epggrab/module/eitpatternlist.h b/src/epggrab/module/eitpatternlist.h index 369206e95..bc6c18e55 100644 --- a/src/epggrab/module/eitpatternlist.h +++ b/src/epggrab/module/eitpatternlist.h @@ -1,19 +1,8 @@ /* - * Electronic Program Guide - Regular Expression Pattern Functions - * Copyright (C) 2012-2017 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012-2017 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Electronic Program Guide - Regular Expression Pattern Functions */ #ifndef __EITPATTERN_LIST__ @@ -35,17 +24,21 @@ TAILQ_HEAD(eit_pattern_list, eit_pattern); typedef struct eit_pattern_list eit_pattern_list_t; /* is list empty? */ + static inline int eit_pattern_list_empty ( eit_pattern_list_t *list ) { return TAILQ_EMPTY(list); } /* Compile a regular expression pattern from a message */ + void eit_pattern_compile_list ( eit_pattern_list_t *list, htsmsg_t *l, int flags ); /* Compile a regular expression pattern from a named message, applying message location conventions */ + void eit_pattern_compile_named_list ( eit_pattern_list_t *list, htsmsg_t *m, const char *key); /* Apply the compiled pattern to text. If it matches then return the * match in buf which is of size size_buf. * Return the buf or NULL if no match. */ + void *eit_pattern_apply_list(char *buf, size_t size_buf, const char *text, const char *lang, eit_pattern_list_t *l); void eit_pattern_free_list ( eit_pattern_list_t *l ); #endif diff --git a/src/epggrab/module/opentv.c b/src/epggrab/module/opentv.c index c76507d3a..74f348384 100644 --- a/src/epggrab/module/opentv.c +++ b/src/epggrab/module/opentv.c @@ -1,19 +1,8 @@ /* - * Electronic Program Guide - opentv epg grabber - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Electronic Program Guide - opentv epg grabber */ #include diff --git a/src/epggrab/module/psip.c b/src/epggrab/module/psip.c index a462c2fee..9eb898c47 100644 --- a/src/epggrab/module/psip.c +++ b/src/epggrab/module/psip.c @@ -1,21 +1,8 @@ /* - * Electronic Program Guide - psip grabber - * Copyright (C) 2012 Adam Sutton - * 2014 Lauri Mylläri - * 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Electronic Program Guide - psip grabber */ #include @@ -601,4 +588,3 @@ void psip_init ( void ) epggrab_module_ota_create(NULL, "psip", LS_PSIP, NULL, "PSIP: ATSC Grabber", 1, NULL, &ops); } - diff --git a/src/epggrab/module/xmltv.c b/src/epggrab/module/xmltv.c index fe4b4e14e..3071080a3 100644 --- a/src/epggrab/module/xmltv.c +++ b/src/epggrab/module/xmltv.c @@ -1,19 +1,8 @@ /* - * Electronic Program Guide - xmltv grabber - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Electronic Program Guide - xmltv grabber */ #include diff --git a/src/epggrab/otamux.c b/src/epggrab/otamux.c index 0a5dc9345..bfc25e75e 100644 --- a/src/epggrab/otamux.c +++ b/src/epggrab/otamux.c @@ -1,19 +1,8 @@ /* - * Electronic Program Guide - EPG grabber OTA functions - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Electronic Program Guide - EPG grabber OTA functions */ #include "tvheadend.h" diff --git a/src/epggrab/private.h b/src/epggrab/private.h index bc7aa5306..5fe78d0ee 100644 --- a/src/epggrab/private.h +++ b/src/epggrab/private.h @@ -1,19 +1,8 @@ /* - * EPG Grabber - private routines - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * EPG Grabber - private routines */ #ifndef __EPGGRAB_PRIVATE_H__ diff --git a/src/epggrab/support/freesat_huffman.c b/src/epggrab/support/freesat_huffman.c index 827a36602..7e45b704a 100644 --- a/src/epggrab/support/freesat_huffman.c +++ b/src/epggrab/support/freesat_huffman.c @@ -1,24 +1,7 @@ /* - * freesat_huffman.c - * - * Decode a Freesat huffman encoded buffer. - * Once decoded the buffer can be used like a "standard" DVB buffer. - * - * Code originally authored for tv_grab_dvb_plus and subsequently modified - * to integrate into tvheadend by Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * SPDX-License-Identifier: GPL-3.0-or-later * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * freesat_huffman.c */ #include "tvheadend.h" @@ -2192,6 +2175,7 @@ struct fsattab fsat_table_1[] = { /* 2 */ { 0x00000000, 1, 1}, /* 2025 '0x01' */ { 0x80000000, 1, 1} /* 2026 '0x01' */ + }; unsigned fsat_index_1[] = { @@ -2324,6 +2308,7 @@ unsigned fsat_index_1[] = { 2023, /* 126 */ 2025, /* 127 */ 2027 /* 128 */ + }; struct fsattab fsat_table_2[] = { @@ -5615,6 +5600,7 @@ struct fsattab fsat_table_2[] = { /* 2 */ { 0x00000000, 1, 1}, /* 3158 '0x01' */ { 0x80000000, 1, 1} /* 3159 '0x01' */ + }; unsigned fsat_index_2[] = { @@ -5747,6 +5733,7 @@ unsigned fsat_index_2[] = { 3156, /* 126 */ 3158, /* 127 */ 3160 /* 128 */ + }; size_t freesat_huffman_decode diff --git a/src/esfilter.c b/src/esfilter.c index f6584cdcc..b72a7b6ed 100644 --- a/src/esfilter.c +++ b/src/esfilter.c @@ -1,19 +1,8 @@ /* - * tvheadend, Elementary Stream Filter - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Elementary Stream Filter */ #include "tvheadend.h" diff --git a/src/esfilter.h b/src/esfilter.h index 82957e3e7..6e406914a 100644 --- a/src/esfilter.h +++ b/src/esfilter.h @@ -1,19 +1,8 @@ /* - * tvheadend, Elementary Stream Filter - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Elementary Stream Filter */ #ifndef __TVH_ESFILTER_H__ diff --git a/src/esstream.c b/src/esstream.c index 7f432da36..fdd4d1347 100644 --- a/src/esstream.c +++ b/src/esstream.c @@ -1,21 +1,8 @@ /* - * Elementary streams - * Copyright (C) 2010 Andreas Öman - * 2018 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2010 Andreas Öman * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Elementary streams */ #include "tvheadend.h" @@ -27,6 +14,7 @@ /** * */ + static void elementary_stream_make_nicename(elementary_stream_t *st, const char *nicename) { @@ -47,6 +35,7 @@ elementary_stream_make_nicename(elementary_stream_t *st, const char *nicename) /** * */ + void elementary_set_init (elementary_set_t *set, int subsys, const char *nicename, service_t *t) { @@ -62,6 +51,7 @@ void elementary_set_init /** * */ + void elementary_set_clean(elementary_set_t *set, service_t *t, int keep_nicename) { elementary_stream_t *st; @@ -79,6 +69,7 @@ void elementary_set_clean(elementary_set_t *set, service_t *t, int keep_nicename /** * */ + void elementary_set_update_nicename(elementary_set_t *set, const char *nicename) { elementary_stream_t *st; @@ -92,6 +83,7 @@ void elementary_set_update_nicename(elementary_set_t *set, const char *nicename) /** * */ + static void elementary_stream_init(elementary_stream_t *es) { @@ -101,6 +93,7 @@ elementary_stream_init(elementary_stream_t *es) /** * */ + static void elementary_stream_clean(elementary_stream_t *es) { @@ -110,6 +103,7 @@ elementary_stream_clean(elementary_stream_t *es) /** * */ + void elementary_set_clean_streams(elementary_set_t *set) { @@ -122,6 +116,7 @@ elementary_set_clean_streams(elementary_set_t *set) /** * */ + void elementary_set_init_filter_streams(elementary_set_t *set) { @@ -134,6 +129,7 @@ elementary_set_init_filter_streams(elementary_set_t *set) /** * */ + int elementary_set_has_streams(elementary_set_t *set, int filtered) { @@ -144,6 +140,7 @@ elementary_set_has_streams(elementary_set_t *set, int filtered) /** * */ + void elementary_set_stream_destroy(elementary_set_t *set, elementary_stream_t *es) { @@ -174,6 +171,7 @@ elementary_set_stream_destroy(elementary_set_t *set, elementary_stream_t *es) /** * */ + #define ESFM_USED (1<<0) #define ESFM_IGNORE (1<<1) @@ -194,6 +192,7 @@ elementary_set_filter_build_add /** * */ + static void elementary_set_filter_print (elementary_set_t *set) @@ -223,6 +222,7 @@ elementary_set_filter_print /** * */ + void elementary_set_filter_build(elementary_set_t *set) { @@ -448,6 +448,7 @@ ignore: /** * Add a new stream to a service */ + elementary_stream_t * elementary_stream_create_parent (elementary_set_t *set, int pid, int parent_pid, streaming_component_type_t type) @@ -486,6 +487,7 @@ create: /** * Find an elementary stream in a service */ + elementary_stream_t * elementary_stream_find_(elementary_set_t *set, int pid) { @@ -504,6 +506,7 @@ elementary_stream_find_(elementary_set_t *set, int pid) /** * Find an elementary stream in a service with specific parent pid */ + elementary_stream_t * elementary_stream_find_parent(elementary_set_t *set, int pid, int parent_pid) { @@ -519,6 +522,7 @@ elementary_stream_find_parent(elementary_set_t *set, int pid, int parent_pid) /** * Find a first elementary stream in a service (by type) */ + elementary_stream_t * elementary_stream_type_find (elementary_set_t *set, streaming_component_type_t type) @@ -534,6 +538,7 @@ elementary_stream_type_find /** * */ + elementary_stream_t * elementary_stream_type_modify(elementary_set_t *set, int pid, streaming_component_type_t type) @@ -549,6 +554,7 @@ elementary_stream_type_modify(elementary_set_t *set, int pid, /** * */ + void elementary_stream_type_destroy (elementary_set_t *set, streaming_component_type_t type) @@ -561,6 +567,7 @@ elementary_stream_type_destroy /** * */ + int elementary_stream_has_audio_or_video(elementary_set_t *set) { @@ -590,6 +597,7 @@ elementary_stream_has_no_audio(elementary_set_t *set, int filtered) /** * */ + static int escmp(const void *A, const void *B) { @@ -601,6 +609,7 @@ escmp(const void *A, const void *B) /** * */ + void elementary_set_sort_streams(elementary_set_t *set) { @@ -624,6 +633,7 @@ elementary_set_sort_streams(elementary_set_t *set) /** * Generate a message containing info about all components */ + streaming_start_t * elementary_stream_build_start(elementary_set_t *set) { @@ -656,6 +666,7 @@ elementary_stream_build_start(elementary_set_t *set) /** * Create back elementary streams from the start message. */ + elementary_set_t * elementary_stream_create_from_start (elementary_set_t *set, streaming_start_t *ss, size_t es_size) diff --git a/src/esstream.h b/src/esstream.h index 592a6933d..08721a914 100644 --- a/src/esstream.h +++ b/src/esstream.h @@ -1,20 +1,8 @@ /* - * Tvheadend - * Copyright (C) 2010 Andreas Öman - * 2018 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2010 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend */ #ifndef ESSTREAM_H__ diff --git a/src/extra/capmt_ca.c b/src/extra/capmt_ca.c index e6e83e832..f21e220ed 100644 --- a/src/extra/capmt_ca.c +++ b/src/extra/capmt_ca.c @@ -47,6 +47,7 @@ #include #ifndef CA_SET_PID /* removed in kernel 4.14 */ + typedef struct ca_pid { unsigned int pid; int index; /* -1 == disable */ diff --git a/src/file.c b/src/file.c index e23036891..f6e5a7921 100644 --- a/src/file.c +++ b/src/file.c @@ -1,19 +1,8 @@ /* - * Process file functions - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Process file functions */ #include "tvheadend.h" diff --git a/src/file.h b/src/file.h index 9523a9080..e7cc95e09 100644 --- a/src/file.h +++ b/src/file.h @@ -1,19 +1,8 @@ /* - * Process file operations - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Process file operations */ #ifndef FILE_H diff --git a/src/filebundle.c b/src/filebundle.c index 931357dc2..e124baf6c 100644 --- a/src/filebundle.c +++ b/src/filebundle.c @@ -1,19 +1,8 @@ /* - * TV headend - File bundles - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - File bundles */ #include "tvheadend.h" diff --git a/src/filebundle.h b/src/filebundle.h index 77b6edfa4..cf56e678f 100644 --- a/src/filebundle.h +++ b/src/filebundle.h @@ -1,19 +1,8 @@ /* - * TV headend - File bundles - * Copyright (C) 2008 Andreas Öman, Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman, Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - File bundles */ #ifndef __TVH_FILE_BUNDLE_H__ @@ -25,6 +14,7 @@ #include /* Bundle or Direct */ + typedef enum filebundle_handle_type { FB_BUNDLE, @@ -32,6 +22,7 @@ typedef enum filebundle_handle_type } fb_type; /* File bundle entry type */ + enum filebundle_type { FB_UNKNOWN, @@ -40,6 +31,7 @@ enum filebundle_type }; /* File bundle entry */ + typedef struct filebundle_entry { enum filebundle_type type; @@ -59,6 +51,7 @@ typedef struct filebundle_entry } filebundle_entry_t; /* File bundle directory entry */ + typedef struct filebundle_dirent { char name[256]; @@ -66,6 +59,7 @@ typedef struct filebundle_dirent } fb_dirent; /* File bundle stat */ + struct filebundle_stat { fb_type type; @@ -74,22 +68,27 @@ struct filebundle_stat }; /* Opaque types */ + typedef struct filebundle_dir fb_dir; typedef struct filebundle_file fb_file; /* Root of bundle */ + extern const filebundle_entry_t * const filebundle_root; /* Miscellaneous */ + int fb_stat ( const char *path, struct filebundle_stat *st ); /* Directory processing wrappers */ + fb_dir *fb_opendir ( const char *path ); fb_dirent *fb_readdir ( fb_dir *fb ); void fb_closedir ( fb_dir *fb ); int fb_scandir ( const char *path, fb_dirent ***list ); /* File processing wrappers */ + // Note: all access is read-only // Note: decompress is only for compressed filebundles, // not direct disk access diff --git a/src/fsmonitor.c b/src/fsmonitor.c index b8f66b632..bbaad8669 100644 --- a/src/fsmonitor.c +++ b/src/fsmonitor.c @@ -1,20 +1,8 @@ /* - * Tvheadend - File/Directory monitoring + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Adam Sutton * - * Copyright (C) 2014 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - File/Directory monitoring */ #include "tvheadend.h" diff --git a/src/fsmonitor.h b/src/fsmonitor.h index d3c586a97..d648ce848 100644 --- a/src/fsmonitor.h +++ b/src/fsmonitor.h @@ -1,20 +1,8 @@ /* - * Tvheadend - File/Directory monitoring + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Adam Sutton * - * Copyright (C) 2014 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - File/Directory monitoring */ #ifndef __FS_MONITOR_H__ diff --git a/src/hts_strtab.h b/src/hts_strtab.h index 16f0aa8f4..7f96a512a 100644 --- a/src/hts_strtab.h +++ b/src/hts_strtab.h @@ -1,19 +1,8 @@ /* - * tvheadend - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend */ #ifndef STRTAB_H_ diff --git a/src/htsbuf.c b/src/htsbuf.c index c7c9b10f8..74427c933 100644 --- a/src/htsbuf.c +++ b/src/htsbuf.c @@ -1,19 +1,8 @@ /* - * Buffer management functions - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Buffer management functions */ #include diff --git a/src/htsbuf.h b/src/htsbuf.h index 093299400..8bd1f7263 100644 --- a/src/htsbuf.h +++ b/src/htsbuf.h @@ -1,19 +1,8 @@ /* - * Buffer management functions - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Buffer management functions */ #ifndef HTSBUF_H__ @@ -33,6 +22,7 @@ typedef struct htsbuf_data { unsigned int hd_data_size; /* Size of allocation hb_data */ unsigned int hd_data_len; /* Number of valid bytes from hd_data */ unsigned int hd_data_off; /* Offset in data, used for partial writes */ + } htsbuf_data_t; typedef struct htsbuf_queue { diff --git a/src/htsmsg.c b/src/htsmsg.c index 74a8a0300..234539e67 100644 --- a/src/htsmsg.c +++ b/src/htsmsg.c @@ -1,19 +1,8 @@ /* - * Functions for manipulating HTS messages - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions for manipulating HTS messages */ #include @@ -40,6 +29,7 @@ static htsmsg_t *htsmsg_field_get_msg ( htsmsg_field_t *f, int islist ); /** * */ + static void htsmsg_field_data_destroy(htsmsg_field_t *f) { @@ -81,6 +71,7 @@ htsmsg_field_data_destroy(htsmsg_field_t *f) /** * */ + void htsmsg_field_destroy(htsmsg_t *msg, htsmsg_field_t *f) { @@ -98,6 +89,7 @@ htsmsg_field_destroy(htsmsg_t *msg, htsmsg_field_t *f) /* * */ + static void htsmsg_clear(htsmsg_t *msg) { @@ -111,6 +103,7 @@ htsmsg_clear(htsmsg_t *msg) /* * */ + htsmsg_field_t * htsmsg_field_add(htsmsg_t *msg, const char *name, int type, int flags, size_t esize) { @@ -167,6 +160,7 @@ htsmsg_field_add(htsmsg_t *msg, const char *name, int type, int flags, size_t es /* * */ + htsmsg_field_t * htsmsg_field_find(const htsmsg_t *msg, const char *name) { @@ -185,6 +179,7 @@ htsmsg_field_find(const htsmsg_t *msg, const char *name) /* * */ + htsmsg_field_t * htsmsg_field_last(htsmsg_t *msg) { @@ -197,6 +192,7 @@ htsmsg_field_last(htsmsg_t *msg) /** * */ + int htsmsg_delete_field(htsmsg_t *msg, const char *name) { @@ -212,6 +208,7 @@ htsmsg_delete_field(htsmsg_t *msg, const char *name) /** * */ + int htsmsg_is_empty(htsmsg_t *msg) { @@ -226,6 +223,7 @@ htsmsg_is_empty(htsmsg_t *msg) /* * */ + htsmsg_t * htsmsg_create_map(void) { @@ -247,6 +245,7 @@ htsmsg_create_map(void) /* * */ + htsmsg_t * htsmsg_create_list(void) { @@ -270,6 +269,7 @@ htsmsg_create_list(void) /* * */ + void htsmsg_concat(htsmsg_t *msg, htsmsg_t *sub) { @@ -286,6 +286,7 @@ htsmsg_concat(htsmsg_t *msg, htsmsg_t *sub) /* * */ + void htsmsg_destroy(htsmsg_t *msg) { @@ -308,6 +309,7 @@ htsmsg_destroy(htsmsg_t *msg) /* * */ + void htsmsg_add_bool(htsmsg_t *msg, const char *name, int b) { @@ -318,6 +320,7 @@ htsmsg_add_bool(htsmsg_t *msg, const char *name, int b) /* * */ + void htsmsg_set_bool(htsmsg_t *msg, const char *name, int b) { @@ -330,6 +333,7 @@ htsmsg_set_bool(htsmsg_t *msg, const char *name, int b) /* * */ + void htsmsg_add_s64(htsmsg_t *msg, const char *name, int64_t s64) { @@ -340,6 +344,7 @@ htsmsg_add_s64(htsmsg_t *msg, const char *name, int64_t s64) /* * */ + int htsmsg_set_s64(htsmsg_t *msg, const char *name, int64_t s64) { @@ -356,6 +361,7 @@ htsmsg_set_s64(htsmsg_t *msg, const char *name, int64_t s64) /* * */ + void htsmsg_add_dbl(htsmsg_t *msg, const char *name, double dbl) { @@ -367,6 +373,7 @@ htsmsg_add_dbl(htsmsg_t *msg, const char *name, double dbl) /* * */ + void htsmsg_add_str(htsmsg_t *msg, const char *name, const char *str) { @@ -378,6 +385,7 @@ htsmsg_add_str(htsmsg_t *msg, const char *name, const char *str) /* * */ + void htsmsg_add_str_alloc(htsmsg_t *msg, const char *name, char *str) { @@ -389,6 +397,7 @@ htsmsg_add_str_alloc(htsmsg_t *msg, const char *name, char *str) /* * */ + void htsmsg_add_str2(htsmsg_t *msg, const char *name, const char *str) { @@ -399,6 +408,7 @@ htsmsg_add_str2(htsmsg_t *msg, const char *name, const char *str) /* * */ + void htsmsg_add_str_exclusive(htsmsg_t *msg, const char *str) { @@ -418,6 +428,7 @@ htsmsg_add_str_exclusive(htsmsg_t *msg, const char *str) /* * */ + int htsmsg_field_set_str(htsmsg_field_t *f, const char *str) { @@ -450,6 +461,7 @@ htsmsg_field_set_str(htsmsg_field_t *f, const char *str) /* * */ + int htsmsg_field_set_str_force(htsmsg_field_t *f, const char *str) { @@ -464,6 +476,7 @@ htsmsg_field_set_str_force(htsmsg_field_t *f, const char *str) /* * */ + int htsmsg_set_str(htsmsg_t *msg, const char *name, const char *str) { @@ -478,6 +491,7 @@ htsmsg_set_str(htsmsg_t *msg, const char *name, const char *str) /* * */ + int htsmsg_set_str2(htsmsg_t *msg, const char *name, const char *str) { @@ -489,6 +503,7 @@ htsmsg_set_str2(htsmsg_t *msg, const char *name, const char *str) /* * */ + int htsmsg_field_set_bin(htsmsg_field_t *f, const void *bin, size_t len) { @@ -524,6 +539,7 @@ htsmsg_field_set_bin(htsmsg_field_t *f, const void *bin, size_t len) /* * */ + int htsmsg_field_set_bin_force(htsmsg_field_t *f, const void *bin, size_t len) { @@ -539,6 +555,7 @@ htsmsg_field_set_bin_force(htsmsg_field_t *f, const void *bin, size_t len) /* * */ + void htsmsg_add_bin(htsmsg_t *msg, const char *name, const void *bin, size_t len) { @@ -550,6 +567,7 @@ htsmsg_add_bin(htsmsg_t *msg, const char *name, const void *bin, size_t len) /* * */ + void htsmsg_add_bin_alloc(htsmsg_t *msg, const char *name, const void *bin, size_t len) { @@ -562,6 +580,7 @@ htsmsg_add_bin_alloc(htsmsg_t *msg, const char *name, const void *bin, size_t le /* * */ + void htsmsg_add_bin_ptr(htsmsg_t *msg, const char *name, const void *bin, size_t len) { @@ -573,6 +592,7 @@ htsmsg_add_bin_ptr(htsmsg_t *msg, const char *name, const void *bin, size_t len) /* * */ + static int htsmsg_field_set_uuid(htsmsg_field_t *f, tvh_uuid_t *u) { @@ -591,6 +611,7 @@ htsmsg_field_set_uuid(htsmsg_field_t *f, tvh_uuid_t *u) /* * */ + int htsmsg_set_uuid(htsmsg_t *msg, const char *name, tvh_uuid_t *u) { @@ -605,6 +626,7 @@ htsmsg_set_uuid(htsmsg_t *msg, const char *name, tvh_uuid_t *u) /* * */ + void htsmsg_add_uuid(htsmsg_t *msg, const char *name, tvh_uuid_t *u) { @@ -616,6 +638,7 @@ htsmsg_add_uuid(htsmsg_t *msg, const char *name, tvh_uuid_t *u) /* * */ + static htsmsg_t * htsmsg_field_set_msg(htsmsg_field_t *f, htsmsg_t *sub) { @@ -637,6 +660,7 @@ htsmsg_field_set_msg(htsmsg_field_t *f, htsmsg_t *sub) /* * */ + htsmsg_t * htsmsg_add_msg(htsmsg_t *msg, const char *name, htsmsg_t *sub) { @@ -650,6 +674,7 @@ htsmsg_add_msg(htsmsg_t *msg, const char *name, htsmsg_t *sub) /* * */ + htsmsg_t * htsmsg_set_msg(htsmsg_t *msg, const char *name, htsmsg_t *sub) { @@ -663,6 +688,7 @@ htsmsg_set_msg(htsmsg_t *msg, const char *name, htsmsg_t *sub) /* * */ + void htsmsg_add_msg_extname(htsmsg_t *msg, const char *name, htsmsg_t *sub) { @@ -684,6 +710,7 @@ htsmsg_add_msg_extname(htsmsg_t *msg, const char *name, htsmsg_t *sub) /** * */ + int htsmsg_get_s64(htsmsg_t *msg, const char *name, int64_t *s64p) { @@ -721,6 +748,7 @@ htsmsg_field_get_s64 /** * */ + int bool_check(const char *str) { @@ -775,6 +803,7 @@ htsmsg_get_bool_or_default(htsmsg_t *msg, const char *name, int def) /** * */ + int64_t htsmsg_get_s64_or_default(htsmsg_t *msg, const char *name, int64_t def) { @@ -785,6 +814,7 @@ htsmsg_get_s64_or_default(htsmsg_t *msg, const char *name, int64_t def) /* * */ + int htsmsg_get_u32(htsmsg_t *msg, const char *name, uint32_t *u32p) { @@ -820,6 +850,7 @@ htsmsg_field_get_u32(htsmsg_field_t *f, uint32_t *u32p) /** * */ + int htsmsg_get_u32_or_default(htsmsg_t *msg, const char *name, uint32_t def) { @@ -830,6 +861,7 @@ htsmsg_get_u32_or_default(htsmsg_t *msg, const char *name, uint32_t def) /** * */ + int32_t htsmsg_get_s32_or_default(htsmsg_t *msg, const char *name, int32_t def) { @@ -840,6 +872,7 @@ htsmsg_get_s32_or_default(htsmsg_t *msg, const char *name, int32_t def) /* * */ + int htsmsg_get_s32(htsmsg_t *msg, const char *name, int32_t *s32p) { @@ -859,6 +892,7 @@ htsmsg_get_s32(htsmsg_t *msg, const char *name, int32_t *s32p) /* * */ + int htsmsg_field_get_s32(htsmsg_field_t *f, int32_t *s32p) { @@ -878,6 +912,7 @@ htsmsg_field_get_s32(htsmsg_field_t *f, int32_t *s32p) /* * */ + int htsmsg_get_dbl(htsmsg_t *msg, const char *name, double *dblp) { @@ -913,6 +948,7 @@ htsmsg_field_get_dbl /** * */ + const char * htsmsg_field_get_string(htsmsg_field_t *f) { @@ -945,6 +981,7 @@ htsmsg_field_get_string(htsmsg_field_t *f) /* * */ + const char * htsmsg_get_str(htsmsg_t *msg, const char *name) { @@ -958,6 +995,7 @@ htsmsg_get_str(htsmsg_t *msg, const char *name) /** * */ + int htsmsg_field_get_bin(htsmsg_field_t *f, const void **binp, size_t *lenp) { @@ -996,6 +1034,7 @@ htsmsg_field_get_bin(htsmsg_field_t *f, const void **binp, size_t *lenp) /* * */ + int htsmsg_get_bin (htsmsg_t *msg, const char *name, const void **binp, size_t *lenp) @@ -1011,6 +1050,7 @@ htsmsg_get_bin /** * */ + int htsmsg_field_get_uuid(htsmsg_field_t *f, tvh_uuid_t *u) { @@ -1041,6 +1081,7 @@ htsmsg_field_get_uuid(htsmsg_field_t *f, tvh_uuid_t *u) /* * */ + int htsmsg_get_uuid (htsmsg_t *msg, const char *name, tvh_uuid_t *u) @@ -1056,6 +1097,7 @@ htsmsg_get_uuid /* * */ + htsmsg_t * htsmsg_get_map(htsmsg_t *msg, const char *name) { @@ -1076,6 +1118,7 @@ htsmsg_field_get_map(htsmsg_field_t *f) /** * */ + htsmsg_t * htsmsg_get_map_multi(htsmsg_t *msg, ...) { @@ -1093,6 +1136,7 @@ htsmsg_get_map_multi(htsmsg_t *msg, ...) /** * */ + const char * htsmsg_get_str_multi(htsmsg_t *msg, ...) { @@ -1122,6 +1166,7 @@ htsmsg_get_str_multi(htsmsg_t *msg, ...) /* * */ + htsmsg_t * htsmsg_get_list(const htsmsg_t *msg, const char *name) { @@ -1175,6 +1220,7 @@ htsmsg_field_get_msg ( htsmsg_field_t *f, int islist ) /** * */ + htsmsg_t * htsmsg_detach_submsg(htsmsg_field_t *f) { @@ -1190,6 +1236,7 @@ htsmsg_detach_submsg(htsmsg_field_t *f) /* * */ + static void htsmsg_print0(htsmsg_t *msg, int indent) { @@ -1247,6 +1294,7 @@ htsmsg_print0(htsmsg_t *msg, int indent) /* * */ + void htsmsg_print(htsmsg_t *msg) { @@ -1256,6 +1304,7 @@ htsmsg_print(htsmsg_t *msg) /** * */ + static void htsmsg_copy_i(htsmsg_t *dst, const htsmsg_t *src); static void @@ -1332,6 +1381,7 @@ htsmsg_copy_field(htsmsg_t *dst, const char *dstname, /** * */ + int htsmsg_cmp(const htsmsg_t *m1, const htsmsg_t *m2) { @@ -1400,6 +1450,7 @@ htsmsg_cmp(const htsmsg_t *m1, const htsmsg_t *m2) /** * */ + htsmsg_t * htsmsg_get_map_in_list(htsmsg_t *m, int num) { @@ -1416,6 +1467,7 @@ htsmsg_get_map_in_list(htsmsg_t *m, int num) /** * */ + htsmsg_t * htsmsg_get_map_by_field_if_name(htsmsg_field_t *f, const char *name) { @@ -1430,6 +1482,7 @@ htsmsg_get_map_by_field_if_name(htsmsg_field_t *f, const char *name) /** * */ + const char * htsmsg_get_cdata(htsmsg_t *m, const char *field) { @@ -1441,6 +1494,7 @@ htsmsg_get_cdata(htsmsg_t *m, const char *field) * * Note: this will NOT work for lists of complex types */ + char * htsmsg_list_2_csv(htsmsg_t *m, char delim, int human) { @@ -1535,6 +1589,7 @@ htsmsg_csv_2_list(const char *str, char delim) /* * */ + htsmsg_t * htsmsg_create_key_val(const char *key, const char *val) { @@ -1549,6 +1604,7 @@ htsmsg_create_key_val(const char *key, const char *val) /* * */ + int htsmsg_is_string_in_list(htsmsg_t *list, const char *str) { @@ -1570,6 +1626,7 @@ htsmsg_is_string_in_list(htsmsg_t *list, const char *str) /* * */ + int htsmsg_remove_string_from_list(htsmsg_t *list, const char *str) { @@ -1595,6 +1652,7 @@ htsmsg_remove_string_from_list(htsmsg_t *list, const char *str) * Based on htsbuf_vqprintf, but can't easily share code since we rely * on stack allocations. */ + static void htsmsg_add_str_ap(htsmsg_t *msg, const char *name, const char *fmt, va_list ap0) { diff --git a/src/htsmsg.h b/src/htsmsg.h index 82787d4cc..22a75b106 100644 --- a/src/htsmsg.h +++ b/src/htsmsg.h @@ -1,19 +1,8 @@ /* - * Functions for manipulating HTS messages - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions for manipulating HTS messages */ #pragma once @@ -104,6 +93,7 @@ typedef struct htsmsg_field { /** * Aligned memory allocation */ + static inline size_t htsmsg_malloc_align(int type, size_t len) { if (type == HMF_LIST || type == HMF_MAP) @@ -114,6 +104,7 @@ static inline size_t htsmsg_malloc_align(int type, size_t len) /** * Get a field name */ + static inline const char *htsmsg_field_name(htsmsg_field_t *f) { if (f->hmf_flags & HMF_NONAME) return ""; @@ -123,51 +114,61 @@ static inline const char *htsmsg_field_name(htsmsg_field_t *f) /** * Create a new map */ + htsmsg_t *htsmsg_create_map(void); /** * Create a new list */ + htsmsg_t *htsmsg_create_list(void); /** * Concat msg2 to msg1 (list or map) */ + void htsmsg_concat(htsmsg_t *msg1, htsmsg_t *msg2); /** * Remove a given field from a msg */ + void htsmsg_field_destroy(htsmsg_t *msg, htsmsg_field_t *f); /** * Destroys a message (map or list) */ + void htsmsg_destroy(htsmsg_t *msg); /** * Add an boolean field. */ + void htsmsg_add_bool(htsmsg_t *msg, const char *name, int b); /** * Add/update an boolean field. */ + void htsmsg_set_bool(htsmsg_t *msg, const char *name, int b); /** * Add an integer field where source is signed 64 bit. */ + void htsmsg_add_s64(htsmsg_t *msg, const char *name, int64_t s64); /** * Add/update an integer field where source is signed 64 bit. */ + int htsmsg_set_s64(htsmsg_t *msg, const char *name, int64_t s64); /** * Add an integer field where source is unsigned 32 bit. */ + static inline void htsmsg_add_u32(htsmsg_t *msg, const char *name, uint32_t u32) { htsmsg_add_s64(msg, name, u32); } @@ -175,6 +176,7 @@ htsmsg_add_u32(htsmsg_t *msg, const char *name, uint32_t u32) /** * Add/update an integer field */ + static inline int htsmsg_set_u32(htsmsg_t *msg, const char *name, uint32_t u32) { return htsmsg_set_s64(msg, name, u32); } @@ -182,6 +184,7 @@ htsmsg_set_u32(htsmsg_t *msg, const char *name, uint32_t u32) /** * Add an integer field where source is signed 32 bit. */ + static inline void htsmsg_add_s32(htsmsg_t *msg, const char *name, int32_t s32) { htsmsg_add_s64(msg, name, s32); } @@ -189,6 +192,7 @@ htsmsg_add_s32(htsmsg_t *msg, const char *name, int32_t s32) /** * Add/update an integer field */ + static inline int htsmsg_set_s32(htsmsg_t *msg, const char *name, int32_t s32) { return htsmsg_set_s64(msg, name, s32); } @@ -196,26 +200,31 @@ htsmsg_set_s32(htsmsg_t *msg, const char *name, int32_t s32) /** * Add a string field. */ + void htsmsg_add_str(htsmsg_t *msg, const char *name, const char *str); /** * Add a string field (NULL check). */ + void htsmsg_add_str2(htsmsg_t *msg, const char *name, const char *str); /** * Add a string field (allocated using malloc). */ + void htsmsg_add_str_alloc(htsmsg_t *msg, const char *name, char *str); /** * Add a string field to a list only once. */ + void htsmsg_add_str_exclusive(htsmsg_t *msg, const char *str); /** * Add a string using printf-style for the value. */ + void htsmsg_add_str_printf(htsmsg_t *msg, const char *name, const char *fmt, ...) __attribute__((format(printf,3,4)));; @@ -223,28 +232,33 @@ htsmsg_add_str_printf(htsmsg_t *msg, const char *name, const char *fmt, ...) /** * Add/update a string field */ + int htsmsg_set_str(htsmsg_t *msg, const char *name, const char *str); int htsmsg_set_str2(htsmsg_t *msg, const char *name, const char *str); /** * Update a string field */ + int htsmsg_field_set_str(htsmsg_field_t *f, const char *str); int htsmsg_field_set_str_force(htsmsg_field_t *f, const char *str); /** * Add an field where source is a list or map message. */ + htsmsg_t *htsmsg_add_msg(htsmsg_t *msg, const char *name, htsmsg_t *sub); /** * Add/update an field where source is a list or map message. */ + htsmsg_t *htsmsg_set_msg(htsmsg_t *msg, const char *name, htsmsg_t *sub); /** * Add an field where source is a double */ + void htsmsg_add_dbl(htsmsg_t *msg, const char *name, double dbl); /** @@ -253,22 +267,26 @@ void htsmsg_add_dbl(htsmsg_t *msg, const char *name, double dbl); * This function will not strdup() \p name but relies on the caller * to keep the string allocated for as long as the message is valid. */ + void htsmsg_add_msg_extname(htsmsg_t *msg, const char *name, htsmsg_t *sub); /** * Update an binary field */ + int htsmsg_field_set_bin(htsmsg_field_t *f, const void *bin, size_t len); int htsmsg_field_set_bin_force(htsmsg_field_t *f, const void *bin, size_t len); /** * Add an binary field. The data is copied to a inallocated storage. */ + void htsmsg_add_bin(htsmsg_t *msg, const char *name, const void *bin, size_t len); /** * Add an binary field. The passed data must be mallocated. */ + void htsmsg_add_bin_alloc(htsmsg_t *msg, const char *name, const void *bin, size_t len); /** @@ -276,16 +294,19 @@ void htsmsg_add_bin_alloc(htsmsg_t *msg, const char *name, const void *bin, size * is responsible for keeping the data valid for as long as the message * is around. */ + void htsmsg_add_bin_ptr(htsmsg_t *msg, const char *name, const void *bin, size_t len); /** * Add/update a uuid field */ + int htsmsg_set_uuid(htsmsg_t *msg, const char *name, tvh_uuid_t *u); /** * Add an uuid field. */ + void htsmsg_add_uuid(htsmsg_t *msg, const char *name, tvh_uuid_t *u); /** @@ -295,6 +316,7 @@ void htsmsg_add_uuid(htsmsg_t *msg, const char *name, tvh_uuid_t *u); * HTSMSG_ERR_CONVERSION_IMPOSSIBLE - Field is not an integer or * out of range for the requested storage. */ + int htsmsg_get_u32(htsmsg_t *msg, const char *name, uint32_t *u32p); int htsmsg_field_get_u32(htsmsg_field_t *f, uint32_t *u32p); @@ -306,6 +328,7 @@ int htsmsg_field_get_u32(htsmsg_field_t *f, uint32_t *u32p); * HTSMSG_ERR_CONVERSION_IMPOSSIBLE - Field is not an integer or * out of range for the requested storage. */ + int htsmsg_get_s32(htsmsg_t *msg, const char *name, int32_t *s32p); int htsmsg_field_get_s32(htsmsg_field_t *f, int32_t *s32p); @@ -317,6 +340,7 @@ int htsmsg_field_get_s32(htsmsg_field_t *f, int32_t *s32p); * HTSMSG_ERR_CONVERSION_IMPOSSIBLE - Field is not an integer or * out of range for the requested storage. */ + int htsmsg_get_s64(htsmsg_t *msg, const char *name, int64_t *s64p); int htsmsg_field_get_s64(htsmsg_field_t *f, int64_t *s64p); @@ -324,6 +348,7 @@ int htsmsg_field_get_s64(htsmsg_field_t *f, int64_t *s64p); /* * Return the field \p name as an s64. */ + int64_t htsmsg_get_s64_or_default(htsmsg_t *msg, const char *name, int64_t def); int bool_check(const char *str); @@ -346,6 +371,7 @@ int htsmsg_get_bool_or_default(htsmsg_t *msg, const char *name, int def); * @return HTSMSG_ERR_FIELD_NOT_FOUND - Field does not exist * HTSMSG_ERR_CONVERSION_IMPOSSIBLE - Field is not a binary blob. */ + int htsmsg_get_bin(htsmsg_t *msg, const char *name, const void **binp, size_t *lenp); @@ -357,6 +383,7 @@ int htsmsg_get_bin(htsmsg_t *msg, const char *name, const void **binp, * @return HTSMSG_ERR_FIELD_NOT_FOUND - Field does not exist * HTSMSG_ERR_CONVERSION_IMPOSSIBLE - Field is not a binary blob. */ + int htsmsg_get_uuid(htsmsg_t *msg, const char *name, tvh_uuid_t *u); /** @@ -365,6 +392,7 @@ int htsmsg_get_uuid(htsmsg_t *msg, const char *name, tvh_uuid_t *u); * @return NULL if the field can not be found or not of list type. * Otherwise a htsmsg is returned. */ + htsmsg_t *htsmsg_get_list(const htsmsg_t *msg, const char *name); htsmsg_t *htsmsg_field_get_list(htsmsg_field_t *f); @@ -375,6 +403,7 @@ htsmsg_t *htsmsg_field_get_list(htsmsg_field_t *f); * @return NULL if the field can not be found or not of string type. * Otherwise a pointer to the data is returned. */ + const char *htsmsg_get_str(htsmsg_t *msg, const char *name); /** @@ -383,6 +412,7 @@ const char *htsmsg_get_str(htsmsg_t *msg, const char *name); * @return NULL if the field can not be found or not of map type. * Otherwise a htsmsg is returned. */ + htsmsg_t *htsmsg_get_map(htsmsg_t *msg, const char *name); htsmsg_t *htsmsg_field_get_map(htsmsg_field_t *f); @@ -390,12 +420,14 @@ htsmsg_t *htsmsg_field_get_map(htsmsg_field_t *f); /** * Traverse a hierarchy of htsmsg's to find a specific child. */ + htsmsg_t *htsmsg_get_map_multi(htsmsg_t *msg, ...) __attribute__((__sentinel__(0))); /** * Traverse a hierarchy of htsmsg's to find a specific child. */ + const char *htsmsg_get_str_multi(htsmsg_t *msg, ...) __attribute__((__sentinel__(0))); @@ -406,6 +438,7 @@ const char *htsmsg_get_str_multi(htsmsg_t *msg, ...) * HTSMSG_ERR_CONVERSION_IMPOSSIBLE - Field is not an integer or * out of range for the requested storage. */ + int htsmsg_get_dbl(htsmsg_t *msg, const char *name, double *dblp); int htsmsg_field_get_dbl(htsmsg_field_t *f, double *dblp); @@ -414,6 +447,7 @@ int htsmsg_field_get_dbl(htsmsg_field_t *f, double *dblp); * Given the field \p f, return a string if it is of type string, otherwise * return NULL */ + const char *htsmsg_field_get_string(htsmsg_field_t *f); #define htsmsg_field_get_str(f) htsmsg_field_get_string(f) @@ -421,6 +455,7 @@ const char *htsmsg_field_get_string(htsmsg_field_t *f); * Given the field \p f, return a uuid if it is of type string, otherwise * return NULL */ + int htsmsg_field_get_uuid(htsmsg_field_t *f, tvh_uuid_t *u); /** @@ -430,6 +465,7 @@ int htsmsg_field_get_uuid(htsmsg_field_t *f, tvh_uuid_t *u); * HTSMSG_ERR_CONVERSION_IMPOSSIBLE - Field is not an integer or * out of range for the requested storage. */ + int htsmsg_field_get_bin(htsmsg_field_t *f, const void **binp, size_t *lenp); /** @@ -438,6 +474,7 @@ int htsmsg_field_get_bin(htsmsg_field_t *f, const void **binp, size_t *lenp); * @return An unsigned 32 bit integer or NULL if the field can not be found * or if conversion is not possible. */ + int htsmsg_get_u32_or_default(htsmsg_t *msg, const char *name, uint32_t def); /** @@ -446,17 +483,20 @@ int htsmsg_get_u32_or_default(htsmsg_t *msg, const char *name, uint32_t def); * @return A signed 32 bit integer or NULL if the field can not be found * or if conversion is not possible. */ + int32_t htsmsg_get_s32_or_default(htsmsg_t *msg, const char *name, int32_t def); /** * Remove the given field called \p name from the message \p msg. */ + int htsmsg_delete_field(htsmsg_t *msg, const char *name); /** * Is list/map empty */ + int htsmsg_is_empty(htsmsg_t *msg); /** @@ -465,43 +505,51 @@ int htsmsg_is_empty(htsmsg_t *msg); * the the contents of the sub message will stay valid if the parent is * destroyed. The caller is responsible for freeing this new message. */ + htsmsg_t *htsmsg_detach_submsg(htsmsg_field_t *f); /** * Print a message to stdout. */ + void htsmsg_print(htsmsg_t *msg); /** * Create a new field. Primarily intended for htsmsg internal functions. */ + htsmsg_field_t *htsmsg_field_add(htsmsg_t *msg, const char *name, int type, int flags, size_t esize); /** * Get a field, return NULL if it does not exist */ + htsmsg_field_t *htsmsg_field_find(const htsmsg_t *msg, const char *name); /** * Get a last field, return NULL if it does not exist */ + htsmsg_field_t *htsmsg_field_last(htsmsg_t *msg); /** * Clone a message. */ + htsmsg_t *htsmsg_copy(const htsmsg_t *src); /** * Copy only one field from one htsmsg to another (with renaming). */ + void htsmsg_copy_field(htsmsg_t *dst, const char *dstname, const htsmsg_t *src, const char *srcname); /** * Compare a message. */ + int htsmsg_cmp(const htsmsg_t *m1, const htsmsg_t *m2); #define HTSMSG_FOREACH(f, msg) TAILQ_FOREACH(f, &(msg)->hm_fields, hmf_link) @@ -510,6 +558,7 @@ int htsmsg_cmp(const htsmsg_t *m1, const htsmsg_t *m2); /** * Misc */ + htsmsg_t *htsmsg_get_map_in_list(htsmsg_t *m, int num); htsmsg_t *htsmsg_get_map_by_field_if_name(htsmsg_field_t *f, const char *name); @@ -529,6 +578,7 @@ int htsmsg_remove_string_from_list(htsmsg_t *list, const char *str); /** * */ + struct memoryinfo; extern struct memoryinfo htsmsg_memoryinfo; extern struct memoryinfo htsmsg_field_memoryinfo; diff --git a/src/htsmsg_binary.c b/src/htsmsg_binary.c index 48a1bf985..a1d46f561 100644 --- a/src/htsmsg_binary.c +++ b/src/htsmsg_binary.c @@ -1,19 +1,8 @@ /* - * Functions converting HTSMSGs to/from a simple binary format - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions converting HTSMSGs to/from a simple binary format */ #include @@ -29,6 +18,7 @@ /* * */ + static int htsmsg_binary_des0(htsmsg_t *msg, const uint8_t *buf, size_t len) { @@ -152,6 +142,7 @@ htsmsg_binary_des0(htsmsg_t *msg, const uint8_t *buf, size_t len) /* * */ + htsmsg_t * htsmsg_binary_deserialize0(const void *data, size_t len, const void *buf) { @@ -180,6 +171,7 @@ htsmsg_binary_deserialize0(const void *data, size_t len, const void *buf) /* * */ + int htsmsg_binary_deserialize(htsmsg_t **msg, const void *data, size_t *len, const void *buf) { @@ -211,6 +203,7 @@ htsmsg_binary_deserialize(htsmsg_t **msg, const void *data, size_t *len, const v /* * */ + static size_t htsmsg_binary_count(htsmsg_t *msg) { @@ -260,6 +253,7 @@ htsmsg_binary_count(htsmsg_t *msg) /* * */ + static void htsmsg_binary_write(htsmsg_t *msg, uint8_t *ptr) { @@ -356,6 +350,7 @@ htsmsg_binary_write(htsmsg_t *msg, uint8_t *ptr) /* * */ + int htsmsg_binary_serialize0(htsmsg_t *msg, void **datap, size_t *lenp, int maxlen) { @@ -377,6 +372,7 @@ htsmsg_binary_serialize0(htsmsg_t *msg, void **datap, size_t *lenp, int maxlen) /* * */ + int htsmsg_binary_serialize(htsmsg_t *msg, void **datap, size_t *lenp, int maxlen) { diff --git a/src/htsmsg_binary.h b/src/htsmsg_binary.h index d7d1eee79..5661fc1f3 100644 --- a/src/htsmsg_binary.h +++ b/src/htsmsg_binary.h @@ -1,19 +1,8 @@ /* - * Functions converting HTSMSGs to/from a simple binary format - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions converting HTSMSGs to/from a simple binary format */ #ifndef HTSMSG_BINARY_H_ @@ -24,6 +13,7 @@ /** * htsmsg_binary_deserialize */ + htsmsg_t *htsmsg_binary_deserialize0(const void *data, size_t len, const void *buf); diff --git a/src/htsmsg_binary2.c b/src/htsmsg_binary2.c index 77ddaf862..09d9a1351 100644 --- a/src/htsmsg_binary2.c +++ b/src/htsmsg_binary2.c @@ -1,19 +1,8 @@ /* - * Functions converting HTSMSGs to/from a simple binary format - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions converting HTSMSGs to/from a simple binary format */ #include @@ -31,6 +20,7 @@ static uint32_t htsmsg_binary2_count(htsmsg_t *msg); /* * */ + static inline uint32_t htsmsg_binary2_get_length(uint8_t const **_p, const uint8_t *end) { uint32_t r = 0; @@ -90,6 +80,7 @@ static inline uint32_t htsmsg_binary2_length_count(uint32_t len) /* * */ + static int htsmsg_binary2_des0(htsmsg_t *msg, const uint8_t *buf, uint32_t len) { @@ -211,6 +202,7 @@ htsmsg_binary2_des0(htsmsg_t *msg, const uint8_t *buf, uint32_t len) /* * */ + htsmsg_t * htsmsg_binary2_deserialize0(const void *data, size_t len, const void *buf) { @@ -243,6 +235,7 @@ htsmsg_binary2_deserialize0(const void *data, size_t len, const void *buf) /* * */ + int htsmsg_binary2_deserialize (htsmsg_t **msg, const void *data, size_t *len, const void *buf) @@ -277,6 +270,7 @@ htsmsg_binary2_deserialize /* * */ + static uint32_t htsmsg_binary2_field_length(htsmsg_field_t *f) { @@ -317,6 +311,7 @@ htsmsg_binary2_field_length(htsmsg_field_t *f) /* * */ + static uint32_t htsmsg_binary2_count(htsmsg_t *msg) { @@ -335,6 +330,7 @@ htsmsg_binary2_count(htsmsg_t *msg) /* * */ + static void htsmsg_binary2_write(htsmsg_t *msg, uint8_t *ptr) { @@ -397,6 +393,7 @@ htsmsg_binary2_write(htsmsg_t *msg, uint8_t *ptr) /* * */ + int htsmsg_binary2_serialize0 (htsmsg_t *msg, void **datap, size_t *lenp, size_t maxlen) @@ -420,6 +417,7 @@ htsmsg_binary2_serialize0 /* * */ + int htsmsg_binary2_serialize (htsmsg_t *msg, void **datap, size_t *lenp, size_t maxlen) diff --git a/src/htsmsg_binary2.h b/src/htsmsg_binary2.h index e41eeb7ee..402681eed 100644 --- a/src/htsmsg_binary2.h +++ b/src/htsmsg_binary2.h @@ -1,19 +1,8 @@ /* - * Functions converting HTSMSGs to/from a simple binary format - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions converting HTSMSGs to/from a simple binary format */ #ifndef HTSMSG_BINARY2_H_ diff --git a/src/htsmsg_json.c b/src/htsmsg_json.c index 28f6c585e..303f64331 100644 --- a/src/htsmsg_json.c +++ b/src/htsmsg_json.c @@ -1,19 +1,8 @@ /* - * Functions converting HTSMSGs to/from JSON - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions converting HTSMSGs to/from JSON */ #include @@ -33,6 +22,7 @@ /** * */ + static void htsmsg_json_write(htsmsg_t *msg, htsbuf_queue_t *hq, int isarray, int indent, int pretty) @@ -107,6 +97,7 @@ htsmsg_json_write(htsmsg_t *msg, htsbuf_queue_t *hq, int isarray, /** * */ + void htsmsg_json_serialize(htsmsg_t *msg, htsbuf_queue_t *hq, int pretty) { @@ -119,6 +110,7 @@ htsmsg_json_serialize(htsmsg_t *msg, htsbuf_queue_t *hq, int pretty) /** * */ + char * htsmsg_json_serialize_to_str(htsmsg_t *msg, int pretty) { @@ -135,6 +127,7 @@ htsmsg_json_serialize_to_str(htsmsg_t *msg, int pretty) /** * */ + static void * create_map(void *opaque) { @@ -192,6 +185,7 @@ add_null(void *opaque, void *parent, const char *name) /** * */ + static const json_deserializer_t json_to_htsmsg = { .jd_create_map = create_map, .jd_create_list = create_list, @@ -208,6 +202,7 @@ static const json_deserializer_t json_to_htsmsg = { /** * */ + htsmsg_t * htsmsg_json_deserialize(const char *src) { diff --git a/src/htsmsg_json.h b/src/htsmsg_json.h index ae7cf4cf2..71121cf81 100644 --- a/src/htsmsg_json.h +++ b/src/htsmsg_json.h @@ -1,19 +1,8 @@ /* - * Functions converting HTSMSGs to/from JSON - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions converting HTSMSGs to/from JSON */ #ifndef HTSMSG_JSON_H_ @@ -25,6 +14,7 @@ struct rstr; /** * htsmsg_binary_deserialize */ + htsmsg_t *htsmsg_json_deserialize(const char *src); void htsmsg_json_serialize(htsmsg_t *msg, htsbuf_queue_t *hq, int pretty); diff --git a/src/htsmsg_xml.c b/src/htsmsg_xml.c index 4123e74d6..7e01a0ed8 100644 --- a/src/htsmsg_xml.c +++ b/src/htsmsg_xml.c @@ -1,19 +1,8 @@ /* - * Functions converting HTSMSGs to/from XML - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions converting HTSMSGs to/from XML */ /** diff --git a/src/htsmsg_xml.h b/src/htsmsg_xml.h index c4d4f29dc..208b644b1 100644 --- a/src/htsmsg_xml.h +++ b/src/htsmsg_xml.h @@ -1,19 +1,8 @@ /* - * Functions converting HTSMSGs to/from XML - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions converting HTSMSGs to/from XML */ #ifndef HTSMSG_XML_H_ diff --git a/src/htsp_server.c b/src/htsp_server.c index e3c8ea4ac..c3fac0cf7 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -1,19 +1,8 @@ /* - * tvheadend, HTSP interface - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, HTSP interface */ #include diff --git a/src/htsp_server.h b/src/htsp_server.h index 3b6470d51..79e110014 100644 --- a/src/htsp_server.h +++ b/src/htsp_server.h @@ -1,19 +1,8 @@ /* - * tvheadend, HTSP interface - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, HTSP interface */ #ifndef HTSP_H_ diff --git a/src/htsstr.c b/src/htsstr.c index 35c10d0d3..52ca417c3 100644 --- a/src/htsstr.c +++ b/src/htsstr.c @@ -1,20 +1,9 @@ /* - * String helper functions - * Copyright (C) 2008 Andreas Öman - * Copyright (C) 2008 Mattias Wadman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman + * Copyright (C) 2008 Mattias Wadman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * String helper functions */ #include @@ -294,6 +283,7 @@ htsstr_substitute(const char *src, char *dst, size_t dstlen, /* * gcc -g -I ../build.linux/ -o test htsstr.c */ + void main(int argc, char *argv[]) { char *strings[] = { diff --git a/src/http.c b/src/http.c index 71a041805..5a8ba5fd8 100644 --- a/src/http.c +++ b/src/http.c @@ -1,19 +1,8 @@ /* - * tvheadend, HTTP interface - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, HTTP interface */ #include "tvheadend.h" diff --git a/src/http.h b/src/http.h index 0246311ba..cb9a8ad58 100644 --- a/src/http.h +++ b/src/http.h @@ -1,19 +1,8 @@ /* - * tvheadend, HTTP interface - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, HTTP interface */ #ifndef HTTP_H_ diff --git a/src/httpc.c b/src/httpc.c index 9f469752b..7b86b244f 100644 --- a/src/httpc.c +++ b/src/httpc.c @@ -1,20 +1,8 @@ /* - * Tvheadend - HTTP client functions + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - HTTP client functions */ #include "tvheadend.h" diff --git a/src/huffman.c b/src/huffman.c index ac3a322f6..e35038673 100644 --- a/src/huffman.c +++ b/src/huffman.c @@ -1,19 +1,7 @@ /* - * TV headend - Huffman decoder - * Copyb1 (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - Huffman decoder */ #include diff --git a/src/huffman.h b/src/huffman.h index 184a5a8f4..b778f3012 100644 --- a/src/huffman.h +++ b/src/huffman.h @@ -1,19 +1,8 @@ /* - * TV headend - Huffman decoder - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - Huffman decoder */ #ifndef __TVH_HUFFMAN_H__ diff --git a/src/idnode.c b/src/idnode.c index 1508b1773..fe657a841 100644 --- a/src/idnode.c +++ b/src/idnode.c @@ -1,20 +1,8 @@ /* - * Tvheadend - idnode (class) system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * Copyright (C) 2013 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - idnode (class) system */ #define _GNU_SOURCE diff --git a/src/idnode.h b/src/idnode.h index 1224db7e7..0ac7124b9 100644 --- a/src/idnode.h +++ b/src/idnode.h @@ -1,20 +1,8 @@ /* - * Tvheadend - idnode (class) system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * Copyright (C) 2013 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - idnode (class) system */ #ifndef __TVH_IDNODE_H__ diff --git a/src/imagecache.c b/src/imagecache.c index a88ef6253..bc6930bdd 100644 --- a/src/imagecache.c +++ b/src/imagecache.c @@ -1,21 +1,9 @@ /* - * Icon file server operations - * Copyright (C) 2012 Andy Brown - * (C) 2015-2018 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Andy Brown + * Copyright (C) 2015-2018 Jaroslav Kysela * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Icon file server operations */ #include diff --git a/src/imagecache.h b/src/imagecache.h index 5a2d0e19b..64e5bf677 100644 --- a/src/imagecache.h +++ b/src/imagecache.h @@ -1,19 +1,8 @@ /* - * Icon file serve operations - * Copyright (C) 2012 Andy Brown + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Andy Brown * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Icon file serve operations */ #ifndef __IMAGE_CACHE_H__ diff --git a/src/input.c b/src/input.c index d8c825a96..421c70582 100644 --- a/src/input.c +++ b/src/input.c @@ -1,19 +1,8 @@ /* - * TVheadend - * Copyright (C) 2013 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TVheadend */ #include "input.h" diff --git a/src/input.h b/src/input.h index 3dce355c6..110cffeaf 100644 --- a/src/input.h +++ b/src/input.h @@ -1,19 +1,8 @@ /* - * TVheadend - * Copyright (C) 2007 - 2010 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 - 2010 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TVheadend */ #ifndef __TVH_INPUT_H__ diff --git a/src/input/mpegts.c b/src/input/mpegts.c index fca4f3429..8951b4fe1 100644 --- a/src/input/mpegts.c +++ b/src/input/mpegts.c @@ -1,19 +1,8 @@ /* - * TVheadend - * Copyright (C) 2013 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TVheadend */ #include "input.h" @@ -44,16 +33,19 @@ mpegts_init ( int linuxdvb_mask, int nosatip, str_list_t *satip_client, dvb_fastscan_init(); /* Network scanner */ + #if ENABLE_MPEGTS mpegts_network_scan_init(); #endif /* Setup DVB networks */ + #if ENABLE_MPEGTS_DVB dvb_network_init(); #endif /* TS files */ + #if ENABLE_TSFILE if(tsfiles->num) { int i; @@ -64,26 +56,31 @@ mpegts_init ( int linuxdvb_mask, int nosatip, str_list_t *satip_client, #endif /* IPTV */ + #if ENABLE_IPTV iptv_init(); #endif /* Linux DVB */ + #if ENABLE_LINUXDVB linuxdvb_init(linuxdvb_mask); #endif /* SAT>IP DVB client */ + #if ENABLE_SATIP_CLIENT satip_init(nosatip, satip_client); #endif /* HDHomerun client */ + #if ENABLE_HDHOMERUN_CLIENT tvhdhomerun_init(); #endif /* Mux schedulers */ + #if ENABLE_MPEGTS mpegts_mux_sched_init(); #endif diff --git a/src/input/mpegts.h b/src/input/mpegts.h index 0fb5b1922..864e54412 100644 --- a/src/input/mpegts.h +++ b/src/input/mpegts.h @@ -1,20 +1,8 @@ /* - * Tvheadend - TS file input system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - TS file input system */ #ifndef __TVH_MPEGTS_H__ diff --git a/src/input/mpegts/dvb.h b/src/input/mpegts/dvb.h index 4749f790e..3b5baed54 100644 --- a/src/input/mpegts/dvb.h +++ b/src/input/mpegts/dvb.h @@ -1,19 +1,8 @@ /* - * Tvheadend - DVB support routines and defines - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - DVB support routines and defines */ /* diff --git a/src/input/mpegts/dvb_charset.c b/src/input/mpegts/dvb_charset.c index 237f19b73..558c49278 100644 --- a/src/input/mpegts/dvb_charset.c +++ b/src/input/mpegts/dvb_charset.c @@ -1,19 +1,8 @@ /* - * tvheadend, charset list - * Copyright (C) 2012 Mariusz Białończyk + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Mariusz Białończyk * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, charset list */ #include @@ -27,6 +16,7 @@ static LIST_HEAD(,dvb_charset) dvb_charset_list; /* * Process a file */ + static void _charset_load_file() { htsmsg_t *l, *e; @@ -73,6 +63,7 @@ static void _charset_load_file() /* * Initialise the charset list */ + void dvb_charset_init ( void ) { _charset_load_file(); @@ -81,6 +72,7 @@ void dvb_charset_init ( void ) /* * */ + void dvb_charset_done ( void ) { dvb_charset_t *enc; @@ -95,6 +87,7 @@ void dvb_charset_done ( void ) /* * Find default charset */ + const char *dvb_charset_find ( mpegts_network_t *mn, mpegts_mux_t *mm, mpegts_service_t *s ) { @@ -130,6 +123,7 @@ const char *dvb_charset_find /* * List of available charsets */ + htsmsg_t * dvb_charset_enum ( void *p, const char *lang ) { diff --git a/src/input/mpegts/dvb_charset.h b/src/input/mpegts/dvb_charset.h index eb3c40ad6..de1873c48 100644 --- a/src/input/mpegts/dvb_charset.h +++ b/src/input/mpegts/dvb_charset.h @@ -1,19 +1,8 @@ /* - * tvheadend, dvb charset config - * Copyright (C) 2012 Mariusz Białończyk + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Mariusz Białończyk * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, dvb charset config */ #ifndef __TVH_DVB_CHARSET_H__ diff --git a/src/input/mpegts/dvb_psi.c b/src/input/mpegts/dvb_psi.c index 4e7f369cc..68531576e 100644 --- a/src/input/mpegts/dvb_psi.c +++ b/src/input/mpegts/dvb_psi.c @@ -1,19 +1,8 @@ /* - * MPEG TS Program Specific Information code - * Copyright (C) 2007 - 2010 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 - 2010 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * MPEG TS Program Specific Information code */ #include "tvheadend.h" diff --git a/src/input/mpegts/dvb_psi_hbbtv.c b/src/input/mpegts/dvb_psi_hbbtv.c index fd64a69c7..bad9ff291 100644 --- a/src/input/mpegts/dvb_psi_hbbtv.c +++ b/src/input/mpegts/dvb_psi_hbbtv.c @@ -1,19 +1,8 @@ /* - * tvheadend, MPEG transport stream demuxer - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, MPEG transport stream demuxer */ #include "tvheadend.h" @@ -24,6 +13,7 @@ /** * Extract Hbbtv */ + htsmsg_t * dvb_psi_parse_hbbtv (mpegts_psi_table_t *mt, const uint8_t *buf, int len, int *_sect) diff --git a/src/input/mpegts/dvb_psi_hbbtv.h b/src/input/mpegts/dvb_psi_hbbtv.h index 3946d96ec..e3f1378d7 100644 --- a/src/input/mpegts/dvb_psi_hbbtv.h +++ b/src/input/mpegts/dvb_psi_hbbtv.h @@ -1,19 +1,8 @@ /* - * MPEG TS Program Specific Information code - * Copyright (C) 2007 - 2010 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 - 2010 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * MPEG TS Program Specific Information code */ #ifndef __DVB_PSI_HBBTV_H diff --git a/src/input/mpegts/dvb_psi_lib.c b/src/input/mpegts/dvb_psi_lib.c index c6d24b45e..f3e857143 100644 --- a/src/input/mpegts/dvb_psi_lib.c +++ b/src/input/mpegts/dvb_psi_lib.c @@ -1,20 +1,9 @@ /* - * MPEG TS Program Specific Information Library code - * Copyright (C) 2007 - 2010 Andreas Öman - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 - 2010 Andreas Öman + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * MPEG TS Program Specific Information Library code */ #include "tvheadend.h" diff --git a/src/input/mpegts/dvb_psi_pmt.c b/src/input/mpegts/dvb_psi_pmt.c index fff6919e5..f323d1835 100644 --- a/src/input/mpegts/dvb_psi_pmt.c +++ b/src/input/mpegts/dvb_psi_pmt.c @@ -1,19 +1,8 @@ /* - * MPEG TS Program Specific Information code - * Copyright (C) 2007 - 2010 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 - 2010 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * MPEG TS Program Specific Information code */ #include "tvheadend.h" diff --git a/src/input/mpegts/dvb_psi_pmt.h b/src/input/mpegts/dvb_psi_pmt.h index 095981612..88ae3b604 100644 --- a/src/input/mpegts/dvb_psi_pmt.h +++ b/src/input/mpegts/dvb_psi_pmt.h @@ -1,19 +1,8 @@ /* - * MPEG TS Program Specific Information code - * Copyright (C) 2007 - 2010 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 - 2010 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * MPEG TS Program Specific Information code */ #ifndef __DVB_PSI_PMT_H diff --git a/src/input/mpegts/dvb_support.c b/src/input/mpegts/dvb_support.c index 762ddb341..4fb8bc164 100644 --- a/src/input/mpegts/dvb_support.c +++ b/src/input/mpegts/dvb_support.c @@ -1,19 +1,8 @@ /* - * TV Input - DVB - Support/Conversion functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV Input - DVB - Support/Conversion functions */ #include diff --git a/src/input/mpegts/en50221/en50221.c b/src/input/mpegts/en50221/en50221.c index 0c4bee8f3..f5b5b9d13 100644 --- a/src/input/mpegts/en50221/en50221.c +++ b/src/input/mpegts/en50221/en50221.c @@ -1,19 +1,8 @@ /* - * Tvheadend - CI CAM (EN50221) generic interface - * Copyright (C) 2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - CI CAM (EN50221) generic interface */ #include diff --git a/src/input/mpegts/en50221/en50221.h b/src/input/mpegts/en50221/en50221.h index 34c27ac2c..4cebeba79 100644 --- a/src/input/mpegts/en50221/en50221.h +++ b/src/input/mpegts/en50221/en50221.h @@ -1,19 +1,8 @@ /* - * Tvheadend - CI CAM (EN50221) generic interface - * Copyright (C) 2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - CI CAM (EN50221) generic interface */ #ifndef __EN50221_H__ @@ -24,6 +13,7 @@ #include "sbuf.h" /* Session resource IDs */ + #define CICAM_RI_RESOURCE_MANAGER 0x00010041 #define CICAM_RI_APPLICATION_INFORMATION 0x00020041 #define CICAM_RI_CONDITIONAL_ACCESS_SUPPORT 0x00030041 @@ -34,6 +24,7 @@ #define CICAM_RI_DUMMY_CAPMT 0x00ffffff /* Application tags */ + #define CICAM_AOT_NONE 0x000000 #define CICAM_AOT_PROFILE_ENQ 0x9F8010 #define CICAM_AOT_PROFILE 0x9F8011 @@ -171,6 +162,7 @@ struct en50221_ops { /* * */ + int en50221_create_transport(en50221_ops_t *ops, void *ops_aux, int slots, const char *name, en50221_transport_t **cit); void en50221_transport_destroy(en50221_transport_t *cit); @@ -184,6 +176,7 @@ int en50221_transport_read(en50221_transport_t *cit, /* * */ + en50221_app_t * en50221_slot_find_application(en50221_slot_t *cil, uint32_t resource_id, uint32_t mask); @@ -193,6 +186,7 @@ int en50221_slot_disable(en50221_slot_t *cil); /* * */ + void en50221_register_app(en50221_app_prop_t *prop); int en50221_app_pdu_send(en50221_app_t *app, uint32_t atag, const uint8_t *data, size_t datalen, @@ -210,6 +204,7 @@ void en50221_register_apps(void); /* * */ + int en50221_extract_len (const uint8_t *data, size_t datalen, const uint8_t **ptr, size_t *len, const char *prefix, const char *pdu_name); @@ -217,6 +212,7 @@ int en50221_extract_len /* * random public functions */ + int en50221_send_capmt (en50221_slot_t *slot, const uint8_t *capmt, size_t capmtlen); int en50221_pcmcia_data_rate(en50221_slot_t *slot, uint8_t rate); diff --git a/src/input/mpegts/en50221/en50221_apps.c b/src/input/mpegts/en50221/en50221_apps.c index 180e81d9e..65a37c903 100644 --- a/src/input/mpegts/en50221/en50221_apps.c +++ b/src/input/mpegts/en50221/en50221_apps.c @@ -1,19 +1,8 @@ /* - * Tvheadend - CI CAM (EN50221) generic interface - * Copyright (C) 2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - CI CAM (EN50221) generic interface */ #include diff --git a/src/input/mpegts/en50221/en50221_capmt.c b/src/input/mpegts/en50221/en50221_capmt.c index 3bcd3987f..0789a19ca 100644 --- a/src/input/mpegts/en50221/en50221_capmt.c +++ b/src/input/mpegts/en50221/en50221_capmt.c @@ -1,19 +1,8 @@ /* - * Tvheadend - CI CAM (EN50221) generic interface - * Copyright (C) 2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - CI CAM (EN50221) generic interface */ #include "tvheadend.h" diff --git a/src/input/mpegts/en50221/en50221_capmt.h b/src/input/mpegts/en50221/en50221_capmt.h index 20860c6ce..7b9fbb1e2 100644 --- a/src/input/mpegts/en50221/en50221_capmt.h +++ b/src/input/mpegts/en50221/en50221_capmt.h @@ -1,19 +1,8 @@ /* - * Tvheadend - CI CAM (EN50221) CAPMT interface - * Copyright (C) 2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - CI CAM (EN50221) CAPMT interface */ #ifndef __EN50221_CAPMT_H__ diff --git a/src/input/mpegts/fastscan.c b/src/input/mpegts/fastscan.c index d9e955be4..c64503370 100644 --- a/src/input/mpegts/fastscan.c +++ b/src/input/mpegts/fastscan.c @@ -1,19 +1,8 @@ /* - * tvheadend, charset list - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, charset list */ #include "tvheadend.h" @@ -152,6 +141,7 @@ fail: /* * Initialize the fastscan list */ + void dvb_fastscan_init ( void ) { htsmsg_t *c, *e; @@ -172,6 +162,7 @@ void dvb_fastscan_init ( void ) /* * */ + void dvb_fastscan_done ( void ) { dvb_fastscan_t *fs; diff --git a/src/input/mpegts/fastscan.h b/src/input/mpegts/fastscan.h index ca5774200..652530ecc 100644 --- a/src/input/mpegts/fastscan.h +++ b/src/input/mpegts/fastscan.h @@ -1,19 +1,8 @@ /* - * Tvheadend - FastScan support - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - FastScan support */ #ifndef __TVH_DVB_FASTSCAN_H__ diff --git a/src/input/mpegts/iptv.h b/src/input/mpegts/iptv.h index 05c74b2b5..723e2f0b6 100644 --- a/src/input/mpegts/iptv.h +++ b/src/input/mpegts/iptv.h @@ -1,20 +1,8 @@ /* - * IPTV Input + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * Copyright (C) 2013 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV Input */ #ifndef __IPTV_H__ diff --git a/src/input/mpegts/iptv/iptv.c b/src/input/mpegts/iptv/iptv.c index 17d2c2701..5fa88214e 100644 --- a/src/input/mpegts/iptv/iptv.c +++ b/src/input/mpegts/iptv/iptv.c @@ -1,20 +1,8 @@ /* - * IPTV Input + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * Copyright (C) 2013 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV Input */ #include diff --git a/src/input/mpegts/iptv/iptv_auto.c b/src/input/mpegts/iptv/iptv_auto.c index 5d7f1f45c..03570a4e6 100644 --- a/src/input/mpegts/iptv/iptv_auto.c +++ b/src/input/mpegts/iptv/iptv_auto.c @@ -1,20 +1,8 @@ /* - * IPTV - automatic network based on playlists + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV - automatic network based on playlists */ #include "tvheadend.h" diff --git a/src/input/mpegts/iptv/iptv_file.c b/src/input/mpegts/iptv/iptv_file.c index 17d6b105a..0d2f80497 100644 --- a/src/input/mpegts/iptv/iptv_file.c +++ b/src/input/mpegts/iptv/iptv_file.c @@ -1,20 +1,8 @@ /* - * IPTV - file handler + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV - file handler */ #include "tvheadend.h" diff --git a/src/input/mpegts/iptv/iptv_http.c b/src/input/mpegts/iptv/iptv_http.c index d5289ece8..a720e27dc 100644 --- a/src/input/mpegts/iptv/iptv_http.c +++ b/src/input/mpegts/iptv/iptv_http.c @@ -1,21 +1,9 @@ /* - * IPTV - HTTP/HTTPS handler + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton + * Copyright (C) 2014,2015 Jaroslav Kysela * - * Copyright (C) 2013 Adam Sutton - * Copyright (C) 2014,2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV - HTTP/HTTPS handler */ #include "tvheadend.h" diff --git a/src/input/mpegts/iptv/iptv_libav.c b/src/input/mpegts/iptv/iptv_libav.c index 5e60f5a12..79507ee13 100644 --- a/src/input/mpegts/iptv/iptv_libav.c +++ b/src/input/mpegts/iptv/iptv_libav.c @@ -1,20 +1,8 @@ /* - * IPTV - libav handler + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Jaroslav Kysela * - * Copyright (C) 2017 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV - libav handler */ #include "tvheadend.h" @@ -46,6 +34,7 @@ typedef struct { /* * */ + #if LIBAVFORMAT_VERSION_MAJOR > 60 static int iptv_libav_write_packet(void *opaque, const uint8_t *buf, int buf_size) @@ -79,6 +68,7 @@ fin: /* * */ + static int iptv_libav_interrupt_callback(void *opaque) { @@ -90,6 +80,7 @@ iptv_libav_interrupt_callback(void *opaque) /* * */ + static void * iptv_libav_thread(void *aux) { @@ -189,6 +180,7 @@ fail: /* * Start new thread */ + static int iptv_libav_start ( iptv_input_t *mi, iptv_mux_t *im, const char *raw, const url_t *url ) @@ -261,6 +253,7 @@ iptv_libav_pause ( iptv_input_t *mi, iptv_mux_t *im, int pause ) /* * Initialise libav handler */ + void iptv_libav_init ( void ) { diff --git a/src/input/mpegts/iptv/iptv_mux.c b/src/input/mpegts/iptv/iptv_mux.c index 1c34cb30d..6a3239680 100644 --- a/src/input/mpegts/iptv/iptv_mux.c +++ b/src/input/mpegts/iptv/iptv_mux.c @@ -1,20 +1,8 @@ /* - * IPTV Input + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * Copyright (C) 2013 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV Input */ #include "iptv_private.h" @@ -24,6 +12,7 @@ /* * Class */ + extern const idclass_t mpegts_mux_class; static inline void @@ -376,6 +365,7 @@ iptv_mux_display_name ( mpegts_mux_t *mm, char *buf, size_t len ) /* * Create */ + iptv_mux_t * iptv_mux_create0 ( iptv_network_t *in, const char *uuid, htsmsg_t *conf ) { diff --git a/src/input/mpegts/iptv/iptv_pipe.c b/src/input/mpegts/iptv/iptv_pipe.c index 2a5e18790..08c48880b 100644 --- a/src/input/mpegts/iptv/iptv_pipe.c +++ b/src/input/mpegts/iptv/iptv_pipe.c @@ -1,20 +1,8 @@ /* - * IPTV - pipe handler + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV - pipe handler */ #include "tvheadend.h" diff --git a/src/input/mpegts/iptv/iptv_private.h b/src/input/mpegts/iptv/iptv_private.h index c5dcf1367..ab59d929d 100644 --- a/src/input/mpegts/iptv/iptv_private.h +++ b/src/input/mpegts/iptv/iptv_private.h @@ -1,20 +1,8 @@ /* - * IPTV Input + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * Copyright (C) 2013 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV Input */ #ifndef __IPTV_PRIVATE_H__ diff --git a/src/input/mpegts/iptv/iptv_rtcp.c b/src/input/mpegts/iptv/iptv_rtcp.c index 2441cdace..091ed56e2 100644 --- a/src/input/mpegts/iptv/iptv_rtcp.c +++ b/src/input/mpegts/iptv/iptv_rtcp.c @@ -1,19 +1,8 @@ /* - * Multicasted IPTV Input - * Copyright (C) 2012 Adrien CLERC + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adrien CLERC * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Multicasted IPTV Input */ #include "iptv_rtcp.h" diff --git a/src/input/mpegts/iptv/iptv_rtcp.h b/src/input/mpegts/iptv/iptv_rtcp.h index 7a166a76f..aeef6b7ac 100644 --- a/src/input/mpegts/iptv/iptv_rtcp.h +++ b/src/input/mpegts/iptv/iptv_rtcp.h @@ -1,19 +1,8 @@ /* - * Tvheadend - * Copyright (C) 2012 Adrien CLERC + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adrien CLERC * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend */ #ifndef RTCP_H @@ -145,4 +134,3 @@ int rtcp_receiver_update(rtcp_t *info, uint8_t *rtp_packet); ssize_t rtcp_send_nak(rtcp_t *rtcp_info, uint32_t ssrc, uint16_t seqn, uint16_t len); int rtcp_connect(rtcp_t * info, char *url, char *host, int port, char *interface, char *nicename); #endif /* IPTV_RTCP_H */ - diff --git a/src/input/mpegts/iptv/iptv_rtsp.c b/src/input/mpegts/iptv/iptv_rtsp.c index ec3c3db65..1f8bda39e 100644 --- a/src/input/mpegts/iptv/iptv_rtsp.c +++ b/src/input/mpegts/iptv/iptv_rtsp.c @@ -1,20 +1,8 @@ /* - * IPTV - RTSP/RTSPS handler + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV - RTSP/RTSPS handler */ #include "tvheadend.h" @@ -41,6 +29,7 @@ typedef struct { /* * */ + static void iptv_rtsp_close_cb ( void *aux ) { @@ -50,6 +39,7 @@ iptv_rtsp_close_cb ( void *aux ) /* * Alive timeout */ + static void iptv_rtsp_alive_cb ( void *aux ) { @@ -71,6 +61,7 @@ iptv_rtsp_alive_cb ( void *aux ) /* * Connected */ + static int iptv_rtsp_header ( http_client_t *hc ) { @@ -191,6 +182,7 @@ iptv_rtsp_header ( http_client_t *hc ) /* * Receive data */ + static int iptv_rtsp_data ( http_client_t *hc, void *buf, size_t len ) @@ -256,6 +248,7 @@ iptv_rtsp_data /* * Setup RTSP(S) connection */ + static int iptv_rtsp_start ( iptv_input_t *mi, iptv_mux_t *im, const char *raw, const url_t *u ) @@ -335,6 +328,7 @@ iptv_rtsp_start /* * Stop connection */ + static void iptv_rtsp_stop ( iptv_input_t *mi, iptv_mux_t *im ) @@ -393,6 +387,7 @@ iptv_rtp_header_callback ( iptv_mux_t *im, uint8_t *rtp, int len ) /* * Read data */ + static ssize_t iptv_rtsp_read ( iptv_input_t *mi, iptv_mux_t *im ) { @@ -414,6 +409,7 @@ iptv_rtsp_read ( iptv_input_t *mi, iptv_mux_t *im ) /* * Send the status message */ + #if ENABLE_TIMESHIFT static void rtsp_timeshift_fill_status(rtsp_st_t *ts, rtsp_priv_t *rp, timeshift_status_t *status) { @@ -562,6 +558,7 @@ void rtsp_st_destroy(streaming_target_t *st) { /* * Initialise RTSP handler */ + void iptv_rtsp_init ( void ) { diff --git a/src/input/mpegts/iptv/iptv_service.c b/src/input/mpegts/iptv/iptv_service.c index 2292ca178..994946ab9 100644 --- a/src/input/mpegts/iptv/iptv_service.c +++ b/src/input/mpegts/iptv/iptv_service.c @@ -1,20 +1,8 @@ /* - * IPTV Input + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * Copyright (C) 2013 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV Input */ #include "iptv_private.h" @@ -130,6 +118,7 @@ iptv_service_channel_tags ( service_t *s ) /* * Create */ + iptv_service_t * iptv_service_create0 ( iptv_mux_t *im, uint16_t sid, uint16_t pmt, diff --git a/src/input/mpegts/iptv/iptv_udp.c b/src/input/mpegts/iptv/iptv_udp.c index c3bff2621..bba4e2fc5 100644 --- a/src/input/mpegts/iptv/iptv_udp.c +++ b/src/input/mpegts/iptv/iptv_udp.c @@ -1,20 +1,8 @@ /* - * IPTV - UDP/RTP handler + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * IPTV - UDP/RTP handler */ #include "tvheadend.h" diff --git a/src/input/mpegts/linuxdvb.h b/src/input/mpegts/linuxdvb.h index 2bcd38ac0..963982292 100644 --- a/src/input/mpegts/linuxdvb.h +++ b/src/input/mpegts/linuxdvb.h @@ -1,20 +1,8 @@ /* - * Tvheadend - Linux DVB input system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB input system */ #ifndef __TVH_LINUX_DVB_H__ diff --git a/src/input/mpegts/linuxdvb/linuxdvb.c b/src/input/mpegts/linuxdvb/linuxdvb.c index ef0982da6..e2b82943b 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb.c +++ b/src/input/mpegts/linuxdvb/linuxdvb.c @@ -1,20 +1,8 @@ /* - * Tvheadend - Linux DVB input system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB input system */ #include "tvheadend.h" diff --git a/src/input/mpegts/linuxdvb/linuxdvb_adapter.c b/src/input/mpegts/linuxdvb/linuxdvb_adapter.c index f3ab082dc..e4cd68acb 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_adapter.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_adapter.c @@ -1,20 +1,8 @@ /* - * Tvheadend - Linux DVB input system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB input system */ #include "tvheadend.h" diff --git a/src/input/mpegts/linuxdvb/linuxdvb_ca.c b/src/input/mpegts/linuxdvb/linuxdvb_ca.c index 1a888b01f..09c585e01 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_ca.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_ca.c @@ -1,22 +1,9 @@ /* - * Tvheadend - Linux DVB CA + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Damjan Marion + * Copyright (C) 2017 Jaroslav Kysela * - * Copyright (C) 2015 Damjan Marion - * Copyright (C) 2017 Jaroslav Kysela - * - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB CA */ #include "tvheadend.h" diff --git a/src/input/mpegts/linuxdvb/linuxdvb_ddci.c b/src/input/mpegts/linuxdvb/linuxdvb_ddci.c index c9313b0b7..2cdc8e50a 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_ddci.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_ddci.c @@ -1,20 +1,8 @@ /* - * Tvheadend - Linux DVB DDCI + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Jasmin Jessich * - * Copyright (C) 2017 Jasmin Jessich - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB DDCI */ #include "tvheadend.h" diff --git a/src/input/mpegts/linuxdvb/linuxdvb_en50494.c b/src/input/mpegts/linuxdvb/linuxdvb_en50494.c index 9ea7f783e..e890ba577 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_en50494.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_en50494.c @@ -1,28 +1,8 @@ /* - * Tvheadend - Linux DVB EN50494 - * (known under trademark "UniCable") + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Sascha "InuSasha" Kuehndel * - * Copyright (C) 2013 Sascha "InuSasha" Kuehndel - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Open things: - * - TODO: collision detection - * * compare transport-stream-id from stream with id in config - * * check continuity of the pcr-counter - * * when one point is given -> retry - * * delay time is easily random, but in standard is special (complicated) way described (cap. 8). + * Tvheadend - Linux DVB EN50494 */ #include "tvheadend.h" diff --git a/src/input/mpegts/linuxdvb/linuxdvb_frontend.c b/src/input/mpegts/linuxdvb/linuxdvb_frontend.c index 72aaf41f1..7249610ba 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_frontend.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_frontend.c @@ -1,20 +1,8 @@ /* - * Tvheadend - Linux DVB frontend + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB frontend */ #include "tvheadend.h" diff --git a/src/input/mpegts/linuxdvb/linuxdvb_lnb.c b/src/input/mpegts/linuxdvb/linuxdvb_lnb.c index 2a976d05e..e79fea9d5 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_lnb.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_lnb.c @@ -1,20 +1,8 @@ /* - * Tvheadend - Linux DVB LNB config + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB LNB config */ #include "tvheadend.h" diff --git a/src/input/mpegts/linuxdvb/linuxdvb_private.h b/src/input/mpegts/linuxdvb/linuxdvb_private.h index c0eb3a203..173918312 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_private.h +++ b/src/input/mpegts/linuxdvb/linuxdvb_private.h @@ -1,20 +1,8 @@ /* - * Tvheadend - Linux DVB private data + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB private data */ #ifndef __TVH_LINUXDVB_PRIVATE_H__ diff --git a/src/input/mpegts/linuxdvb/linuxdvb_rotor.c b/src/input/mpegts/linuxdvb/linuxdvb_rotor.c index faa9cbc53..7beeb8042 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_rotor.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_rotor.c @@ -1,20 +1,8 @@ /* - * Tvheadend - Linux DVB DiseqC Rotor + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB DiseqC Rotor */ #ifndef ROTOR_TEST diff --git a/src/input/mpegts/linuxdvb/linuxdvb_satconf.c b/src/input/mpegts/linuxdvb/linuxdvb_satconf.c index 3c6bf1146..8fb07eb2d 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_satconf.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_satconf.c @@ -1,20 +1,8 @@ /* - * Tvheadend - Linux DVB satconf + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB satconf */ #include "tvheadend.h" diff --git a/src/input/mpegts/linuxdvb/linuxdvb_switch.c b/src/input/mpegts/linuxdvb/linuxdvb_switch.c index f12ab7013..370e157ef 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_switch.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_switch.c @@ -1,20 +1,8 @@ /* - * Tvheadend - Linux DVB DiseqC switch + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB DiseqC switch */ #include "tvheadend.h" diff --git a/src/input/mpegts/mpegts_dvb.h b/src/input/mpegts/mpegts_dvb.h index 1ded80b58..c472b5200 100644 --- a/src/input/mpegts/mpegts_dvb.h +++ b/src/input/mpegts/mpegts_dvb.h @@ -1,20 +1,9 @@ /* - * Tvheadend - MPEGTS DVB support routines and defines - * Copyright (C) 2013 Adam Sutton - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - MPEGTS DVB support routines and defines */ #ifndef __TVH_MPEGTS_DVB_H__ diff --git a/src/input/mpegts/mpegts_input.c b/src/input/mpegts/mpegts_input.c index c4856b08c..113318dc9 100644 --- a/src/input/mpegts/mpegts_input.c +++ b/src/input/mpegts/mpegts_input.c @@ -1,19 +1,8 @@ /* - * Tvheadend - MPEGTS input source - * Copyright (C) 2013 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - MPEGTS input source */ #include "input.h" diff --git a/src/input/mpegts/mpegts_mux.c b/src/input/mpegts/mpegts_mux.c index fa966fdce..6d2c50135 100644 --- a/src/input/mpegts/mpegts_mux.c +++ b/src/input/mpegts/mpegts_mux.c @@ -1,20 +1,8 @@ /* - * Tvheadend - MPEGTS multiplex + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - MPEGTS multiplex */ #include "idnode.h" diff --git a/src/input/mpegts/mpegts_mux_dvb.c b/src/input/mpegts/mpegts_mux_dvb.c index 454019dba..6ad026a9f 100644 --- a/src/input/mpegts/mpegts_mux_dvb.c +++ b/src/input/mpegts/mpegts_mux_dvb.c @@ -1,20 +1,8 @@ /* - * Tvheadend - DVB Multiplex + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - DVB Multiplex */ #include "tvheadend.h" diff --git a/src/input/mpegts/mpegts_mux_sched.c b/src/input/mpegts/mpegts_mux_sched.c index 1c30efc9f..1f2139ecb 100644 --- a/src/input/mpegts/mpegts_mux_sched.c +++ b/src/input/mpegts/mpegts_mux_sched.c @@ -1,20 +1,8 @@ /* - * Tvheadend - TS file input system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Adam Sutton * - * Copyright (C) 2014 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - TS file input system */ #include "tvheadend.h" diff --git a/src/input/mpegts/mpegts_mux_sched.h b/src/input/mpegts/mpegts_mux_sched.h index 80c01b762..58d5a4016 100644 --- a/src/input/mpegts/mpegts_mux_sched.h +++ b/src/input/mpegts/mpegts_mux_sched.h @@ -1,20 +1,8 @@ /* - * Tvheadend - TS file input system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Adam Sutton * - * Copyright (C) 2014 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - TS file input system */ #ifndef __TVH_MPEGTS_MUX_SCHED_H__ diff --git a/src/input/mpegts/mpegts_network.c b/src/input/mpegts/mpegts_network.c index 0d52bebd7..0098af899 100644 --- a/src/input/mpegts/mpegts_network.c +++ b/src/input/mpegts/mpegts_network.c @@ -1,19 +1,8 @@ /* - * Tvheadend - MPEGTS input source - * Copyright (C) 2013 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - MPEGTS input source */ #include "input.h" diff --git a/src/input/mpegts/mpegts_network_dvb.c b/src/input/mpegts/mpegts_network_dvb.c index 07c8a1dcd..e3e869be5 100644 --- a/src/input/mpegts/mpegts_network_dvb.c +++ b/src/input/mpegts/mpegts_network_dvb.c @@ -1,20 +1,8 @@ /* - * Tvheadend - Linux DVB Network + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Linux DVB Network */ #include "tvheadend.h" diff --git a/src/input/mpegts/mpegts_network_scan.c b/src/input/mpegts/mpegts_network_scan.c index 5a6e2cfd9..37bcf185f 100644 --- a/src/input/mpegts/mpegts_network_scan.c +++ b/src/input/mpegts/mpegts_network_scan.c @@ -1,20 +1,8 @@ /* - * Tvheadend - Network Scanner + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Adam Sutton * - * Copyright (C) 2014 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Network Scanner */ #include "input.h" diff --git a/src/input/mpegts/mpegts_network_scan.h b/src/input/mpegts/mpegts_network_scan.h index 5a8d9d46d..41c6519f5 100644 --- a/src/input/mpegts/mpegts_network_scan.h +++ b/src/input/mpegts/mpegts_network_scan.h @@ -1,20 +1,8 @@ /* - * Tvheadend - Network Scanner + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Adam Sutton * - * Copyright (C) 2014 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - Network Scanner */ #ifndef __TVH_MPEGTS_NETWORK_SCAN_H__ diff --git a/src/input/mpegts/mpegts_pid.c b/src/input/mpegts/mpegts_pid.c index 04c9602ca..fbb5cf51e 100644 --- a/src/input/mpegts/mpegts_pid.c +++ b/src/input/mpegts/mpegts_pid.c @@ -1,19 +1,8 @@ /* - * MPEGTS PID list management - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * MPEGTS PID list management */ #include "tvheadend.h" diff --git a/src/input/mpegts/mpegts_service.c b/src/input/mpegts/mpegts_service.c index 12cae7283..2a0c188b0 100644 --- a/src/input/mpegts/mpegts_service.c +++ b/src/input/mpegts/mpegts_service.c @@ -1,20 +1,8 @@ /* - * MPEGTS (DVB) based service + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * Copyright (C) 2013 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * MPEGTS (DVB) based service */ #include diff --git a/src/input/mpegts/mpegts_table.c b/src/input/mpegts/mpegts_table.c index 3f7380db6..bf46b4e0f 100644 --- a/src/input/mpegts/mpegts_table.c +++ b/src/input/mpegts/mpegts_table.c @@ -1,19 +1,8 @@ /* - * MPEGTS table support - * Copyright (C) 2013 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * MPEGTS table support */ #include "tvheadend.h" @@ -171,6 +160,7 @@ mpegts_table_destroy ( mpegts_table_t *mt ) /** * Determine table type */ + int mpegts_table_type ( mpegts_table_t *mt ) { @@ -185,6 +175,7 @@ mpegts_table_type ( mpegts_table_t *mt ) /** * Find a table */ + mpegts_table_t *mpegts_table_find ( mpegts_mux_t *mm, const char *name, void *opaque ) { @@ -208,6 +199,7 @@ mpegts_table_t *mpegts_table_find /** * Add a new DVB table */ + mpegts_table_t * mpegts_table_add ( mpegts_mux_t *mm, int tableid, int mask, @@ -289,6 +281,7 @@ mpegts_table_add /** * */ + void mpegts_table_flush_all ( mpegts_mux_t *mm ) { diff --git a/src/input/mpegts/mpegts_tsdebug.c b/src/input/mpegts/mpegts_tsdebug.c index c7d12c8cf..f8e913f88 100644 --- a/src/input/mpegts/mpegts_tsdebug.c +++ b/src/input/mpegts/mpegts_tsdebug.c @@ -1,22 +1,10 @@ /* - * Tvheadend - MPEGTS debug output - * Copyright (C) 2015,2016,2017,2018 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015,2016,2017,2018 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - MPEGTS debug output */ - #include "input.h" void diff --git a/src/input/mpegts/satip/satip.c b/src/input/mpegts/satip/satip.c index 58e91d30b..3e68b3465 100644 --- a/src/input/mpegts/satip/satip.c +++ b/src/input/mpegts/satip/satip.c @@ -1,20 +1,8 @@ /* - * Tvheadend - SAT-IP client + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - SAT-IP client */ #include "tvheadend.h" diff --git a/src/input/mpegts/satip/satip.h b/src/input/mpegts/satip/satip.h index ee403d035..1231b82a8 100644 --- a/src/input/mpegts/satip/satip.h +++ b/src/input/mpegts/satip/satip.h @@ -1,20 +1,8 @@ /* - * Tvheadend - SAT-IP DVB private data + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - SAT-IP DVB private data */ #ifndef __TVH_SATIP_H__ diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index 2d7e7ad28..5ff3beff0 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -1,20 +1,8 @@ /* - * Tvheadend - SAT>IP DVB frontend + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - SAT>IP DVB frontend */ #include diff --git a/src/input/mpegts/satip/satip_private.h b/src/input/mpegts/satip/satip_private.h index af123ca86..57b83c92b 100644 --- a/src/input/mpegts/satip/satip_private.h +++ b/src/input/mpegts/satip/satip_private.h @@ -1,20 +1,8 @@ /* - * Tvheadend - SAT-IP DVB private data + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - SAT-IP DVB private data */ #ifndef __TVH_SATIP_PRIVATE_H__ diff --git a/src/input/mpegts/satip/satip_rtsp.c b/src/input/mpegts/satip/satip_rtsp.c index f6a376bd1..a6fd7cc1c 100644 --- a/src/input/mpegts/satip/satip_rtsp.c +++ b/src/input/mpegts/satip/satip_rtsp.c @@ -1,20 +1,8 @@ /* - * Tvheadend - SAT>IP DVB RTSP client + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - SAT>IP DVB RTSP client */ #include diff --git a/src/input/mpegts/satip/satip_satconf.c b/src/input/mpegts/satip/satip_satconf.c index 8560ef9b9..77c34d33f 100644 --- a/src/input/mpegts/satip/satip_satconf.c +++ b/src/input/mpegts/satip/satip_satconf.c @@ -1,20 +1,8 @@ /* - * Tvheadend - SAT>IP DVB satconf + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - SAT>IP DVB satconf */ #include "tvheadend.h" diff --git a/src/input/mpegts/scanfile.c b/src/input/mpegts/scanfile.c index 8a16c44ff..66b953bf1 100644 --- a/src/input/mpegts/scanfile.c +++ b/src/input/mpegts/scanfile.c @@ -1,19 +1,8 @@ /* - * tvheadend, intial mux list - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, intial mux list */ #include "tvheadend.h" diff --git a/src/input/mpegts/scanfile.h b/src/input/mpegts/scanfile.h index ffdcaaa1e..dc64acf04 100644 --- a/src/input/mpegts/scanfile.h +++ b/src/input/mpegts/scanfile.h @@ -1,19 +1,8 @@ /* - * tvheadend, intial mux list - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, intial mux list */ #ifndef __DVB_SCANFILES_H__ diff --git a/src/input/mpegts/tsdemux.c b/src/input/mpegts/tsdemux.c index c33b185a8..1ad3cc3e5 100644 --- a/src/input/mpegts/tsdemux.c +++ b/src/input/mpegts/tsdemux.c @@ -1,19 +1,8 @@ /* - * tvheadend, MPEG transport stream demuxer - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, MPEG transport stream demuxer */ #include "tvheadend.h" diff --git a/src/input/mpegts/tsdemux.h b/src/input/mpegts/tsdemux.h index e62bb070f..2ae2a1157 100644 --- a/src/input/mpegts/tsdemux.h +++ b/src/input/mpegts/tsdemux.h @@ -1,19 +1,8 @@ /* - * tvheadend, MPEG transport stream functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, MPEG transport stream functions */ #ifndef TSDEMUX_H diff --git a/src/input/mpegts/tsfile.h b/src/input/mpegts/tsfile.h index 87ed5ec4d..74cdd6836 100644 --- a/src/input/mpegts/tsfile.h +++ b/src/input/mpegts/tsfile.h @@ -1,20 +1,8 @@ /* - * Tvheadend - TS file input system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - TS file input system */ #ifndef __TVH_TSFILE_H__ diff --git a/src/input/mpegts/tsfile/tsfile.c b/src/input/mpegts/tsfile/tsfile.c index 407e06197..cc56ad4a5 100644 --- a/src/input/mpegts/tsfile/tsfile.c +++ b/src/input/mpegts/tsfile/tsfile.c @@ -1,20 +1,8 @@ /* - * Tvheadend - TS file input system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - TS file input system */ #include "tvheadend.h" @@ -26,6 +14,7 @@ /* * Globals */ + tvh_mutex_t tsfile_lock; mpegts_network_t *tsfile_network; tsfile_input_list_t tsfile_inputs; @@ -48,6 +37,7 @@ tsfile_service_delete ( service_t *s, int delconf ) /* * Network definition */ + static mpegts_service_t * tsfile_network_create_service ( mpegts_mux_t *mm, uint16_t sid, uint16_t pmt_pid ) @@ -75,6 +65,7 @@ tsfile_network_create_service /* * Initialise */ + void tsfile_init ( int tuners ) { int i; @@ -104,6 +95,7 @@ void tsfile_init ( int tuners ) /* * Shutdown */ + void tsfile_done ( void ) { @@ -122,6 +114,7 @@ tsfile_done ( void ) /* * Add multiplex */ + void tsfile_add_file ( const char *path ) { tsfile_input_t *mi; diff --git a/src/input/mpegts/tsfile/tsfile_input.c b/src/input/mpegts/tsfile/tsfile_input.c index 3615fef92..03f7dd15d 100644 --- a/src/input/mpegts/tsfile/tsfile_input.c +++ b/src/input/mpegts/tsfile/tsfile_input.c @@ -1,20 +1,8 @@ /* - * Tvheadend - TS file input system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - TS file input system */ #include "tvheadend.h" diff --git a/src/input/mpegts/tsfile/tsfile_mux.c b/src/input/mpegts/tsfile/tsfile_mux.c index 4cfb40816..e89980ffb 100644 --- a/src/input/mpegts/tsfile/tsfile_mux.c +++ b/src/input/mpegts/tsfile/tsfile_mux.c @@ -1,20 +1,8 @@ /* - * Tvheadend - TS file input system + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - TS file input system */ #include "tsfile_private.h" diff --git a/src/input/mpegts/tsfile/tsfile_private.h b/src/input/mpegts/tsfile/tsfile_private.h index cbf903a6b..2a0e2f8a3 100644 --- a/src/input/mpegts/tsfile/tsfile_private.h +++ b/src/input/mpegts/tsfile/tsfile_private.h @@ -1,20 +1,8 @@ /* - * Tvheadend - TS file private data + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - TS file private data */ #ifndef __TVH_TSFILE_PRIVATE_H__ diff --git a/src/input/mpegts/tvhdhomerun/tvhdhomerun.c b/src/input/mpegts/tvhdhomerun/tvhdhomerun.c index f8914d61b..3fd9f62ab 100644 --- a/src/input/mpegts/tvhdhomerun/tvhdhomerun.c +++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun.c @@ -1,20 +1,8 @@ /* - * Tvheadend - HDHomeRun client + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Patric Karlström * - * Copyright (C) 2014 Patric Karlström - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - HDHomeRun client */ #include "libhdhomerun/hdhomerun.h" diff --git a/src/input/mpegts/tvhdhomerun/tvhdhomerun.h b/src/input/mpegts/tvhdhomerun/tvhdhomerun.h index be2652410..b516e48ba 100644 --- a/src/input/mpegts/tvhdhomerun/tvhdhomerun.h +++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun.h @@ -1,20 +1,8 @@ /* - * Tvheadend - HDHomeRun DVB private data + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Patric Karlström * - * Copyright (C) 2014 Patric Karlström - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - HDHomeRun DVB private data */ #ifndef __TVH_tvhdhomerun_H__ diff --git a/src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c b/src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c index 3f8f82081..05531d20f 100644 --- a/src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c +++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c @@ -1,20 +1,8 @@ /* - * Tvheadend - HDHomeRun DVB frontend + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Patric Karlström * - * Copyright (C) 2014 Patric Karlström - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - HDHomeRun DVB frontend */ #include "libhdhomerun/hdhomerun.h" diff --git a/src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h b/src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h index eaf14f81d..ef3409156 100644 --- a/src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h +++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun_private.h @@ -1,20 +1,8 @@ /* - * Tvheadend - HDHomeRun DVB private data + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Patric Karlstrom * - * Copyright (C) 2014 Patric Karlstrom - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - HDHomeRun DVB private data */ #ifndef __TVH_tvhdhomerun_PRIVATE_H__ diff --git a/src/intlconv.h b/src/intlconv.h index f28781eb0..0d37a2573 100644 --- a/src/intlconv.h +++ b/src/intlconv.h @@ -1,19 +1,8 @@ /* - * tvheadend, iconv interface - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, iconv interface */ #ifndef INTLCONV_H_ diff --git a/src/lang_codes.c b/src/lang_codes.c index 277528213..2ca93a2ee 100644 --- a/src/lang_codes.c +++ b/src/lang_codes.c @@ -1,19 +1,8 @@ /* - * Multi-language Support - language codes - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Multi-language Support - language codes */ #include diff --git a/src/lang_codes.h b/src/lang_codes.h index 2fcc5f158..f5dc1254d 100644 --- a/src/lang_codes.h +++ b/src/lang_codes.h @@ -1,19 +1,8 @@ /* - * Multi-language Support - language codes - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Multi-language Support - language codes */ #ifndef __TVH_LANG_CODES_H__ @@ -41,6 +30,7 @@ typedef struct lang_code_list } lang_code_list_t; /* Convert code to preferred internal code */ + const char *lang_code_get ( const char *code ); const char *lang_code_get2 ( const char *code, size_t len ); const lang_code_t *lang_code_get3 ( const char *code ); @@ -49,9 +39,11 @@ const char *lang_code_preferred( void ); char *lang_code_user( const char *ucode ); /* Split list of codes as per HTTP Language-Accept spec */ + const lang_code_list_t *lang_code_split ( const char *codes ); /* Efficient code lookup */ + typedef struct lang_code_lookup_element { RB_ENTRY(lang_code_lookup_element) link; const lang_code_t *lang_code; diff --git a/src/lang_str.c b/src/lang_str.c index c0cfbe016..c1180a6e0 100644 --- a/src/lang_str.c +++ b/src/lang_str.c @@ -1,19 +1,8 @@ /* - * Multi-language String support - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Multi-language String support */ #include diff --git a/src/lang_str.h b/src/lang_str.h index 3bf1a3285..1855552cb 100644 --- a/src/lang_str.h +++ b/src/lang_str.h @@ -1,19 +1,8 @@ /* - * Multi-language String support - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Multi-language String support */ #ifndef __TVH_LANG_STR_H__ @@ -33,12 +22,14 @@ typedef struct lang_str_ele typedef RB_HEAD(lang_str, lang_str_ele) lang_str_t; /* Create/Destroy */ + void lang_str_destroy ( lang_str_t *ls ); lang_str_t *lang_str_create ( void ); lang_str_t *lang_str_create2 ( const char *str, const char *lang ); lang_str_t *lang_str_copy ( const lang_str_t *ls ); /* Get elements */ + lang_str_ele_t *lang_str_get2_only ( const lang_str_t *ls, const char *lang ); static inline const char *lang_str_get_only(const lang_str_t *ls, const char *lang) { @@ -54,6 +45,7 @@ static inline const char *lang_str_get(const lang_str_t *ls, const char *lang) /* Add/Update elements */ + int lang_str_add ( lang_str_t *ls, const char *str, const char *lang ); int lang_str_append @@ -66,6 +58,7 @@ int lang_str_set2 ( lang_str_t **dst, const lang_str_t *src ); /* Serialize/Deserialize */ + htsmsg_t *lang_str_serialize_map ( lang_str_t *ls ); void lang_str_serialize @@ -78,13 +71,16 @@ lang_str_t *lang_str_deserialize ( htsmsg_t *m, const char *f ); /* Compare */ + int lang_str_compare ( const lang_str_t *ls1, const lang_str_t *ls2 ); /* Is string empty? */ + static inline int lang_str_empty(lang_str_t* str) { return strempty(lang_str_get(str, NULL)); } /* Size in bytes */ + size_t lang_str_size ( const lang_str_t *ls ); #endif /* __TVH_LANG_STR_H__ */ diff --git a/src/libav.c b/src/libav.c index c633d05c9..b8bffdd2c 100644 --- a/src/libav.c +++ b/src/libav.c @@ -7,6 +7,7 @@ /** * */ + static void libav_log_callback(void *ptr, int level, const char *fmt, va_list vl) { @@ -86,6 +87,7 @@ libav_log_callback(void *ptr, int level, const char *fmt, va_list vl) /** * Translate a component type to a libavcodec id */ + enum AVCodecID streaming_component_type2codec_id(streaming_component_type_t type) { @@ -153,6 +155,7 @@ streaming_component_type2codec_id(streaming_component_type_t type) /** * Translate a libavcodec id to a component type */ + streaming_component_type_t codec_id2streaming_component_type(enum AVCodecID id) { @@ -225,6 +228,7 @@ codec_id2streaming_component_type(enum AVCodecID id) /** * */ + #if ENABLE_VAAPI #ifdef VA_FOURCC_I010 static void libav_va_log(int severity, const char *msg) @@ -264,6 +268,7 @@ static void libav_va_info_callback(const char *msg) /** * */ + static void libav_vaapi_init(void) { @@ -280,6 +285,7 @@ libav_vaapi_init(void) /** * */ + void libav_vaapi_init_context(void *context) { @@ -296,6 +302,7 @@ libav_vaapi_init_context(void *context) /** * */ + void libav_set_loglevel(void) { @@ -306,6 +313,7 @@ libav_set_loglevel(void) /** * */ + void libav_init(void) { @@ -319,6 +327,7 @@ libav_init(void) /** * */ + void libav_done(void) { diff --git a/src/libav.h b/src/libav.h index 902b305d8..2f6558c7e 100644 --- a/src/libav.h +++ b/src/libav.h @@ -1,19 +1,8 @@ /* - * tvheadend, libav utils - * Copyright (C) 2012 John Törnblom + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 John Törnblom * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, libav utils */ #ifndef LIBAV_H_ @@ -37,6 +26,7 @@ http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=104e10fb426f903ba9157fdbfe3 This list must be updated every time we use a new AV_CODEC_ID */ + #if LIBAVCODEC_VERSION_MAJOR < 54 || (LIBAVCODEC_VERSION_MAJOR == 54 && LIBAVCODEC_VERSION_MINOR < 25) #define AVCodecID CodecID #define AV_CODEC_ID_AAC CODEC_ID_AAC diff --git a/src/lock.c b/src/lock.c index ffa9d6ebe..1c617e4ee 100644 --- a/src/lock.c +++ b/src/lock.c @@ -1,18 +1,7 @@ /* - * Copyright (c) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * SPDX-License-Identifier: GPL-3.0-or-later * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Copyright (c) 2014 Jaroslav Kysela */ #include diff --git a/src/lock.h b/src/lock.h index 2f5690393..0af6658d6 100644 --- a/src/lock.h +++ b/src/lock.h @@ -1,19 +1,8 @@ /* - * File locking - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * File locking */ #ifndef TVH_LOCK_H diff --git a/src/main.c b/src/main.c index fa3a335d5..158b1b9ed 100644 --- a/src/main.c +++ b/src/main.c @@ -1,19 +1,8 @@ /* - * TVheadend - * Copyright (C) 2007 - 2010 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 - 2010 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TVheadend */ #include diff --git a/src/memoryinfo.c b/src/memoryinfo.c index 8039164a5..ebf8b9236 100644 --- a/src/memoryinfo.c +++ b/src/memoryinfo.c @@ -1,19 +1,8 @@ /* - * Tvheadend - memory info support - * Copyright (C) 2016 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - memory info support */ #include "tvheadend.h" diff --git a/src/memoryinfo.h b/src/memoryinfo.h index d59c8a6a1..6a70073aa 100644 --- a/src/memoryinfo.h +++ b/src/memoryinfo.h @@ -1,19 +1,8 @@ /* - * Tvheadend - memory info support - * Copyright (C) 2016 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - memory info support */ #ifndef TVHEADEND_MEMORYINFO_H diff --git a/src/misc/dbl.c b/src/misc/dbl.c index 08bbdb891..b26142866 100644 --- a/src/misc/dbl.c +++ b/src/misc/dbl.c @@ -1,21 +1,8 @@ /* - * Floating point conversion functions. - * Not accurate but should be enough for Showtime's needs + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2011 Andreas Öman * - * Copyright (C) 2011 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Floating point conversion functions. */ #define _ISOC99_SOURCE @@ -301,4 +288,3 @@ my_double2str(char *buf, size_t bufsize, double realvalue) *bufpt = 0; return 0; } - diff --git a/src/misc/json.c b/src/misc/json.c index 27be48412..0f18339e8 100644 --- a/src/misc/json.c +++ b/src/misc/json.c @@ -1,19 +1,8 @@ /* - * JSON helpers - * Copyright (C) 2011 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2011 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * JSON helpers */ #include diff --git a/src/misc/m3u.c b/src/misc/m3u.c index cc5dc48e6..e35185511 100644 --- a/src/misc/m3u.c +++ b/src/misc/m3u.c @@ -1,19 +1,8 @@ /* - * M3U parser - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * M3U parser */ #include "tvheadend.h" @@ -24,6 +13,7 @@ /* * */ + static char *get_m3u_str(char *data, char **res, int *last) { char *p = data, first = *data; @@ -52,6 +42,7 @@ static char *get_m3u_str(char *data, char **res, int *last) /* * */ + static void get_m3u_str_post(char **data, int delim) { if (delim == '\n' || delim == '\r') { @@ -63,6 +54,7 @@ static void get_m3u_str_post(char **data, int delim) /* * */ + static char *until_eol(char *d) { while (*d && *d != '\r' && *d != '\n') d++; @@ -74,6 +66,7 @@ static char *until_eol(char *d) /* * */ + static int is_full_url(const char *url) { if (strncmp(url, "file://", 7) == 0) return 7; @@ -90,6 +83,7 @@ static int is_full_url(const char *url) /* * */ + static const char *get_url (char *buf, size_t buflen, const char *rel, const char *url) { @@ -120,6 +114,7 @@ static const char *get_url /* * Note: text in data pointer is not preserved (must be read/write) */ + htsmsg_t *parse_m3u (char *data, const char *charset, const char *url) { diff --git a/src/muxer.c b/src/muxer.c index 81b9cea4c..a7c6fcc06 100644 --- a/src/muxer.c +++ b/src/muxer.c @@ -1,19 +1,8 @@ /* - * tvheadend, generic muxing utils - * Copyright (C) 2012 John Törnblom + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 John Törnblom * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, generic muxing utils */ #include @@ -30,6 +19,7 @@ #endif /* Newer platforms such as FreeBSD 11.1 support fdatasync so only alias on older systems */ + #ifndef CONFIG_FDATASYNC #if defined(PLATFORM_DARWIN) #define fdatasync(fd) fcntl(fd, F_FULLFSYNC) @@ -41,6 +31,7 @@ /** * Mime type for containers containing only audio */ + static struct strtab container_audio_mime[] = { { "application/octet-stream", MC_UNKNOWN }, { "audio/x-matroska", MC_MATROSKA }, @@ -64,6 +55,7 @@ static struct strtab container_audio_mime[] = { /** * Mime type for containers */ + static struct strtab container_video_mime[] = { { "application/octet-stream", MC_UNKNOWN }, { "video/x-matroska", MC_MATROSKA }, @@ -81,6 +73,7 @@ static struct strtab container_video_mime[] = { /** * Name of the container */ + static struct strtab container_name[] = { { "unknown", MC_UNKNOWN }, { "matroska", MC_MATROSKA }, @@ -104,6 +97,7 @@ static struct strtab container_name[] = { /** * filename suffix of audio-only streams */ + static struct strtab container_audio_file_suffix[] = { { "bin", MC_UNKNOWN }, { "mka", MC_MATROSKA }, @@ -127,6 +121,7 @@ static struct strtab container_audio_file_suffix[] = { /** * filename suffix of video streams */ + static struct strtab container_video_file_suffix[] = { { "bin", MC_UNKNOWN }, { "mkv", MC_MATROSKA }, @@ -144,6 +139,7 @@ static struct strtab container_video_file_suffix[] = { /** * Get the mime type for a container */ + const char* muxer_container_type2mime(muxer_container_type_t mc, int video) { @@ -164,6 +160,7 @@ muxer_container_type2mime(muxer_container_type_t mc, int video) /** * Get the mime type for a filename */ + const char* muxer_container_filename2mime(const char *filename, int video) { @@ -189,6 +186,7 @@ muxer_container_filename2mime(const char *filename, int video) /** * Get the suffix used in file names */ + const char* muxer_container_suffix(muxer_container_type_t mc, int video) { @@ -208,6 +206,7 @@ muxer_container_suffix(muxer_container_type_t mc, int video) /** * Convert a container type to a string */ + const char* muxer_container_type2txt(muxer_container_type_t mc) { @@ -224,6 +223,7 @@ muxer_container_type2txt(muxer_container_type_t mc) /** * Convert a container name to a container type */ + muxer_container_type_t muxer_container_txt2type(const char *str) { @@ -243,6 +243,7 @@ muxer_container_txt2type(const char *str) /** * Convert a mime-string to a container type */ + muxer_container_type_t muxer_container_mime2type(const char *str) { @@ -265,6 +266,7 @@ muxer_container_mime2type(const char *str) /** * Copy muxer settings */ + void muxer_config_copy(muxer_config_t *dst, const muxer_config_t *src) { @@ -279,6 +281,7 @@ muxer_config_copy(muxer_config_t *dst, const muxer_config_t *src) /** * Free muxer settings */ + void muxer_config_free(muxer_config_t *m_cfg) { @@ -293,6 +296,7 @@ muxer_config_free(muxer_config_t *m_cfg) /** * Create muxer hints */ + muxer_hints_t * muxer_hints_create(const char *agent) { @@ -305,6 +309,7 @@ muxer_hints_create(const char *agent) /** * Free muxer hints */ + void muxer_hints_free(muxer_hints_t *hints) { @@ -317,6 +322,7 @@ muxer_hints_free(muxer_hints_t *hints) /** * Create a new muxer */ + muxer_t* muxer_create(muxer_config_t *m_cfg, muxer_hints_t *hints) { @@ -354,6 +360,7 @@ muxer_create(muxer_config_t *m_cfg, muxer_hints_t *hints) /** * Figure out the file suffix by looking at the mime type */ + const char* muxer_suffix(muxer_t *m, const struct streaming_start *ss) { @@ -374,6 +381,7 @@ muxer_suffix(muxer_t *m, const struct streaming_start *ss) /** * cache type conversions */ + static struct strtab cache_types[] = { { "Unknown", MC_CACHE_UNKNOWN }, { "System", MC_CACHE_SYSTEM }, @@ -400,6 +408,7 @@ muxer_cache_txt2type(const char *str) /** * cache scheme */ + void muxer_cache_update(muxer_t *m, int fd, off_t pos, size_t size) { @@ -428,6 +437,7 @@ muxer_cache_update(muxer_t *m, int fd, off_t pos, size_t size) /** * Get a list of supported cache schemes */ + int muxer_cache_list(htsmsg_t *array) { diff --git a/src/muxer.h b/src/muxer.h index 55a9a2947..d3c3189a5 100644 --- a/src/muxer.h +++ b/src/muxer.h @@ -1,19 +1,8 @@ /* - * tvheadend, generic muxing utils - * Copyright (C) 2012 John Törnblom + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 John Törnblom * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, generic muxing utils */ #ifndef MUXER_H_ diff --git a/src/muxer/ebml.c b/src/muxer/ebml.c index 6a8a71049..cb3de4572 100644 --- a/src/muxer/ebml.c +++ b/src/muxer/ebml.c @@ -1,23 +1,8 @@ -/***************************************************************************** - * matroska_ebml.c: - ***************************************************************************** +/* + * SPDX-License-Identifier: GPL-3.0-or-later * Copyright (C) 2005 Mike Matsnev * Copyright (C) 2010 Andreas Öman - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. - *****************************************************************************/ + */ #include #include diff --git a/src/muxer/muxer_audioes.c b/src/muxer/muxer_audioes.c index ab0ca2884..9c6034a07 100644 --- a/src/muxer/muxer_audioes.c +++ b/src/muxer/muxer_audioes.c @@ -1,19 +1,8 @@ /* - * "muxer" to write mpeg audio elementary streams - * Copyright (C) 2013 Dave Chapman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Dave Chapman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * "muxer" to write mpeg audio elementary streams */ #include @@ -50,6 +39,7 @@ typedef struct audioes_muxer { /** * */ + static int audioes_muxer_type(streaming_component_type_t type) { @@ -71,6 +61,7 @@ audioes_muxer_type(streaming_component_type_t type) /** * */ + static const streaming_start_component_t * audioes_get_component(muxer_t *m, const struct streaming_start *ss) { @@ -98,6 +89,7 @@ audioes_get_component(muxer_t *m, const struct streaming_start *ss) /** * Figure out the mimetype */ + static const char * audioes_muxer_mime(muxer_t *m, const struct streaming_start *ss) { @@ -118,6 +110,7 @@ audioes_muxer_mime(muxer_t *m, const struct streaming_start *ss) /** * Reconfigure the muxer */ + static int audioes_muxer_reconfigure(muxer_t *m, const struct streaming_start *ss) { @@ -137,6 +130,7 @@ audioes_muxer_reconfigure(muxer_t *m, const struct streaming_start *ss) /** * Init the builtin mkv muxer with streams */ + static int audioes_muxer_init(muxer_t* m, struct streaming_start *ss, const char *name) { @@ -147,6 +141,7 @@ audioes_muxer_init(muxer_t* m, struct streaming_start *ss, const char *name) /* * Open the muxer as a stream muxer (using a non-seekable socket) */ + static int audioes_muxer_open_stream(muxer_t *m, int fd) { @@ -164,6 +159,7 @@ audioes_muxer_open_stream(muxer_t *m, int fd) /** * Open the file and set the file descriptor */ + static int audioes_muxer_open_file(muxer_t *m, const char *filename) { @@ -197,6 +193,7 @@ audioes_muxer_open_file(muxer_t *m, const char *filename) /** * Write a packet to the muxer */ + static int audioes_muxer_write_pkt(muxer_t *m, streaming_message_type_t smt, void *data) { @@ -246,6 +243,7 @@ audioes_muxer_write_pkt(muxer_t *m, streaming_message_type_t smt, void *data) /** * NOP */ + static int audioes_muxer_write_meta(muxer_t *m, struct epg_broadcast *eb, const char *comment) { @@ -257,6 +255,7 @@ audioes_muxer_write_meta(muxer_t *m, struct epg_broadcast *eb, const char *comme /** * Close the muxer */ + static int audioes_muxer_close(muxer_t *m) { @@ -277,6 +276,7 @@ audioes_muxer_close(muxer_t *m) /** * Free all memory associated with the muxer */ + static void audioes_muxer_destroy(muxer_t *m) { @@ -293,6 +293,7 @@ audioes_muxer_destroy(muxer_t *m) /** * Create a new builtin muxer */ + muxer_t* audioes_muxer_create(const muxer_config_t *m_cfg, const muxer_hints_t *hints) diff --git a/src/muxer/muxer_audioes.h b/src/muxer/muxer_audioes.h index ac1a73d2b..e1c42dd86 100644 --- a/src/muxer/muxer_audioes.h +++ b/src/muxer/muxer_audioes.h @@ -1,19 +1,8 @@ /* - * "muxer" to write raw audio streams - * Copyright (C) 2013 Dave Chapman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Dave Chapman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * "muxer" to write raw audio streams */ #ifndef AUDIOES_MUXER_H_ diff --git a/src/muxer/muxer_libav.c b/src/muxer/muxer_libav.c index 04e844143..74ee1cca6 100644 --- a/src/muxer/muxer_libav.c +++ b/src/muxer/muxer_libav.c @@ -1,19 +1,8 @@ /* - * tvheadend, libavformat based muxer - * Copyright (C) 2012 John Törnblom + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 John Törnblom * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, libavformat based muxer */ #include @@ -55,6 +44,7 @@ static const AVRational mpeg_tc = {1, 90000}; /** * Callback function for libavformat */ + #if LIBAVFORMAT_VERSION_MAJOR > 60 static int lav_muxer_write(void *opaque, const uint8_t *buf, int buf_size) @@ -85,6 +75,7 @@ lav_muxer_write(void *opaque, uint8_t *buf, int buf_size) /** * Add a stream to the muxer */ + static int lav_muxer_add_stream(lav_muxer_t *lm, const streaming_start_component_t *ssc) @@ -242,6 +233,7 @@ fail: /** * Check if a container supports a given streaming component */ + static int lav_muxer_support_stream(muxer_container_type_t mc, streaming_component_type_t type) @@ -311,6 +303,7 @@ lav_muxer_support_stream(muxer_container_type_t mc, /** * Figure out the mime-type for the muxed data stream */ + static const char* lav_muxer_mime(muxer_t* m, const struct streaming_start *ss) { @@ -347,6 +340,7 @@ lav_muxer_mime(muxer_t* m, const struct streaming_start *ss) /** * Init the muxer with streams */ + static int lav_muxer_init(muxer_t* m, struct streaming_start *ss, const char *name) { @@ -531,6 +525,7 @@ fail: /** * Handle changes to the streams (usually PMT updates) */ + static int lav_muxer_reconfigure(muxer_t* m, const struct streaming_start *ss) { @@ -545,6 +540,7 @@ lav_muxer_reconfigure(muxer_t* m, const struct streaming_start *ss) /** * Open the muxer and write the header */ + static int lav_muxer_open_stream(muxer_t *m, int fd) { @@ -593,6 +589,7 @@ lav_muxer_open_file(muxer_t *m, const char *filename) /** * Write a packet to the muxer */ + static int lav_muxer_write_pkt(muxer_t *m, streaming_message_type_t smt, void *data) { @@ -682,6 +679,7 @@ lav_muxer_write_pkt(muxer_t *m, streaming_message_type_t smt, void *data) /** * NOP */ + static int lav_muxer_write_meta(muxer_t *m, struct epg_broadcast *eb, const char *comment) { @@ -692,6 +690,7 @@ lav_muxer_write_meta(muxer_t *m, struct epg_broadcast *eb, const char *comment) /** * NOP */ + static int lav_muxer_add_marker(muxer_t* m) { @@ -702,6 +701,7 @@ lav_muxer_add_marker(muxer_t* m) /** * Close the muxer and append trailer to output */ + static int lav_muxer_close(muxer_t *m) { @@ -736,6 +736,7 @@ lav_muxer_close(muxer_t *m) /** * Free all memory associated with the muxer */ + static void lav_muxer_destroy(muxer_t *m) { @@ -767,6 +768,7 @@ lav_muxer_destroy(muxer_t *m) /** * Create a new libavformat based muxer */ + muxer_t* lav_muxer_create(const muxer_config_t *m_cfg, const muxer_hints_t *hints) diff --git a/src/muxer/muxer_libav.h b/src/muxer/muxer_libav.h index 3852948cb..3e8583c9c 100644 --- a/src/muxer/muxer_libav.h +++ b/src/muxer/muxer_libav.h @@ -1,19 +1,8 @@ /* - * tvheadend, muxing of packets with libavformat - * Copyright (C) 2012 John Törnblom + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 John Törnblom * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, muxing of packets with libavformat */ #ifndef LAV_MUXER_H_ diff --git a/src/muxer/muxer_mkv.c b/src/muxer/muxer_mkv.c index 13b437987..d19e604cf 100644 --- a/src/muxer/muxer_mkv.c +++ b/src/muxer/muxer_mkv.c @@ -1,26 +1,11 @@ /* - * Matroska muxer - * Copyright (C) 2005 Mike Matsnev - * Copyright (C) 2010 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2005 Mike Matsnev + * Copyright (C) 2010 Andreas Öman + * Copyright (C) 2012 John Törnblom + * Copyright (C) 2014,2015,2016,2017 Jaroslav Kysela * - * tvheadend, wrapper for the builtin dvr muxer - * Copyright (C) 2012 John Törnblom - * - * code merge, fixes, enhancements - * Copyright (C) 2014,2015,2016,2017 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Matroska muxer */ #include diff --git a/src/muxer/muxer_mkv.h b/src/muxer/muxer_mkv.h index 9abd2e5a9..118295282 100644 --- a/src/muxer/muxer_mkv.h +++ b/src/muxer/muxer_mkv.h @@ -1,19 +1,8 @@ /* - * tvheadend, muxing of packets with builtin dvr muxer - * Copyright (C) 2012 John Törnblom + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 John Törnblom * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, muxing of packets with builtin dvr muxer */ #ifndef MUXER_MKV_H_ diff --git a/src/muxer/muxer_pass.c b/src/muxer/muxer_pass.c index 95ba86e52..0d0b69c14 100644 --- a/src/muxer/muxer_pass.c +++ b/src/muxer/muxer_pass.c @@ -1,19 +1,8 @@ /* - * tvheadend, simple muxer that just passes the input along - * Copyright (C) 2012 John Törnblom + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 John Törnblom * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, simple muxer that just passes the input along */ #include diff --git a/src/muxer/muxer_pass.h b/src/muxer/muxer_pass.h index 0cf269438..da1c72a9f 100644 --- a/src/muxer/muxer_pass.h +++ b/src/muxer/muxer_pass.h @@ -1,19 +1,8 @@ /* - * tvheadend, simple muxer that just passes the input along - * Copyright (C) 2012 John Törnblom + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 John Törnblom * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, simple muxer that just passes the input along */ #ifndef PASS_MUXER_H_ diff --git a/src/notify.c b/src/notify.c index 056d5df6a..40213a40e 100644 --- a/src/notify.c +++ b/src/notify.c @@ -1,19 +1,8 @@ /* - * tvheadend, Notification framework - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Notification framework */ #include diff --git a/src/notify.h b/src/notify.h index e7bf18b53..74a772c4a 100644 --- a/src/notify.h +++ b/src/notify.h @@ -1,19 +1,8 @@ /* - * tvheadend, Notification framework - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Notification framework */ #ifndef NOTIFY_H_ diff --git a/src/packet.c b/src/packet.c index 58f841956..f8d9dbfc6 100644 --- a/src/packet.c +++ b/src/packet.c @@ -1,22 +1,8 @@ -/** - * Packet management - * Copyright (C) 2008 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman */ - #include "tvheadend.h" #include "streaming.h" #include "packet.h" diff --git a/src/packet.h b/src/packet.h index 3b2bed91e..367dd9dfc 100644 --- a/src/packet.h +++ b/src/packet.h @@ -1,19 +1,8 @@ /* - * Packet management - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Packet management */ #ifndef PACKET_H_ diff --git a/src/parsers/bitstream.c b/src/parsers/bitstream.c index 921ee0ef0..28c8c60c2 100644 --- a/src/parsers/bitstream.c +++ b/src/parsers/bitstream.c @@ -1,19 +1,8 @@ /* - * Bit stream reader - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Bit stream reader */ #include diff --git a/src/parsers/bitstream.h b/src/parsers/bitstream.h index f1bcf16df..7cd317b8e 100644 --- a/src/parsers/bitstream.h +++ b/src/parsers/bitstream.h @@ -1,19 +1,8 @@ /* - * Bit stream reader - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Bit stream reader */ #ifndef BITSTREAM_H_ diff --git a/src/parsers/message.c b/src/parsers/message.c index a56ea7bed..f08015941 100644 --- a/src/parsers/message.c +++ b/src/parsers/message.c @@ -1,19 +1,8 @@ /* - * Packet parsing functions - streaming message handler - * Copyright (C) 2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Packet parsing functions - streaming message handler */ #include "parsers.h" diff --git a/src/parsers/parser_h264.c b/src/parsers/parser_h264.c index ade299a63..795836f99 100644 --- a/src/parsers/parser_h264.c +++ b/src/parsers/parser_h264.c @@ -40,6 +40,7 @@ /** * H.264 parser, nal escaper */ + void * h264_nal_deescape(bitstream_t *bs, const uint8_t *data, int size) { diff --git a/src/parsers/parser_h264.h b/src/parsers/parser_h264.h index 79d8241fe..e00866d75 100644 --- a/src/parsers/parser_h264.h +++ b/src/parsers/parser_h264.h @@ -1,19 +1,8 @@ /* - * Packet parsing functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Packet parsing functions */ #ifndef PARSER_H264_H_ diff --git a/src/parsers/parser_latm.c b/src/parsers/parser_latm.c index 5f21f1ddf..55155a09a 100644 --- a/src/parsers/parser_latm.c +++ b/src/parsers/parser_latm.c @@ -223,6 +223,7 @@ read_stream_mux_config(parser_es_t *st, latm_private_t *latm, bitstream_t *bs) /** * Parse AAC LATM */ + th_pkt_t * parse_latm_audio_mux_element(parser_t *t, parser_es_t *st, const uint8_t *data, int len) diff --git a/src/parsers/parser_latm.h b/src/parsers/parser_latm.h index 4251bb2f4..69192663e 100644 --- a/src/parsers/parser_latm.h +++ b/src/parsers/parser_latm.h @@ -1,19 +1,8 @@ /* - * Packet parsing functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Packet parsing functions */ #ifndef PARSER_LATM_H_ diff --git a/src/parsers/parser_teletext.c b/src/parsers/parser_teletext.c index ff39eb6ac..2b9abb20b 100644 --- a/src/parsers/parser_teletext.c +++ b/src/parsers/parser_teletext.c @@ -1,20 +1,7 @@ /* - * Teletext parsing functions - * Copyright (C) 2007 Andreas Öman - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman + * Copyright (C) 2014 Jaroslav Kysela */ #include @@ -124,16 +111,16 @@ static const uint8_t hamtable[] = { #define SUBSET_CZECH_SLOVAK 1 /* Cesky / Slovencina */ #define SUBSET_ENGLISH 2 /* English */ #define SUBSET_ESTONIAN 3 /* Eesti */ -#define SUBSET_FRENCH 4 /* Français */ +#define SUBSET_FRENCH 4 /* Fran�ais */ #define SUBSET_GERMAN 5 /* German / Deutch */ #define SUBSET_ITALIAN 6 /* Italiano */ #define SUBSET_LETT_LITH 7 /* Lettish / Lietuviskai */ #define SUBSET_POLISH 8 /* Polski */ -#define SUBSET_PORTUG_SPANISH 9 /* Português / Español */ -#define SUBSET_RUMANIAN 10 /* Româna */ +#define SUBSET_PORTUG_SPANISH 9 /* Portugu�s / Espa�ol */ +#define SUBSET_RUMANIAN 10 /* Rom�na */ #define SUBSET_SERB_CRO_SLO 11 /* Srpski / Hrvatski / Slovenscina */ #define SUBSET_SWE_FIN_HUN 12 /* Svenska / Suomi / Magyar */ -#define SUBSET_TURKISH 13 /* Türkçe */ +#define SUBSET_TURKISH 13 /* T�rk�e */ #define SUBSET_LAST SUBSET_TURKISH #define SUBSET_CHARMAP_COUNT 13 diff --git a/src/parsers/parser_teletext.h b/src/parsers/parser_teletext.h index 2f44b386d..6043796b5 100644 --- a/src/parsers/parser_teletext.h +++ b/src/parsers/parser_teletext.h @@ -1,19 +1,8 @@ /* - * Teletext parsing functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Teletext parsing functions */ #ifndef TELETEXT_H diff --git a/src/parsers/parsers.c b/src/parsers/parsers.c index 7c20d01d2..c8c5de9a8 100644 --- a/src/parsers/parsers.c +++ b/src/parsers/parsers.c @@ -1,20 +1,9 @@ /* - * Packet parsing functions - * Copyright (C) 2007 Andreas Öman - * Copyright (C) 2014-2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman + * Copyright (C) 2014-2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Packet parsing functions */ #include "parsers.h" diff --git a/src/parsers/parsers.h b/src/parsers/parsers.h index 404d69dd5..87dcda269 100644 --- a/src/parsers/parsers.h +++ b/src/parsers/parsers.h @@ -1,19 +1,8 @@ /* - * Elementary stream functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Elementary stream functions */ #ifndef PARSERS_H diff --git a/src/plumbing/globalheaders.c b/src/plumbing/globalheaders.c index ecd560ec6..28d3e5994 100644 --- a/src/plumbing/globalheaders.c +++ b/src/plumbing/globalheaders.c @@ -1,19 +1,6 @@ -/** - * Global header modification - * Copyright (C) 2010 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2010 Andreas Öman */ #include @@ -35,12 +22,14 @@ typedef struct globalheaders { } globalheaders_t; /* note: there up to 2.5 sec diffs in some sources! */ + #define MAX_SCAN_TIME 5000 // in ms #define MAX_NOPKT_TIME 2500 // in ms /** * */ + static inline int gh_require_meta(int type) { @@ -56,6 +45,7 @@ gh_require_meta(int type) /** * */ + static inline int gh_is_audiovideo(int type) { @@ -65,6 +55,7 @@ gh_is_audiovideo(int type) /** * */ + static void gh_flush(globalheaders_t *gh) { @@ -80,6 +71,7 @@ gh_flush(globalheaders_t *gh) /** * */ + static void apply_header(streaming_start_component_t *ssc, th_pkt_t *pkt) { @@ -127,6 +119,7 @@ apply_header(streaming_start_component_t *ssc, th_pkt_t *pkt) /** * */ + static int header_complete(streaming_start_component_t *ssc, int not_so_picky) { @@ -155,6 +148,7 @@ header_complete(streaming_start_component_t *ssc, int not_so_picky) /** * */ + static int64_t gh_queue_delay(globalheaders_t *gh, int index) { @@ -204,6 +198,7 @@ gh_queue_delay(globalheaders_t *gh, int index) /** * */ + static int headers_complete(globalheaders_t *gh) { @@ -269,6 +264,7 @@ headers_complete(globalheaders_t *gh) /** * */ + static void gh_start(globalheaders_t *gh, streaming_message_t *sm) { @@ -280,6 +276,7 @@ gh_start(globalheaders_t *gh, streaming_message_t *sm) /** * */ + static void gh_hold(globalheaders_t *gh, streaming_message_t *sm) { @@ -361,6 +358,7 @@ gh_hold(globalheaders_t *gh, streaming_message_t *sm) /** * */ + static void gh_pass(globalheaders_t *gh, streaming_message_t *sm) { @@ -405,6 +403,7 @@ gh_pass(globalheaders_t *gh, streaming_message_t *sm) /** * */ + static void globalheaders_input(void *opaque, streaming_message_t *sm) { @@ -434,6 +433,7 @@ static streaming_ops_t globalheaders_input_ops = { /** * */ + streaming_target_t * globalheaders_create(streaming_target_t *output) { @@ -450,6 +450,7 @@ globalheaders_create(streaming_target_t *output) /** * */ + void globalheaders_destroy(streaming_target_t *pad) { diff --git a/src/plumbing/globalheaders.h b/src/plumbing/globalheaders.h index dff742e5f..8f29b6ac2 100644 --- a/src/plumbing/globalheaders.h +++ b/src/plumbing/globalheaders.h @@ -1,19 +1,6 @@ -/** - * Global header modification - * Copyright (C) 2010 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2010 Andreas Öman */ #ifndef GLOBALHEADERS_H__ diff --git a/src/plumbing/tsfix.c b/src/plumbing/tsfix.c index 08a4c9498..acdade472 100644 --- a/src/plumbing/tsfix.c +++ b/src/plumbing/tsfix.c @@ -1,19 +1,6 @@ -/** - * Timestamp fixup - * Copyright (C) 2010 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2010 Andreas Öman */ #include "tvheadend.h" @@ -29,6 +16,7 @@ LIST_HEAD(tfstream_list, tfstream); /** * */ + typedef struct tfstream { LIST_ENTRY(tfstream) tfs_link; @@ -57,6 +45,7 @@ typedef struct tfstream { /** * */ + typedef struct tsfix { streaming_target_t tf_input; @@ -79,6 +68,7 @@ typedef struct tsfix { /** * Compute the timestamp deltas */ + static int64_t tsfix_ts_diff(int64_t ts1, int64_t ts2) { @@ -101,6 +91,7 @@ tsfix_ts_diff(int64_t ts1, int64_t ts2) /** * */ + static void tsfix_destroy_streams(tsfix_t *tf) { @@ -127,6 +118,7 @@ tfs_find(tsfix_t *tf, th_pkt_t *pkt) /** * */ + static tfstream_t * tsfix_add_stream(tsfix_t *tf, int index, streaming_component_type_t type) { @@ -155,6 +147,7 @@ tsfix_add_stream(tsfix_t *tf, int index, streaming_component_type_t type) /** * */ + static void tsfix_start(tsfix_t *tf, streaming_start_t *ss) { @@ -184,6 +177,7 @@ tsfix_start(tsfix_t *tf, streaming_start_t *ss) /** * */ + static void tsfix_stop(tsfix_t *tf) { @@ -194,6 +188,7 @@ tsfix_stop(tsfix_t *tf) /** * */ + static void tsfix_packet_drop(tfstream_t *tfs, th_pkt_t *pkt, const char *reason) { @@ -208,6 +203,7 @@ tsfix_packet_drop(tfstream_t *tfs, th_pkt_t *pkt, const char *reason) /** * */ + static void normalize_ts(tsfix_t *tf, tfstream_t *tfs, th_pkt_t *pkt, int backlog) { @@ -327,6 +323,7 @@ deliver: /** * */ + static inline int txfix_need_to_update_ref(tsfix_t *tf, tfstream_t *tfs, th_pkt_t *pkt) { @@ -338,6 +335,7 @@ txfix_need_to_update_ref(tsfix_t *tf, tfstream_t *tfs, th_pkt_t *pkt) /** * */ + static int tsfix_update_ref(tsfix_t *tf, tfstream_t *tfs, th_pkt_t *pkt) { @@ -388,6 +386,7 @@ tsfix_update_ref(tsfix_t *tf, tfstream_t *tfs, th_pkt_t *pkt) /** * */ + static void tsfix_backlog(tsfix_t *tf) { @@ -412,6 +411,7 @@ tsfix_backlog(tsfix_t *tf) /** * */ + static int64_t tsfix_backlog_diff(tsfix_t *tf) { @@ -453,6 +453,7 @@ tsfix_backlog_diff(tsfix_t *tf) * 12: B dts 4922741536 pts rpts 4922741536 * 13: I dts 4922745136 pts 4922755936 rpts 4922755936 */ + static void recover_pts(tsfix_t *tf, tfstream_t *tfs, th_pkt_t *pkt) { @@ -523,6 +524,7 @@ recover_pts(tsfix_t *tf, tfstream_t *tfs, th_pkt_t *pkt) /** * Compute PTS (if not known) */ + static void compute_pts(tsfix_t *tf, tfstream_t *tfs, th_pkt_t *pkt) { @@ -545,6 +547,7 @@ compute_pts(tsfix_t *tf, tfstream_t *tfs, th_pkt_t *pkt) /** * */ + static void tsfix_input_packet(tsfix_t *tf, streaming_message_t *sm) { @@ -628,6 +631,7 @@ tsfix_input_packet(tsfix_t *tf, streaming_message_t *sm) /** * */ + static void tsfix_input(void *opaque, streaming_message_t *sm) { @@ -698,6 +702,7 @@ static streaming_ops_t tsfix_input_ops = { /** * */ + streaming_target_t * tsfix_create(streaming_target_t *output) { @@ -715,6 +720,7 @@ tsfix_create(streaming_target_t *output) /** * */ + void tsfix_destroy(streaming_target_t *pad) { diff --git a/src/plumbing/tsfix.h b/src/plumbing/tsfix.h index 7e6f7bd0b..14a2dab75 100644 --- a/src/plumbing/tsfix.h +++ b/src/plumbing/tsfix.h @@ -1,19 +1,6 @@ -/** - * Timestamp fixup - * Copyright (C) 2010 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2010 Andreas Öman */ #ifndef TSFIX_H__ diff --git a/src/profile.c b/src/profile.c index 1aa9c57c8..9bb40006d 100644 --- a/src/profile.c +++ b/src/profile.c @@ -1,19 +1,8 @@ /* - * tvheadend, Stream Profile - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Stream Profile */ #include "tvheadend.h" diff --git a/src/profile.h b/src/profile.h index ac135c4d6..5d0319815 100644 --- a/src/profile.h +++ b/src/profile.h @@ -1,19 +1,8 @@ /* - * tvheadend, Stream Profile - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Stream Profile */ #ifndef __TVH_PROFILE_H__ diff --git a/src/prop.c b/src/prop.c index b1e87ccbd..2b1efa5b8 100644 --- a/src/prop.c +++ b/src/prop.c @@ -1,20 +1,8 @@ /* - * Tvheadend - property system (part of idnode) + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * Copyright (C) 2013 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - property system (part of idnode) */ #include diff --git a/src/prop.h b/src/prop.h index 5855b2d6f..f01e2f7ec 100644 --- a/src/prop.h +++ b/src/prop.h @@ -1,20 +1,8 @@ /* - * Tvheadend - property system (part of idnode) + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Andreas Öman * - * Copyright (C) 2013 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - property system (part of idnode) */ #ifndef __TVH_PROP_H__ diff --git a/src/proplib.c b/src/proplib.c index 057b46181..7efc24ff0 100644 --- a/src/proplib.c +++ b/src/proplib.c @@ -1,20 +1,8 @@ /* - * Tvheadend - property system library (part of idnode) + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Jaroslav Kysela * - * Copyright (C) 2017 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - property system library (part of idnode) */ #include diff --git a/src/ratinglabels.c b/src/ratinglabels.c index 5671a4dd5..4a33d8ae7 100644 --- a/src/ratinglabels.c +++ b/src/ratinglabels.c @@ -1,25 +1,9 @@ /* - * tvheadend, Rating Labels - * Copyright (C) 2014 Jaroslav Kysela (Original Bouquets) - * Copyright (C) 2023 DeltaMikeCharlie (Updated for Rating Labels) + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela (Original Bouquets) + * Copyright (C) 2023 DeltaMikeCharlie (Updated for Rating Labels) * - * 'Rating labels' are text codes like 'PG', 'PG-13', 'FSK 12', etc, - * and are related to the parental classification code values - * that are broadcast via DVB as numbers. - * Each country/region has their own ratings. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Rating Labels */ #include "tvheadend.h" diff --git a/src/ratinglabels.h b/src/ratinglabels.h index 50415ed73..0e766b443 100644 --- a/src/ratinglabels.h +++ b/src/ratinglabels.h @@ -1,20 +1,9 @@ /* - * TV headend - Rating Labels - * Copyright (C) 2014 Jaroslav Kysela (Original Bouquets) - * Copyright (C) 2023 DeltaMikeCharlie (Updated for Rating Labels) + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela (Original Bouquets) + * Copyright (C) 2023 DeltaMikeCharlie (Updated for Rating Labels) * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - Rating Labels */ #ifndef RATINGLABEL_H_ diff --git a/src/redblack.h b/src/redblack.h index 864fa3437..37bc37223 100644 --- a/src/redblack.h +++ b/src/redblack.h @@ -1,26 +1,8 @@ -/***************************************************************************** - * -* Copyright (C) 2001 Mark Edel -* Copyright (C) 2008 Andreas Öman - -* This is free software; you can redistribute it and/or modify it under the -* terms of the GNU General Public License as published by the Free Software -* Foundation; either version 2 of the License, or (at your option) any later -* version. -* -* This software is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* for more details. -* -* You should have received a copy of the GNU General Public License along with -* software; if not, write to the Free Software Foundation, Inc., 51 Franklin -* Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Written by Mark Edel -* Macroified + additional support functions by Andreas Öman -* -*****************************************************************************/ +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2001 Mark Edel + * Copyright (C) 2008 Andreas Öman + */ #ifndef REDBLACK_H_ #define REDBLACK_H_ @@ -145,6 +127,7 @@ do { \ /** * Insert a new node, if a collision occures the colliding node is returned */ + #define RB_INSERT_SORTED(head, skel, field, cmpfunc) \ ({ \ int res, fromleft = 0; \ @@ -199,6 +182,7 @@ do { \ /** * Returns next node */ + #define RB_NEXT(e, field) \ ({ \ typeof(e) xx = e, f; \ @@ -221,6 +205,7 @@ do { \ /** * Returns previous node */ + #define RB_PREV(e, field) \ ({ \ typeof(e) xx = e, f; \ @@ -243,16 +228,19 @@ do { \ /** * Returns first node */ + #define RB_FIRST(head) ((head)->first) /** * Returns last node */ + #define RB_LAST(head) ((head)->last) /** * Iterate thru all nodes */ + #define RB_FOREACH(e, head, field) \ for(e = (head)->first; e != NULL; \ ({ \ @@ -274,6 +262,7 @@ do { \ /** * Iterate thru all nodes in reverse order */ + #define RB_FOREACH_REVERSE(e, head, field) \ for(e = (head)->last; e != NULL; \ ({ \ @@ -294,6 +283,7 @@ do { \ /** * Remove the given node */ + #define RB_REMOVE(head, e, field) \ do { \ int swapColor; \ @@ -461,6 +451,7 @@ do { \ /** * Finds a node */ + #define RB_FIND(head, skel, field, cmpfunc) \ ({ \ int res; \ @@ -483,6 +474,7 @@ do { \ /** * Finds first node greater than 'skel' */ + #define RB_FIND_GT(head, skel, field, cmpfunc) \ ({ \ int res; \ @@ -505,6 +497,7 @@ do { \ /** * Finds a node greater or equal to 'skel' */ + #define RB_FIND_GE(head, skel, field, cmpfunc) \ ({ \ int res; \ @@ -528,6 +521,7 @@ do { \ /** * Finds first node lesser than 'skel' */ + #define RB_FIND_LT(head, skel, field, cmpfunc) \ ({ \ int res; \ @@ -550,6 +544,7 @@ do { \ /** * Finds a node lesser or equal to 'skel' */ + #define RB_FIND_LE(head, skel, field, cmpfunc) \ ({ \ int res; \ diff --git a/src/rtsp.c b/src/rtsp.c index f4ca83922..1e52a8fc9 100644 --- a/src/rtsp.c +++ b/src/rtsp.c @@ -1,20 +1,8 @@ /* - * Tvheadend - RTSP routines + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - RTSP routines */ #include diff --git a/src/satip/rtp.c b/src/satip/rtp.c index a66eea01b..d6916003c 100644 --- a/src/satip/rtp.c +++ b/src/satip/rtp.c @@ -1,20 +1,8 @@ /* - * Tvheadend - SAT-IP server - RTP part + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - SAT-IP server - RTP part */ #include @@ -34,7 +22,9 @@ #define RTP_PACKETS 128 #define RTP_PAYLOAD (7*188+12) #define RTP_TCP_MIN_PAYLOAD (7*188+12+4) /* fit ethernet packet */ + #define RTP_TCP_MAX_PAYLOAD (348*188+12+4) /* cca 64kB */ + #define RTCP_PAYLOAD (1420) #define RTP_TCP_BUFFER_SIZE (64*1024*1024) @@ -464,6 +454,7 @@ satip_rtp_thread(void *aux) /* * */ + void *satip_rtp_queue(th_subscription_t *subs, streaming_queue_t *sq, http_connection_t *hc, @@ -646,6 +637,7 @@ void satip_rtp_close(void *_rtp) /* * */ + static const char * satip_rtcp_pol(int pol) { @@ -668,6 +660,7 @@ satip_rtcp_pol(int pol) /* * */ + static const char * satip_rtcp_fec(int fec) { @@ -692,6 +685,7 @@ satip_rtcp_fec(int fec) /* * */ + static int satip_status_build(satip_rtp_session_t *rtp, char *buf, int len) { @@ -854,6 +848,7 @@ satip_status_build(satip_rtp_session_t *rtp, char *buf, int len) /* * */ + int satip_rtp_status(void *_rtp, char *buf, int len) { satip_rtp_session_t *rtp = _rtp; @@ -873,6 +868,7 @@ int satip_rtp_status(void *_rtp, char *buf, int len) /* * */ + static int satip_rtcp_build(satip_rtp_session_t *rtp, uint8_t *msg) { @@ -914,6 +910,7 @@ satip_rtcp_build(satip_rtp_session_t *rtp, uint8_t *msg) /* * */ + static void * satip_rtcp_thread(void *aux) { @@ -979,6 +976,7 @@ end: /* * */ + void satip_rtp_init(int boot) { TAILQ_INIT(&satip_rtp_sessions); @@ -996,6 +994,7 @@ void satip_rtp_init(int boot) /* * */ + void satip_rtp_done(void) { assert(TAILQ_EMPTY(&satip_rtp_sessions)); diff --git a/src/satip/rtsp.c b/src/satip/rtsp.c index 24efae9d7..363e6f6e1 100644 --- a/src/satip/rtsp.c +++ b/src/satip/rtsp.c @@ -1,20 +1,8 @@ /* - * Tvheadend - SAT-IP server - RTSP part + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - SAT-IP server - RTSP part */ #include "tvheadend.h" diff --git a/src/satip/server.c b/src/satip/server.c index 401fd6b63..df0d06b77 100644 --- a/src/satip/server.c +++ b/src/satip/server.c @@ -1,20 +1,8 @@ /* - * Tvheadend - SAT-IP server + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - SAT-IP server */ #include "tvheadend.h" diff --git a/src/satip/server.h b/src/satip/server.h index 03a286289..bc5c2c20f 100644 --- a/src/satip/server.h +++ b/src/satip/server.h @@ -1,20 +1,8 @@ /* - * Tvheadend - SAT-IP DVB server - private data + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * Copyright (C) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - SAT-IP DVB server - private data */ #ifndef __TVH_SATIP_SERVER_H__ diff --git a/src/sbuf.h b/src/sbuf.h index 2969e6c94..7601a8b70 100644 --- a/src/sbuf.h +++ b/src/sbuf.h @@ -1,20 +1,9 @@ /* - * Tvheadend - sbuf routines - * Copyright (C) 2007 Andreas Öman - * Copyright (C) 2014-2017 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman + * Copyright (C) 2014-2017 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - sbuf routines */ #ifndef __TVH_SBUF_H @@ -28,6 +17,7 @@ /** * Simple dynamically growing buffer */ + typedef struct sbuf { uint8_t *sb_data; int sb_ptr; diff --git a/src/service.c b/src/service.c index c65301666..8241dc4b7 100644 --- a/src/service.c +++ b/src/service.c @@ -1,19 +1,8 @@ /* - * Services - * Copyright (C) 2010 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2010 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Services */ #include "tvheadend.h" diff --git a/src/service.h b/src/service.h index d4833848f..d6a734228 100644 --- a/src/service.h +++ b/src/service.h @@ -1,19 +1,8 @@ /* - * Tvheadend - * Copyright (C) 2010 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2010 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend */ #ifndef SERVICE_H__ diff --git a/src/service_mapper.c b/src/service_mapper.c index ee37a54fc..1fbd8632e 100644 --- a/src/service_mapper.c +++ b/src/service_mapper.c @@ -1,19 +1,8 @@ /* - * Service Mapper functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Service Mapper functions */ #include diff --git a/src/service_mapper.h b/src/service_mapper.h index 64166253b..ca48ee768 100644 --- a/src/service_mapper.h +++ b/src/service_mapper.h @@ -1,19 +1,8 @@ /* - * Functions for transport probing - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions for transport probing */ #ifndef __TVH_SERVICE_MAPPER_H__ diff --git a/src/settings.c b/src/settings.c index da98a249a..f318eee2a 100644 --- a/src/settings.c +++ b/src/settings.c @@ -1,19 +1,8 @@ /* - * Functions for storing program settings - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions for storing program settings */ #include @@ -42,6 +31,7 @@ static char *settingspath = NULL; /** * */ + const char * hts_settings_get_root(void) { @@ -51,6 +41,7 @@ hts_settings_get_root(void) /** * */ + void hts_settings_init(const char *confpath) { @@ -61,6 +52,7 @@ hts_settings_init(const char *confpath) /** * */ + void hts_settings_done(void) { @@ -70,6 +62,7 @@ hts_settings_done(void) /** * */ + int hts_settings_makedirs ( const char *inpath ) { @@ -92,6 +85,7 @@ hts_settings_makedirs ( const char *inpath ) /** * */ + static void _hts_settings_buildpath (char *dst, size_t dstsize, const char *fmt, va_list ap, const char *prefix) @@ -128,6 +122,7 @@ hts_settings_buildpath /** * */ + void hts_settings_save(htsmsg_t *record, const char *pathfmt, ...) { @@ -161,6 +156,7 @@ hts_settings_save(htsmsg_t *record, const char *pathfmt, ...) } /* Store data */ + #if ENABLE_ZLIB pack = strstr(path, "/muxes/") != NULL && /* ugly, redesign API */ strstr(path, "/networks/") != NULL && @@ -217,6 +213,7 @@ hts_settings_save(htsmsg_t *record, const char *pathfmt, ...) /** * */ + static htsmsg_t * hts_settings_load_one(const char *filename) { @@ -270,6 +267,7 @@ hts_settings_load_one(const char *filename) /** * */ + static htsmsg_t * hts_settings_load_path(const char *fullpath, int depth) { @@ -322,6 +320,7 @@ hts_settings_load_path(const char *fullpath, int depth) /** * */ + static htsmsg_t * hts_settings_vload(const char *pathfmt, va_list ap, int depth) { @@ -351,6 +350,7 @@ hts_settings_vload(const char *pathfmt, va_list ap, int depth) /** * */ + htsmsg_t * hts_settings_load(const char *pathfmt, ...) { @@ -365,6 +365,7 @@ hts_settings_load(const char *pathfmt, ...) /** * */ + htsmsg_t * hts_settings_load_r(int depth, const char *pathfmt, ...) { @@ -378,6 +379,7 @@ hts_settings_load_r(int depth, const char *pathfmt, ...) /** * */ + void hts_settings_remove(const char *pathfmt, ...) { @@ -402,6 +404,7 @@ hts_settings_remove(const char *pathfmt, ...) /** * */ + int hts_settings_open_file(int flags, const char *pathfmt, ...) { @@ -430,6 +433,7 @@ hts_settings_open_file(int flags, const char *pathfmt, ...) /* * Check if a path exists */ + int hts_settings_exists ( const char *pathfmt, ... ) { @@ -448,6 +452,7 @@ hts_settings_exists ( const char *pathfmt, ... ) /* * XDG user directory support */ + char * hts_settings_get_xdg_dir_lookup (const char *name) { diff --git a/src/settings.h b/src/settings.h index bf8524628..6afa4faec 100644 --- a/src/settings.h +++ b/src/settings.h @@ -1,19 +1,8 @@ /* - * Functions for storing program settings - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Functions for storing program settings */ #ifndef HTSSETTINGS_H__ diff --git a/src/spawn.c b/src/spawn.c index 89b65402c..e6c30937b 100644 --- a/src/spawn.c +++ b/src/spawn.c @@ -1,19 +1,8 @@ /* - * Process spawn functions - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Process spawn functions */ #include @@ -67,6 +56,7 @@ static void spawn_reaper(void); /* * */ + #define SPAWN_PIPE_READ_SIZE 4096 static void @@ -184,6 +174,7 @@ spawn_error( const char *fmt, ... ) /* * Search PATH for executable */ + int find_exec ( const char *name, char *out, size_t len ) { @@ -224,6 +215,7 @@ find_exec ( const char *name, char *out, size_t len ) /** * Reap one child */ + int spawn_reap(pid_t wpid, char *stxt, size_t stxtlen) { @@ -278,6 +270,7 @@ spawn_reap(pid_t wpid, char *stxt, size_t stxtlen) /** * The reaper is called once a second to finish of any pending spawns */ + static void spawn_reaper(void) { @@ -307,6 +300,7 @@ spawn_reaper(void) /** * Kill the pid (only if waiting) */ + int spawn_kill(pid_t pid, int sig, int timeout) { @@ -339,6 +333,7 @@ spawn_kill(pid_t pid, int sig, int timeout) /** * Enqueue a spawn on the pending spawn list */ + static spawn_t * spawn_enq(const char *name, int pid) { @@ -355,6 +350,7 @@ spawn_enq(const char *name, int pid) /** * */ + int spawn_parse_args(char ***argv, int argc, const char *cmd, const char **replace) { @@ -442,6 +438,7 @@ spawn_parse_args(char ***argv, int argc, const char *cmd, const char **replace) /** * */ + void spawn_free_args(char **argv) { @@ -454,6 +451,7 @@ spawn_free_args(char **argv) /** * Execute the given program and return its standard output as file-descriptor (pipe). */ + int spawn_and_give_stdout(const char *prog, char *argv[], char *envp[], int *rd, pid_t *pid, int redir_stderr) @@ -598,6 +596,7 @@ spawn_and_give_stdout(const char *prog, char *argv[], char *envp[], * Execute the given program and return its standard input as file-descriptor (pipe). * The standard output file-decriptor (od) must be valid, too. */ + int spawn_with_passthrough(const char *prog, char *argv[], char *envp[], int od, int *wd, pid_t *pid, int redir_stderr) @@ -738,6 +737,7 @@ spawn_with_passthrough(const char *prog, char *argv[], char *envp[], * * *outp will point to the allocated buffer */ + int spawnv(const char *prog, char *argv[], pid_t *pid, int redir_stdout, int redir_stderr) { @@ -821,6 +821,7 @@ spawnv(const char *prog, char *argv[], pid_t *pid, int redir_stdout, int redir_s /* * */ + void spawn_init(void) { tvh_pipe(O_NONBLOCK, &spawn_pipe_info); diff --git a/src/spawn.h b/src/spawn.h index 12c0b2ec8..8beeec9a8 100644 --- a/src/spawn.h +++ b/src/spawn.h @@ -1,19 +1,8 @@ /* - * Process spawn functions - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Process spawn functions */ #ifndef SPAWN_H diff --git a/src/streaming.c b/src/streaming.c index 54f48b9ec..e3352e3d2 100644 --- a/src/streaming.c +++ b/src/streaming.c @@ -1,19 +1,6 @@ -/** - * Streaming helpers - * Copyright (C) 2008 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman */ #include @@ -39,6 +26,7 @@ streaming_pad_init(streaming_pad_t *sp) /** * */ + void streaming_target_init(streaming_target_t *st, streaming_ops_t *ops, void *opaque, int reject_filter) @@ -51,6 +39,7 @@ streaming_target_init(streaming_target_t *st, streaming_ops_t *ops, /** * */ + static size_t streaming_message_data_size(streaming_message_t *sm) { @@ -69,6 +58,7 @@ streaming_message_data_size(streaming_message_t *sm) /** * */ + static void streaming_queue_deliver(void *opauqe, streaming_message_t *sm) { @@ -91,6 +81,7 @@ streaming_queue_deliver(void *opauqe, streaming_message_t *sm) /** * */ + static htsmsg_t * streaming_queue_info(void *opaque, htsmsg_t *list) { @@ -108,6 +99,7 @@ streaming_queue_info(void *opaque, htsmsg_t *list) /** * */ + void streaming_queue_remove(streaming_queue_t *sq, streaming_message_t *sm) { @@ -118,6 +110,7 @@ streaming_queue_remove(streaming_queue_t *sq, streaming_message_t *sm) /** * */ + void streaming_queue_init(streaming_queue_t *sq, int reject_filter, size_t maxsize) { @@ -139,6 +132,7 @@ streaming_queue_init(streaming_queue_t *sq, int reject_filter, size_t maxsize) /** * */ + void streaming_queue_deinit(streaming_queue_t *sq) { @@ -151,6 +145,7 @@ streaming_queue_deinit(streaming_queue_t *sq) /** * */ + void streaming_queue_clear(struct streaming_message_queue *q) { @@ -165,6 +160,7 @@ streaming_queue_clear(struct streaming_message_queue *q) /** * */ + void streaming_target_connect(streaming_pad_t *sp, streaming_target_t *st) { @@ -178,6 +174,7 @@ streaming_target_connect(streaming_pad_t *sp, streaming_target_t *st) /** * */ + void streaming_target_disconnect(streaming_pad_t *sp, streaming_target_t *st) { @@ -198,6 +195,7 @@ streaming_target_disconnect(streaming_pad_t *sp, streaming_target_t *st) /** * */ + streaming_message_t * streaming_msg_create(streaming_message_type_t type) { @@ -215,6 +213,7 @@ streaming_msg_create(streaming_message_type_t type) /** * */ + streaming_message_t * streaming_msg_create_pkt(th_pkt_t *pkt) { @@ -228,6 +227,7 @@ streaming_msg_create_pkt(th_pkt_t *pkt) /** * */ + streaming_message_t * streaming_msg_create_data(streaming_message_type_t type, void *data) { @@ -240,6 +240,7 @@ streaming_msg_create_data(streaming_message_type_t type, void *data) /** * */ + streaming_message_t * streaming_msg_create_code(streaming_message_type_t type, int code) { @@ -253,6 +254,7 @@ streaming_msg_create_code(streaming_message_type_t type, int code) /** * */ + streaming_message_t * streaming_msg_clone(streaming_message_t *src) { @@ -326,6 +328,7 @@ streaming_msg_clone(streaming_message_t *src) /** * */ + void streaming_start_unref(streaming_start_t *ss) { @@ -344,6 +347,7 @@ streaming_start_unref(streaming_start_t *ss) /** * */ + void streaming_msg_free(streaming_message_t *sm) { @@ -394,6 +398,7 @@ streaming_msg_free(streaming_message_t *sm) /** * */ + void streaming_target_deliver2(streaming_target_t *st, streaming_message_t *sm) { @@ -406,6 +411,7 @@ streaming_target_deliver2(streaming_target_t *st, streaming_message_t *sm) /** * */ + void streaming_pad_deliver(streaming_pad_t *sp, streaming_message_t *sm) { @@ -429,6 +435,7 @@ streaming_pad_deliver(streaming_pad_t *sp, streaming_message_t *sm) /** * */ + void streaming_service_deliver(service_t *t, streaming_message_t *sm) { @@ -441,6 +448,7 @@ streaming_service_deliver(service_t *t, streaming_message_t *sm) /** * */ + const char * streaming_code2txt(int code) { @@ -522,6 +530,7 @@ streaming_code2txt(int code) /** * */ + streaming_start_t * streaming_start_copy(const streaming_start_t *src) { @@ -548,6 +557,7 @@ streaming_start_copy(const streaming_start_t *src) /** * */ + streaming_start_component_t * streaming_start_component_find_by_index(streaming_start_t *ss, int idx) { @@ -562,6 +572,7 @@ streaming_start_component_find_by_index(streaming_start_t *ss, int idx) /** * */ + static struct strtab streamtypetab[] = { { "NONE", SCT_NONE }, { "UNKNOWN", SCT_UNKNOWN }, @@ -595,6 +606,7 @@ static struct strtab streamtypetab[] = { /** * */ + const char * streaming_component_type2txt(streaming_component_type_t s) { @@ -638,6 +650,7 @@ const char *signal2str(signal_state_t st) /* * */ + void streaming_init(void) { memoryinfo_register(&streaming_msg_memoryinfo); diff --git a/src/streaming.h b/src/streaming.h index c90034358..5782e1f6c 100644 --- a/src/streaming.h +++ b/src/streaming.h @@ -1,19 +1,8 @@ /* - * Stream plumbing, connects individual streaming components to each other - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Stream plumbing, connects individual streaming components to each other */ #ifndef STREAMING_H_ diff --git a/src/string_list.c b/src/string_list.c index cfe0fa034..5176d7518 100644 --- a/src/string_list.c +++ b/src/string_list.c @@ -1,19 +1,8 @@ /* - * Sorted String List Functions - * Copyright (C) 2017 Tvheadend Project (https://tvheadend.org) + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Tvheadend Project (https://tvheadend.org) * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Sorted String List Functions */ #include "string_list.h" diff --git a/src/string_list.h b/src/string_list.h index e60ead66e..81dc9ede8 100644 --- a/src/string_list.h +++ b/src/string_list.h @@ -1,20 +1,10 @@ /* - * Sorted String List Functions - * Copyright (C) 2017 Tvheadend Project (https://tvheadend.org) + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Tvheadend Project (https://tvheadend.org) * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Sorted String List Functions */ + #ifndef STRING_LIST_H #define STRING_LIST_H @@ -23,6 +13,7 @@ /* * External forward decls */ + struct htsmsg; /// Simple _sorted_ string list type and helper functions. diff --git a/src/subscriptions.c b/src/subscriptions.c index 08f490e1d..d73694c66 100644 --- a/src/subscriptions.c +++ b/src/subscriptions.c @@ -1,19 +1,8 @@ /* - * tvheadend, transport and subscription functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, transport and subscription functions */ #include "tvheadend.h" diff --git a/src/subscriptions.h b/src/subscriptions.h index 1416f3747..80f3376b6 100644 --- a/src/subscriptions.h +++ b/src/subscriptions.h @@ -1,19 +1,8 @@ /* - * tvheadend, subscription functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, subscription functions */ #ifndef SUBSCRIPTIONS_H diff --git a/src/tcp.c b/src/tcp.c index 0c86146a8..3c17b418b 100644 --- a/src/tcp.c +++ b/src/tcp.c @@ -1,19 +1,8 @@ /* - * tvheadend, TCP common functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, TCP common functions */ #include @@ -48,6 +37,7 @@ th_pipe_t tcp_server_pipe; /** * */ + int socket_set_dscp(int sockfd, uint32_t dscp, char *errbuf, size_t errbufsize) { @@ -66,6 +56,7 @@ socket_set_dscp(int sockfd, uint32_t dscp, char *errbuf, size_t errbufsize) /** * */ + int ip_check_is_local_address (const struct sockaddr_storage *peer, const struct sockaddr_storage *local, @@ -108,6 +99,7 @@ ip_check_is_local_address /** * */ + int tcp_connect(const char *hostname, int port, const char *bindaddr, char *errbuf, size_t errbufsize, int timeout) @@ -254,6 +246,7 @@ error: /** * */ + int tcp_write_queue(int fd, htsbuf_queue_t *q) { @@ -277,6 +270,7 @@ tcp_write_queue(int fd, htsbuf_queue_t *q) /** * */ + static int tcp_fill_htsbuf_from_fd(int fd, htsbuf_queue_t *hq) { @@ -325,6 +319,7 @@ tcp_fill_htsbuf_from_fd(int fd, htsbuf_queue_t *hq) /** * */ + char * tcp_read_line(int fd, htsbuf_queue_t *spill) { @@ -355,6 +350,7 @@ tcp_read_line(int fd, htsbuf_queue_t *spill) /** * */ + int tcp_read_data(int fd, char *buf, const size_t bufsize, htsbuf_queue_t *spill) { @@ -373,6 +369,7 @@ tcp_read_data(int fd, char *buf, const size_t bufsize, htsbuf_queue_t *spill) /** * */ + int tcp_read(int fd, void *buf, size_t len) { @@ -389,6 +386,7 @@ tcp_read(int fd, void *buf, size_t len) /** * */ + int tcp_read_timeout(int fd, void *buf, size_t len, int timeout) { @@ -434,6 +432,7 @@ tcp_read_timeout(int fd, void *buf, size_t len, int timeout) /** * */ + int tcp_socket_dead(int fd) { @@ -457,6 +456,7 @@ tcp_socket_dead(int fd) /** * */ + char * tcp_get_str_from_ip(const struct sockaddr_storage *sa, char *dst, size_t maxlen) { @@ -482,6 +482,7 @@ tcp_get_str_from_ip(const struct sockaddr_storage *sa, char *dst, size_t maxlen) /** * */ + struct sockaddr_storage * tcp_get_ip_from_str(const char *src, struct sockaddr_storage *sa) { @@ -506,6 +507,7 @@ tcp_get_ip_from_str(const char *src, struct sockaddr_storage *sa) /** * */ + static tvhpoll_t *tcp_server_poll; static uint32_t tcp_server_launch_id; @@ -542,6 +544,7 @@ static LIST_HEAD(, tcp_server_launch) tcp_server_join = { 0 }; /** * */ + uint32_t tcp_connection_count(access_t *aa) { @@ -562,6 +565,7 @@ tcp_connection_count(access_t *aa) /** * */ + void * tcp_connection_launch (int fd, int streaming, void (*status) (void *opaque, htsmsg_t *m), access_t *aa) @@ -630,6 +634,7 @@ try_again: /** * */ + void tcp_connection_land(void *tcp_id) { @@ -650,6 +655,7 @@ tcp_connection_land(void *tcp_id) /** * */ + void tcp_connection_cancel(uint32_t id) { @@ -668,6 +674,7 @@ tcp_connection_cancel(uint32_t id) /** * */ + void tcp_connection_cancel_all(void) { @@ -683,6 +690,7 @@ tcp_connection_cancel_all(void) /* * */ + static void * tcp_server_start(void *aux) { @@ -737,6 +745,7 @@ tcp_server_start(void *aux) /** * */ + static void * tcp_server_loop(void *aux) { @@ -826,6 +835,7 @@ next: /** * */ + #if ENABLE_LIBSYSTEMD_DAEMON static void *tcp_server_create_new #else @@ -913,6 +923,7 @@ void *tcp_server_create /** * */ + void * tcp_server_create (int subsystem, const char *name, const char *bindaddr, @@ -984,6 +995,7 @@ tcp_server_create /** * */ + void tcp_server_register(void *server) { tcp_server_t *ts = server; @@ -997,6 +1009,7 @@ void tcp_server_register(void *server) /** * */ + void tcp_server_delete(void *server) { @@ -1016,6 +1029,7 @@ tcp_server_delete(void *server) /** * */ + int tcp_default_ip_addr ( struct sockaddr_storage *deflt, int family ) { @@ -1065,6 +1079,7 @@ tcp_default_ip_addr ( struct sockaddr_storage *deflt, int family ) /** * */ + int tcp_server_bound ( void *server, struct sockaddr_storage *bound, int family ) { @@ -1101,6 +1116,7 @@ tcp_server_bound ( void *server, struct sockaddr_storage *bound, int family ) /** * */ + int tcp_server_onall ( void *server ) { @@ -1121,6 +1137,7 @@ tcp_server_onall ( void *server ) /* * Connections status */ + htsmsg_t * tcp_server_connections ( void ) { @@ -1159,6 +1176,7 @@ tcp_server_connections ( void ) /* * Connections count */ + int tcp_server_connections_count ( void ) { @@ -1176,6 +1194,7 @@ tcp_server_connections_count ( void ) /** * */ + pthread_t tcp_server_tid; void diff --git a/src/tcp.h b/src/tcp.h index 2ae9c1d39..ee3bab9f7 100644 --- a/src/tcp.h +++ b/src/tcp.h @@ -1,19 +1,8 @@ /* - * tvheadend, TCP common functions - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, TCP common functions */ #ifndef TCP_H_ diff --git a/src/test.h b/src/test.h index 463aa17d6..9d142c2f8 100644 --- a/src/test.h +++ b/src/test.h @@ -3,6 +3,7 @@ #include /* Parent */ + typedef struct obj_a { idnode_t a_id; @@ -18,6 +19,7 @@ typedef struct obj_a extern const idclass_t obj_a_class; /* Child */ + typedef struct obj_b { obj_a_t; diff --git a/src/timeshift.c b/src/timeshift.c index be5655318..da588b375 100644 --- a/src/timeshift.c +++ b/src/timeshift.c @@ -1,19 +1,6 @@ -/** - * TV headend - Timeshift - * Copyright (C) 2012 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton */ #include "tvheadend.h" diff --git a/src/timeshift.h b/src/timeshift.h index a97621cb5..9e723878f 100644 --- a/src/timeshift.h +++ b/src/timeshift.h @@ -1,19 +1,8 @@ /* - * TV headend - Timeshift - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - Timeshift */ #ifndef __TVH_TIMESHIFT_H__ diff --git a/src/timeshift/private.h b/src/timeshift/private.h index c6a5609f2..ea9cb9381 100644 --- a/src/timeshift/private.h +++ b/src/timeshift/private.h @@ -1,19 +1,8 @@ /* - * TV headend - Timeshift - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - Timeshift */ #ifndef __TVH_TIMESHIFT_PRIVATE_H__ @@ -26,6 +15,7 @@ /** * Indexes of import data in the stream */ + typedef struct timeshift_index_iframe { off_t pos; ///< Position in the file @@ -38,6 +28,7 @@ typedef TAILQ_HEAD(timeshift_index_iframe_list,timeshift_index_iframe) timeshift /** * Indexes of import data in the stream */ + typedef struct timeshift_index_data { off_t pos; ///< Position in the file @@ -50,6 +41,7 @@ typedef TAILQ_HEAD(timeshift_index_data_list,timeshift_index_data) timeshift_ind /** * Timeshift file */ + typedef struct timeshift_file { int wfd; ///< Write descriptor @@ -82,6 +74,7 @@ typedef TAILQ_HEAD(timeshift_file_list,timeshift_file) timeshift_file_list_t; /** * */ + typedef struct timeshift_seek { timeshift_file_t *file; timeshift_index_iframe_t *frame; @@ -90,6 +83,7 @@ typedef struct timeshift_seek { /** * */ + typedef struct timeshift { // Note: input MUST BE FIRST in struct streaming_target_t input; ///< Input source @@ -142,6 +136,7 @@ typedef struct timeshift { /* * */ + extern uint64_t timeshift_total_size; extern uint64_t timeshift_total_ram_size; @@ -158,6 +153,7 @@ static inline void timeshift_packet_log /* * Write functions */ + ssize_t timeshift_write_start ( timeshift_file_t *tsf, int64_t time, streaming_start_t *ss ); ssize_t timeshift_write_sigstat ( timeshift_file_t *tsf, int64_t time, signal_status_t *ss ); ssize_t timeshift_write_packet ( timeshift_file_t *tsf, int64_t time, th_pkt_t *pkt ); @@ -171,12 +167,14 @@ ssize_t timeshift_write_eof ( timeshift_file_t *tsf ); /* * Threads */ + void *timeshift_reader ( void *p ); void *timeshift_writer ( void *p ); /* * File management */ + void timeshift_filemgr_init ( void ); void timeshift_filemgr_term ( void ); int timeshift_filemgr_makedirs ( int ts_index, char *buf, size_t len ); diff --git a/src/timeshift/timeshift_filemgr.c b/src/timeshift/timeshift_filemgr.c index e82e2cf33..a9f6d10d5 100644 --- a/src/timeshift/timeshift_filemgr.c +++ b/src/timeshift/timeshift_filemgr.c @@ -1,19 +1,8 @@ /* - * TV headend - Timeshift File Manager - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - Timeshift File Manager */ #include diff --git a/src/timeshift/timeshift_reader.c b/src/timeshift/timeshift_reader.c index 6339a9485..58a443bfd 100644 --- a/src/timeshift/timeshift_reader.c +++ b/src/timeshift/timeshift_reader.c @@ -1,19 +1,6 @@ -/** - * TV headend - Timeshift Reader - * Copyright (C) 2012 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton */ #include "tvheadend.h" diff --git a/src/timeshift/timeshift_writer.c b/src/timeshift/timeshift_writer.c index 9c6591c37..4e93a78fd 100644 --- a/src/timeshift/timeshift_writer.c +++ b/src/timeshift/timeshift_writer.c @@ -1,19 +1,6 @@ -/** - * TV headend - Timeshift Write Handler - * Copyright (C) 2012 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton */ #include "tvheadend.h" diff --git a/src/tprofile.c b/src/tprofile.c index 5d9aeaacb..60395f381 100644 --- a/src/tprofile.c +++ b/src/tprofile.c @@ -1,19 +1,8 @@ /* - * tvheadend, Gather timing statistics - profiling - * Copyright (C) 2018 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2018 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Gather timing statistics - profiling */ #include diff --git a/src/tprofile.h b/src/tprofile.h index ddfba6e9a..64934fcb4 100644 --- a/src/tprofile.h +++ b/src/tprofile.h @@ -1,19 +1,8 @@ /* - * tvheadend, Gather timing statistics - profiling - * Copyright (C) 2018 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2018 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Gather timing statistics - profiling */ #ifndef __TVH_TPROFILE_H__ diff --git a/src/transcoding/codec.h b/src/transcoding/codec.h index 97a25e498..e3da29318 100644 --- a/src/transcoding/codec.h +++ b/src/transcoding/codec.h @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #ifndef TVH_TRANSCODING_CODEC_H__ #define TVH_TRANSCODING_CODEC_H__ diff --git a/src/transcoding/codec/codec.c b/src/transcoding/codec/codec.c index 6e5d1e3e7..532d7d5de 100644 --- a/src/transcoding/codec/codec.c +++ b/src/transcoding/codec/codec.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "internals.h" #if ENABLE_VAAPI diff --git a/src/transcoding/codec/codecs/aac.c b/src/transcoding/codec/codecs/aac.c index 63239083a..c3d76ee16 100644 --- a/src/transcoding/codec/codecs/aac.c +++ b/src/transcoding/codec/codecs/aac.c @@ -1,27 +1,15 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" /* aac ====================================================================== */ + // see aacenc_profiles[] ffmpeg-7.0/libavcodec/aacenctab.h + AV_PROFILE_UNKNOWN static const AVProfile aac_profiles[] = { { FF_AV_PROFILE_AAC_MAIN, "Main" }, diff --git a/src/transcoding/codec/codecs/flac.c b/src/transcoding/codec/codecs/flac.c index 3bb62c454..9bf9b7083 100644 --- a/src/transcoding/codec/codecs/flac.c +++ b/src/transcoding/codec/codecs/flac.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" diff --git a/src/transcoding/codec/codecs/libs/libfdk_aac.c b/src/transcoding/codec/codecs/libs/libfdk_aac.c index 6aeeb43d2..08602bd8c 100644 --- a/src/transcoding/codec/codecs/libs/libfdk_aac.c +++ b/src/transcoding/codec/codecs/libs/libfdk_aac.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" diff --git a/src/transcoding/codec/codecs/libs/libopus.c b/src/transcoding/codec/codecs/libs/libopus.c index 0efdca617..291260d47 100644 --- a/src/transcoding/codec/codecs/libs/libopus.c +++ b/src/transcoding/codec/codecs/libs/libopus.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" #include diff --git a/src/transcoding/codec/codecs/libs/libtheora.c b/src/transcoding/codec/codecs/libs/libtheora.c index cc64ed0af..3c8b37a6e 100644 --- a/src/transcoding/codec/codecs/libs/libtheora.c +++ b/src/transcoding/codec/codecs/libs/libtheora.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" diff --git a/src/transcoding/codec/codecs/libs/libvorbis.c b/src/transcoding/codec/codecs/libs/libvorbis.c index cc66aad3a..33d329ce7 100644 --- a/src/transcoding/codec/codecs/libs/libvorbis.c +++ b/src/transcoding/codec/codecs/libs/libvorbis.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" diff --git a/src/transcoding/codec/codecs/libs/libvpx.c b/src/transcoding/codec/codecs/libs/libvpx.c index ee9445f3c..3d4a91fa1 100644 --- a/src/transcoding/codec/codecs/libs/libvpx.c +++ b/src/transcoding/codec/codecs/libs/libvpx.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" #include diff --git a/src/transcoding/codec/codecs/libs/libx26x.c b/src/transcoding/codec/codecs/libs/libx26x.c index abe3ca443..5db83f23b 100644 --- a/src/transcoding/codec/codecs/libs/libx26x.c +++ b/src/transcoding/codec/codecs/libs/libx26x.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" diff --git a/src/transcoding/codec/codecs/libs/nvenc.c b/src/transcoding/codec/codecs/libs/nvenc.c index 914fb5ac2..cef1ba7c6 100644 --- a/src/transcoding/codec/codecs/libs/nvenc.c +++ b/src/transcoding/codec/codecs/libs/nvenc.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Tvheadend * - * Copyright (C) 2017 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" #include #include diff --git a/src/transcoding/codec/codecs/libs/omx.c b/src/transcoding/codec/codecs/libs/omx.c index 916fcddbb..c459c8309 100644 --- a/src/transcoding/codec/codecs/libs/omx.c +++ b/src/transcoding/codec/codecs/libs/omx.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" diff --git a/src/transcoding/codec/codecs/libs/vaapi.c b/src/transcoding/codec/codecs/libs/vaapi.c index 1cc77fae3..d1dedf692 100644 --- a/src/transcoding/codec/codecs/libs/vaapi.c +++ b/src/transcoding/codec/codecs/libs/vaapi.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" #include #include diff --git a/src/transcoding/codec/codecs/mp2.c b/src/transcoding/codec/codecs/mp2.c index e26ad3eb8..c8cff9a27 100644 --- a/src/transcoding/codec/codecs/mp2.c +++ b/src/transcoding/codec/codecs/mp2.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" diff --git a/src/transcoding/codec/codecs/mpeg2video.c b/src/transcoding/codec/codecs/mpeg2video.c index d50601f87..682e0c5df 100644 --- a/src/transcoding/codec/codecs/mpeg2video.c +++ b/src/transcoding/codec/codecs/mpeg2video.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" diff --git a/src/transcoding/codec/codecs/vorbis.c b/src/transcoding/codec/codecs/vorbis.c index 17a718c88..1688c77f3 100644 --- a/src/transcoding/codec/codecs/vorbis.c +++ b/src/transcoding/codec/codecs/vorbis.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "transcoding/codec/internals.h" diff --git a/src/transcoding/codec/internals.h b/src/transcoding/codec/internals.h index f60b77be4..3a349d4f7 100644 --- a/src/transcoding/codec/internals.h +++ b/src/transcoding/codec/internals.h @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #ifndef TVH_TRANSCODING_CODEC_INTERNALS_H__ #define TVH_TRANSCODING_CODEC_INTERNALS_H__ diff --git a/src/transcoding/codec/module.c b/src/transcoding/codec/module.c index bfe624427..edc2a1791 100644 --- a/src/transcoding/codec/module.c +++ b/src/transcoding/codec/module.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "internals.h" diff --git a/src/transcoding/codec/profile.c b/src/transcoding/codec/profile.c index 2e1dff444..1c4a350bd 100644 --- a/src/transcoding/codec/profile.c +++ b/src/transcoding/codec/profile.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "internals.h" #include "settings.h" diff --git a/src/transcoding/codec/profile_audio_class.c b/src/transcoding/codec/profile_audio_class.c index f82a68a0b..05a1d9eb1 100644 --- a/src/transcoding/codec/profile_audio_class.c +++ b/src/transcoding/codec/profile_audio_class.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "internals.h" #include "lang_codes.h" diff --git a/src/transcoding/codec/profile_class.c b/src/transcoding/codec/profile_class.c index c093a43b6..c917c0140 100644 --- a/src/transcoding/codec/profile_class.c +++ b/src/transcoding/codec/profile_class.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "internals.h" #include "access.h" diff --git a/src/transcoding/codec/profile_video_class.c b/src/transcoding/codec/profile_video_class.c index 20f87dd6e..7fe0c8575 100644 --- a/src/transcoding/codec/profile_video_class.c +++ b/src/transcoding/codec/profile_video_class.c @@ -1,23 +1,10 @@ /* - * tvheadend - Codec Profiles + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Codec Profiles */ - #include "internals.h" #include diff --git a/src/transcoding/codec/vainfo.c b/src/transcoding/codec/vainfo.c index cca42a13b..69d545a7e 100644 --- a/src/transcoding/codec/vainfo.c +++ b/src/transcoding/codec/vainfo.c @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2023 Tvheadend * - * Copyright (C) 2023 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #include "vainfo.h" #include "internals.h" @@ -574,4 +561,4 @@ int vainfo_encoder_maxQuality(int codec) void vainfo_deinit() { // this function should not be called -} \ No newline at end of file +} diff --git a/src/transcoding/codec/vainfo.h b/src/transcoding/codec/vainfo.h index 21d2a4dce..0690110ee 100644 --- a/src/transcoding/codec/vainfo.h +++ b/src/transcoding/codec/vainfo.h @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2023 Tvheadend * - * Copyright (C) 2023 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #ifndef TVH_TRANSCODING_TRANSCODE_CODEC_VAINFO_H__ #define TVH_TRANSCODING_TRANSCODE_CODEC_VAINFO_H__ @@ -29,6 +16,7 @@ * Will not print output with detected codec/profiles * */ + #define VAINFO_DONT_SHOW_LOGS 0 /** @@ -38,6 +26,7 @@ * Will print output with detected codec/profiles * */ + #define VAINFO_SHOW_LOGS 1 @@ -46,48 +35,56 @@ * @note * Define used when calling functions for H264 */ + #define VAINFO_H264 1 /** * VAINFO CODEC DEFINE. * @note * Define used when calling functions for H264 low power */ + #define VAINFO_H264_LOW_POWER 2 /** * VAINFO CODEC DEFINE. * @note * Define used when calling functions for HEVC */ + #define VAINFO_HEVC 3 /** * VAINFO CODEC DEFINE. * @note * Define used when calling functions for HEVC low power */ + #define VAINFO_HEVC_LOW_POWER 4 /** * VAINFO CODEC DEFINE. * @note * Define used when calling functions for VP8 */ + #define VAINFO_VP8 5 /** * VAINFO CODEC DEFINE. * @note * Define used when calling functions for VP8 low power */ + #define VAINFO_VP8_LOW_POWER 6 /** * VAINFO CODEC DEFINE. * @note * Define used when calling functions for VP9 */ + #define VAINFO_VP9 7 /** * VAINFO CODEC DEFINE. * @note * Define used when calling functions for VP9 low power */ + #define VAINFO_VP9_LOW_POWER 8 /** @@ -100,6 +97,7 @@ * 0 = no logs generated * */ + int vainfo_init(int show_log); @@ -114,6 +112,7 @@ int vainfo_init(int show_log); * 1 - if encoder is available * */ + int vainfo_encoder_isavailable(int codec); @@ -126,6 +125,7 @@ int vainfo_encoder_isavailable(int codec); * > 0 - if encoder is supporting B frames and how many (MAX = 7) * */ + int vainfo_encoder_maxBfreames(int codec); @@ -138,6 +138,7 @@ int vainfo_encoder_maxBfreames(int codec); * 1 - if encoder is supporting Quality and how much (MAX = 15) * */ + int vainfo_encoder_maxQuality(int codec); @@ -148,6 +149,7 @@ int vainfo_encoder_maxQuality(int codec); * Return all variables to default state * */ + void vainfo_deinit(void); -#endif // TVH_TRANSCODING_TRANSCODE_CODEC_VAINFO_H__ \ No newline at end of file +#endif // TVH_TRANSCODING_TRANSCODE_CODEC_VAINFO_H__ diff --git a/src/transcoding/memutils.c b/src/transcoding/memutils.c index f34eaec90..3fb8588e4 100644 --- a/src/transcoding/memutils.c +++ b/src/transcoding/memutils.c @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #include "memutils.h" #include @@ -105,6 +92,7 @@ str_snprintf(char *str, size_t size, const char *format, ...) /* _IMPORTANT!_: need to check for pb->pb_size and pb->pb_data _BEFORE_ calling pktbuf_copy_data */ + uint8_t * pktbuf_copy_data(pktbuf_t *pb) { diff --git a/src/transcoding/memutils.h b/src/transcoding/memutils.h index 3ca2c9ebe..c0f3c0abc 100644 --- a/src/transcoding/memutils.h +++ b/src/transcoding/memutils.h @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #ifndef TVH_TRANSCODING_MEMUTILS_H__ #define TVH_TRANSCODING_MEMUTILS_H__ @@ -60,6 +47,7 @@ str_snprintf(char *str, size_t size, const char *format, ...); /* _IMPORTANT!_: need to check for pb->pb_size and pb->pb_data _BEFORE_ calling pktbuf_copy_data */ + uint8_t * pktbuf_copy_data(pktbuf_t *pb); diff --git a/src/transcoding/transcode.h b/src/transcoding/transcode.h index 4708919bc..ba875b99f 100644 --- a/src/transcoding/transcode.h +++ b/src/transcoding/transcode.h @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #ifndef TVH_TRANSCODING_TRANSCODE_H__ #define TVH_TRANSCODING_TRANSCODE_H__ diff --git a/src/transcoding/transcode/audio.c b/src/transcoding/transcode/audio.c index 6c6119877..f79b753b5 100644 --- a/src/transcoding/transcode/audio.c +++ b/src/transcoding/transcode/audio.c @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #include "internals.h" diff --git a/src/transcoding/transcode/context.c b/src/transcoding/transcode/context.c index 6d939e8f0..6c270e7e7 100644 --- a/src/transcoding/transcode/context.c +++ b/src/transcoding/transcode/context.c @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #include "internals.h" #include diff --git a/src/transcoding/transcode/helpers.c b/src/transcoding/transcode/helpers.c index 025512f63..22c479972 100644 --- a/src/transcoding/transcode/helpers.c +++ b/src/transcoding/transcode/helpers.c @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #include "internals.h" #include "parsers/parsers.h" diff --git a/src/transcoding/transcode/hwaccels/hwaccels.c b/src/transcoding/transcode/hwaccels/hwaccels.c index 55b772ccb..1f9373afc 100644 --- a/src/transcoding/transcode/hwaccels/hwaccels.c +++ b/src/transcoding/transcode/hwaccels/hwaccels.c @@ -1,20 +1,8 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ #include "hwaccels.h" diff --git a/src/transcoding/transcode/hwaccels/hwaccels.h b/src/transcoding/transcode/hwaccels/hwaccels.h index ed04f6748..983ef083b 100644 --- a/src/transcoding/transcode/hwaccels/hwaccels.h +++ b/src/transcoding/transcode/hwaccels/hwaccels.h @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #ifndef TVH_TRANSCODING_TRANSCODE_HWACCELS_H__ #define TVH_TRANSCODING_TRANSCODE_HWACCELS_H__ diff --git a/src/transcoding/transcode/hwaccels/vaapi.c b/src/transcoding/transcode/hwaccels/vaapi.c index 15473773e..e1710d726 100644 --- a/src/transcoding/transcode/hwaccels/vaapi.c +++ b/src/transcoding/transcode/hwaccels/vaapi.c @@ -1,20 +1,8 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ #include "../../codec/internals.h" diff --git a/src/transcoding/transcode/hwaccels/vaapi.h b/src/transcoding/transcode/hwaccels/vaapi.h index 57417b052..bdd0c2525 100644 --- a/src/transcoding/transcode/hwaccels/vaapi.h +++ b/src/transcoding/transcode/hwaccels/vaapi.h @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #ifndef TVH_TRANSCODING_TRANSCODE_HWACCELS_VAAPI_H__ #define TVH_TRANSCODING_TRANSCODE_HWACCELS_VAAPI_H__ diff --git a/src/transcoding/transcode/internals.h b/src/transcoding/transcode/internals.h index 2bf58b002..1f24cc46c 100644 --- a/src/transcoding/transcode/internals.h +++ b/src/transcoding/transcode/internals.h @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #ifndef TVH_TRANSCODING_TRANSCODE_INTERNALS_H__ #define TVH_TRANSCODING_TRANSCODE_INTERNALS_H__ diff --git a/src/transcoding/transcode/log.h b/src/transcoding/transcode/log.h index db471674c..73a26745c 100644 --- a/src/transcoding/transcode/log.h +++ b/src/transcoding/transcode/log.h @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #ifndef TVH_TRANSCODING_TRANSCODE_LOG_H__ #define TVH_TRANSCODING_TRANSCODE_LOG_H__ diff --git a/src/transcoding/transcode/module.c b/src/transcoding/transcode/module.c index c41d2f9ae..01f16fdc7 100644 --- a/src/transcoding/transcode/module.c +++ b/src/transcoding/transcode/module.c @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #include "transcoding/transcode.h" #include "internals.h" diff --git a/src/transcoding/transcode/stream.c b/src/transcoding/transcode/stream.c index b2b5d20de..6ce8ba6dc 100644 --- a/src/transcoding/transcode/stream.c +++ b/src/transcoding/transcode/stream.c @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #include "internals.h" #include "../codec/internals.h" diff --git a/src/transcoding/transcode/transcoder.c b/src/transcoding/transcode/transcoder.c index 52fe227c6..83579cb99 100644 --- a/src/transcoding/transcode/transcoder.c +++ b/src/transcoding/transcode/transcoder.c @@ -1,23 +1,10 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ - #include "internals.h" #include "../codec/internals.h" #include "service.h" diff --git a/src/transcoding/transcode/video.c b/src/transcoding/transcode/video.c index 92223224c..e90a9f3ed 100644 --- a/src/transcoding/transcode/video.c +++ b/src/transcoding/transcode/video.c @@ -1,20 +1,8 @@ /* - * tvheadend - Transcoding + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Tvheadend * - * Copyright (C) 2016 Tvheadend - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend - Transcoding */ #include "internals.h" diff --git a/src/trap.c b/src/trap.c index 952f55318..64bcec0e7 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,20 +1,8 @@ -/** - * Crash handling - * Copyright (C) 2009 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2009 Andreas Öman */ + #include "build.h" #include "trap.h" @@ -77,6 +65,7 @@ sappend(char *buf, size_t l, const char *fmt, ...) /** * */ + #ifndef ENABLE_LIBUNWIND #if ENABLE_EXECINFO static int @@ -139,6 +128,7 @@ addr2lineresolve(const char *binary, intptr_t addr, char *buf0, size_t buflen) return 0; } #endif /* ENABLE_EXECINFO */ + #endif #if ENABLE_LIBUNWIND @@ -217,6 +207,7 @@ traphandler(int sig, siginfo_t *si, void *UC) * handler often terminates without a trace, or does not provide * correct function name mapping. */ + #if ENABLE_LIBUNWIND traphandler_libunwind(); return; diff --git a/src/trap.h b/src/trap.h index bc40a2844..b89b50de6 100644 --- a/src/trap.h +++ b/src/trap.h @@ -1,19 +1,6 @@ -/** - * Crash handling - * Copyright (C) 2009 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2009 Andreas Öman */ #ifndef TRAP_H__ @@ -22,4 +9,3 @@ void trap_init(const char *swname); #endif /* TRAP_H__ */ - diff --git a/src/tvh_endian.h b/src/tvh_endian.h index c30638f63..e25470bbd 100644 --- a/src/tvh_endian.h +++ b/src/tvh_endian.h @@ -1,18 +1,7 @@ /* - * Copyright (c) 2015 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * SPDX-License-Identifier: GPL-3.0-or-later * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Copyright (c) 2015 Jaroslav Kysela */ #ifndef __TVH_ENDIAN_H diff --git a/src/tvh_locale.c b/src/tvh_locale.c index 7d1420e99..1c1e33016 100644 --- a/src/tvh_locale.c +++ b/src/tvh_locale.c @@ -1,19 +1,8 @@ /* - * tvheadend, internationalization (locale) - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, internationalization (locale) */ #include diff --git a/src/tvh_locale.h b/src/tvh_locale.h index 05564a400..2172c372b 100644 --- a/src/tvh_locale.h +++ b/src/tvh_locale.h @@ -1,20 +1,10 @@ /* - * Tvheadend - internationalization (locale) - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - internationalization (locale) */ + #ifndef __TVH_LOCALE_H__ #define __TVH_LOCALE_H__ diff --git a/src/tvh_string.h b/src/tvh_string.h index 707a01007..a437bdf62 100644 --- a/src/tvh_string.h +++ b/src/tvh_string.h @@ -1,21 +1,11 @@ /* - * Tvheadend - advanced string functions - * Copyright (C) 2007 Andreas Öman - * Copyright (C) 2014-2018 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman + * Copyright (C) 2014-2018 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - advanced string functions */ + #ifndef TVHEADEND_STRING_H #define TVHEADEND_STRING_H diff --git a/src/tvh_thread.c b/src/tvh_thread.c index 6a019d7a0..fca2dfdcb 100644 --- a/src/tvh_thread.c +++ b/src/tvh_thread.c @@ -121,6 +121,7 @@ int tvh_thread_kill(pthread_t thread, int sig) } /* linux style: -19 .. 20 */ + int tvh_thread_renice(int value) { diff --git a/src/tvh_thread.h b/src/tvh_thread.h index 3305ba299..2b5545501 100644 --- a/src/tvh_thread.h +++ b/src/tvh_thread.h @@ -1,20 +1,10 @@ /* - * Tvheadend - mutex functions - * Copyright (C) 2018 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2018 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - mutex functions */ + #ifndef TVHEADEND_THREAD_H #define TVHEADEND_THREAD_H diff --git a/src/tvheadend.h b/src/tvheadend.h index 23f58cbd9..b376bc79c 100644 --- a/src/tvheadend.h +++ b/src/tvheadend.h @@ -1,20 +1,10 @@ /* - * Tvheadend - structures - * Copyright (C) 2007 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2007 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - structures */ + #ifndef TVHEADEND_H #define TVHEADEND_H diff --git a/src/tvhlog.c b/src/tvhlog.c index bc67e40dc..95304d35f 100644 --- a/src/tvhlog.c +++ b/src/tvhlog.c @@ -1,19 +1,8 @@ /* - * Tvheadend - logging - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - logging */ #include diff --git a/src/tvhlog.h b/src/tvhlog.h index 481d362e0..dc29080b8 100644 --- a/src/tvhlog.h +++ b/src/tvhlog.h @@ -1,20 +1,10 @@ /* - * Tvheadend - logging - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - logging */ + #ifndef __TVH_LOGGING_H__ #define __TVH_LOGGING_H__ @@ -43,6 +33,7 @@ typedef struct { } tvhlog_subsys_t; /* Config */ + extern int tvhlog_level; extern char *tvhlog_path; extern int tvhlog_options; @@ -50,6 +41,7 @@ extern tvh_mutex_t tvhlog_mutex; extern tvhlog_subsys_t tvhlog_subsystems[]; /* Initialise */ + void tvhlog_init ( int level, int options, const char *path ); void tvhlog_start ( void ); void tvhlog_end ( void ); @@ -73,6 +65,7 @@ static inline int tvhlog_limit ( tvhlog_limit_t *limit, uint32_t delay ) /* Options */ + #define TVHLOG_OPT_DBG_SYSLOG 0x0001 #define TVHLOG_OPT_DBG_STDERR 0x0002 #define TVHLOG_OPT_DBG_FILE 0x0004 @@ -86,6 +79,7 @@ static inline int tvhlog_limit ( tvhlog_limit_t *limit, uint32_t delay ) #define TVHLOG_OPT_ALL 0xFFFF /* Levels */ + #ifndef LOG_TRACE #define LOG_TRACE (LOG_DEBUG+1) #endif @@ -93,6 +87,7 @@ static inline int tvhlog_limit ( tvhlog_limit_t *limit, uint32_t delay ) #define LOG_TVH_NOTIFY 0x40000000 /* Subsystems */ + enum { LS_NONE, LS_START, @@ -202,9 +197,11 @@ enum { LS_UDP, LS_RATINGLABELS, LS_LAST /* keep this last */ + }; /* Macros */ + #define tvhlog(severity, subsys, fmt, ...)\ _tvhlog(__FILE__, __LINE__, severity | LOG_TVH_NOTIFY, subsys, fmt, ##__VA_ARGS__) #define tvhlog_spawn(severity, subsys, fmt, ...)\ diff --git a/src/tvhpoll.c b/src/tvhpoll.c index 71db7036f..f892bb6f0 100644 --- a/src/tvhpoll.c +++ b/src/tvhpoll.c @@ -1,20 +1,8 @@ /* - * TVheadend - poll/select wrapper + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TVheadend - poll/select wrapper */ #include "tvheadend.h" diff --git a/src/tvhpoll.h b/src/tvhpoll.h index a76970b90..95e5e48cf 100644 --- a/src/tvhpoll.h +++ b/src/tvhpoll.h @@ -1,21 +1,8 @@ - /* - * TVheadend - poll/select wrapper - * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TVheadend - poll/select wrapper */ #ifndef __TVHPOLL_H__ diff --git a/src/tvhregex.h b/src/tvhregex.h index b7b8ec1d3..cb81107ae 100644 --- a/src/tvhregex.h +++ b/src/tvhregex.h @@ -1,19 +1,8 @@ /* - * TVheadend - regex wrapper + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017 Jaroslav Kysela * - * Copyright (C) 2017 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TVheadend - regex wrapper */ #ifndef __TVHREGEX_H__ diff --git a/src/tvhtime.c b/src/tvhtime.c index 82c910da0..0c7fa7e96 100644 --- a/src/tvhtime.c +++ b/src/tvhtime.c @@ -18,7 +18,9 @@ /* * NTP processing */ + #define NTPD_BASE 0x4e545030 /* "NTP0" */ + #define NTPD_UNIT 2 #if !ENABLE_ANDROID @@ -76,6 +78,7 @@ ntp_shm_init ( void ) /* * Update time */ + void tvhtime_update ( time_t utc, const char *srcname ) { @@ -133,6 +136,7 @@ tvhtime_update ( time_t utc, const char *srcname ) } /* Initialise */ + void tvhtime_init ( void ) { if (config.tvhtime_tolerance == 0) diff --git a/src/tvhtime.h b/src/tvhtime.h index 4bff0dd14..7218cfbe2 100644 --- a/src/tvhtime.h +++ b/src/tvhtime.h @@ -1,20 +1,8 @@ /* - * TVheadend - time processing + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TVheadend - time processing */ #ifndef __TVH_TIME_H__ diff --git a/src/tvhvfs.c b/src/tvhvfs.c index 0be2592a3..2fe910665 100644 --- a/src/tvhvfs.c +++ b/src/tvhvfs.c @@ -1,18 +1,7 @@ /* - * Copyright (c) 2017 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * SPDX-License-Identifier: GPL-3.0-or-later * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Copyright (c) 2017 Jaroslav Kysela */ #include "tvheadend.h" diff --git a/src/tvhvfs.h b/src/tvhvfs.h index 5a33672f6..43320df79 100644 --- a/src/tvhvfs.h +++ b/src/tvhvfs.h @@ -1,19 +1,8 @@ /* - * File system management - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * File system management */ #ifndef __TVH_VFS_H__ diff --git a/src/udp.c b/src/udp.c index 40cb8308b..03c49588c 100644 --- a/src/udp.c +++ b/src/udp.c @@ -1,21 +1,9 @@ /* - * TVHeadend - UDP common routines + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton + * Copyright (C) 2014 Jaroslav Kysela * - * Copyright (C) 2013 Adam Sutton - * Copyright (C) 2014 Jaroslav Kysela - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TVHeadend - UDP common routines */ #define _GNU_SOURCE diff --git a/src/udp.h b/src/udp.h index 75328961a..62e265376 100644 --- a/src/udp.h +++ b/src/udp.h @@ -1,20 +1,9 @@ /* - * tvheadend, UDP interface - * Copyright (C) 2013 Adam Sutton - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, UDP interface */ #ifndef UDP_H_ diff --git a/src/udp_stream.c b/src/udp_stream.c index 48842a992..0686421ca 100644 --- a/src/udp_stream.c +++ b/src/udp_stream.c @@ -1,20 +1,8 @@ /* - * TVHeadend - UDP stream common routines + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2019 Stephane Duperron * - * Copyright (C) 2019 Stephane Duperron - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TVHeadend - UDP stream common routines */ #define _GNU_SOURCE @@ -263,4 +251,4 @@ udp_stream_shutdown (udp_stream_t *us) } atomic_set(&us->us_running, 0); return pthread_join(us->us_tid, NULL); -} \ No newline at end of file +} diff --git a/src/udp_stream.h b/src/udp_stream.h index 64bbea0e2..bd2dd59d5 100644 --- a/src/udp_stream.h +++ b/src/udp_stream.h @@ -1,19 +1,8 @@ /* - * tvheadend, UDP stream interface - * Copyright (C) 2019 Stephane Duperron + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2019 Stephane Duperron * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, UDP stream interface */ #ifndef UDP_STREAM_H_ diff --git a/src/upnp.c b/src/upnp.c index 51dac4291..a2d6cbb08 100644 --- a/src/upnp.c +++ b/src/upnp.c @@ -1,19 +1,8 @@ /* - * tvheadend, UPnP interface - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, UPnP interface */ #include "tvheadend.h" @@ -53,6 +42,7 @@ static struct sockaddr_storage upnp_ipv4_multicast; /* * */ + upnp_service_t *upnp_service_create0( upnp_service_t *us ) { tvh_mutex_lock(&upnp_lock); @@ -73,6 +63,7 @@ void upnp_service_destroy( upnp_service_t *us ) /* * */ + void upnp_send( htsbuf_queue_t *q, struct sockaddr_storage *storage, int delay_ms, int from_multicast ) @@ -98,6 +89,7 @@ upnp_send( htsbuf_queue_t *q, struct sockaddr_storage *storage, /* * */ + static void upnp_dump_data( upnp_data_t *data ) { @@ -112,6 +104,7 @@ upnp_dump_data( upnp_data_t *data ) /* * Discovery thread */ + static void * upnp_thread( void *aux ) { @@ -220,6 +213,7 @@ error: /* * Fire up UPnP server */ + void upnp_server_init(const char *bindaddr) { diff --git a/src/upnp.h b/src/upnp.h index c2f6726cd..a7bf42fca 100644 --- a/src/upnp.h +++ b/src/upnp.h @@ -1,19 +1,8 @@ /* - * tvheadend, UPnP interface - * Copyright (C) 2014 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, UPnP interface */ #ifndef UPNP_H_ diff --git a/src/url.c b/src/url.c index 77a1eaaf8..389aaffea 100644 --- a/src/url.c +++ b/src/url.c @@ -1,20 +1,8 @@ /* - * Tvheadend - URL Processing + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - URL Processing */ #include "tvheadend.h" diff --git a/src/url.h b/src/url.h index f4859c1a9..7b19ba96a 100644 --- a/src/url.h +++ b/src/url.h @@ -1,20 +1,8 @@ /* - * Tvheadend - URL Processing + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend - URL Processing */ #ifndef __TVH_URL_H__ @@ -24,6 +12,7 @@ #include /* URL structure */ + typedef struct url { char *scheme; diff --git a/src/utils.c b/src/utils.c index bc6401d22..9a9ced2ec 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,20 +1,9 @@ /* + * SPDX-License-Identifier: GPL-3.0-or-later + * * Copyright (c) 2005 Michael Niedermayer * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com) * Copyright (c) 2010 Andreas Öman - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . */ #include diff --git a/src/uuid.c b/src/uuid.c index acbdfd4dd..98266e8f3 100644 --- a/src/uuid.c +++ b/src/uuid.c @@ -1,20 +1,8 @@ /* - * TV headend - UUID generation routines + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Adam Sutton * - * Copyright (C) 2014 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - UUID generation routines */ #include "tvheadend.h" diff --git a/src/uuid.h b/src/uuid.h index ebadbb20c..b97b98035 100644 --- a/src/uuid.h +++ b/src/uuid.h @@ -1,20 +1,8 @@ /* - * TV headend - UUID generation routines + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2014 Adam Sutton * - * Copyright (C) 2014 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - UUID generation routines */ #ifndef __TVH_UUID_H__ @@ -29,11 +17,13 @@ extern uint8_t ___uuid_empty[UUID_BIN_SIZE]; /* Structure to hold UUID */ + typedef struct uuid { uint8_t bin[UUID_BIN_SIZE]; } tvh_uuid_t; /* Structure for the uuid set */ + typedef struct uuid_set { tvh_uuid_t *us_array; uint32_t us_count; @@ -42,20 +32,25 @@ typedef struct uuid_set { } tvh_uuid_set_t; /* Initialise subsystem */ + void uuid_init ( void ); /* Random bytes */ + void uuid_random ( uint8_t *buf, size_t bufsize ); /* Set uuid */ + int uuid_set ( tvh_uuid_t *u, const char *str ); /* Get hexa uuid, str must have length at least UUID_HEX_SIZE */ + char *uuid_get_hex ( const tvh_uuid_t *u, char *dst ); /** * Copy */ + static inline void uuid_duplicate ( tvh_uuid_t *dst, const tvh_uuid_t *src ) { *dst = *src; @@ -64,6 +59,7 @@ static inline void uuid_duplicate ( tvh_uuid_t *dst, const tvh_uuid_t *src ) /** * Compare */ + static inline int uuid_cmp ( const tvh_uuid_t *a, const tvh_uuid_t *b ) { return memcmp(a->bin, b->bin, UUID_BIN_SIZE); @@ -72,6 +68,7 @@ static inline int uuid_cmp ( const tvh_uuid_t *a, const tvh_uuid_t *b ) /** * Empty */ + static inline int uuid_empty ( const tvh_uuid_t *a ) { return memcmp(a->bin, ___uuid_empty, UUID_BIN_SIZE) == 0; @@ -80,42 +77,50 @@ static inline int uuid_empty ( const tvh_uuid_t *a ) /** * Validate the hexadecimal representation of uuid */ + int uuid_hexvalid ( const char *uuid ); /** * */ + void uuid_set_init( tvh_uuid_set_t *us, uint32_t alloc_chunk ); /** * */ + tvh_uuid_set_t *uuid_set_copy( tvh_uuid_set_t *dst, const tvh_uuid_set_t *src ); /** * */ + tvh_uuid_t *uuid_set_add( tvh_uuid_set_t *us, const tvh_uuid_t *u ); /** * */ + void uuid_set_free( tvh_uuid_set_t *us ); /** * */ + void uuid_set_destroy( tvh_uuid_set_t *us ); /** * */ + static inline int uuid_set_empty( tvh_uuid_set_t *us ) { return us->us_count == 0; } /** * */ + #define UUID_SET_FOREACH(u, us, u32) \ if ((us)->us_count > 0) \ for ((u32) = 0, (u) = (us)->us_array; \ @@ -124,11 +129,13 @@ static inline int uuid_set_empty( tvh_uuid_set_t *us ) /** * Hex string to binary */ + int hex2bin ( uint8_t *buf, size_t buflen, const char *hex ); /** * Binary to hex string */ + char *bin2hex ( char *dst, size_t dstlen, const uint8_t *src, size_t srclen ); #endif /* __TVH_UUID_H__ */ diff --git a/src/watchdog.c b/src/watchdog.c index 9fcb4d857..e8a1097fb 100644 --- a/src/watchdog.c +++ b/src/watchdog.c @@ -1,19 +1,8 @@ /* - * tvheadend, systemd watchdog support - * Copyright (C) 2017-2018 Erkki Seppälä + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017-2018 Erkki Seppälä * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, systemd watchdog support */ #include "watchdog.h" diff --git a/src/watchdog.h b/src/watchdog.h index 68af82831..ee77adc4d 100644 --- a/src/watchdog.h +++ b/src/watchdog.h @@ -1,19 +1,8 @@ /* - * tvheadend, systemd watchdog support - * Copyright (C) 2017-2018 Erkki Seppälä + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2017-2018 Erkki Seppälä * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, systemd watchdog support */ #ifndef WATCHDOG_H_ diff --git a/src/webui/comet.c b/src/webui/comet.c index def64844b..3d8417530 100644 --- a/src/webui/comet.c +++ b/src/webui/comet.c @@ -1,19 +1,8 @@ /* - * tvheadend, COMET - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, COMET */ #include diff --git a/src/webui/doc_md.c b/src/webui/doc_md.c index e4f776cfe..5433adfcc 100644 --- a/src/webui/doc_md.c +++ b/src/webui/doc_md.c @@ -1,19 +1,8 @@ /* - * tvheadend, documenation markdown generator - * Copyright (C) 2016 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2016 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, documenation markdown generator */ #include "tvheadend.h" @@ -27,6 +16,7 @@ static int md_class(htsbuf_queue_t *hq, const char *clazz, const char *lang, int hdr, int docs, int props); /* */ + static int md_nl(htsbuf_queue_t *hq, int nl) { @@ -36,6 +26,7 @@ md_nl(htsbuf_queue_t *hq, int nl) } /* */ + static void md_header(htsbuf_queue_t *hq, const char *prefix, const char *s) { @@ -45,6 +36,7 @@ md_header(htsbuf_queue_t *hq, const char *prefix, const char *s) } /* */ + static void md_style(htsbuf_queue_t *hq, const char *style, const char *s) { @@ -55,6 +47,7 @@ md_style(htsbuf_queue_t *hq, const char *style, const char *s) } /* */ + static void md_text(htsbuf_queue_t *hq, const char *first, const char *next, const char *text) { @@ -95,6 +88,7 @@ md_text(htsbuf_queue_t *hq, const char *first, const char *next, const char *tex } /* */ + static int md_props(htsbuf_queue_t *hq, htsmsg_t *m, const char *lang, int nl) { @@ -164,6 +158,7 @@ md_props(htsbuf_queue_t *hq, htsmsg_t *m, const char *lang, int nl) } /* */ + static void md_render(htsbuf_queue_t *hq, const char *doc, const char *lang) { @@ -194,6 +189,7 @@ md_render(htsbuf_queue_t *hq, const char *doc, const char *lang) } /* */ + static int md_doc(htsbuf_queue_t *hq, const char **doc, const char *lang, int nl) { @@ -207,6 +203,7 @@ md_doc(htsbuf_queue_t *hq, const char **doc, const char *lang, int nl) } /* */ + static int md_class(htsbuf_queue_t *hq, const char *clazz, const char *lang, int hdr, int docs, int props) @@ -243,6 +240,7 @@ md_class(htsbuf_queue_t *hq, const char *clazz, const char *lang, /** * List of all classes with documentation */ + static int http_markdown_classes(http_connection_t *hc) { @@ -272,6 +270,7 @@ http_markdown_classes(http_connection_t *hc) /** * */ + static int http_markdown_class(http_connection_t *hc, const char *clazz) { @@ -284,6 +283,7 @@ http_markdown_class(http_connection_t *hc, const char *clazz) /** * */ + static int http_markdown_page(http_connection_t *hc, const struct tvh_doc_page *page) { @@ -300,6 +300,7 @@ http_markdown_page(http_connection_t *hc, const struct tvh_doc_page *page) /** * Handle requests for markdown export. */ + int page_markdown(http_connection_t *hc, const char *remain, void *opaque) { diff --git a/src/webui/extjs.c b/src/webui/extjs.c index 73b338a21..88273cd29 100644 --- a/src/webui/extjs.c +++ b/src/webui/extjs.c @@ -1,19 +1,8 @@ /* - * tvheadend, EXTJS based interface - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, EXTJS based interface */ #include "htsmsg.h" @@ -29,6 +18,7 @@ /** * */ + static void extjs_load(htsbuf_queue_t *hq, const char *script, ...) { @@ -45,6 +35,7 @@ extjs_load(htsbuf_queue_t *hq, const char *script, ...) /** * */ + static void extjs_lcss(htsbuf_queue_t *hq, const char *css, ...) { @@ -62,6 +53,7 @@ extjs_lcss(htsbuf_queue_t *hq, const char *css, ...) /** * */ + static void extjs_exec(htsbuf_queue_t *hq, const char *fmt, ...) { @@ -79,6 +71,7 @@ extjs_exec(htsbuf_queue_t *hq, const char *fmt, ...) /** * EXTJS root page */ + static int extjs_root(http_connection_t *hc, const char *remain, void *opaque) { @@ -141,6 +134,7 @@ Ext.onReady(tvheadend.app.init, tvheadend.app);\ /** * */ + static int extjs_livetv(http_connection_t *hc, const char *remain, void *opaque) { @@ -179,6 +173,7 @@ extjs_livetv(http_connection_t *hc, const char *remain, void *opaque) /** * */ + static int page_about(http_connection_t *hc, const char *remain, void *opaque) { @@ -236,6 +231,7 @@ FamFamFam, "\ /** * WEB user interface */ + void extjs_start(void) { diff --git a/src/webui/html.c b/src/webui/html.c index fc7a56c02..0be524fcd 100644 --- a/src/webui/html.c +++ b/src/webui/html.c @@ -1,19 +1,8 @@ /* - * tvheadend, HTML/XML helper routines - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, HTML/XML helper routines */ #include @@ -22,6 +11,7 @@ #include "hts_strtab.h" /* Escape chars */ + static struct { char chr; const char *esc; @@ -46,6 +36,7 @@ static const char *html_escape_char ( const char chr ) * Escape characters that will interfere with xml. * Count how many bytes str would contain if it would be rss escapped */ + size_t html_escaped_len(const char *src) { @@ -65,6 +56,7 @@ html_escaped_len(const char *src) /* * http (xml) escape a string */ + const char* html_escape(char *dst, const char *src, size_t len) { diff --git a/src/webui/simpleui.c b/src/webui/simpleui.c index 16b808f75..f28848ecf 100644 --- a/src/webui/simpleui.c +++ b/src/webui/simpleui.c @@ -1,19 +1,8 @@ /* - * tvheadend, WEBUI / HTML user interface - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, WEBUI / HTML user interface */ #include "tvheadend.h" diff --git a/src/webui/statedump.c b/src/webui/statedump.c index ea2bb033e..b37719582 100644 --- a/src/webui/statedump.c +++ b/src/webui/statedump.c @@ -1,19 +1,8 @@ /* - * Tvheadend, Statedump - * Copyright (C) 2010 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2010 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Tvheadend, Statedump */ #include "tvheadend.h" @@ -169,4 +158,3 @@ page_statedump(http_connection_t *hc, const char *remain, void *opaque) http_output_content(hc, "text/plain; charset=UTF-8"); return 0; } - diff --git a/src/webui/webui.c b/src/webui/webui.c index d2669389d..cb38149fa 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -1,20 +1,9 @@ /* - * tvheadend, WEBUI / HTML user interface - * Copyright (C) 2008 Andreas Öman - * Copyright (C) 2014,2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman + * Copyright (C) 2014,2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, WEBUI / HTML user interface */ #include diff --git a/src/webui/webui.h b/src/webui/webui.h index 003a778d8..8d9832c43 100644 --- a/src/webui/webui.h +++ b/src/webui/webui.h @@ -1,19 +1,8 @@ /* - * tvheadend, web user interface - * Copyright (C) 2008 Andreas Öman + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2008 Andreas Öman * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, web user interface */ #ifndef WEBUI_H_ @@ -61,6 +50,7 @@ void webui_api_init ( void ); /** * */ + void comet_init(void); void comet_done(void); diff --git a/src/webui/webui_api.c b/src/webui/webui_api.c index 718fbcce7..9c485d54b 100644 --- a/src/webui/webui_api.c +++ b/src/webui/webui_api.c @@ -1,20 +1,8 @@ /* - * tvheadend, WebAPI access point + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2013 Adam Sutton * - * Copyright (C) 2013 Adam Sutton - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, WebAPI access point */ #include "tvheadend.h" diff --git a/src/webui/xmltv.c b/src/webui/xmltv.c index d7e260373..7631e6d60 100644 --- a/src/webui/xmltv.c +++ b/src/webui/xmltv.c @@ -1,19 +1,8 @@ /* - * tvheadend, XMLTV exporter - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, XMLTV exporter */ #include "tvheadend.h" @@ -30,6 +19,7 @@ /* * */ + static void http_xmltv_time(char *dst, time_t t) { @@ -41,6 +31,7 @@ http_xmltv_time(char *dst, time_t t) /* * */ + static void http_xmltv_begin(htsbuf_queue_t *hq) { @@ -57,6 +48,7 @@ http_xmltv_begin(htsbuf_queue_t *hq) /* * */ + static void http_xmltv_end(htsbuf_queue_t *hq) { @@ -75,6 +67,7 @@ http_xmltv_end(htsbuf_queue_t *hq) * be the same as the passed in temporary buffer. * */ + static const char * http_xmltv_channel_get_name(const http_connection_t *hc, const channel_t *ch, @@ -93,6 +86,7 @@ http_xmltv_channel_get_name(const http_connection_t *hc, /* * */ + static void http_xmltv_channel_add(http_connection_t *hc, htsbuf_queue_t *hq, int flags, const char *hostpath, channel_t *ch) { @@ -177,6 +171,7 @@ _http_xmltv_add_episode_num(htsbuf_queue_t *hq, uint16_t num, uint16_t cnt) /** Output long description fields of the programme which are * not output for basic/limited devices. */ + static void http_xmltv_programme_one_long(const http_connection_t *hc, htsbuf_queue_t *hq, const char *hostpath, @@ -289,6 +284,7 @@ http_xmltv_programme_one_long(const http_connection_t *hc, /* * */ + static void http_xmltv_programme_one(const http_connection_t *hc, htsbuf_queue_t *hq, const char *hostpath, @@ -339,6 +335,7 @@ http_xmltv_programme_one(const http_connection_t *hc, /* * */ + static void http_xmltv_programme_add(const http_connection_t *hc, htsbuf_queue_t *hq, const char *hostpath, channel_t *ch) { @@ -351,6 +348,7 @@ http_xmltv_programme_add(const http_connection_t *hc, htsbuf_queue_t *hq, const /** * Output a XMLTV containing a single channel */ + static int http_xmltv_channel(http_connection_t *hc, int flags, channel_t *channel) { @@ -371,6 +369,7 @@ http_xmltv_channel(http_connection_t *hc, int flags, channel_t *channel) /** * Output a playlist containing all channels with a specific tag */ + static int http_xmltv_tag(http_connection_t *hc, int flags, channel_tag_t *tag) { @@ -404,6 +403,7 @@ http_xmltv_tag(http_connection_t *hc, int flags, channel_tag_t *tag) /** * Output a flat playlist with all channels */ + static int http_xmltv_channel_list(http_connection_t *hc, int flags) { @@ -434,6 +434,7 @@ http_xmltv_channel_list(http_connection_t *hc, int flags) /** * Handle requests for XMLTV export. */ + int page_xmltv(http_connection_t *hc, const char *remain, void *opaque) { diff --git a/src/wizard.c b/src/wizard.c index 6ceded5f0..0a190f186 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -1,19 +1,8 @@ /* - * tvheadend, Wizard - * Copyright (C) 2015,2016 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015,2016 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Wizard */ /* diff --git a/src/wizard.h b/src/wizard.h index 7fcc186a3..eb7a4676d 100644 --- a/src/wizard.h +++ b/src/wizard.h @@ -1,19 +1,8 @@ /* - * tvheadend, Wizard - * Copyright (C) 2015 Jaroslav Kysela + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2015 Jaroslav Kysela * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * tvheadend, Wizard */ #ifndef __TVH_WIZARD_H__ diff --git a/src/wrappers.c b/src/wrappers.c index 1f93b22c5..81938f631 100644 --- a/src/wrappers.c +++ b/src/wrappers.c @@ -274,6 +274,7 @@ tvh_qsort_r(void *base, size_t nmemb, size_t size, int (*compar)(const void *, c /* * Regex stuff */ + void regex_free(tvh_regex_t *regex) { #if ENABLE_PCRE || ENABLE_PCRE2 diff --git a/src/zlib.c b/src/zlib.c index 9d2a5b614..f1588ca0c 100644 --- a/src/zlib.c +++ b/src/zlib.c @@ -1,19 +1,8 @@ /* - * TV headend - zlib integration - * Copyright (C) 2012 Adam Sutton + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2012 Adam Sutton * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * TV headend - zlib integration */ #include "tvheadend.h" diff --git a/support/eitscrape_test.py b/support/eitscrape_test.py index f177b9fcd..466ea33d6 100755 --- a/support/eitscrape_test.py +++ b/support/eitscrape_test.py @@ -1,19 +1,7 @@ #!/usr/bin/env python -# +# SPDX-License-Identifier: GPL-3.0-or-later # Copyright (C) 2017, 2018 Tvheadend Project (https://tvheadend.org) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# + """ Test regular expressions used in OTA EIT scraper. diff --git a/support/lib.sh b/support/lib.sh index 3921685bd..cff81b1b6 100755 --- a/support/lib.sh +++ b/support/lib.sh @@ -1,26 +1,6 @@ #!/usr/bin/env bash -# +# SPDX-License-Identifier: GPL-3.0-or-later # Copyright (C) 2008-2014 Tvheadend Project (https://tvheadend.org) -# -# This file is part of Tvheadend -# -# Tvheadend is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Tvheadend is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Tvheadend. If not, see . -# -# For more details, including opportunities for alternative licensing, -# please read the LICENSE file. -# -# ############################################################################ # ############################################################################ # 3rd Party library processing support @@ -57,11 +37,6 @@ CODENAME=$(echo "$CODENAME" | tr '\n' ' ' | sed -e 's/[[:blank:]]*$//g') # Convert amd64 to x86_64 (ensure uniformity) [ "${ARCH}" = "amd64" ] && ARCH=x86_64 -# ############################################################################ -# Config -# ############################################################################ - - # ############################################################################ # Functions # ############################################################################ @@ -138,7 +113,7 @@ function unpack # Cleanup rm -rf "${BUILDDIR}/${LIB_NAME}" || return 1 mkdir -p "${BUILDDIR}/${LIB_NAME}" || return 1 - + # Unpack echo "UNPACK ${P}" tar -C "${BUILDDIR}/${LIB_NAME}" -xf "${P}" || return 1 @@ -159,7 +134,7 @@ function upload # Can't upload [ -z "${PCLOUD_USER}" -o -z "${PCLOUD_PASS}" ] && return 0 - + # Don't need to upload [ -f "${P}" ] && return 0 @@ -174,7 +149,7 @@ function upload N="${PCLOUD_BASEDIR}/staticlib/${CODENAME}/${ARCH}/${LIB_NAME}-${LIB_HASH}.tgz" echo "UPLOAD ${N}" ${ROOTDIR}/support/pcloud.py upload "${N}" "${P}.tmp" || python3 ${ROOTDIR}/support/pcloud.py upload "${N}" "${P}.tmp" || return 1 - + # Done mv "${P}.tmp" "${P}" || return 1 } diff --git a/support/template/header.c b/support/template/header.c index 310bc7bf5..9959087f7 100644 --- a/support/template/header.c +++ b/support/template/header.c @@ -1,26 +1,7 @@ -/* **************************************************************************** - * - * Copyright (C) 2016- Tvheadend Project (https://tvheadend.org) - * - * This file is part of Tvheadend - * - * Tvheadend is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Tvheadend is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Tvheadend. If not, see . - * - * For more details, including opportunities for alternative licensing, - * please read the LICENSE file. - * - * ***************************************************************************/ +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2025 Tvheadend Project (https://tvheadend.org) + */ /* **************************************************************************** * Editor Configuration diff --git a/support/template/header.h b/support/template/header.h index 48ffda672..2bab46d60 100644 --- a/support/template/header.h +++ b/support/template/header.h @@ -1,31 +1,12 @@ -/* **************************************************************************** - * - * Copyright (C) 2016- Tvheadend Project (https://tvheadend.org) - * - * This file is part of Tvheadend - * - * Tvheadend is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Tvheadend is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Tvheadend. If not, see . - * - * For more details, including opportunities for alternative licensing, - * please read the LICENSE file. - * - * ***************************************************************************/ +/* + * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright (C) 2025 Tvheadend Project (https://tvheadend.org) + */ /* **************************************************************************** * Module Title * - * Basic module description + * Module Description * * ***************************************************************************/ diff --git a/support/template/header.py b/support/template/header.py index d366a4757..12363e94f 100644 --- a/support/template/header.py +++ b/support/template/header.py @@ -1,26 +1,6 @@ #!/usr/bin/env python -# -# Copyright (C) 2008-2014 Tvheadend Project (https://tvheadend.org) -# -# This file is part of Tvheadend -# -# Tvheadend is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Tvheadend is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Tvheadend. If not, see . -# -# For more details, including opportunities for alternative licensing, -# please read the LICENSE file. -# -# ############################################################################ +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright (C) 2025 Tvheadend Project (https://tvheadend.org) """ Module Title diff --git a/support/template/header.sh b/support/template/header.sh index cb78bd3a8..b8ab12bce 100644 --- a/support/template/header.sh +++ b/support/template/header.sh @@ -1,33 +1,14 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright (C) 2025 Tvheadend Project (https://tvheadend.org) # -# Copyright (C) 2008-2014 Tvheadend Project (https://tvheadend.org) -# -# This file is part of Tvheadend -# -# Tvheadend is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Tvheadend is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Tvheadend. If not, see . -# -# For more details, including opportunities for alternative licensing, -# please read the LICENSE file. -# -# ############################################################################ - # ############################################################################ # Module Title # # Module Description # ############################################################################ + # ############################################################################ # Editor Configuration # -- 2.47.3