Commit 83ad40ed authored by Sebastian Ramacher's avatar Sebastian Ramacher

Imported Upstream version 1.1

parent 38db8779
PREFIX ?= /usr/local
INCLUDE = $(subst //,/,$(DESTDIR)/$(PREFIX)/include/bitstream)
VERSION = 1.0
VERSION = 1.1
all:
@echo "Run \"make install\" to install biTStream into $(INCLUDE)"
......@@ -9,22 +9,28 @@ install:
@echo "INSTALL $(INCLUDE)"
@install -d $(INCLUDE)
@install -m 644 common.h $(INCLUDE)/
@install -d $(INCLUDE)/atsc
@install -m 644 atsc/*.h $(INCLUDE)/atsc
@install -d $(INCLUDE)/dvb
@install -m 644 dvb/*.h $(INCLUDE)/dvb
@install -d $(INCLUDE)/dvb/si
@install -m 644 dvb/si/*.h $(INCLUDE)/dvb/si
@install -d $(INCLUDE)/ietf
@install -m 644 ietf/* $(INCLUDE)/ietf
@install -d $(INCLUDE)/ieee
@install -m 644 ieee/* $(INCLUDE)/ieee
@install -d $(INCLUDE)/mpeg
@install -m 644 mpeg/*.h $(INCLUDE)/mpeg
@install -d $(INCLUDE)/mpeg/psi
@install -m 644 mpeg/psi/*.h $(INCLUDE)/mpeg/psi
@install -d $(INCLUDE)/scte
@install -m 644 scte/*.h $(INCLUDE)/scte
uninstall:
@echo "REMOVE $(INCLUDE)"
@rm -rf $(INCLUDE)
distcheck:
dist:
git archive --format=tar --prefix=bitstream-$(VERSION)/ master | bzip2 -9 > bitstream-$(VERSION).tar.bz2
.PHONY: install uninstall distcheck
1.1 (5 Oct 2015)
================
- Rename fields in BAT, RST and SIT to match those of SDT
- Add support for private data specifier 0x233a for descriptor 0x83
- Add support for elementary streams MPEG video and audio, AAC, A/52, Opus,
H264 and DVB subtitles
- Add support for SMPTE 2022-1 Forward Error Correction
- Add support for encoder/decoder DVB Simulcrypt EMMG interface
- Add support for IEEE 802.3 Ethernet frames
- Add support for IP and UDP headers
- Add support for IETF RTCP
- Add support for SCTE-35 Splice Information Table
- Fix parsing of PSI version_number
- Fix bug in EIT
- Fix bug in PCR writing
- Fix retrieval of PES payload offset in case of optional header
- Fix incorrect marker bit in PES PTS and DTS syntax
1.0 (15 Dec 2011)
=================
......
/*****************************************************************************
* a52.h: ATSC A/52:2012 Digital Audio Compression Standard
*****************************************************************************
* Copyright (C) 2013-2014 VideoLAN
*
* Authors: Benjamin Cohen <bencoh@notk.org>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*****************************************************************************/
/*
* Normative references:
* - ATSC A/52:2012
*/
#ifndef __BITSTREAM_ATSC_A52_H__
#define __BITSTREAM_ATSC_A52_H__
#include <stdint.h> /* uint8_t, uint16_t, etc... */
#include <string.h> /* memcmp */
#include <stdbool.h> /* bool */
#ifdef __cplusplus
extern "C"
{
#endif
#define A52_BSID 8
#define A52_BSID_ANNEX_D 1
#define A52_BSID_ANNEX_E 16
#define A52_FSCOD_48KHZ 0
#define A52_FSCOD_441KHZ 1
#define A52_FSCOD_32KHZ 2
#define A52_FSCOD_RESERVED 3
#define A52_FRAME_SAMPLES 1536
/*****************************************************************************
* A/52 syncinfo (A/52:2012 Table 5.1)
* - syncword 16
* - crc1 16
* - fscod 2
* - frmsizecod 6
*****************************************************************************/
#define A52_SYNCINFO_SIZE 5
/* A/52 Frame Size Code Table (A/52:2012 Table 5.18) */
static const uint16_t a52_frame_size_code_tab[38][3] = {
{ 64, 69, 96 },
{ 64, 70, 96 },
{ 80, 87, 120 },
{ 80, 88, 120 },
{ 96, 104, 144 },
{ 96, 105, 144 },
{ 112, 121, 168 },
{ 112, 122, 168 },
{ 128, 139, 192 },
{ 128, 140, 192 },
{ 160, 174, 240 },
{ 160, 175, 240 },
{ 192, 208, 288 },
{ 192, 209, 288 },
{ 224, 243, 336 },
{ 224, 244, 336 },
{ 256, 278, 384 },
{ 256, 279, 384 },
{ 320, 348, 480 },
{ 320, 349, 480 },
{ 384, 417, 576 },
{ 384, 418, 576 },
{ 448, 487, 672 },
{ 448, 488, 672 },
{ 512, 557, 768 },
{ 512, 558, 768 },
{ 640, 696, 960 },
{ 640, 697, 960 },
{ 768, 835, 1152 },
{ 768, 836, 1152 },
{ 896, 975, 1344 },
{ 896, 976, 1344 },
{ 1024, 1114, 1536 },
{ 1024, 1115, 1536 },
{ 1152, 1253, 1728 },
{ 1152, 1254, 1728 },
{ 1280, 1393, 1920 },
{ 1280, 1394, 1920 },
};
/* A/52 Bitrate Table (A/52:2012 Table 5.18) */
static const uint16_t a52_bitrate_tab[38] = {
64, 64,
80, 80,
96, 96,
112, 112,
128, 128,
160, 160,
192, 192,
224, 224,
256, 256,
320, 320,
384, 384,
448, 448,
512, 512,
640, 640,
768, 768,
896, 896,
1024, 1024,
1152, 1152,
1280, 1280
};
static inline uint16_t a52_get_sync(const uint8_t *p_a52)
{
return (p_a52[0] << 8 | p_a52[1]);
}
static inline void a52_set_sync(uint8_t *p_a52)
{
p_a52[0] = 0xb;
p_a52[1] = 0x77;
}
static inline uint16_t a52_get_crc(const uint8_t *p_a52)
{
return (p_a52[2] << 8 | p_a52[3]);
}
static inline void a52_set_crc(uint8_t *p_a52, uint16_t i_crc)
{
p_a52[2] = i_crc >> 8;
p_a52[3] = i_crc & 0xff;
}
static inline uint8_t a52_get_fscod(const uint8_t *p_a52)
{
return (p_a52[4] & 0xc0) >> 6;
}
static inline void a52_set_fscod(uint8_t *p_a52, uint8_t i_fscod)
{
p_a52[4] &= ~0xc0;
p_a52[4] |= (i_fscod & 0x3) << 6;
}
static inline uint8_t a52_get_frmsizecod(const uint8_t *p_a52)
{
return p_a52[4] & 0x3f;
}
static inline void a52_set_frmsizecod(uint8_t *p_a52, uint8_t i_frmsizecod)
{
p_a52[4] &= ~0x3f;
p_a52[4] |= i_frmsizecod & 0x3f;
}
static inline uint16_t a52_get_frame_size(uint8_t i_fscod, uint8_t i_frmsizecod)
{
i_fscod &= 0x3;
if ((i_fscod == A52_FSCOD_RESERVED) || (i_frmsizecod > 37)) {
return 0;
}
return a52_frame_size_code_tab[i_frmsizecod][i_fscod] * 2;
}
static inline bool a52_sync_compare_formats(const uint8_t *p_a521, const uint8_t *p_a522)
{
return p_a521[0] == p_a522[0] && p_a521[1] == p_a522[1] &&
p_a521[4] == p_a522[4];
}
/*****************************************************************************
* A/52 bsi (Bit Stream Information)
*****************************************************************************/
static inline uint8_t a52_get_bsid(const uint8_t *p_a52)
{
return (p_a52[5] & 0xf8) >> 3;
}
static inline void a52_set_bsid(uint8_t *p_a52, uint8_t i_bsid)
{
p_a52[5] &= ~0xf8;
p_a52[5] |= (i_bsid & 0xf8) << 3;
}
static inline uint8_t a52_get_bsmod(const uint8_t *p_a52)
{
return (p_a52[5] & 0x7);
}
static inline void a52_set_bsmod(uint8_t *p_a52, uint8_t i_bsid)
{
p_a52[5] &= ~0x7;
p_a52[5] |= i_bsid & 0x7;
}
static inline uint8_t a52_get_acmod(const uint8_t *p_a52)
{
return (p_a52[6] & 0xe0) >> 5;
}
static inline void a52_set_acmod(uint8_t *p_a52, uint8_t i_acmod)
{
p_a52[6] &= ~0xe0;
p_a52[6] |= (i_acmod & 0x7) << 5;
}
static inline uint8_t a52_get_cmixlev(const uint8_t *p_a52)
{
return (p_a52[6] & 0x18) >> 3;
}
static inline void a52_set_cmixlev(uint8_t *p_a52, uint8_t i_cmixlev)
{
p_a52[6] &= ~0x18;
p_a52[6] |= (i_cmixlev & 0x3) << 3;
}
/*****************************************************************************
* A/52 Annex E
*****************************************************************************/
#define A52E_FSCOD2_24KHZ 0
#define A52E_FSCOD2_2205KHZ 1
#define A52E_FSCOD2_16KHZ 2
#define A52E_FSCOD2_RESERVED 3
static inline uint8_t a52e_get_strmtyp(const uint8_t *p_a52)
{
return (p_a52[2] & 0xc0) >> 5;
}
static inline void a52e_set_strmtyp(uint8_t *p_a52, uint8_t i_strmtyp)
{
p_a52[2] &= ~0xc0;
p_a52[2] |= (i_strmtyp & 0x3) << 6;
}
static inline uint8_t a52e_get_substreamid(const uint8_t *p_a52)
{
return (p_a52[2] & 0x38) >> 3;
}
static inline void a52e_set_substreamid(uint8_t *p_a52, uint8_t i_substreamid)
{
p_a52[2] &= ~0x38;
p_a52[2] |= (i_substreamid & 0x7) << 3;
}
static inline uint16_t a52e_get_frmsiz(const uint8_t *p_a52)
{
return ((p_a52[2] & 0x7) << 8) | p_a52[3];
}
static inline void a52e_set_frmsiz(uint8_t *p_a52, uint16_t i_frmsiz)
{
p_a52[2] &= ~0x7;
p_a52[2] |= (i_frmsiz >> 8) & 0x7;
p_a52[3] = i_frmsiz & 0xff;
}
static inline uint16_t a52e_get_frame_size(uint16_t i_frmsiz)
{
return (i_frmsiz + 1) * 2;
}
static inline uint8_t a52e_get_fscod(const uint8_t *p_a52)
{
return (p_a52[4] & 0xc0) >> 6;
}
static inline void a52e_set_fscod(uint8_t *p_a52, uint8_t i_fscod)
{
p_a52[4] &= ~0xc0;
p_a52[4] |= (i_fscod & 0x3) << 6;
}
static inline uint8_t a52e_get_fscod2(const uint8_t *p_a52)
{
return (p_a52[4] & 0x30) >> 4;
}
static inline void a52e_set_fscod2(uint8_t *p_a52, uint8_t i_fscod)
{
p_a52[4] &= ~0x30;
p_a52[4] |= (i_fscod & 0x3) << 4;
}
static inline bool a52e_sync_compare_formats(const uint8_t *p_a521, const uint8_t *p_a522)
{
return !memcmp(p_a521, p_a522, A52_SYNCINFO_SIZE);
}
#ifdef __cplusplus
}
#endif
#endif
/*****************************************************************************
* ci.h: ETSI EN 50 221 Common Interface Specification
* ci.h: CENELEC EN 50 221 Common Interface Specification
*****************************************************************************
* Copyright (C) 2010 VideoLAN
*
......@@ -27,7 +27,7 @@
/*
* Normative references:
* - ETSI EN 50 221 (1997) (Common Interface Specification)
* - CENELEC EN 50 221 (1997) (Common Interface Specification)
*/
#ifndef __BITSTREAM_DVB_CI_H__
......
......@@ -52,14 +52,14 @@ static inline void bat_table_print(uint8_t **pp_sections,
switch (i_print_type) {
case PRINT_XML:
pf_print(print_opaque, "<BAT tid=\"%hhu\" networkid=\"%hu\" version=\"%hhu\" current_next=\"%d\">",
pf_print(print_opaque, "<BAT tid=\"%hhu\" bouquetid=\"%hu\" version=\"%hhu\" current_next=\"%d\">",
psi_table_get_tableid(pp_sections),
psi_table_get_tableidext(pp_sections),
psi_table_get_version(pp_sections),
!psi_table_get_current(pp_sections) ? 0 : 1);
break;
default:
pf_print(print_opaque, "new BAT networkid=%hu version=%hhu%s",
pf_print(print_opaque, "new BAT bouquetid=%hu version=%hhu%s",
psi_table_get_tableidext(pp_sections),
psi_table_get_version(pp_sections),
!psi_table_get_current(pp_sections) ? " (next)" : "");
......
......@@ -70,6 +70,8 @@ static inline const uint8_t *desc40_get_networkname(const uint8_t *p_desc,
static inline bool desc40_validate(const uint8_t *p_desc)
{
(void) p_desc;
return true;
}
......
......@@ -53,6 +53,8 @@ static inline void desc42_init(uint8_t *p_desc)
static inline bool desc42_validate(const uint8_t *p_desc)
{
(void) p_desc;
return true;
}
......
......@@ -72,7 +72,7 @@ static inline uint8_t desc45n_get_data_length(const uint8_t *p_desc_n)
return p_desc_n[1];
}
static inline char *desc45_get_service_id_txt(uint8_t i_service_id)
static inline const char *desc45_get_service_id_txt(uint8_t i_service_id)
{
return i_service_id == 0x00 ? "reserved" :
i_service_id == 0x01 ? "EBU teletext" :
......
......@@ -49,6 +49,12 @@ extern "C"
#define DESC46_HEADER_SIZE DESC_HEADER_SIZE
#define DESC46_LANGUAGE_SIZE 5
#define DESC46_TELETEXTTYPE_INITIAL 1
#define DESC46_TELETEXTTYPE_SUBTITLE 2
#define DESC46_TELETEXTTYPE_INFORMATION 3
#define DESC46_TELETEXTTYPE_SCHEDULE 4
#define DESC46_TELETEXTTYPE_SUBTITLE_H 5
static inline void desc46_init(uint8_t *p_desc)
{
desc_set_tag(p_desc, 0x46);
......@@ -77,7 +83,7 @@ static inline uint8_t desc46n_get_teletexttype(const uint8_t *p_desc_n)
return p_desc_n[3] >> 3;
}
static inline char *desc46_get_teletexttype_txt(uint8_t i_type)
static inline const char *desc46_get_teletexttype_txt(uint8_t i_type)
{
return i_type == 0x00 ? "Reserved" :
i_type == 0x01 ? "Initial teletext page" :
......
......@@ -105,7 +105,7 @@ static inline void desc51n_set_logical_cell_presentation_info(uint8_t *p_desc_n,
p_desc_n[1] = (i_lc_presentation_info & 0x07) | 0xf8;
}
static inline char *desc51_get_logical_cell_presentation_info_txt(uint8_t i_lcp_info)
static inline const char *desc51_get_logical_cell_presentation_info_txt(uint8_t i_lcp_info)
{
return i_lcp_info == 0x00 ? "undefined" :
i_lcp_info == 0x01 ? "video" :
......@@ -143,7 +143,7 @@ static inline void desc51n_set_cell_linkage_info(uint8_t *p_desc_n, uint8_t i_ce
p_desc_n[3 + desc51n_get_elementary_cell_field_length(p_desc_n)] = i_cell_linkage_info;
}
static inline char *desc51_get_cell_linkage_info_txt(uint8_t i_icl_info)
static inline const char *desc51_get_cell_linkage_info_txt(uint8_t i_icl_info)
{
return i_icl_info == 0x00 ? "undefined" :
i_icl_info == 0x01 ? "bouquet related" :
......
......@@ -48,6 +48,12 @@ extern "C"
#define DESC56_HEADER_SIZE DESC46_HEADER_SIZE
#define DESC56_LANGUAGE_SIZE DESC46_LANGUAGE_SIZE
#define DESC56_TELETEXTTYPE_INITIAL DESC46_TELETEXTTYPE_INITIAL
#define DESC56_TELETEXTTYPE_SUBTITLE DESC46_TELETEXTTYPE_SUBTITLE
#define DESC56_TELETEXTTYPE_INFORMATION DESC46_TELETEXTTYPE_INFORMATION
#define DESC56_TELETEXTTYPE_SCHEDULE DESC46_TELETEXTTYPE_SCHEDULE
#define DESC56_TELETEXTTYPE_SUBTITLE_H DESC46_TELETEXTTYPE_SUBTITLE_H
static inline void desc56_init(uint8_t *p_desc)
{
desc_set_tag(p_desc, 0x56);
......
......@@ -97,7 +97,7 @@ static inline void desc66_print(const uint8_t *p_desc, f_print pf_print,
for (i = 0; i < i_selector_byte_length; i++) {
sprintf(psz_selector_byte + 2 * i, "%02x", p_selector_byte[i]);
if (p_selector_byte[i] >= 32 && p_selector_byte[i] <= 127 && p_selector_byte[i] != '"')
if (p_selector_byte[i] >= 48 && p_selector_byte[i] <= 127 && p_selector_byte[i] != '"')
psz_selector_byte_txt[i] = p_selector_byte[i];
else
psz_selector_byte_txt[i] = '.';
......
......@@ -71,6 +71,8 @@ static inline void desc67_set_bytes(uint8_t *p_desc, const uint8_t *p_bytes, uin
static inline bool desc67_validate(const uint8_t *p_desc)
{
(void) p_desc;
return true;
}
......
......@@ -67,8 +67,8 @@ static inline void desc69_set_pil(uint8_t *p_desc, uint32_t i_pil)
static inline uint8_t desc69_get_day(const uint8_t *p_desc)
{
uint8_t i_day = ((p_desc[2] & 0x0f) << 1) | ((p_desc[3] & 0x7f) >> 7); // rrrr1111 1xxxxxxx
return i_day + 1;
uint8_t i_day = ((p_desc[2] & 0x0f) << 1) | ((p_desc[3] & 0x80) >> 7); // rrrr1111 1xxxxxxx
return i_day;
}
static inline void desc69_set_day(uint8_t *p_desc, uint8_t i_day)
......
......@@ -83,7 +83,7 @@ static inline void desc7c_set_aac_type_flag(uint8_t *p_desc, bool b_aac_type_fla
desc_set_length(p_desc, i_desc_len);
}
if (i_desc_len > 1)
p_desc[3] = b_aac_type_flag ? 0xff : 0x7f;
p_desc[3] = b_aac_type_flag ? 0x80 : 0;
}
static inline uint8_t desc7c_get_aac_type(const uint8_t *p_desc)
......
......@@ -103,7 +103,7 @@ static inline void desc83p28_print(uint8_t *p_desc, f_print pf_print,
break;
default:
pf_print(opaque,
" - desc %hhu lcn sid=%hu%s lcn=%hu", desc_get_tag(p_desc),
" - desc %hhx lcn sid=%hu%s lcn=%hu", desc_get_tag(p_desc),
desc83p28n_get_sid(p_desc_n),
desc83p28n_get_visible(p_desc_n) ? " visible" : "",
desc83p28n_get_lcn(p_desc_n));
......
......@@ -44,6 +44,9 @@ static inline void dit_print(uint8_t *p_dit,
f_iconv pf_iconv, void *iconv_opaque,
print_type_t i_print_type)
{
(void) pf_iconv;
(void) iconv_opaque;
switch (i_print_type) {
case PRINT_XML:
pf_print(print_opaque, "<DIT transition_flag=\"%u\"/>",
......
......@@ -114,6 +114,11 @@ static inline uint8_t eit_get_last_table_id(const uint8_t *p_eit)
return p_eit[13];
}
static inline void eitn_init(uint8_t *p_eit_n)
{
p_eit_n[10] = 0;
}
static inline uint16_t eitn_get_event_id(const uint8_t *p_eit_n)
{
return (p_eit_n[0] << 8) | p_eit_n[1];
......@@ -152,24 +157,24 @@ static inline void eitn_set_duration_bcd(uint8_t *p_eit_n, uint32_t i_duration_b
p_eit_n[9] = i_duration_bcd & 0xff;
}
static inline uint8_t eitn_get_running_status(const uint8_t *p_eit_n)
static inline uint8_t eitn_get_running(const uint8_t *p_eit_n)
{
return p_eit_n[10] >> 5;
}
static inline void eitn_set_running_status(uint8_t *p_eit_n, uint8_t i_running_status)
static inline void eitn_set_running(uint8_t *p_eit_n, uint8_t i_running_status)
{
p_eit_n[10] = (p_eit_n[10] & 0x1f) | (i_running_status << 5);
}
static inline bool eitn_get_free_CA_mode(const uint8_t *p_eit_n)
static inline bool eitn_get_ca(const uint8_t *p_eit_n)
{
return (p_eit_n[10] & 0x10) == 0x10;
}
static inline void eitn_set_free_CA_mode(uint8_t *p_eit_n, bool b_free_CA_mode)
static inline void eitn_set_ca(uint8_t *p_eit_n)
{
p_eit_n[10] = b_free_CA_mode ? (p_eit_n[10] | 0x10) : (p_eit_n[10] &~ 0x10);
p_eit_n[10] |= 0x10;
}
static inline uint16_t eitn_get_desclength(const uint8_t *p_eit_n)
......
......@@ -50,7 +50,7 @@ static inline void eit_print(uint8_t *p_eit,
uint8_t *p_event;
uint8_t j = 0;
uint8_t i_tid = psi_get_tableid(p_eit);
char *psz_tid = "unknown";
const char *psz_tid = "unknown";
if (i_tid == EIT_TABLE_ID_PF_ACTUAL)
psz_tid = "actual_pf";
......@@ -64,29 +64,28 @@ static inline void eit_print(uint8_t *p_eit,
switch (i_print_type) {
case PRINT_XML:
pf_print(print_opaque,
"<EIT tableid=\"0x%02x\" type=\"%s\" version=\"%u\""
" current_next=\"%u\" tsid=\"%u\" onid=\"%u\""
" seg_last_sec_number=\"%u\" last_table_id=\"0x%02x\">",
"<EIT tableid=\"0x%02x\" type=\"%s\" service_id=\"%u\" version=\"%u\""
" current_next=\"%u\" tsid=\"%u\" onid=\"%u\">",
i_tid, psz_tid,
eit_get_sid(p_eit),
psi_get_version(p_eit),
!psi_get_current(p_eit) ? 0 : 1,
eit_get_tsid(p_eit),
eit_get_onid(p_eit),
eit_get_segment_last_sec_number(p_eit),
eit_get_last_table_id(p_eit)
eit_get_onid(p_eit)
);
break;
default:
pf_print(print_opaque,
"new EIT tableid=0x%02x type=%s version=%u%s tsid=%u"
" onid=%u seg_last_sec_number=%u last_table_id=0x%02x",
"new EIT tableid=0x%02x type=%s service_id=%u version=%u%s section=%u/%u tsid=%u"
" onid=%u",
i_tid, psz_tid,
eit_get_sid(p_eit),
psi_get_version(p_eit),
!psi_get_current(p_eit) ? " (next)" : "",
psi_get_section(p_eit),
psi_get_lastsection(p_eit),
eit_get_tsid(p_eit),
eit_get_onid(p_eit),
eit_get_segment_last_sec_number(p_eit),
eit_get_last_table_id(p_eit)
eit_get_onid(p_eit)
);
}
......@@ -105,21 +104,21 @@ static inline void eit_print(uint8_t *p_eit,
case PRINT_XML:
pf_print(print_opaque, "<EVENT id=\"%u\" start_time=\"%ld\" start_time_dec=\"%s\""
" duration=\"%u\" duration_dec=\"%s\""
" running_status=\"%d\" free_CA_mode=\"%d\">",
" running=\"%d\" free_CA=\"%d\">",
eitn_get_event_id(p_event),
start_ts, start_str,
duration, duration_str,
eitn_get_running_status(p_event),
eitn_get_free_CA_mode(p_event)
eitn_get_running(p_event),
eitn_get_ca(p_event)
);
break;
default:
pf_print(print_opaque, " * EVENT id=%u start_time=%ld start_time_dec=\"%s\" duration=%u duration_dec=%s running_status=%d free_CA_mode=%d",
pf_print(print_opaque, " * EVENT id=%u start_time=%ld start_time_dec=\"%s\" duration=%u duration_dec=%s running=%d free_CA=%d",
eitn_get_event_id(p_event),
start_ts, start_str,
duration, duration_str,
eitn_get_running_status(p_event),
eitn_get_free_CA_mode(p_event)
eitn_get_running(p_event),
eitn_get_ca(p_event)
);
}
......
......@@ -110,12 +110,12 @@ static inline void rstn_set_event_id(uint8_t *p_rst_n, uint16_t i_event_id)
p_rst_n[7] = i_event_id & 0xff;
}
static inline uint8_t rstn_get_running_status(const uint8_t *p_rst_n)
static inline uint8_t rstn_get_running(const uint8_t *p_rst_n)
{
return p_rst_n[8] & 0x07;
}
static inline void rstn_set_running_status(uint8_t *p_rst_n, uint8_t i_running_status)
static inline void rstn_set_running(uint8_t *p_rst_n, uint8_t i_running_status)
{
p_rst_n[8] = 0xf8 | (i_running_status & 0x07);
}
......
......@@ -44,6 +44,9 @@ static inline void rst_print(uint8_t *p_rst,
f_iconv pf_iconv, void *iconv_opaque,
print_type_t i_print_type)
{
(void) pf_iconv;
(void) iconv_opaque;
uint8_t j = 0;
uint8_t *p_rst_n;
......@@ -60,23 +63,23 @@ static inline void rst_print(uint8_t *p_rst,
case PRINT_XML:
pf_print(print_opaque,
"<STATUS tsid=\"%hu\" onid=\"%hu\" service_id=\"%hu\""
" event_id=\"%hu\" running_status=\"%hu\"/>",
" event_id=\"%hu\" running=\"%hu\"/>",
rstn_get_tsid(p_rst_n),
rstn_get_onid(p_rst_n),
rstn_get_service_id(p_rst_n),
rstn_get_event_id(p_rst_n),
rstn_get_running_status(p_rst_n)
rstn_get_running(p_rst_n)
);
break;
default:
pf_print(print_opaque,
" * status tsid=\"%hu\" onid=\"%hu\" service_id=\"%hu\""
" event_id=\"%hu\" running_status=\"%hu\"",
" event_id=\"%hu\" running=\"%hu\"",
rstn_get_tsid(p_rst_n),
rstn_get_onid(p_rst_n),
rstn_get_service_id(p_rst_n),
rstn_get_event_id(p_rst_n),
rstn_get_running_status(p_rst_n)
rstn_get_running(p_rst_n)
);
}
}
......