2007-08-16 10:59:06 +00:00
|
|
|
|
/*
|
2007-09-14 21:45:21 +00:00
|
|
|
|
* Multicasted IPTV Input
|
2007-08-16 10:59:06 +00:00
|
|
|
|
* Copyright (C) 2007 Andreas <EFBFBD>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/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2007-09-14 21:45:21 +00:00
|
|
|
|
#ifndef PSI_H_
|
|
|
|
|
#define PSI_H_
|
2007-08-16 10:59:06 +00:00
|
|
|
|
|
2008-08-25 16:22:50 +00:00
|
|
|
|
#include <libhts/htsmsg.h>
|
|
|
|
|
|
2007-09-14 21:45:21 +00:00
|
|
|
|
#define PSI_SECTION_SIZE 4096
|
2007-08-16 10:59:06 +00:00
|
|
|
|
|
2007-09-14 21:45:21 +00:00
|
|
|
|
typedef struct psi_section {
|
|
|
|
|
int ps_offset;
|
|
|
|
|
uint8_t ps_data[PSI_SECTION_SIZE];
|
|
|
|
|
} psi_section_t;
|
2007-08-16 10:59:06 +00:00
|
|
|
|
|
2007-09-14 21:45:21 +00:00
|
|
|
|
|
|
|
|
|
int psi_section_reassemble(psi_section_t *ps, uint8_t *data, int len,
|
|
|
|
|
int pusi, int chkcrc);
|
|
|
|
|
|
|
|
|
|
int psi_parse_pat(th_transport_t *t, uint8_t *ptr, int len,
|
|
|
|
|
pid_section_callback_t *pmt_callback);
|
|
|
|
|
|
|
|
|
|
int psi_parse_pmt(th_transport_t *t, uint8_t *ptr, int len, int chksvcid);
|
|
|
|
|
|
2007-10-27 07:40:30 +00:00
|
|
|
|
uint32_t psi_crc32(uint8_t *data, size_t datalen);
|
|
|
|
|
|
2008-01-26 12:15:34 +00:00
|
|
|
|
int psi_build_pat(th_transport_t *t, uint8_t *buf, int maxlen, int pmtpid);
|
2007-10-27 07:40:30 +00:00
|
|
|
|
|
2008-09-17 19:29:25 +00:00
|
|
|
|
//int psi_build_pmt(th_muxer_t *tm, uint8_t *buf0, int maxlen, int pcrpid);
|
2007-10-27 07:40:30 +00:00
|
|
|
|
|
2007-12-02 11:12:58 +00:00
|
|
|
|
const char *psi_caid2name(uint16_t caid);
|
|
|
|
|
|
2008-08-25 17:46:44 +00:00
|
|
|
|
void psi_load_transport_settings(htsmsg_t *m, th_transport_t *t);
|
|
|
|
|
void psi_save_transport_settings(htsmsg_t *m, th_transport_t *t);
|
2008-04-07 15:57:20 +00:00
|
|
|
|
|
2007-09-14 21:45:21 +00:00
|
|
|
|
#endif /* PSI_H_ */
|