Skip to content
Commits on Source (11)
......@@ -105,6 +105,11 @@ D: Splice Information Table
D: Bugfixing
D: Maintainer
N: Steven Toth
E: stoth@kernellabs.com
D: Bugfixing
D: Descriptor 0x8a
N: Yonathan Yusim
D: Descriptor 0xa1
......
......@@ -18,7 +18,7 @@ Changes between 1.3.0 and 2.0.0-git:
- 0x24 Content labelling descriptor
- 0x65 Scrambling descriptor
- 0x67 DVB Transport Stream descriptor
* Fix bugs in descriptors: 0x41, 0x44, 0x4a, 0x4b, 0x53, 0x54, 0x55, 0x56, 0x59, 0xa0
* Fix bugs in descriptors: 0x41, 0x44, 0x4a, 0x4b, 0x53, 0x54, 0x55, 0x56, 0x59, 0x8a, 0xa0
* Fix bugs in table: CA, EIT, NIT
* Work on SIS table and splice commands.
* More descriptor tests
......
......@@ -1193,6 +1193,24 @@ static void DumpSystemClockDescriptor(const void *p_descriptor)
pow(10.0, -(double)p_clock_descriptor->i_clock_accuracy_exponent));
}
/*****************************************************************************
* DumpComponentDescriptor
*****************************************************************************/
static void DumpComponentDescriptor(const void *p_descriptor)
{
const dvbpsi_dvb_component_dr_t *p_dvb_component_dr = p_descriptor;
printf("\t\tstream content: %d\n", p_dvb_component_dr->i_stream_content);
printf("\t\tcomponent type: %d\n", p_dvb_component_dr->i_component_type);
printf("\t\tcomponent tag : %d\n", p_dvb_component_dr->i_component_tag);
printf("\t\tISO 639 code : %c%c%c\n", p_dvb_component_dr->i_iso_639_code[0],
p_dvb_component_dr->i_iso_639_code[1], p_dvb_component_dr->i_iso_639_code[2]);
printf("\t\ttext :");
for (int i = 0; i < p_dvb_component_dr->i_text_length; i++) {
printf("%c", p_dvb_component_dr->i_text[i]);
}
printf("\n");
}
/*****************************************************************************
* DumpStreamIdentifierDescriptor
*****************************************************************************/
......@@ -1375,6 +1393,37 @@ static void DumpContentDescriptor(const void *p_descriptor)
}
}
/*****************************************************************************
* DumpParentalRatingDescriptor
*****************************************************************************/
static void DumpParentalRatingDescriptor(const void *p_descriptor)
{
const dvbpsi_dvb_parental_rating_dr_t *p_parental_rating_descriptor = p_descriptor;
printf("Parental ratings\n");
for (int i = 0; i < p_parental_rating_descriptor->i_ratings_number; i++) {;
printf("\t\tcountry : %d\n", p_parental_rating_descriptor->p_parental_rating[i].i_country_code);
printf("\t\trating : %d\n", p_parental_rating_descriptor->p_parental_rating[i].i_rating);
}
}
/*****************************************************************************
* DumpTeletextDescriptor
*****************************************************************************/
static void DumpTeletextDescriptor(const void *p_descriptor)
{
const dvbpsi_dvb_teletext_dr_t *p_teletext_descriptor = p_descriptor;
printf("Teletext pages\n");
for (int i = 0; i < p_teletext_descriptor->i_pages_number; i++) {
printf("\t\tISO 6392 language code: %c%c%c\n",
p_teletext_descriptor->p_pages[i].i_iso6392_language_code[0],
p_teletext_descriptor->p_pages[i].i_iso6392_language_code[1],
p_teletext_descriptor->p_pages[i].i_iso6392_language_code[2]);
printf("\t\tteletext type : %d\n", p_teletext_descriptor->p_pages[i].i_teletext_type);
printf("\t\tteletext magazine : %d\n", p_teletext_descriptor->p_pages[i].i_teletext_magazine_number);
printf("\t\tteletext page : %d\n", p_teletext_descriptor->p_pages[i].i_teletext_page_number);
}
}
/*****************************************************************************
* DumpSubtitleDescriptor
*****************************************************************************/
......@@ -1950,6 +1999,10 @@ static void DumpDescriptor(dvbpsi_descriptor_t *p_descriptor)
p_decoded = dvbpsi_decode_dvb_tshifted_ev_dr(p_descriptor);
dump_dr_fn = DumpTimeShiftedEventDescriptor;
break;
case 0x50:
p_decoded = dvbpsi_decode_dvb_component_dr(p_descriptor);
dump_dr_fn = DumpComponentDescriptor;
break;
case 0x52:
p_decoded = dvbpsi_decode_dvb_stream_identifier_dr(p_descriptor);
dump_dr_fn = DumpStreamIdentifierDescriptor;
......@@ -1962,6 +2015,14 @@ static void DumpDescriptor(dvbpsi_descriptor_t *p_descriptor)
p_decoded = dvbpsi_decode_dvb_content_dr(p_descriptor);
dump_dr_fn = DumpContentDescriptor;
break;
case 0x55:
p_decoded = dvbpsi_decode_dvb_parental_rating_dr(p_descriptor);
dump_dr_fn = DumpParentalRatingDescriptor;
break;
case 0x56:
p_decoded = dvbpsi_decode_dvb_teletext_dr(p_descriptor);
dump_dr_fn = DumpTeletextDescriptor;
break;
case 0x59:
p_decoded = dvbpsi_decode_dvb_subtitling_dr(p_descriptor);
dump_dr_fn = DumpSubtitleDescriptor;
......@@ -1972,7 +2033,7 @@ static void DumpDescriptor(dvbpsi_descriptor_t *p_descriptor)
break;
}
if(dump_dr_fn && p_decoded)
if (dump_dr_fn && p_decoded)
{
/* call the dump function if we could decode the descriptor. */
dump_dr_fn(p_decoded);
......
......@@ -39,12 +39,12 @@
* -----------------------------------------------------------------------------------
* - dvbpsi_AttachDemux | @see dvbpsi_demux_chain_new -
* - dvbpsi_DetachDemux | @see dvbpsi_demux_chain_delete -
* - dvbpsi_Demux | -
* - dvbpsi_Demux | no replacement -
* - dvbpsi_demuxGetSubDecoder | @see dvbpsi_decoder_chain_get -
* - dvbpsi_NewDemuxSubDecoder | -
* - dvbpsi_AttachDemuxSubDecoder | -
* - dvbspi_DetachDemuxSubDecoder | -
* ------------------------------------------------------------------------------------
* - dvbpsi_NewDemuxSubDecoder | no replacement -
* - dvbpsi_AttachDemuxSubDecoder | no replacement -
* - dvbspi_DetachDemuxSubDecoder | no replacement -
* -----------------------------------------------------------------------------------
*
* Note that for dvbpsi_Demux(), dvbpsi_NewDemuxSubDecoder(), dvbpsi_AttachDemuxSubDecoder(),
* and dvbspi_DetachDemuxSubDecoder() no replacement API is available. These functions are
......
......@@ -112,9 +112,7 @@ dvbpsi_demux_subdec_t *dvbpsi_NewDemuxSubDecoder(const uint8_t i_table_id,
dvbpsi_demux_gather_cb_t pf_gather,
dvbpsi_decoder_t *p_decoder)
{
(void) i_table_id; (void) i_extension;
(void *) pf_detach, (void *) pf_gather;
(void *) p_decoder;
assert(0);
return NULL;
}
......@@ -126,8 +124,6 @@ dvbpsi_demux_subdec_t *dvbpsi_NewDemuxSubDecoder(const uint8_t i_table_id,
void dvbpsi_DeleteDemuxSubDecoder(dvbpsi_demux_subdec_t *p_subdec)
{
assert(0);
if (!p_subdec)
return;
}
/*****************************************************************************
......@@ -135,16 +131,7 @@ void dvbpsi_DeleteDemuxSubDecoder(dvbpsi_demux_subdec_t *p_subdec)
*****************************************************************************/
void dvbpsi_AttachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec)
{
assert(p_demux);
assert(p_subdec);
if (!p_demux || !p_subdec)
abort();
dvbpsi_t *p_dvbpsi = (dvbpsi_t *)p_demux;
dvbpsi_decoder_t *p_dec = (dvbpsi_decoder_t *)p_subdec;
if (!dvbpsi_decoder_chain_add(p_dvbpsi, p_dec))
abort();
assert(0);
}
/*****************************************************************************
......@@ -152,14 +139,5 @@ void dvbpsi_AttachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t
*****************************************************************************/
void dvbpsi_DetachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec)
{
assert(p_demux);
assert(p_subdec);
if (!p_demux || !p_subdec)
abort();
dvbpsi_t *p_dvbpsi = (dvbpsi_t *)p_demux;
dvbpsi_decoder_t *p_dec = (dvbpsi_decoder_t *)p_subdec;
if (!dvbpsi_decoder_chain_remove(p_dvbpsi, p_dec))
abort();
assert(0);
}
......@@ -53,7 +53,7 @@ dvbpsi_scte_cuei_dr_t * dvbpsi_decode_scte_cuei_dr(dvbpsi_descriptor_t * p_descr
if (dvbpsi_IsDescriptorDecoded(p_descriptor))
return p_descriptor->p_decoded;
if (p_descriptor->i_length == 0x01)
if (p_descriptor->i_length != 0x01)
return NULL;
/* Allocate memory */
......
......@@ -218,6 +218,7 @@ bool dvbpsi_decoder_psi_section_add(dvbpsi_decoder_t *p_decoder, dvbpsi_psi_sect
/* Add to end of list */
if (p_prev->i_number < p_section->i_number)
{
p_decoder->i_last_section_number = p_section->i_number;
p_prev->p_next = p_section;
p_section->p_next = NULL;
}
......
......@@ -578,7 +578,7 @@ static dvbpsi_sis_cmd_splice_schedule_t *
p_cmd->i_splice_count = p_data[pos++];
dvbpsi_sis_splice_event_t *p_last = p_cmd->p_splice_event;
for (uint8_t i = 0; i < p_cmd->i_splice_count; i++) {
for (uint8_t i = pos; i < p_cmd->i_splice_count; i++) {
dvbpsi_sis_splice_event_t *p_event;
p_event = (dvbpsi_sis_splice_event_t *)calloc(1, sizeof(dvbpsi_sis_splice_event_t));
if (!p_event) {
......