#!/usr/bin/env python
-#
+# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2012 Adam Sutton <dev@adamsutton.me.uk>
-#
-# This program is free software: 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 <http://www.gnu.org/licenses/>.
-#
+
"""
Support for processing HTSMSG binary format
"""
#!/usr/bin/env python
-#
+# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2012 Adam Sutton <dev@adamsutton.me.uk>
-#
-# This program is free software: 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 <http://www.gnu.org/licenses/>.
-#
+
"""
This is a very simple HTSP client library written in python mainly just
for demonstration purposes.
def disconnect(self):
self._sock.close()
-
#!/usr/bin/env python
-#
+# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2012 Adam Sutton <dev@adamsutton.me.uk>
-#
-# This program is free software: 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 <http://www.gnu.org/licenses/>.
-#
+
"""
Some very basic logging routines
"""
#
def error(msg, **dargs):
out('ERROR', msg, **dargs)
-
#! /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 <https://www.gnu.org/licenses/>.
import os,sys
import json
#! /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 <https://www.gnu.org/licenses/>.
-
import os,sys
import json
import logging
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, access control
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - Access control
*/
#ifndef ACCESS_H_
/**
* 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);
/**
* 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);
*
* 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) :
/**
* 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,
/**
*
*/
+
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
/**
*
*/
+
passwd_entry_t *
passwd_entry_create(const char *uuid, htsmsg_t *conf);
void
/**
*
*/
+
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 );
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - Common functions for control/query API
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - Common functions for control/query API
*/
#ifndef __TVH_API_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - access control
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - bouquet calls
*/
#ifndef __TVH_API_BOUQUET_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - API access to Conditional Access Clients
*/
#include "tvheadend.h"
/*
*
*/
+
static int
api_caclient_list
( access_t *perm, void *opaque, const char *op, htsmsg_t *args, htsmsg_t **resp )
/*
* Init
*/
+
void
api_caclient_init ( void )
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - channel related calls
*/
#ifndef __TVH_API_CHANNEL_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - API access to Codec Profiles
*/
-
#include "tvheadend.h"
#include "access.h"
#include "api.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - General configuration related calls
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - DVR
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - EPG related calls
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - epggrab related calls
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - elementary stream filter related calls
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - idnode related API calls
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - Imagecache related calls
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - channel related calls
*/
#ifndef __TVH_API_INPUT_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - international character conversions
*/
#ifndef __TVH_API_INTLCONV_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - international character conversions
*/
#ifndef __TVH_API_LANGUAGE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - API access to MPEGTS system
*/
#include "tvheadend.h"
/*
* Inputs
*/
+
static int
api_mpegts_input_network_list
( access_t *perm, void *opaque, const char *op, htsmsg_t *args, htsmsg_t **resp )
/*
* Networks
*/
+
static void
api_mpegts_network_grid
( access_t *perm, idnode_set_t *ins, api_idnode_grid_conf_t *conf, htsmsg_t *args )
/*
* Muxes
*/
+
static void
api_mpegts_mux_grid
( access_t *perm, idnode_set_t *ins, api_idnode_grid_conf_t *conf, htsmsg_t *args )
/*
* Services
*/
+
static void
api_mpegts_service_grid
( access_t *perm, idnode_set_t *ins, api_idnode_grid_conf_t *conf, htsmsg_t *args )
/*
* 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 )
/*
* Init
*/
+
void
api_mpegts_init ( void )
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - API access to Stream Profile
*/
#include "tvheadend.h"
/*
*
*/
+
static int
api_profile_is_all(access_t *perm, htsmsg_t *args)
{
/*
*
*/
+
static int
api_profile_list
( access_t *perm, void *opaque, const char *op, htsmsg_t *args, htsmsg_t **resp )
/*
* Init
*/
+
void
api_profile_init ( void )
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - ratinglabel calls
*/
#ifndef __TVH_API_RATINGLABEL_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - idnode raw load/save related API calls
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - SAT>IP Server related calls
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - service related calls
*/
#ifndef __TVH_API_SERVICE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - service related calls
*/
#ifndef __TVH_API_SERVICE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - Timeshift related calls
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * API - Wizard interface
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Atomic ops
*/
#pragma once
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * AVAHI service publisher
*/
/***
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Bit ops
*/
#pragma once
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Bonjour service publisher
*/
#include <stdio.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, bouquets
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - Bouquets
*/
#ifndef BOUQUET_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, channel functions
*/
#include <ctype.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, channel functions
*/
#ifndef CHANNELS_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - clock support
*/
#ifndef TVHEADEND_CLOCK_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - structures
*/
+
#ifndef TVH_COMPAT_H
#define TVH_COMPAT_H
#define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0
#endif /* COMPAT_IPTOS */
-
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - General configuration settings
*/
#include <ctype.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - General configuration settings
*/
// TODO: expand this, possibly integrate command line
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - cron routines
*/
#include "build.h"
/*
* Parse value
*/
+
static int
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,
/*
* Set value
*/
+
int
cron_set ( cron_t *c, const char *str )
{
/*
* Set value
*/
+
cron_multi_t *
cron_multi_set ( const char *str )
{
/*
* Check for leap year
*/
+
static int
is_leep_year ( int year )
{
/*
* Check for days in month
*/
+
static int
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 )
{
/*
* 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 )
{
*
* gcc -g -DCRON_TEST -I./build.linux src/cron.c
*/
+
#ifdef CRON_TEST
static
void print_bits ( uint64_t b, int n )
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - cron routines
*/
#ifndef __TVH_CRON_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * DBUS interface
*/
#include <time.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, UPnP interface
*/
#ifndef DBUS_H_
#include "libaes128dec.h"
/* key structure */
+
typedef struct aes128_priv {
AES_KEY keys[2]; /* 0 = even, 1 = odd */
} aes128_priv_t;
#include "libaesdec.h"
/* key structure */
+
typedef struct aes_priv {
AES_KEY keys[2]; /* 0 = even, 1 = odd */
} aes_priv_t;
#include "libdesdec.h"
/* key structure */
+
typedef struct des_priv {
DES_key_schedule sched[2]; /* 0 = even, 1 = odd */
} des_priv_t;
/*
- * Tvheadend - conditional access key client superclass
- * Copyright (C) 2014 Jaroslav Kysela <perex@perex.cz>
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2014 Jaroslav Kysela <perex@perex.cz>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * Tvheadend - conditional access key client superclass
*/
#include "tvheadend.h"
/*
* Initialize
*/
+
void
caclient_init(void)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Conditional Access Client
*/
#ifndef __TVH_CACLIENT_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend
*/
#include "tvheadend.h"
*
* based on the equivalent in sasc-ng
*/
+
card_type_t
detect_card_type(const uint16_t caid)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend
*/
#ifndef __TVH_CAID_H__
/**
* cards for which emm updates are handled
*/
+
typedef enum {
CARD_IRDETO,
CARD_DRE,
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, CAPMT Server
*/
#include <netinet/in.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, CCCAM interface
*/
#include <ctype.h>
/**
*
*/
+
#define CCCAM_KEEPALIVE_INTERVAL 0
#define CCCAM_NETMSGSIZE 1024
/**
*
*/
+
struct cccam_crypt_block {
uint8_t keytable[256];
uint8_t state;
/**
*
*/
+
typedef struct cccam {
cclient_t;
/**
*
*/
+
static inline const char *cccam_get_version_str(cccam_t *cccam)
{
int ver = MINMAX(cccam->cccam_version, 0, ARRAY_SIZE(cccam_version_str) - 1);
/**
*
*/
+
static inline const char *cccam_get_build_str(cccam_t *cccam)
{
int ver = MINMAX(cccam->cccam_version, 0, ARRAY_SIZE(cccam_version_str) - 1);
/**
*
*/
+
static inline int cccam_set_busy(cccam_t *cccam)
{
if (cccam->cccam_extended)
/**
*
*/
+
static inline void cccam_unset_busy(cccam_t *cccam)
{
cccam->cccam_busy = 0;
/**
*
*/
+
static inline void
uint8_swap(uint8_t *p1, uint8_t *p2)
{
/**
*
*/
+
static void
cccam_crypt_xor(uint8_t *buf)
{
/**
*
*/
+
static void
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)
{
/**
*
*/
+
static void
cccam_encrypt(struct cccam_crypt_block *block, uint8_t *data, int32_t len)
{
/**
*
*/
+
static int
cccam_oscam_check(cccam_t *cccam, uint8_t *buf)
{
/**
*
*/
+
static int
cccam_oscam_nodeid_check(cccam_t *cccam, uint8_t *buf)
{
/**
*
*/
+
static inline uint8_t *
cccam_set_ua(uint8_t *dst, uint8_t *src)
{
/**
*
*/
+
static inline uint8_t *
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)
{
/**
*
*/
+
static void
cccam_handle_keys(cccam_t *cccam, cc_service_t *ct, cc_ecm_section_t *es,
uint8_t *buf, int len, int seq)
/**
*
*/
+
static void
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)
{
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);
/**
*
*/
+
static int
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,
/**
* Send keep alive
*/
+
static void
cccam_send_ka(void *cc)
{
/**
* Send keep alive
*/
+
static void
cccam_send_oscam_extended(cccam_t *cccam)
{
/**
*
*/
+
static void
sha1_make_login_key(cccam_t *cccam, uint8_t *buf)
{
/**
* Login command
*/
+
static int
cccam_send_login(cccam_t *cccam)
{
/**
*
*/
+
static void
cccam_send_cli_data(cccam_t *cccam)
{
/**
*
*/
+
static void
cccam_oscam_update_idnode(cccam_t *cccam)
{
/**
*
*/
+
static int
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)
/**
*
*/
+
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)
/**
*
*/
+
static int
cccam_read(void *cc, sbuf_t *rbuf)
{
/**
*
*/
+
static void
cccam_no_services(void *cc)
{
/**
*
*/
+
static void
cccam_conf_changed(caclient_t *cac)
{
/**
*
*/
+
static int
nibble(char c)
{
/**
*
*/
+
static int
caclient_cccam_nodeid_set(void *o, const void *v)
{
/*
*
*/
+
caclient_t *cccam_create(void)
{
cccam_t *cccam = calloc(1, sizeof(*cccam));
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, card client interface
*/
#include <fcntl.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, network card client
*/
#include "tvheadend.h"
/**
*
*/
+
#define CC_KEEPALIVE_INTERVAL 30
#define CC_MAX_NOKS 3
/**
*
*/
+
typedef struct cc_ecm_section {
LIST_ENTRY(cc_ecm_section) es_link;
/**
*
*/
+
typedef struct cc_ecm_pid {
LIST_ENTRY(cc_ecm_pid) ep_link;
/**
*
*/
+
typedef struct cc_service {
th_descrambler_t;
/**
*
*/
+
typedef struct cc_message {
TAILQ_ENTRY(cc_message) cm_link;
uint32_t cm_len;
/**
*
*/
+
typedef struct cc_card_data {
LIST_ENTRY(cc_card_data) cs_card;
uint32_t cs_id;
/**
*
*/
+
typedef struct cclient {
caclient_t;
/*
*
*/
+
static inline int cc_must_break(cclient_t *cc)
{ return !cc->cc_running || !cc->cac_enabled || cc->cc_reconfigure; }
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, constant code word interface
*/
#include <ctype.h>
/**
*
*/
+
typedef struct constcw_service {
th_descrambler_t;
LIST_ENTRY(constcw_service) cs_link;
/**
*
*/
+
typedef struct constcw {
caclient_t;
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)
{
/**
*
*/
+
static int
constcw_algo(caclient_t *cac)
{
/**
*
*/
+
static int
constcw_key_size(caclient_t *cac)
{
/*
*
*/
+
static int
constcw_ecm_reset(th_descrambler_t *th)
{
/**
* s_stream_mutex is held
*/
+
static void
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)
{
/**
*
*/
+
static void
constcw_free(caclient_t *cac)
{
/**
*
*/
+
static int
nibble(char c)
{
/**
*
*/
+
static void
constcw_conf_changed(caclient_t *cac)
{
/**
*
*/
+
static int
constcw_class_key_set(void *o, const void *v, uint8_t *dkey)
{
/*
*
*/
+
caclient_t *constcw_create(void)
{
constcw_t *ccw = calloc(1, sizeof(*ccw));
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, CWC interface
*/
#include <ctype.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend
*/
#include "tvheadend.h"
/*
*
*/
+
static inline int extractpid(const uint8_t *tsb)
{
return (tsb[1] & 0x1f) << 8 | tsb[2];
/*
*
*/
+
static void
descrambler_data_destroy(th_descrambler_runtime_t *dr, th_descrambler_data_t *dd, int skip)
{
/*
*
*/
+
static void
descrambler_destroy_ecmsec(descrambler_ecmsec_t *des)
{
/*
*
*/
+
static struct strtab ecmparitytab[] = {
{ "default", ECM_PARITY_DEFAULT },
{ "standard", ECM_PARITY_80EVEN_81ODD },
/*
*
*/
+
static void
descrambler_load_hints(htsmsg_t *m)
{
/*
*
*/
+
void
descrambler_init ( void )
{
/*
* Decide, if we should work in "quick ECM" mode
*/
+
static int
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 )
{
}
/* it's called inside s_stream_mutex lock! */
+
static void
descrambler_notify_nokey( th_descrambler_runtime_t *dr )
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend
*/
#ifndef __TVH_DESCRAMBLER_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, DVB CAM interface
*/
#include <ctype.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - CSA wrapper
*/
#ifndef __DVBCAM_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, EMM reassembly functions
*/
#include "emm_reass.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, EMM reassemble functions
*/
#ifndef __TVH_EMM_REASS_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, tsdebug code word interface
*/
#include <ctype.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - CSA wrapper
*/
#include <stdio.h>
( tvhcsa_t *csa, struct mpegts_service *s )
{
/* empty - no queue */
+
}
static void
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - CSA wrapper
*/
#ifndef __TVH_CSA_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TVheadend
*/
#ifndef __TVH_DOCS_H__
extern const struct tvh_doc_page tvh_doc_markdown_pages[];
#endif /* __TVH_DOCS_H__ */
-
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Download a file from storage or network
*/
#include "tvheadend.h"
/*
*
*/
+
static int
download_file(download_t *dn, const char *filename)
{
/*
*
*/
+
static void
download_fetch_done(void *aux)
{
/*
*
*/
+
static int
download_fetch_complete(http_client_t *hc)
{
/*
*
*/
+
static void
download_pipe_close(download_t *dn)
{
/*
*
*/
+
static void
download_pipe_read(void *aux)
{
/*
*
*/
+
static int
download_pipe(download_t *dn, const char *args)
{
/*
*
*/
+
static void
download_fetch(void *aux)
{
/*
*
*/
+
void
download_init( download_t *dn, int subsys )
{
/*
*
*/
+
void
download_start( download_t *dn, const char *url, void *aux )
{
/*
*
*/
+
void
download_done( download_t *dn )
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Download a file from storage or network
*/
#ifndef __DOWNLOAD__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Digital Video Recorder
*/
#ifndef DVR_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Automatic recordings
*/
#include <ctype.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Digital Video Recorder
*/
#define _GNU_SOURCE
/*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: GPL-3.0-or-later
*/
+
#include <string.h>
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Digital Video Recorder
*/
#include <ctype.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Digital Video Recorder - inotify processing
*/
#include <sys/inotify.h>
#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 | \
/**
* Initialise threads
*/
+
pthread_t dvr_inotify_tid;
void dvr_inotify_init ( void )
/**
*
*/
+
void dvr_inotify_done ( void )
{
int fd = atomic_exchange(&_inot_fd, -1);
/**
*
*/
+
static int dvr_inotify_exists ( dvr_inotify_entry_t *die, dvr_entry_t *de )
{
dvr_inotify_filename_t *dif;
/**
* Add an entry for monitoring
*/
+
static void dvr_inotify_add_one ( dvr_entry_t *de, htsmsg_t *m )
{
dvr_inotify_filename_t *dif;
/*
* Delete an entry from the monitor
*/
+
void dvr_inotify_del ( dvr_entry_t *de )
{
dvr_inotify_filename_t *f = NULL, *f_next;
/*
* return count of registered entries (for debugging)
*/
+
int dvr_inotify_count ( void )
{
dvr_inotify_filename_t *f;
/*
* Find inotify entry
*/
+
static dvr_inotify_entry_t *
_dvr_inotify_find
( int fd )
/*
* File moved
*/
+
static void
_dvr_inotify_moved
( int from_fd, const char *from, const char *to, int to_fd )
/*
* File deleted
*/
+
static void
_dvr_inotify_delete
( int fd, const char *path )
/*
* Directory moved
*/
+
static void
_dvr_inotify_moved_all
( int fd, const char *to )
/*
* Directory deleted
*/
+
static void
_dvr_inotify_delete_all
( int fd )
/*
* Process events
*/
+
void* _dvr_inotify_thread ( void *p )
{
int fd, i, len;
return NULL;
}
-
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Digital Video Recorder
*/
#include <sys/stat.h>
/*
- * tvheadend, Automatic time-based recording
- * Copyright (C) 2014 Jaroslav Kysela <perex@perex.cz>
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2014 Jaroslav Kysela <perex@perex.cz>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * tvheadend, Automatic time-based recording
*/
#include <ctype.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Digital Video Recorder - file system management
*/
#include <sys/stat.h>
/*
*
*/
+
static dvr_vfs_t *
dvr_vfs_find(dvr_vfs_t *old, tvh_fsid_t *id)
{
/*
*
*/
+
void
dvr_vfs_refresh_entry(dvr_entry_t *de)
{
/*
*
*/
+
void
dvr_vfs_remove_entry(dvr_entry_t *de)
{
/*
*
*/
+
int64_t
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)
{
* 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()
{
/**
*
*/
+
static void
dvr_get_disk_space_update(const char *path, int locked)
{
/**
*
*/
+
static void
dvr_get_disk_space_tcb(void *opaque, int dearmed)
{
* 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)
{
/**
*
*/
+
void
dvr_disk_space_boot(void)
{
/**
*
*/
+
void
dvr_disk_space_init(void)
{
/**
*
*/
+
void
dvr_disk_space_done(void)
{
/**
*
*/
+
int
dvr_get_disk_space(int64_t *bfree, int64_t *bused, int64_t *btotal)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Electronic Program Guide - Common functions
*/
#include <stdio.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Electronic Program Guide - Common functions
*/
#ifndef EPG_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Electronic Program Guide - Database File functions
*/
#include <string.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Electronic Program Guide - Common functions
*/
#include <errno.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * EPG Grabber - common functions
*/
#ifndef __EPGGRAB_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * EPG Grabber - channel functions
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * EPG Grabber - module functions
*/
#include <signal.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Electronic Program Guide - eit grabber
*/
#include <string.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Electronic Program Guide - Regular Expression Pattern Functions
*/
#include <assert.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Electronic Program Guide - Regular Expression Pattern Functions
*/
#ifndef __EITPATTERN_LIST__
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
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Electronic Program Guide - opentv epg grabber
*/
#include <string.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Electronic Program Guide - psip grabber
*/
#include <string.h>
epggrab_module_ota_create(NULL, "psip", LS_PSIP, NULL, "PSIP: ATSC Grabber",
1, NULL, &ops);
}
-
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Electronic Program Guide - xmltv grabber
*/
#include <assert.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Electronic Program Guide - EPG grabber OTA functions
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * EPG Grabber - private routines
*/
#ifndef __EPGGRAB_PRIVATE_H__
/*
- * 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 <dev@adamsutton.me.uk>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT 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 <http://www.gnu.org/licenses/>.
+ * freesat_huffman.c
*/
#include "tvheadend.h"
/* 2 */
{ 0x00000000, 1, 1}, /* 2025 '0x01' */
{ 0x80000000, 1, 1} /* 2026 '0x01' */
+
};
unsigned fsat_index_1[] = {
2023, /* 126 */
2025, /* 127 */
2027 /* 128 */
+
};
struct fsattab fsat_table_2[] = {
/* 2 */
{ 0x00000000, 1, 1}, /* 3158 '0x01' */
{ 0x80000000, 1, 1} /* 3159 '0x01' */
+
};
unsigned fsat_index_2[] = {
3156, /* 126 */
3158, /* 127 */
3160 /* 128 */
+
};
size_t freesat_huffman_decode
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Elementary Stream Filter
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Elementary Stream Filter
*/
#ifndef __TVH_ESFILTER_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Elementary streams
*/
#include "tvheadend.h"
/**
*
*/
+
static void
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)
{
/**
*
*/
+
void elementary_set_clean(elementary_set_t *set, service_t *t, int keep_nicename)
{
elementary_stream_t *st;
/**
*
*/
+
void elementary_set_update_nicename(elementary_set_t *set, const char *nicename)
{
elementary_stream_t *st;
/**
*
*/
+
static void
elementary_stream_init(elementary_stream_t *es)
{
/**
*
*/
+
static void
elementary_stream_clean(elementary_stream_t *es)
{
/**
*
*/
+
void
elementary_set_clean_streams(elementary_set_t *set)
{
/**
*
*/
+
void
elementary_set_init_filter_streams(elementary_set_t *set)
{
/**
*
*/
+
int
elementary_set_has_streams(elementary_set_t *set, int filtered)
{
/**
*
*/
+
void
elementary_set_stream_destroy(elementary_set_t *set, elementary_stream_t *es)
{
/**
*
*/
+
#define ESFM_USED (1<<0)
#define ESFM_IGNORE (1<<1)
/**
*
*/
+
static void
elementary_set_filter_print
(elementary_set_t *set)
/**
*
*/
+
void
elementary_set_filter_build(elementary_set_t *set)
{
/**
* 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)
/**
* Find an elementary stream in a service
*/
+
elementary_stream_t *
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)
{
/**
* 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)
/**
*
*/
+
elementary_stream_t *
elementary_stream_type_modify(elementary_set_t *set, int pid,
streaming_component_type_t type)
/**
*
*/
+
void
elementary_stream_type_destroy
(elementary_set_t *set, streaming_component_type_t type)
/**
*
*/
+
int
elementary_stream_has_audio_or_video(elementary_set_t *set)
{
/**
*
*/
+
static int
escmp(const void *A, const void *B)
{
/**
*
*/
+
void
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)
{
/**
* 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)
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend
*/
#ifndef ESSTREAM_H__
#include <errno.h>
#ifndef CA_SET_PID /* removed in kernel 4.14 */
+
typedef struct ca_pid {
unsigned int pid;
int index; /* -1 == disable */
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Process file functions
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Process file operations
*/
#ifndef FILE_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - File bundles
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - File bundles
*/
#ifndef __TVH_FILE_BUNDLE_H__
#include <stdio.h>
/* Bundle or Direct */
+
typedef enum filebundle_handle_type
{
FB_BUNDLE,
} fb_type;
/* File bundle entry type */
+
enum filebundle_type
{
FB_UNKNOWN,
};
/* File bundle entry */
+
typedef struct filebundle_entry
{
enum filebundle_type type;
} filebundle_entry_t;
/* File bundle directory entry */
+
typedef struct filebundle_dirent
{
char name[256];
} fb_dirent;
/* File bundle stat */
+
struct filebundle_stat
{
fb_type type;
};
/* 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
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - File/Directory monitoring
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - File/Directory monitoring
*/
#ifndef __FS_MONITOR_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend
*/
#ifndef STRTAB_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Buffer management functions
*/
#include <assert.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Buffer management functions
*/
#ifndef HTSBUF_H__
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 {
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions for manipulating HTS messages
*/
#include <assert.h>
/**
*
*/
+
static void
htsmsg_field_data_destroy(htsmsg_field_t *f)
{
/**
*
*/
+
void
htsmsg_field_destroy(htsmsg_t *msg, htsmsg_field_t *f)
{
/*
*
*/
+
static void
htsmsg_clear(htsmsg_t *msg)
{
/*
*
*/
+
htsmsg_field_t *
htsmsg_field_add(htsmsg_t *msg, const char *name, int type, int flags, size_t esize)
{
/*
*
*/
+
htsmsg_field_t *
htsmsg_field_find(const htsmsg_t *msg, const char *name)
{
/*
*
*/
+
htsmsg_field_t *
htsmsg_field_last(htsmsg_t *msg)
{
/**
*
*/
+
int
htsmsg_delete_field(htsmsg_t *msg, const char *name)
{
/**
*
*/
+
int
htsmsg_is_empty(htsmsg_t *msg)
{
/*
*
*/
+
htsmsg_t *
htsmsg_create_map(void)
{
/*
*
*/
+
htsmsg_t *
htsmsg_create_list(void)
{
/*
*
*/
+
void
htsmsg_concat(htsmsg_t *msg, htsmsg_t *sub)
{
/*
*
*/
+
void
htsmsg_destroy(htsmsg_t *msg)
{
/*
*
*/
+
void
htsmsg_add_bool(htsmsg_t *msg, const char *name, int b)
{
/*
*
*/
+
void
htsmsg_set_bool(htsmsg_t *msg, const char *name, int b)
{
/*
*
*/
+
void
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)
{
/*
*
*/
+
void
htsmsg_add_dbl(htsmsg_t *msg, const char *name, double dbl)
{
/*
*
*/
+
void
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)
{
/*
*
*/
+
void
htsmsg_add_str2(htsmsg_t *msg, const char *name, const char *str)
{
/*
*
*/
+
void
htsmsg_add_str_exclusive(htsmsg_t *msg, const char *str)
{
/*
*
*/
+
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)
{
/*
*
*/
+
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)
{
/*
*
*/
+
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)
{
/*
*
*/
+
void
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)
{
/*
*
*/
+
void
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)
{
/*
*
*/
+
int
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)
{
/*
*
*/
+
static htsmsg_t *
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)
{
/*
*
*/
+
htsmsg_t *
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)
{
/**
*
*/
+
int
htsmsg_get_s64(htsmsg_t *msg, const char *name, int64_t *s64p)
{
/**
*
*/
+
int
bool_check(const char *str)
{
/**
*
*/
+
int64_t
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)
{
/**
*
*/
+
int
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)
{
/*
*
*/
+
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)
{
/*
*
*/
+
int
htsmsg_get_dbl(htsmsg_t *msg, const char *name, double *dblp)
{
/**
*
*/
+
const char *
htsmsg_field_get_string(htsmsg_field_t *f)
{
/*
*
*/
+
const char *
htsmsg_get_str(htsmsg_t *msg, const char *name)
{
/**
*
*/
+
int
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)
/**
*
*/
+
int
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)
/*
*
*/
+
htsmsg_t *
htsmsg_get_map(htsmsg_t *msg, const char *name)
{
/**
*
*/
+
htsmsg_t *
htsmsg_get_map_multi(htsmsg_t *msg, ...)
{
/**
*
*/
+
const char *
htsmsg_get_str_multi(htsmsg_t *msg, ...)
{
/*
*
*/
+
htsmsg_t *
htsmsg_get_list(const htsmsg_t *msg, const char *name)
{
/**
*
*/
+
htsmsg_t *
htsmsg_detach_submsg(htsmsg_field_t *f)
{
/*
*
*/
+
static void
htsmsg_print0(htsmsg_t *msg, int indent)
{
/*
*
*/
+
void
htsmsg_print(htsmsg_t *msg)
{
/**
*
*/
+
static void htsmsg_copy_i(htsmsg_t *dst, const htsmsg_t *src);
static void
/**
*
*/
+
int
htsmsg_cmp(const htsmsg_t *m1, const htsmsg_t *m2)
{
/**
*
*/
+
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)
{
/**
*
*/
+
const char *
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)
{
/*
*
*/
+
htsmsg_t *
htsmsg_create_key_val(const char *key, const char *val)
{
/*
*
*/
+
int
htsmsg_is_string_in_list(htsmsg_t *list, const char *str)
{
/*
*
*/
+
int
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)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions for manipulating HTS messages
*/
#pragma once
/**
* Aligned memory allocation
*/
+
static inline size_t htsmsg_malloc_align(int type, size_t len)
{
if (type == HMF_LIST || type == HMF_MAP)
/**
* Get a field name
*/
+
static inline const char *htsmsg_field_name(htsmsg_field_t *f)
{
if (f->hmf_flags & HMF_NONAME) return "";
/**
* 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); }
/**
* 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); }
/**
* 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); }
/**
* 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); }
/**
* 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)));;
/**
* 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);
/**
* 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);
/**
* 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);
/**
* 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);
* 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);
* 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);
/*
* 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);
* @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);
* @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);
/**
* @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);
* @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);
/**
* @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);
/**
* 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)));
* 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);
* 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)
* 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);
/**
* 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);
/**
* @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);
/**
* @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);
/**
* 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)
/**
* 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);
/**
*
*/
+
struct memoryinfo;
extern struct memoryinfo htsmsg_memoryinfo;
extern struct memoryinfo htsmsg_field_memoryinfo;
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions converting HTSMSGs to/from a simple binary format
*/
#include <assert.h>
/*
*
*/
+
static int
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)
{
/*
*
*/
+
int
htsmsg_binary_deserialize(htsmsg_t **msg, const void *data, size_t *len, const void *buf)
{
/*
*
*/
+
static size_t
htsmsg_binary_count(htsmsg_t *msg)
{
/*
*
*/
+
static void
htsmsg_binary_write(htsmsg_t *msg, uint8_t *ptr)
{
/*
*
*/
+
int
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)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions converting HTSMSGs to/from a simple binary format
*/
#ifndef HTSMSG_BINARY_H_
/**
* htsmsg_binary_deserialize
*/
+
htsmsg_t *htsmsg_binary_deserialize0(const void *data, size_t len,
const void *buf);
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions converting HTSMSGs to/from a simple binary format
*/
#include <assert.h>
/*
*
*/
+
static inline uint32_t htsmsg_binary2_get_length(uint8_t const **_p, const uint8_t *end)
{
uint32_t r = 0;
/*
*
*/
+
static int
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)
{
/*
*
*/
+
int
htsmsg_binary2_deserialize
(htsmsg_t **msg, const void *data, size_t *len, const void *buf)
/*
*
*/
+
static uint32_t
htsmsg_binary2_field_length(htsmsg_field_t *f)
{
/*
*
*/
+
static uint32_t
htsmsg_binary2_count(htsmsg_t *msg)
{
/*
*
*/
+
static void
htsmsg_binary2_write(htsmsg_t *msg, uint8_t *ptr)
{
/*
*
*/
+
int
htsmsg_binary2_serialize0
(htsmsg_t *msg, void **datap, size_t *lenp, size_t maxlen)
/*
*
*/
+
int
htsmsg_binary2_serialize
(htsmsg_t *msg, void **datap, size_t *lenp, size_t maxlen)
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions converting HTSMSGs to/from a simple binary format
*/
#ifndef HTSMSG_BINARY2_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions converting HTSMSGs to/from JSON
*/
#include <assert.h>
/**
*
*/
+
static void
htsmsg_json_write(htsmsg_t *msg, htsbuf_queue_t *hq, int isarray,
int indent, int pretty)
/**
*
*/
+
void
htsmsg_json_serialize(htsmsg_t *msg, htsbuf_queue_t *hq, int pretty)
{
/**
*
*/
+
char *
htsmsg_json_serialize_to_str(htsmsg_t *msg, int pretty)
{
/**
*
*/
+
static void *
create_map(void *opaque)
{
/**
*
*/
+
static const json_deserializer_t json_to_htsmsg = {
.jd_create_map = create_map,
.jd_create_list = create_list,
/**
*
*/
+
htsmsg_t *
htsmsg_json_deserialize(const char *src)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions converting HTSMSGs to/from JSON
*/
#ifndef HTSMSG_JSON_H_
/**
* htsmsg_binary_deserialize
*/
+
htsmsg_t *htsmsg_json_deserialize(const char *src);
void htsmsg_json_serialize(htsmsg_t *msg, htsbuf_queue_t *hq, int pretty);
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions converting HTSMSGs to/from XML
*/
/**
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions converting HTSMSGs to/from XML
*/
#ifndef HTSMSG_XML_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, HTSP interface
*/
#include <fcntl.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, HTSP interface
*/
#ifndef HTSP_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * String helper functions
*/
#include <stdio.h>
/*
* gcc -g -I ../build.linux/ -o test htsstr.c
*/
+
void main(int argc, char *argv[])
{
char *strings[] = {
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, HTTP interface
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, HTTP interface
*/
#ifndef HTTP_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - HTTP client functions
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - Huffman decoder
*/
#include <string.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - Huffman decoder
*/
#ifndef __TVH_HUFFMAN_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - idnode (class) system
*/
#define _GNU_SOURCE
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - idnode (class) system
*/
#ifndef __TVH_IDNODE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Icon file server operations
*/
#include <fcntl.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Icon file serve operations
*/
#ifndef __IMAGE_CACHE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TVheadend
*/
#include "input.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TVheadend
*/
#ifndef __TVH_INPUT_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TVheadend
*/
#include "input.h"
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;
#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
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - TS file input system
*/
#ifndef __TVH_MPEGTS_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - DVB support routines and defines
*/
/*
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, charset list
*/
#include <string.h>
/*
* Process a file
*/
+
static void _charset_load_file()
{
htsmsg_t *l, *e;
/*
* Initialise the charset list
*/
+
void dvb_charset_init ( void )
{
_charset_load_file();
/*
*
*/
+
void dvb_charset_done ( void )
{
dvb_charset_t *enc;
/*
* Find default charset
*/
+
const char *dvb_charset_find
( mpegts_network_t *mn, mpegts_mux_t *mm, mpegts_service_t *s )
{
/*
* List of available charsets
*/
+
htsmsg_t *
dvb_charset_enum ( void *p, const char *lang )
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, dvb charset config
*/
#ifndef __TVH_DVB_CHARSET_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * MPEG TS Program Specific Information code
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, MPEG transport stream demuxer
*/
#include "tvheadend.h"
/**
* Extract Hbbtv
*/
+
htsmsg_t *
dvb_psi_parse_hbbtv
(mpegts_psi_table_t *mt, const uint8_t *buf, int len, int *_sect)
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * MPEG TS Program Specific Information code
*/
#ifndef __DVB_PSI_HBBTV_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * MPEG TS Program Specific Information Library code
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * MPEG TS Program Specific Information code
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * MPEG TS Program Specific Information code
*/
#ifndef __DVB_PSI_PMT_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV Input - DVB - Support/Conversion functions
*/
#include <sys/types.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - CI CAM (EN50221) generic interface
*/
#include <errno.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - CI CAM (EN50221) generic interface
*/
#ifndef __EN50221_H__
#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
#define CICAM_RI_DUMMY_CAPMT 0x00ffffff
/* Application tags */
+
#define CICAM_AOT_NONE 0x000000
#define CICAM_AOT_PROFILE_ENQ 0x9F8010
#define CICAM_AOT_PROFILE 0x9F8011
/*
*
*/
+
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);
/*
*
*/
+
en50221_app_t *
en50221_slot_find_application(en50221_slot_t *cil,
uint32_t resource_id, uint32_t mask);
/*
*
*/
+
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,
/*
*
*/
+
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);
/*
* 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);
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - CI CAM (EN50221) generic interface
*/
#include <errno.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - CI CAM (EN50221) generic interface
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - CI CAM (EN50221) CAPMT interface
*/
#ifndef __EN50221_CAPMT_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, charset list
*/
#include "tvheadend.h"
/*
* Initialize the fastscan list
*/
+
void dvb_fastscan_init ( void )
{
htsmsg_t *c, *e;
/*
*
*/
+
void dvb_fastscan_done ( void )
{
dvb_fastscan_t *fs;
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - FastScan support
*/
#ifndef __TVH_DVB_FASTSCAN_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV Input
*/
#ifndef __IPTV_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV Input
*/
#include <signal.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV - automatic network based on playlists
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV - file handler
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV - HTTP/HTTPS handler
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV - libav handler
*/
#include "tvheadend.h"
/*
*
*/
+
#if LIBAVFORMAT_VERSION_MAJOR > 60
static int
iptv_libav_write_packet(void *opaque, const uint8_t *buf, int buf_size)
/*
*
*/
+
static int
iptv_libav_interrupt_callback(void *opaque)
{
/*
*
*/
+
static void *
iptv_libav_thread(void *aux)
{
/*
* Start new thread
*/
+
static int
iptv_libav_start
( iptv_input_t *mi, iptv_mux_t *im, const char *raw, const url_t *url )
/*
* Initialise libav handler
*/
+
void
iptv_libav_init ( void )
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV Input
*/
#include "iptv_private.h"
/*
* Class
*/
+
extern const idclass_t mpegts_mux_class;
static inline void
/*
* Create
*/
+
iptv_mux_t *
iptv_mux_create0 ( iptv_network_t *in, const char *uuid, htsmsg_t *conf )
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV - pipe handler
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV Input
*/
#ifndef __IPTV_PRIVATE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Multicasted IPTV Input
*/
#include "iptv_rtcp.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend
*/
#ifndef RTCP_H
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 */
-
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV - RTSP/RTSPS handler
*/
#include "tvheadend.h"
/*
*
*/
+
static void
iptv_rtsp_close_cb ( void *aux )
{
/*
* Alive timeout
*/
+
static void
iptv_rtsp_alive_cb ( void *aux )
{
/*
* Connected
*/
+
static int
iptv_rtsp_header ( http_client_t *hc )
{
/*
* Receive data
*/
+
static int
iptv_rtsp_data
( http_client_t *hc, void *buf, size_t len )
/*
* Setup RTSP(S) connection
*/
+
static int
iptv_rtsp_start
( iptv_input_t *mi, iptv_mux_t *im, const char *raw, const url_t *u )
/*
* Stop connection
*/
+
static void
iptv_rtsp_stop
( iptv_input_t *mi, iptv_mux_t *im )
/*
* Read data
*/
+
static ssize_t
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) {
/*
* Initialise RTSP handler
*/
+
void
iptv_rtsp_init ( void )
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV Input
*/
#include "iptv_private.h"
/*
* Create
*/
+
iptv_service_t *
iptv_service_create0
( iptv_mux_t *im, uint16_t sid, uint16_t pmt,
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * IPTV - UDP/RTP handler
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB input system
*/
#ifndef __TVH_LINUX_DVB_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB input system
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB input system
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB CA
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB DDCI
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
- *
- * 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"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB frontend
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB LNB config
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB private data
*/
#ifndef __TVH_LINUXDVB_PRIVATE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB DiseqC Rotor
*/
#ifndef ROTOR_TEST
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB satconf
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB DiseqC switch
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - MPEGTS DVB support routines and defines
*/
#ifndef __TVH_MPEGTS_DVB_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - MPEGTS input source
*/
#include "input.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - MPEGTS multiplex
*/
#include "idnode.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - DVB Multiplex
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - TS file input system
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - TS file input system
*/
#ifndef __TVH_MPEGTS_MUX_SCHED_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - MPEGTS input source
*/
#include "input.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Linux DVB Network
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Network Scanner
*/
#include "input.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - Network Scanner
*/
#ifndef __TVH_MPEGTS_NETWORK_SCAN_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * MPEGTS PID list management
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * MPEGTS (DVB) based service
*/
#include <assert.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * MPEGTS table support
*/
#include "tvheadend.h"
/**
* Determine table type
*/
+
int
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 )
{
/**
* Add a new DVB table
*/
+
mpegts_table_t *
mpegts_table_add
( mpegts_mux_t *mm, int tableid, int mask,
/**
*
*/
+
void
mpegts_table_flush_all ( mpegts_mux_t *mm )
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - MPEGTS debug output
*/
-
#include "input.h"
void
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - SAT-IP client
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - SAT-IP DVB private data
*/
#ifndef __TVH_SATIP_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - SAT>IP DVB frontend
*/
#include <fcntl.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - SAT-IP DVB private data
*/
#ifndef __TVH_SATIP_PRIVATE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - SAT>IP DVB RTSP client
*/
#include <signal.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - SAT>IP DVB satconf
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, intial mux list
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, intial mux list
*/
#ifndef __DVB_SCANFILES_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, MPEG transport stream demuxer
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, MPEG transport stream functions
*/
#ifndef TSDEMUX_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - TS file input system
*/
#ifndef __TVH_TSFILE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - TS file input system
*/
#include "tvheadend.h"
/*
* Globals
*/
+
tvh_mutex_t tsfile_lock;
mpegts_network_t *tsfile_network;
tsfile_input_list_t tsfile_inputs;
/*
* Network definition
*/
+
static mpegts_service_t *
tsfile_network_create_service
( mpegts_mux_t *mm, uint16_t sid, uint16_t pmt_pid )
/*
* Initialise
*/
+
void tsfile_init ( int tuners )
{
int i;
/*
* Shutdown
*/
+
void
tsfile_done ( void )
{
/*
* Add multiplex
*/
+
void tsfile_add_file ( const char *path )
{
tsfile_input_t *mi;
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - TS file input system
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - TS file input system
*/
#include "tsfile_private.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - TS file private data
*/
#ifndef __TVH_TSFILE_PRIVATE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - HDHomeRun client
*/
#include "libhdhomerun/hdhomerun.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - HDHomeRun DVB private data
*/
#ifndef __TVH_tvhdhomerun_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - HDHomeRun DVB frontend
*/
#include "libhdhomerun/hdhomerun.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - HDHomeRun DVB private data
*/
#ifndef __TVH_tvhdhomerun_PRIVATE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, iconv interface
*/
#ifndef INTLCONV_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Multi-language Support - language codes
*/
#include <string.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Multi-language Support - language codes
*/
#ifndef __TVH_LANG_CODES_H__
} 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 );
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;
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Multi-language String support
*/
#include <stddef.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Multi-language String support
*/
#ifndef __TVH_LANG_STR_H__
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)
{
/* Add/Update elements */
+
int lang_str_add
( lang_str_t *ls, const char *str, const char *lang );
int lang_str_append
( 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
( 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__ */
/**
*
*/
+
static void
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)
{
/**
* Translate a libavcodec id to a component type
*/
+
streaming_component_type_t
codec_id2streaming_component_type(enum AVCodecID id)
{
/**
*
*/
+
#if ENABLE_VAAPI
#ifdef VA_FOURCC_I010
static void libav_va_log(int severity, const char *msg)
/**
*
*/
+
static void
libav_vaapi_init(void)
{
/**
*
*/
+
void
libav_vaapi_init_context(void *context)
{
/**
*
*/
+
void
libav_set_loglevel(void)
{
/**
*
*/
+
void
libav_init(void)
{
/**
*
*/
+
void
libav_done(void)
{
/*
- * 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 <htmlui://www.gnu.org/licenses/>.
+ * tvheadend, libav utils
*/
#ifndef LIBAV_H_
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
/*
- * Copyright (c) 2014 Jaroslav Kysela <perex@perex.cz>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the 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 <http://www.gnu.org/licenses/>.
+ * Copyright (c) 2014 Jaroslav Kysela <perex@perex.cz>
*/
#include <stdio.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * File locking
*/
#ifndef TVH_LOCK_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TVheadend
*/
#include <stdio.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - memory info support
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - memory info support
*/
#ifndef TVHEADEND_MEMORYINFO_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Floating point conversion functions.
*/
#define _ISOC99_SOURCE
*bufpt = 0;
return 0;
}
-
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * JSON helpers
*/
#include <stdlib.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * M3U parser
*/
#include "tvheadend.h"
/*
*
*/
+
static char *get_m3u_str(char *data, char **res, int *last)
{
char *p = data, first = *data;
/*
*
*/
+
static void get_m3u_str_post(char **data, int delim)
{
if (delim == '\n' || delim == '\r') {
/*
*
*/
+
static char *until_eol(char *d)
{
while (*d && *d != '\r' && *d != '\n') d++;
/*
*
*/
+
static int is_full_url(const char *url)
{
if (strncmp(url, "file://", 7) == 0) return 7;
/*
*
*/
+
static const char *get_url
(char *buf, size_t buflen, const char *rel, const char *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)
{
/*
- * 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 <htmlui://www.gnu.org/licenses/>.
+ * tvheadend, generic muxing utils
*/
#include <string.h>
#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)
/**
* Mime type for containers containing only audio
*/
+
static struct strtab container_audio_mime[] = {
{ "application/octet-stream", MC_UNKNOWN },
{ "audio/x-matroska", MC_MATROSKA },
/**
* Mime type for containers
*/
+
static struct strtab container_video_mime[] = {
{ "application/octet-stream", MC_UNKNOWN },
{ "video/x-matroska", MC_MATROSKA },
/**
* Name of the container
*/
+
static struct strtab container_name[] = {
{ "unknown", MC_UNKNOWN },
{ "matroska", MC_MATROSKA },
/**
* filename suffix of audio-only streams
*/
+
static struct strtab container_audio_file_suffix[] = {
{ "bin", MC_UNKNOWN },
{ "mka", MC_MATROSKA },
/**
* filename suffix of video streams
*/
+
static struct strtab container_video_file_suffix[] = {
{ "bin", MC_UNKNOWN },
{ "mkv", MC_MATROSKA },
/**
* Get the mime type for a container
*/
+
const char*
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)
{
/**
* Get the suffix used in file names
*/
+
const char*
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)
{
/**
* Convert a container name to a container type
*/
+
muxer_container_type_t
muxer_container_txt2type(const char *str)
{
/**
* Convert a mime-string to a container type
*/
+
muxer_container_type_t
muxer_container_mime2type(const char *str)
{
/**
* Copy muxer settings
*/
+
void
muxer_config_copy(muxer_config_t *dst, const muxer_config_t *src)
{
/**
* Free muxer settings
*/
+
void
muxer_config_free(muxer_config_t *m_cfg)
{
/**
* Create muxer hints
*/
+
muxer_hints_t *
muxer_hints_create(const char *agent)
{
/**
* Free muxer hints
*/
+
void
muxer_hints_free(muxer_hints_t *hints)
{
/**
* Create a new muxer
*/
+
muxer_t*
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)
{
/**
* cache type conversions
*/
+
static struct strtab cache_types[] = {
{ "Unknown", MC_CACHE_UNKNOWN },
{ "System", MC_CACHE_SYSTEM },
/**
* cache scheme
*/
+
void
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)
{
/*
- * 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 <htmlui://www.gnu.org/licenses/>.
+ * tvheadend, generic muxing utils
*/
#ifndef MUXER_H_
-/*****************************************************************************
- * 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 <assert.h>
#include <string.h>
/*
- * "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 <htmlui://www.gnu.org/licenses/>.
+ * "muxer" to write mpeg audio elementary streams
*/
#include <assert.h>
/**
*
*/
+
static int
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)
{
/**
* Figure out the mimetype
*/
+
static const char *
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)
{
/**
* Init the builtin mkv muxer with streams
*/
+
static int
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)
{
/**
* Open the file and set the file descriptor
*/
+
static int
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)
{
/**
* NOP
*/
+
static int
audioes_muxer_write_meta(muxer_t *m, struct epg_broadcast *eb, const char *comment)
{
/**
* Close the muxer
*/
+
static int
audioes_muxer_close(muxer_t *m)
{
/**
* Free all memory associated with the muxer
*/
+
static void
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)
/*
- * "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 <htmlui://www.gnu.org/licenses/>.
+ * "muxer" to write raw audio streams
*/
#ifndef AUDIOES_MUXER_H_
/*
- * 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 <htmlui://www.gnu.org/licenses/>.
+ * tvheadend, libavformat based muxer
*/
#include <assert.h>
/**
* Callback function for libavformat
*/
+
#if LIBAVFORMAT_VERSION_MAJOR > 60
static int
lav_muxer_write(void *opaque, const 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)
/**
* 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)
/**
* Figure out the mime-type for the muxed data stream
*/
+
static const char*
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)
{
/**
* Handle changes to the streams (usually PMT updates)
*/
+
static int
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)
{
/**
* Write a packet to the muxer
*/
+
static int
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)
{
/**
* NOP
*/
+
static int
lav_muxer_add_marker(muxer_t* m)
{
/**
* Close the muxer and append trailer to output
*/
+
static int
lav_muxer_close(muxer_t *m)
{
/**
* Free all memory associated with the muxer
*/
+
static void
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)
/*
- * 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 <htmlui://www.gnu.org/licenses/>.
+ * tvheadend, muxing of packets with libavformat
*/
#ifndef LAV_MUXER_H_
/*
- * 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 <htmlui://www.gnu.org/licenses/>.
+ * Matroska muxer
*/
#include <sys/types.h>
/*
- * 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 <htmlui://www.gnu.org/licenses/>.
+ * tvheadend, muxing of packets with builtin dvr muxer
*/
#ifndef MUXER_MKV_H_
/*
- * 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 <htmlui://www.gnu.org/licenses/>.
+ * tvheadend, simple muxer that just passes the input along
*/
#include <string.h>
/*
- * 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 <htmlui://www.gnu.org/licenses/>.
+ * tvheadend, simple muxer that just passes the input along
*/
#ifndef PASS_MUXER_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Notification framework
*/
#include <assert.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Notification framework
*/
#ifndef NOTIFY_H_
-/**
- * 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 <http://www.gnu.org/licenses/>.
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2008 Andreas Öman
*/
-
#include "tvheadend.h"
#include "streaming.h"
#include "packet.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Packet management
*/
#ifndef PACKET_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Bit stream reader
*/
#include <stdio.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Bit stream reader
*/
#ifndef BITSTREAM_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Packet parsing functions - streaming message handler
*/
#include "parsers.h"
/**
* H.264 parser, nal escaper
*/
+
void *
h264_nal_deescape(bitstream_t *bs, const uint8_t *data, int size)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Packet parsing functions
*/
#ifndef PARSER_H264_H_
/**
* Parse AAC LATM
*/
+
th_pkt_t *
parse_latm_audio_mux_element(parser_t *t, parser_es_t *st,
const uint8_t *data, int len)
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Packet parsing functions
*/
#ifndef PARSER_LATM_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2007 Andreas Öman
+ * Copyright (C) 2014 Jaroslav Kysela
*/
#include <ctype.h>
#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
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Teletext parsing functions
*/
#ifndef TELETEXT_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Packet parsing functions
*/
#include "parsers.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Elementary stream functions
*/
#ifndef PARSERS_H
-/**
- * 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 <http://www.gnu.org/licenses/>.
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2010 Andreas Öman
*/
#include <assert.h>
} 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)
{
/**
*
*/
+
static inline int
gh_is_audiovideo(int type)
{
/**
*
*/
+
static void
gh_flush(globalheaders_t *gh)
{
/**
*
*/
+
static void
apply_header(streaming_start_component_t *ssc, th_pkt_t *pkt)
{
/**
*
*/
+
static int
header_complete(streaming_start_component_t *ssc, int not_so_picky)
{
/**
*
*/
+
static int64_t
gh_queue_delay(globalheaders_t *gh, int index)
{
/**
*
*/
+
static int
headers_complete(globalheaders_t *gh)
{
/**
*
*/
+
static void
gh_start(globalheaders_t *gh, streaming_message_t *sm)
{
/**
*
*/
+
static void
gh_hold(globalheaders_t *gh, streaming_message_t *sm)
{
/**
*
*/
+
static void
gh_pass(globalheaders_t *gh, streaming_message_t *sm)
{
/**
*
*/
+
static void
globalheaders_input(void *opaque, streaming_message_t *sm)
{
/**
*
*/
+
streaming_target_t *
globalheaders_create(streaming_target_t *output)
{
/**
*
*/
+
void
globalheaders_destroy(streaming_target_t *pad)
{
-/**
- * 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 <http://www.gnu.org/licenses/>.
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2010 Andreas Öman
*/
#ifndef GLOBALHEADERS_H__
-/**
- * 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 <http://www.gnu.org/licenses/>.
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2010 Andreas Öman
*/
#include "tvheadend.h"
/**
*
*/
+
typedef struct tfstream {
LIST_ENTRY(tfstream) tfs_link;
/**
*
*/
+
typedef struct tsfix {
streaming_target_t tf_input;
/**
* Compute the timestamp deltas
*/
+
static int64_t
tsfix_ts_diff(int64_t ts1, int64_t ts2)
{
/**
*
*/
+
static void
tsfix_destroy_streams(tsfix_t *tf)
{
/**
*
*/
+
static tfstream_t *
tsfix_add_stream(tsfix_t *tf, int index, streaming_component_type_t type)
{
/**
*
*/
+
static void
tsfix_start(tsfix_t *tf, streaming_start_t *ss)
{
/**
*
*/
+
static void
tsfix_stop(tsfix_t *tf)
{
/**
*
*/
+
static void
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)
{
/**
*
*/
+
static inline int
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)
{
/**
*
*/
+
static void
tsfix_backlog(tsfix_t *tf)
{
/**
*
*/
+
static int64_t
tsfix_backlog_diff(tsfix_t *tf)
{
* 12: B dts 4922741536 pts <unset> rpts 4922741536
* 13: I dts 4922745136 pts 4922755936 rpts 4922755936
*/
+
static void
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)
{
/**
*
*/
+
static void
tsfix_input_packet(tsfix_t *tf, streaming_message_t *sm)
{
/**
*
*/
+
static void
tsfix_input(void *opaque, streaming_message_t *sm)
{
/**
*
*/
+
streaming_target_t *
tsfix_create(streaming_target_t *output)
{
/**
*
*/
+
void
tsfix_destroy(streaming_target_t *pad)
{
-/**
- * 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 <http://www.gnu.org/licenses/>.
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2010 Andreas Öman
*/
#ifndef TSFIX_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Stream Profile
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Stream Profile
*/
#ifndef __TVH_PROFILE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - property system (part of idnode)
*/
#include <stdio.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - property system (part of idnode)
*/
#ifndef __TVH_PROP_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - property system library (part of idnode)
*/
#include <stdio.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Rating Labels
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - Rating Labels
*/
#ifndef RATINGLABEL_H_
-/*****************************************************************************
- *
-* 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_
/**
* 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; \
/**
* Returns next node
*/
+
#define RB_NEXT(e, field) \
({ \
typeof(e) xx = e, f; \
/**
* Returns previous node
*/
+
#define RB_PREV(e, field) \
({ \
typeof(e) xx = e, f; \
/**
* 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; \
({ \
/**
* Iterate thru all nodes in reverse order
*/
+
#define RB_FOREACH_REVERSE(e, head, field) \
for(e = (head)->last; e != NULL; \
({ \
/**
* Remove the given node
*/
+
#define RB_REMOVE(head, e, field) \
do { \
int swapColor; \
/**
* Finds a node
*/
+
#define RB_FIND(head, skel, field, cmpfunc) \
({ \
int res; \
/**
* Finds first node greater than 'skel'
*/
+
#define RB_FIND_GT(head, skel, field, cmpfunc) \
({ \
int res; \
/**
* Finds a node greater or equal to 'skel'
*/
+
#define RB_FIND_GE(head, skel, field, cmpfunc) \
({ \
int res; \
/**
* Finds first node lesser than 'skel'
*/
+
#define RB_FIND_LT(head, skel, field, cmpfunc) \
({ \
int res; \
/**
* Finds a node lesser or equal to 'skel'
*/
+
#define RB_FIND_LE(head, skel, field, cmpfunc) \
({ \
int res; \
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - RTSP routines
*/
#include <signal.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - SAT-IP server - RTP part
*/
#include <signal.h>
#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)
/*
*
*/
+
void *satip_rtp_queue(th_subscription_t *subs,
streaming_queue_t *sq,
http_connection_t *hc,
/*
*
*/
+
static const char *
satip_rtcp_pol(int pol)
{
/*
*
*/
+
static const char *
satip_rtcp_fec(int fec)
{
/*
*
*/
+
static int
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;
/*
*
*/
+
static int
satip_rtcp_build(satip_rtp_session_t *rtp, uint8_t *msg)
{
/*
*
*/
+
static void *
satip_rtcp_thread(void *aux)
{
/*
*
*/
+
void satip_rtp_init(int boot)
{
TAILQ_INIT(&satip_rtp_sessions);
/*
*
*/
+
void satip_rtp_done(void)
{
assert(TAILQ_EMPTY(&satip_rtp_sessions));
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - SAT-IP server - RTSP part
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - SAT-IP server
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - SAT-IP DVB server - private data
*/
#ifndef __TVH_SATIP_SERVER_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - sbuf routines
*/
#ifndef __TVH_SBUF_H
/**
* Simple dynamically growing buffer
*/
+
typedef struct sbuf {
uint8_t *sb_data;
int sb_ptr;
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Services
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend
*/
#ifndef SERVICE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Service Mapper functions
*/
#include <ctype.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions for transport probing
*/
#ifndef __TVH_SERVICE_MAPPER_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions for storing program settings
*/
#include <sys/types.h>
/**
*
*/
+
const char *
hts_settings_get_root(void)
{
/**
*
*/
+
void
hts_settings_init(const char *confpath)
{
/**
*
*/
+
void
hts_settings_done(void)
{
/**
*
*/
+
int
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)
/**
*
*/
+
void
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 &&
/**
*
*/
+
static htsmsg_t *
hts_settings_load_one(const char *filename)
{
/**
*
*/
+
static htsmsg_t *
hts_settings_load_path(const char *fullpath, int depth)
{
/**
*
*/
+
static htsmsg_t *
hts_settings_vload(const char *pathfmt, va_list ap, int depth)
{
/**
*
*/
+
htsmsg_t *
hts_settings_load(const char *pathfmt, ...)
{
/**
*
*/
+
htsmsg_t *
hts_settings_load_r(int depth, const char *pathfmt, ...)
{
/**
*
*/
+
void
hts_settings_remove(const char *pathfmt, ...)
{
/**
*
*/
+
int
hts_settings_open_file(int flags, const char *pathfmt, ...)
{
/*
* Check if a path exists
*/
+
int
hts_settings_exists ( const char *pathfmt, ... )
{
/*
* XDG user directory support
*/
+
char *
hts_settings_get_xdg_dir_lookup (const char *name)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Functions for storing program settings
*/
#ifndef HTSSETTINGS_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Process spawn functions
*/
#include <sys/types.h>
/*
*
*/
+
#define SPAWN_PIPE_READ_SIZE 4096
static void
/*
* Search PATH for executable
*/
+
int
find_exec ( const char *name, char *out, size_t len )
{
/**
* Reap one child
*/
+
int
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)
{
/**
* Kill the pid (only if waiting)
*/
+
int
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)
{
/**
*
*/
+
int
spawn_parse_args(char ***argv, int argc, const char *cmd, const char **replace)
{
/**
*
*/
+
void
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)
* 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)
*
* *outp will point to the allocated buffer
*/
+
int
spawnv(const char *prog, char *argv[], pid_t *pid, int redir_stdout, int redir_stderr)
{
/*
*
*/
+
void spawn_init(void)
{
tvh_pipe(O_NONBLOCK, &spawn_pipe_info);
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Process spawn functions
*/
#ifndef SPAWN_H
-/**
- * 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 <http://www.gnu.org/licenses/>.
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2008 Andreas Öman
*/
#include <string.h>
/**
*
*/
+
void
streaming_target_init(streaming_target_t *st, streaming_ops_t *ops,
void *opaque, int reject_filter)
/**
*
*/
+
static size_t
streaming_message_data_size(streaming_message_t *sm)
{
/**
*
*/
+
static void
streaming_queue_deliver(void *opauqe, streaming_message_t *sm)
{
/**
*
*/
+
static htsmsg_t *
streaming_queue_info(void *opaque, htsmsg_t *list)
{
/**
*
*/
+
void
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)
{
/**
*
*/
+
void
streaming_queue_deinit(streaming_queue_t *sq)
{
/**
*
*/
+
void
streaming_queue_clear(struct streaming_message_queue *q)
{
/**
*
*/
+
void
streaming_target_connect(streaming_pad_t *sp, streaming_target_t *st)
{
/**
*
*/
+
void
streaming_target_disconnect(streaming_pad_t *sp, streaming_target_t *st)
{
/**
*
*/
+
streaming_message_t *
streaming_msg_create(streaming_message_type_t type)
{
/**
*
*/
+
streaming_message_t *
streaming_msg_create_pkt(th_pkt_t *pkt)
{
/**
*
*/
+
streaming_message_t *
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)
{
/**
*
*/
+
streaming_message_t *
streaming_msg_clone(streaming_message_t *src)
{
/**
*
*/
+
void
streaming_start_unref(streaming_start_t *ss)
{
/**
*
*/
+
void
streaming_msg_free(streaming_message_t *sm)
{
/**
*
*/
+
void
streaming_target_deliver2(streaming_target_t *st, streaming_message_t *sm)
{
/**
*
*/
+
void
streaming_pad_deliver(streaming_pad_t *sp, streaming_message_t *sm)
{
/**
*
*/
+
void
streaming_service_deliver(service_t *t, streaming_message_t *sm)
{
/**
*
*/
+
const char *
streaming_code2txt(int code)
{
/**
*
*/
+
streaming_start_t *
streaming_start_copy(const streaming_start_t *src)
{
/**
*
*/
+
streaming_start_component_t *
streaming_start_component_find_by_index(streaming_start_t *ss, int idx)
{
/**
*
*/
+
static struct strtab streamtypetab[] = {
{ "NONE", SCT_NONE },
{ "UNKNOWN", SCT_UNKNOWN },
/**
*
*/
+
const char *
streaming_component_type2txt(streaming_component_type_t s)
{
/*
*
*/
+
void streaming_init(void)
{
memoryinfo_register(&streaming_msg_memoryinfo);
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Stream plumbing, connects individual streaming components to each other
*/
#ifndef STREAMING_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Sorted String List Functions
*/
#include "string_list.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Sorted String List Functions
*/
+
#ifndef STRING_LIST_H
#define STRING_LIST_H
/*
* External forward decls
*/
+
struct htsmsg;
/// Simple _sorted_ string list type and helper functions.
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, transport and subscription functions
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, subscription functions
*/
#ifndef SUBSCRIPTIONS_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, TCP common functions
*/
#include <fcntl.h>
/**
*
*/
+
int
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,
/**
*
*/
+
int
tcp_connect(const char *hostname, int port, const char *bindaddr,
char *errbuf, size_t errbufsize, int timeout)
/**
*
*/
+
int
tcp_write_queue(int fd, htsbuf_queue_t *q)
{
/**
*
*/
+
static int
tcp_fill_htsbuf_from_fd(int fd, htsbuf_queue_t *hq)
{
/**
*
*/
+
char *
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)
{
/**
*
*/
+
int
tcp_read(int fd, void *buf, size_t len)
{
/**
*
*/
+
int
tcp_read_timeout(int fd, void *buf, size_t len, int timeout)
{
/**
*
*/
+
int
tcp_socket_dead(int fd)
{
/**
*
*/
+
char *
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)
{
/**
*
*/
+
static tvhpoll_t *tcp_server_poll;
static uint32_t tcp_server_launch_id;
/**
*
*/
+
uint32_t
tcp_connection_count(access_t *aa)
{
/**
*
*/
+
void *
tcp_connection_launch
(int fd, int streaming, void (*status) (void *opaque, htsmsg_t *m), access_t *aa)
/**
*
*/
+
void
tcp_connection_land(void *tcp_id)
{
/**
*
*/
+
void
tcp_connection_cancel(uint32_t id)
{
/**
*
*/
+
void
tcp_connection_cancel_all(void)
{
/*
*
*/
+
static void *
tcp_server_start(void *aux)
{
/**
*
*/
+
static void *
tcp_server_loop(void *aux)
{
/**
*
*/
+
#if ENABLE_LIBSYSTEMD_DAEMON
static void *tcp_server_create_new
#else
/**
*
*/
+
void *
tcp_server_create
(int subsystem, const char *name, const char *bindaddr,
/**
*
*/
+
void tcp_server_register(void *server)
{
tcp_server_t *ts = server;
/**
*
*/
+
void
tcp_server_delete(void *server)
{
/**
*
*/
+
int
tcp_default_ip_addr ( struct sockaddr_storage *deflt, int family )
{
/**
*
*/
+
int
tcp_server_bound ( void *server, struct sockaddr_storage *bound, int family )
{
/**
*
*/
+
int
tcp_server_onall ( void *server )
{
/*
* Connections status
*/
+
htsmsg_t *
tcp_server_connections ( void )
{
/*
* Connections count
*/
+
int
tcp_server_connections_count ( void )
{
/**
*
*/
+
pthread_t tcp_server_tid;
void
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, TCP common functions
*/
#ifndef TCP_H_
#include <stdint.h>
/* Parent */
+
typedef struct obj_a
{
idnode_t a_id;
extern const idclass_t obj_a_class;
/* Child */
+
typedef struct obj_b
{
obj_a_t;
-/**
- * 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 <http://www.gnu.org/licenses/>.
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2012 Adam Sutton
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - Timeshift
*/
#ifndef __TVH_TIMESHIFT_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - Timeshift
*/
#ifndef __TVH_TIMESHIFT_PRIVATE_H__
/**
* Indexes of import data in the stream
*/
+
typedef struct timeshift_index_iframe
{
off_t pos; ///< Position in the file
/**
* Indexes of import data in the stream
*/
+
typedef struct timeshift_index_data
{
off_t pos; ///< Position in the file
/**
* Timeshift file
*/
+
typedef struct timeshift_file
{
int wfd; ///< Write descriptor
/**
*
*/
+
typedef struct timeshift_seek {
timeshift_file_t *file;
timeshift_index_iframe_t *frame;
/**
*
*/
+
typedef struct timeshift {
// Note: input MUST BE FIRST in struct
streaming_target_t input; ///< Input source
/*
*
*/
+
extern uint64_t timeshift_total_size;
extern uint64_t timeshift_total_ram_size;
/*
* 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 );
/*
* 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 );
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - Timeshift File Manager
*/
#include <fcntl.h>
-/**
- * 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 <http://www.gnu.org/licenses/>.
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2012 Adam Sutton
*/
#include "tvheadend.h"
-/**
- * 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 <http://www.gnu.org/licenses/>.
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2012 Adam Sutton
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Gather timing statistics - profiling
*/
#include <assert.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Gather timing statistics - profiling
*/
#ifndef __TVH_TPROFILE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#ifndef TVH_TRANSCODING_CODEC_H__
#define TVH_TRANSCODING_CODEC_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "internals.h"
#if ENABLE_VAAPI
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * 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" },
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
#include <opus/opus_defines.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
#include <vpx/vp8cx.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
#include <fcntl.h>
#include <sys/ioctl.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
#include <fcntl.h>
#include <sys/ioctl.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "transcoding/codec/internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#ifndef TVH_TRANSCODING_CODEC_INTERNALS_H__
#define TVH_TRANSCODING_CODEC_INTERNALS_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "internals.h"
#include "settings.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "internals.h"
#include "lang_codes.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "internals.h"
#include "access.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Codec Profiles
*/
-
#include "internals.h"
#include <libavutil/pixdesc.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#include "vainfo.h"
#include "internals.h"
void vainfo_deinit()
{
// this function should not be called
-}
\ No newline at end of file
+}
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#ifndef TVH_TRANSCODING_TRANSCODE_CODEC_VAINFO_H__
#define TVH_TRANSCODING_TRANSCODE_CODEC_VAINFO_H__
* Will not print output with detected codec/profiles
*
*/
+
#define VAINFO_DONT_SHOW_LOGS 0
/**
* Will print output with detected codec/profiles
*
*/
+
#define VAINFO_SHOW_LOGS 1
* @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
/**
* 0 = no logs generated
*
*/
+
int vainfo_init(int show_log);
* 1 - if encoder is available
*
*/
+
int vainfo_encoder_isavailable(int codec);
* > 0 - if encoder is supporting B frames and how many (MAX = 7)
*
*/
+
int vainfo_encoder_maxBfreames(int codec);
* 1 - if encoder is supporting Quality and how much (MAX = 15)
*
*/
+
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__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#include "memutils.h"
#include <libavutil/mem.h>
/* _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)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#ifndef TVH_TRANSCODING_MEMUTILS_H__
#define TVH_TRANSCODING_MEMUTILS_H__
/* _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);
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#ifndef TVH_TRANSCODING_TRANSCODE_H__
#define TVH_TRANSCODING_TRANSCODE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#include "internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#include "internals.h"
#include <libavutil/opt.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#include "internals.h"
#include "parsers/parsers.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
#include "hwaccels.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#ifndef TVH_TRANSCODING_TRANSCODE_HWACCELS_H__
#define TVH_TRANSCODING_TRANSCODE_HWACCELS_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
#include "../../codec/internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#ifndef TVH_TRANSCODING_TRANSCODE_HWACCELS_VAAPI_H__
#define TVH_TRANSCODING_TRANSCODE_HWACCELS_VAAPI_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#ifndef TVH_TRANSCODING_TRANSCODE_INTERNALS_H__
#define TVH_TRANSCODING_TRANSCODE_INTERNALS_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#ifndef TVH_TRANSCODING_TRANSCODE_LOG_H__
#define TVH_TRANSCODING_TRANSCODE_LOG_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#include "transcoding/transcode.h"
#include "internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#include "internals.h"
#include "../codec/internals.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
-
#include "internals.h"
#include "../codec/internals.h"
#include "service.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend - Transcoding
*/
#include "internals.h"
-/**
- * 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 <http://www.gnu.org/licenses/>.
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2009 Andreas Öman
*/
+
#include "build.h"
#include "trap.h"
/**
*
*/
+
#ifndef ENABLE_LIBUNWIND
#if ENABLE_EXECINFO
static int
return 0;
}
#endif /* ENABLE_EXECINFO */
+
#endif
#if ENABLE_LIBUNWIND
* handler often terminates without a trace, or does not provide
* correct function name mapping.
*/
+
#if ENABLE_LIBUNWIND
traphandler_libunwind();
return;
-/**
- * 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 <http://www.gnu.org/licenses/>.
+/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ * Copyright (C) 2009 Andreas Öman
*/
#ifndef TRAP_H__
void trap_init(const char *swname);
#endif /* TRAP_H__ */
-
/*
- * Copyright (c) 2015 Jaroslav Kysela <perex@perex.cz>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the 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 <http://www.gnu.org/licenses/>.
+ * Copyright (c) 2015 Jaroslav Kysela <perex@perex.cz>
*/
#ifndef __TVH_ENDIAN_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, internationalization (locale)
*/
#include <stdio.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - internationalization (locale)
*/
+
#ifndef __TVH_LOCALE_H__
#define __TVH_LOCALE_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - advanced string functions
*/
+
#ifndef TVHEADEND_STRING_H
#define TVHEADEND_STRING_H
}
/* linux style: -19 .. 20 */
+
int
tvh_thread_renice(int value)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - mutex functions
*/
+
#ifndef TVHEADEND_THREAD_H
#define TVHEADEND_THREAD_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - structures
*/
+
#ifndef TVHEADEND_H
#define TVHEADEND_H
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - logging
*/
#include <stdio.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - logging
*/
+
#ifndef __TVH_LOGGING_H__
#define __TVH_LOGGING_H__
} tvhlog_subsys_t;
/* Config */
+
extern int tvhlog_level;
extern char *tvhlog_path;
extern int tvhlog_options;
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 );
/* Options */
+
#define TVHLOG_OPT_DBG_SYSLOG 0x0001
#define TVHLOG_OPT_DBG_STDERR 0x0002
#define TVHLOG_OPT_DBG_FILE 0x0004
#define TVHLOG_OPT_ALL 0xFFFF
/* Levels */
+
#ifndef LOG_TRACE
#define LOG_TRACE (LOG_DEBUG+1)
#endif
#define LOG_TVH_NOTIFY 0x40000000
/* Subsystems */
+
enum {
LS_NONE,
LS_START,
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, ...)\
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TVheadend - poll/select wrapper
*/
#include "tvheadend.h"
-
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TVheadend - poll/select wrapper
*/
#ifndef __TVHPOLL_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TVheadend - regex wrapper
*/
#ifndef __TVHREGEX_H__
/*
* NTP processing
*/
+
#define NTPD_BASE 0x4e545030 /* "NTP0" */
+
#define NTPD_UNIT 2
#if !ENABLE_ANDROID
/*
* Update time
*/
+
void
tvhtime_update ( time_t utc, const char *srcname )
{
}
/* Initialise */
+
void tvhtime_init ( void )
{
if (config.tvhtime_tolerance == 0)
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TVheadend - time processing
*/
#ifndef __TVH_TIME_H__
/*
- * Copyright (c) 2017 Jaroslav Kysela <perex@perex.cz>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the 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 <http://www.gnu.org/licenses/>.
+ * Copyright (c) 2017 Jaroslav Kysela <perex@perex.cz>
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * File system management
*/
#ifndef __TVH_VFS_H__
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TVHeadend - UDP common routines
*/
#define _GNU_SOURCE
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, UDP interface
*/
#ifndef UDP_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TVHeadend - UDP stream common routines
*/
#define _GNU_SOURCE
}
atomic_set(&us->us_running, 0);
return pthread_join(us->us_tid, NULL);
-}
\ No newline at end of file
+}
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, UDP stream interface
*/
#ifndef UDP_STREAM_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, UPnP interface
*/
#include "tvheadend.h"
/*
*
*/
+
upnp_service_t *upnp_service_create0( upnp_service_t *us )
{
tvh_mutex_lock(&upnp_lock);
/*
*
*/
+
void
upnp_send( htsbuf_queue_t *q, struct sockaddr_storage *storage,
int delay_ms, int from_multicast )
/*
*
*/
+
static void
upnp_dump_data( upnp_data_t *data )
{
/*
* Discovery thread
*/
+
static void *
upnp_thread( void *aux )
{
/*
* Fire up UPnP server
*/
+
void
upnp_server_init(const char *bindaddr)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, UPnP interface
*/
#ifndef UPNP_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - URL Processing
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend - URL Processing
*/
#ifndef __TVH_URL_H__
#include <string.h>
/* URL structure */
+
typedef struct url
{
char *scheme;
/*
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
* Copyright (c) 2005 Michael Niedermayer <michaelni@gmx.at>
* 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 <http://www.gnu.org/licenses/>.
*/
#include <limits.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - UUID generation routines
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - UUID generation routines
*/
#ifndef __TVH_UUID_H__
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;
} 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;
/**
* 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);
/**
* Empty
*/
+
static inline int uuid_empty ( const tvh_uuid_t *a )
{
return memcmp(a->bin, ___uuid_empty, UUID_BIN_SIZE) == 0;
/**
* 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; \
/**
* 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__ */
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, systemd watchdog support
*/
#include "watchdog.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, systemd watchdog support
*/
#ifndef WATCHDOG_H_
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, COMET
*/
#include <openssl/sha.h>
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, documenation markdown generator
*/
#include "tvheadend.h"
int hdr, int docs, int props);
/* */
+
static int
md_nl(htsbuf_queue_t *hq, int nl)
{
}
/* */
+
static void
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)
{
}
/* */
+
static void
md_text(htsbuf_queue_t *hq, const char *first, const char *next, const char *text)
{
}
/* */
+
static int
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)
{
}
/* */
+
static int
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)
/**
* List of all classes with documentation
*/
+
static int
http_markdown_classes(http_connection_t *hc)
{
/**
*
*/
+
static int
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)
{
/**
* Handle requests for markdown export.
*/
+
int
page_markdown(http_connection_t *hc, const char *remain, void *opaque)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, EXTJS based interface
*/
#include "htsmsg.h"
/**
*
*/
+
static void
extjs_load(htsbuf_queue_t *hq, const char *script, ...)
{
/**
*
*/
+
static void
extjs_lcss(htsbuf_queue_t *hq, const char *css, ...)
{
/**
*
*/
+
static void
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)
{
/**
*
*/
+
static int
extjs_livetv(http_connection_t *hc, const char *remain, void *opaque)
{
/**
*
*/
+
static int
page_about(http_connection_t *hc, const char *remain, void *opaque)
{
/**
* WEB user interface
*/
+
void
extjs_start(void)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, HTML/XML helper routines
*/
#include <string.h>
#include "hts_strtab.h"
/* Escape chars */
+
static struct {
char chr;
const char *esc;
* 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)
{
/*
* http (xml) escape a string
*/
+
const char*
html_escape(char *dst, const char *src, size_t len)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, WEBUI / HTML user interface
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * Tvheadend, Statedump
*/
#include "tvheadend.h"
http_output_content(hc, "text/plain; charset=UTF-8");
return 0;
}
-
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, WEBUI / HTML user interface
*/
#include <sys/stat.h>
/*
- * 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 <htmlui://www.gnu.org/licenses/>.
+ * tvheadend, web user interface
*/
#ifndef WEBUI_H_
/**
*
*/
+
void comet_init(void);
void comet_done(void);
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, WebAPI access point
*/
#include "tvheadend.h"
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, XMLTV exporter
*/
#include "tvheadend.h"
/*
*
*/
+
static void
http_xmltv_time(char *dst, time_t t)
{
/*
*
*/
+
static void
http_xmltv_begin(htsbuf_queue_t *hq)
{
/*
*
*/
+
static void
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,
/*
*
*/
+
static void
http_xmltv_channel_add(http_connection_t *hc, htsbuf_queue_t *hq, int flags, const char *hostpath, channel_t *ch)
{
/** 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,
/*
*
*/
+
static void
http_xmltv_programme_one(const http_connection_t *hc,
htsbuf_queue_t *hq, const char *hostpath,
/*
*
*/
+
static void
http_xmltv_programme_add(const http_connection_t *hc, htsbuf_queue_t *hq, const char *hostpath, channel_t *ch)
{
/**
* Output a XMLTV containing a single channel
*/
+
static int
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)
{
/**
* Output a flat playlist with all channels
*/
+
static int
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)
{
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Wizard
*/
/*
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * tvheadend, Wizard
*/
#ifndef __TVH_WIZARD_H__
/*
* Regex stuff
*/
+
void regex_free(tvh_regex_t *regex)
{
#if ENABLE_PCRE || ENABLE_PCRE2
/*
- * 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 <http://www.gnu.org/licenses/>.
+ * TV headend - zlib integration
*/
#include "tvheadend.h"
#!/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 <http://www.gnu.org/licenses/>.
-#
+
"""
Test regular expressions used in OTA EIT scraper.
#!/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 <http://www.gnu.org/licenses/>.
-#
-# For more details, including opportunities for alternative licensing,
-# please read the LICENSE file.
-#
-# ############################################################################
# ############################################################################
# 3rd Party library processing support
# Convert amd64 to x86_64 (ensure uniformity)
[ "${ARCH}" = "amd64" ] && ARCH=x86_64
-# ############################################################################
-# Config
-# ############################################################################
-
-
# ############################################################################
# Functions
# ############################################################################
# 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
# Can't upload
[ -z "${PCLOUD_USER}" -o -z "${PCLOUD_PASS}" ] && return 0
-
+
# Don't need to upload
[ -f "${P}" ] && return 0
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
}
-/* ****************************************************************************
- *
- * 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 <http://www.gnu.org/licenses/>.
- *
- * 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
-/* ****************************************************************************
- *
- * 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 <http://www.gnu.org/licenses/>.
- *
- * 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
*
* ***************************************************************************/
#!/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 <http://www.gnu.org/licenses/>.
-#
-# 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
#!/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 <http://www.gnu.org/licenses/>.
-#
-# For more details, including opportunities for alternative licensing,
-# please read the LICENSE file.
-#
-# ############################################################################
-
# ############################################################################
# Module Title
#
# Module Description
# ############################################################################
+
# ############################################################################
# Editor Configuration
#