Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libdvbpsi
Commits
61277eae
Commit
61277eae
authored
Sep 30, 2015
by
Daniel Kamil Kozar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mass rename of structs and functions
parent
c1ace456
Changes
121
Show whitespace changes
Inline
Side-by-side
Showing
121 changed files
with
1270 additions
and
1192 deletions
+1270
-1192
dr-api-rename.pl
dr-api-rename.pl
+87
-9
examples/decode_mpeg.c
examples/decode_mpeg.c
+8
-8
examples/decode_pmt.c
examples/decode_pmt.c
+8
-8
examples/dvbinfo/libdvbpsi.c
examples/dvbinfo/libdvbpsi.c
+32
-32
src/descriptors/dr_02.c
src/descriptors/dr_02.c
+7
-7
src/descriptors/dr_02.h
src/descriptors/dr_02.h
+13
-13
src/descriptors/dr_03.c
src/descriptors/dr_03.c
+7
-7
src/descriptors/dr_03.h
src/descriptors/dr_03.h
+13
-13
src/descriptors/dr_04.c
src/descriptors/dr_04.c
+7
-7
src/descriptors/dr_04.h
src/descriptors/dr_04.h
+13
-13
src/descriptors/dr_05.c
src/descriptors/dr_05.c
+8
-8
src/descriptors/dr_05.h
src/descriptors/dr_05.h
+14
-14
src/descriptors/dr_06.c
src/descriptors/dr_06.c
+8
-8
src/descriptors/dr_06.h
src/descriptors/dr_06.h
+14
-14
src/descriptors/dr_07.c
src/descriptors/dr_07.c
+7
-7
src/descriptors/dr_07.h
src/descriptors/dr_07.h
+14
-14
src/descriptors/dr_08.c
src/descriptors/dr_08.c
+7
-7
src/descriptors/dr_08.h
src/descriptors/dr_08.h
+13
-13
src/descriptors/dr_09.c
src/descriptors/dr_09.c
+7
-7
src/descriptors/dr_09.h
src/descriptors/dr_09.h
+13
-13
src/descriptors/dr_0a.c
src/descriptors/dr_0a.c
+7
-7
src/descriptors/dr_0a.h
src/descriptors/dr_0a.h
+13
-13
src/descriptors/dr_0b.c
src/descriptors/dr_0b.c
+7
-7
src/descriptors/dr_0b.h
src/descriptors/dr_0b.h
+14
-14
src/descriptors/dr_0c.c
src/descriptors/dr_0c.c
+9
-9
src/descriptors/dr_0c.h
src/descriptors/dr_0c.h
+13
-13
src/descriptors/dr_0d.c
src/descriptors/dr_0d.c
+8
-8
src/descriptors/dr_0d.h
src/descriptors/dr_0d.h
+14
-14
src/descriptors/dr_0e.c
src/descriptors/dr_0e.c
+7
-7
src/descriptors/dr_0e.h
src/descriptors/dr_0e.h
+14
-14
src/descriptors/dr_0f.c
src/descriptors/dr_0f.c
+8
-8
src/descriptors/dr_0f.h
src/descriptors/dr_0f.h
+14
-14
src/descriptors/dr_10.c
src/descriptors/dr_10.c
+5
-5
src/descriptors/dr_10.h
src/descriptors/dr_10.h
+8
-8
src/descriptors/dr_11.c
src/descriptors/dr_11.c
+4
-4
src/descriptors/dr_11.h
src/descriptors/dr_11.h
+7
-7
src/descriptors/dr_12.c
src/descriptors/dr_12.c
+4
-4
src/descriptors/dr_12.h
src/descriptors/dr_12.h
+7
-7
src/descriptors/dr_13.c
src/descriptors/dr_13.c
+8
-8
src/descriptors/dr_13.h
src/descriptors/dr_13.h
+10
-10
src/descriptors/dr_14.c
src/descriptors/dr_14.c
+8
-8
src/descriptors/dr_14.h
src/descriptors/dr_14.h
+10
-10
src/descriptors/dr_1b.c
src/descriptors/dr_1b.c
+5
-5
src/descriptors/dr_1b.h
src/descriptors/dr_1b.h
+8
-8
src/descriptors/dr_1c.c
src/descriptors/dr_1c.c
+5
-5
src/descriptors/dr_1c.h
src/descriptors/dr_1c.h
+8
-8
src/descriptors/dr_24.c
src/descriptors/dr_24.c
+8
-8
src/descriptors/dr_24.h
src/descriptors/dr_24.h
+8
-8
src/descriptors/dr_40.c
src/descriptors/dr_40.c
+8
-8
src/descriptors/dr_40.h
src/descriptors/dr_40.h
+16
-16
src/descriptors/dr_41.c
src/descriptors/dr_41.c
+8
-8
src/descriptors/dr_41.h
src/descriptors/dr_41.h
+14
-14
src/descriptors/dr_42.c
src/descriptors/dr_42.c
+7
-7
src/descriptors/dr_42.h
src/descriptors/dr_42.h
+14
-14
src/descriptors/dr_43.c
src/descriptors/dr_43.c
+8
-8
src/descriptors/dr_43.h
src/descriptors/dr_43.h
+14
-14
src/descriptors/dr_44.c
src/descriptors/dr_44.c
+8
-8
src/descriptors/dr_44.h
src/descriptors/dr_44.h
+14
-14
src/descriptors/dr_45.c
src/descriptors/dr_45.c
+7
-7
src/descriptors/dr_45.h
src/descriptors/dr_45.h
+15
-15
src/descriptors/dr_47.c
src/descriptors/dr_47.c
+7
-7
src/descriptors/dr_47.h
src/descriptors/dr_47.h
+14
-14
src/descriptors/dr_48.c
src/descriptors/dr_48.c
+7
-7
src/descriptors/dr_48.h
src/descriptors/dr_48.h
+12
-12
src/descriptors/dr_49.c
src/descriptors/dr_49.c
+8
-8
src/descriptors/dr_49.h
src/descriptors/dr_49.h
+16
-16
src/descriptors/dr_4a.c
src/descriptors/dr_4a.c
+7
-7
src/descriptors/dr_4a.h
src/descriptors/dr_4a.h
+14
-14
src/descriptors/dr_4b.c
src/descriptors/dr_4b.c
+7
-7
src/descriptors/dr_4b.h
src/descriptors/dr_4b.h
+14
-14
src/descriptors/dr_4c.c
src/descriptors/dr_4c.c
+7
-7
src/descriptors/dr_4c.h
src/descriptors/dr_4c.h
+14
-14
src/descriptors/dr_4d.c
src/descriptors/dr_4d.c
+7
-7
src/descriptors/dr_4d.h
src/descriptors/dr_4d.h
+13
-13
src/descriptors/dr_4e.c
src/descriptors/dr_4e.c
+7
-7
src/descriptors/dr_4e.h
src/descriptors/dr_4e.h
+13
-13
src/descriptors/dr_4f.c
src/descriptors/dr_4f.c
+7
-7
src/descriptors/dr_4f.h
src/descriptors/dr_4f.h
+14
-14
src/descriptors/dr_50.c
src/descriptors/dr_50.c
+7
-7
src/descriptors/dr_50.h
src/descriptors/dr_50.h
+14
-14
src/descriptors/dr_52.c
src/descriptors/dr_52.c
+8
-8
src/descriptors/dr_52.h
src/descriptors/dr_52.h
+14
-14
src/descriptors/dr_53.c
src/descriptors/dr_53.c
+7
-7
src/descriptors/dr_53.h
src/descriptors/dr_53.h
+14
-14
src/descriptors/dr_54.c
src/descriptors/dr_54.c
+8
-8
src/descriptors/dr_54.h
src/descriptors/dr_54.h
+13
-13
src/descriptors/dr_55.c
src/descriptors/dr_55.c
+8
-8
src/descriptors/dr_55.h
src/descriptors/dr_55.h
+12
-12
src/descriptors/dr_56.c
src/descriptors/dr_56.c
+7
-7
src/descriptors/dr_56.h
src/descriptors/dr_56.h
+14
-14
src/descriptors/dr_58.c
src/descriptors/dr_58.c
+8
-8
src/descriptors/dr_58.h
src/descriptors/dr_58.h
+15
-15
src/descriptors/dr_59.c
src/descriptors/dr_59.c
+8
-8
src/descriptors/dr_59.h
src/descriptors/dr_59.h
+13
-13
src/descriptors/dr_5a.c
src/descriptors/dr_5a.c
+8
-8
src/descriptors/dr_5a.h
src/descriptors/dr_5a.h
+14
-14
src/descriptors/dr_62.c
src/descriptors/dr_62.c
+4
-4
src/descriptors/dr_62.h
src/descriptors/dr_62.h
+10
-10
src/descriptors/dr_66.c
src/descriptors/dr_66.c
+8
-8
src/descriptors/dr_66.h
src/descriptors/dr_66.h
+10
-10
src/descriptors/dr_69.c
src/descriptors/dr_69.c
+7
-7
src/descriptors/dr_69.h
src/descriptors/dr_69.h
+13
-13
src/descriptors/dr_73.c
src/descriptors/dr_73.c
+4
-4
src/descriptors/dr_73.h
src/descriptors/dr_73.h
+10
-10
src/descriptors/dr_76.c
src/descriptors/dr_76.c
+4
-4
src/descriptors/dr_76.h
src/descriptors/dr_76.h
+11
-11
src/descriptors/dr_7c.c
src/descriptors/dr_7c.c
+9
-9
src/descriptors/dr_7c.h
src/descriptors/dr_7c.h
+11
-11
src/descriptors/dr_81.c
src/descriptors/dr_81.c
+4
-4
src/descriptors/dr_81.h
src/descriptors/dr_81.h
+10
-10
src/descriptors/dr_83.c
src/descriptors/dr_83.c
+8
-8
src/descriptors/dr_83.h
src/descriptors/dr_83.h
+14
-14
src/descriptors/dr_86.c
src/descriptors/dr_86.c
+4
-4
src/descriptors/dr_86.h
src/descriptors/dr_86.h
+10
-10
src/descriptors/dr_8a.c
src/descriptors/dr_8a.c
+7
-7
src/descriptors/dr_8a.h
src/descriptors/dr_8a.h
+11
-11
src/descriptors/dr_a0.c
src/descriptors/dr_a0.c
+6
-6
src/descriptors/dr_a0.h
src/descriptors/dr_a0.h
+14
-14
src/descriptors/dr_a1.c
src/descriptors/dr_a1.c
+11
-11
src/descriptors/dr_a1.h
src/descriptors/dr_a1.h
+15
-15
src/descriptors/types/aac_profile.h
src/descriptors/types/aac_profile.h
+1
-1
No files found.
dr-api-rename.pl
View file @
61277eae
...
...
@@ -5,6 +5,7 @@ use warnings;
use
File::
Find
;
use
Tie::
File
;
use
Data::
Dumper
;
use
File::
Basename
;
my
@dr_headers
;
...
...
@@ -16,7 +17,37 @@ find(\&wanted_dr_h, 'src/descriptors');
for
(
@dr_headers
)
{
my
$hdrinfo
=
parse_header
(
$_
);
next
if
not
defined
$hdrinfo
;
if
(
not
defined
$hdrinfo
)
{
if
(
/dr_a1\.h$/
)
{
$hdrinfo
=
{
old
=>
{
stru
=>
'
dvbpsi_service_location_dr
',
gen
=>
'
dvbpsi_GenServiceLocationDr
',
decode
=>
'
dvbpsi_DecodeServiceLocationDr
'
},
new
=>
{
stru
=>
'
dvbpsi_atsc_service_location_dr
',
gen
=>
'
dvbpsi_gen_atsc_service_location_dr
',
decode
=>
'
dvbpsi_decode_atsc_service_location_dr
'
}
}
}
elsif
(
/dr_49\.h$/
)
{
$hdrinfo
=
{
old
=>
{
stru
=>
'
dvbpsi_country_availability_dr
',
gen
=>
'
dvbpsi_GenCountryAvailabilityDr
',
decode
=>
'
dvbpsi_DecodeCountryAvailability
'
},
new
=>
{
stru
=>
'
dvbpsi_dvb_country_availability_dr
',
gen
=>
'
dvbpsi_gen_dvb_country_availability_dr
',
decode
=>
'
dvbpsi_decode_dvb_country_availability_dr
'
}
}
}
else
{
print
STDERR
"
Failed to process
$_
\n
";
next
;
}
}
replace_names
(
$hdrinfo
);
}
exit
0
;
...
...
@@ -24,12 +55,11 @@ exit 0;
sub
parse_header
{
my
$dr_h
=
shift
;
my
$sname
;
my
$decode_start
;
my
$fname
;
my
@decode_decl
;
my
@file
;
my
$rv
;
tie
@file
,
'
Tie::File
',
$dr_h
or
die
"
Can't open
$dr_h
";
print
$dr_h
.
"
\n
";
for
(
@file
)
{
if
(
/^typedef struct dvbpsi_(.*?)_dr_(?:t|s)$/
)
{
...
...
@@ -37,12 +67,11 @@ sub parse_header {
last
;
}
}
return
undef
if
not
defined
$sname
;
goto
end
if
not
defined
$sname
;
for
(
my
$i
=
0
;
$i
<
scalar
(
@file
)
;
++
$i
)
{
if
(
$file
[
$i
]
=~
/^dvbpsi_${sname}_dr_t *?\* *?dvbpsi_Decode(.*?)Dr/
)
{
$fname
=
$1
;
$decode_start
=
$i
;
push
@decode_decl
,
$file
[
$i
];
last
if
(
$file
[
$i
]
=~
/.*;.*/
);
$i
++
;
...
...
@@ -57,10 +86,59 @@ sub parse_header {
}
}
}
return
undef
if
not
defined
$fname
;
goto
end
if
not
defined
$fname
;
$dr_h
=~
/dr_([0-9a-f]{2})\.h$/
;
my
$drnum
=
hex
(
$1
);
my
$oldinfo
=
{
stru
=>
"
dvbpsi_
${sname}
_dr
",
gen
=>
"
dvbpsi_Gen
${fname}
Dr
",
decode
=>
"
dvbpsi_Decode
${fname}
Dr
"
};
$rv
=
{
old
=>
$oldinfo
,
new
=>
get_new_hdrinfo
(
$sname
,
get_dr_system
(
$drnum
))
};
end:
untie
@file
;
return
$rv
;
}
sub
get_dr_system
{
my
$drnum
=
shift
;
return
"
mpeg
"
if
$drnum
>=
2
&&
$drnum
<=
63
;
return
"
dvb
"
if
$drnum
>=
64
&&
$drnum
<=
127
;
return
"
atsc
"
if
$drnum
==
0xa0
||
$drnum
==
0x86
||
$drnum
==
0x81
;
return
"
eacem
"
if
$drnum
==
0x83
;
return
"
scte
"
if
$drnum
==
0x8a
;
return
"
custom
"
if
$drnum
>=
128
&&
$drnum
<=
254
;
die
"
Forbidden descriptor
$drnum
";
}
sub
get_new_hdrinfo
{
(
my
$sname
,
my
$sys
)
=
@_
;
return
{
stru
=>
"
dvbpsi_
${sys}
_
${sname}
_dr
",
gen
=>
"
dvbpsi_gen_
${sys}
_
${sname}
_dr
",
decode
=>
"
dvbpsi_decode_
${sys}
_
${sname}
_dr
"
}
}
my
$replacer
;
sub
wanted_global_c_or_h
{
return
unless
/\.(c|h)$/
;
my
@file
;
my
$old
=
$replacer
->
{
old
};
my
$new
=
$replacer
->
{
new
};
tie
@file
,
'
Tie::File
',
$_
or
die
"
Cannot open
$_
";
for
(
@file
)
{
s/$old->{stru}/$new->{stru}/g
;
s/$old->{gen}/$new->{gen}/g
;
s/$old->{decode}/$new->{decode}/g
;
}
untie
@file
;
return
0
;
}
sub
replace_names
{
$replacer
=
shift
;
find
(
\&
wanted_global_c_or_h
,
'
.
');
}
examples/decode_mpeg.c
View file @
61277eae
...
...
@@ -414,7 +414,7 @@ static char const* GetTypeName(uint8_t type)
/*****************************************************************************
* DumpMaxBitrateDescriptor
*****************************************************************************/
static
void
DumpMaxBitrateDescriptor
(
dvbpsi_max_bitrate_dr_t
*
bitrate_descriptor
)
static
void
DumpMaxBitrateDescriptor
(
dvbpsi_m
peg_m
ax_bitrate_dr_t
*
bitrate_descriptor
)
{
fprintf
(
stderr
,
"Bitrate: %d
\n
"
,
bitrate_descriptor
->
i_max_bitrate
);
}
...
...
@@ -422,7 +422,7 @@ static void DumpMaxBitrateDescriptor(dvbpsi_max_bitrate_dr_t* bitrate_descriptor
/*****************************************************************************
* DumpSystemClockDescriptor
*****************************************************************************/
static
void
DumpSystemClockDescriptor
(
dvbpsi_system_clock_dr_t
*
p_clock_descriptor
)
static
void
DumpSystemClockDescriptor
(
dvbpsi_
mpeg_
system_clock_dr_t
*
p_clock_descriptor
)
{
fprintf
(
stderr
,
"External clock: %s, Accuracy: %E
\n
"
,
p_clock_descriptor
->
b_external_clock_ref
?
"Yes"
:
"No"
,
...
...
@@ -433,7 +433,7 @@ static void DumpSystemClockDescriptor(dvbpsi_system_clock_dr_t* p_clock_descript
/*****************************************************************************
* DumpStreamIdentifierDescriptor
*****************************************************************************/
static
void
DumpStreamIdentifierDescriptor
(
dvbpsi_stream_identifier_dr_t
*
p_si_descriptor
)
static
void
DumpStreamIdentifierDescriptor
(
dvbpsi_
dvb_
stream_identifier_dr_t
*
p_si_descriptor
)
{
fprintf
(
stderr
,
"Component tag: %d
\n
"
,
p_si_descriptor
->
i_component_tag
);
...
...
@@ -442,7 +442,7 @@ static void DumpStreamIdentifierDescriptor(dvbpsi_stream_identifier_dr_t* p_si_d
/*****************************************************************************
* DumpSubtitleDescriptor
*****************************************************************************/
static
void
DumpSubtitleDescriptor
(
dvbpsi_subtitling_dr_t
*
p_subtitle_descriptor
)
static
void
DumpSubtitleDescriptor
(
dvbpsi_
dvb_
subtitling_dr_t
*
p_subtitle_descriptor
)
{
int
a
;
...
...
@@ -472,16 +472,16 @@ static void DumpDescriptors(const char* str, dvbpsi_descriptor_t* p_descriptor)
switch
(
p_descriptor
->
i_tag
)
{
case
SYSTEM_CLOCK_DR
:
DumpSystemClockDescriptor
(
dvbpsi_
DecodeSystemClockD
r
(
p_descriptor
));
DumpSystemClockDescriptor
(
dvbpsi_
decode_mpeg_system_clock_d
r
(
p_descriptor
));
break
;
case
MAX_BITRATE_DR
:
DumpMaxBitrateDescriptor
(
dvbpsi_
DecodeMaxBitrateD
r
(
p_descriptor
));
DumpMaxBitrateDescriptor
(
dvbpsi_
decode_mpeg_max_bitrate_d
r
(
p_descriptor
));
break
;
case
STREAM_IDENTIFIER_DR
:
DumpStreamIdentifierDescriptor
(
dvbpsi_
DecodeStreamIdentifierD
r
(
p_descriptor
));
DumpStreamIdentifierDescriptor
(
dvbpsi_
decode_dvb_stream_identifier_d
r
(
p_descriptor
));
break
;
case
SUBTITLING_DR
:
DumpSubtitleDescriptor
(
dvbpsi_
DecodeSubtitlingD
r
(
p_descriptor
));
DumpSubtitleDescriptor
(
dvbpsi_
decode_dvb_subtitling_d
r
(
p_descriptor
));
break
;
default:
fprintf
(
stderr
,
"
\"
"
);
...
...
examples/decode_pmt.c
View file @
61277eae
...
...
@@ -132,7 +132,7 @@ static char* GetTypeName(uint8_t type)
/*****************************************************************************
* DumpMaxBitrateDescriptor
*****************************************************************************/
static
void
DumpMaxBitrateDescriptor
(
dvbpsi_max_bitrate_dr_t
*
bitrate_descriptor
)
static
void
DumpMaxBitrateDescriptor
(
dvbpsi_m
peg_m
ax_bitrate_dr_t
*
bitrate_descriptor
)
{
printf
(
"Bitrate: %d
\n
"
,
bitrate_descriptor
->
i_max_bitrate
);
}
...
...
@@ -140,7 +140,7 @@ static void DumpMaxBitrateDescriptor(dvbpsi_max_bitrate_dr_t* bitrate_descriptor
/*****************************************************************************
* DumpSystemClockDescriptor
*****************************************************************************/
static
void
DumpSystemClockDescriptor
(
dvbpsi_system_clock_dr_t
*
p_clock_descriptor
)
static
void
DumpSystemClockDescriptor
(
dvbpsi_
mpeg_
system_clock_dr_t
*
p_clock_descriptor
)
{
printf
(
"External clock: %s, Accuracy: %E
\n
"
,
p_clock_descriptor
->
b_external_clock_ref
?
"Yes"
:
"No"
,
...
...
@@ -151,7 +151,7 @@ static void DumpSystemClockDescriptor(dvbpsi_system_clock_dr_t* p_clock_descript
/*****************************************************************************
* DumpStreamIdentifierDescriptor
*****************************************************************************/
static
void
DumpStreamIdentifierDescriptor
(
dvbpsi_stream_identifier_dr_t
*
p_si_descriptor
)
static
void
DumpStreamIdentifierDescriptor
(
dvbpsi_
dvb_
stream_identifier_dr_t
*
p_si_descriptor
)
{
printf
(
"Component tag: %d
\n
"
,
p_si_descriptor
->
i_component_tag
);
...
...
@@ -160,7 +160,7 @@ static void DumpStreamIdentifierDescriptor(dvbpsi_stream_identifier_dr_t* p_si_d
/*****************************************************************************
* DumpSubtitleDescriptor
*****************************************************************************/
static
void
DumpSubtitleDescriptor
(
dvbpsi_subtitling_dr_t
*
p_subtitle_descriptor
)
static
void
DumpSubtitleDescriptor
(
dvbpsi_
dvb_
subtitling_dr_t
*
p_subtitle_descriptor
)
{
int
a
;
...
...
@@ -190,16 +190,16 @@ static void DumpDescriptors(const char* str, dvbpsi_descriptor_t* p_descriptor)
switch
(
p_descriptor
->
i_tag
)
{
case
SYSTEM_CLOCK_DR
:
DumpSystemClockDescriptor
(
dvbpsi_
DecodeSystemClockD
r
(
p_descriptor
));
DumpSystemClockDescriptor
(
dvbpsi_
decode_mpeg_system_clock_d
r
(
p_descriptor
));
break
;
case
MAX_BITRATE_DR
:
DumpMaxBitrateDescriptor
(
dvbpsi_
DecodeMaxBitrateD
r
(
p_descriptor
));
DumpMaxBitrateDescriptor
(
dvbpsi_
decode_mpeg_max_bitrate_d
r
(
p_descriptor
));
break
;
case
STREAM_IDENTIFIER_DR
:
DumpStreamIdentifierDescriptor
(
dvbpsi_
DecodeStreamIdentifierD
r
(
p_descriptor
));
DumpStreamIdentifierDescriptor
(
dvbpsi_
decode_dvb_stream_identifier_d
r
(
p_descriptor
));
break
;
case
SUBTITLING_DR
:
DumpSubtitleDescriptor
(
dvbpsi_
DecodeSubtitlingD
r
(
p_descriptor
));
DumpSubtitleDescriptor
(
dvbpsi_
decode_dvb_subtitling_d
r
(
p_descriptor
));
break
;
default:
printf
(
"
\"
"
);
...
...
examples/dvbinfo/libdvbpsi.c
View file @
61277eae
...
...
@@ -961,7 +961,7 @@ static char const* GetDescriptorName(uint8_t tag)
*****************************************************************************/
static
void
DumpMaxBitrateDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_max_bitrate_dr_t
*
bitrate_descriptor
=
p_descriptor
;
const
dvbpsi_m
peg_m
ax_bitrate_dr_t
*
bitrate_descriptor
=
p_descriptor
;
printf
(
"Bitrate: %d
\n
"
,
bitrate_descriptor
->
i_max_bitrate
);
}
...
...
@@ -970,7 +970,7 @@ static void DumpMaxBitrateDescriptor(const void *p_descriptor)
*****************************************************************************/
static
void
DumpSmoothingBufferDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_smoothing_buffer_dr_t
*
smoothing_descriptor
=
p_descriptor
;
const
dvbpsi_
mpeg_
smoothing_buffer_dr_t
*
smoothing_descriptor
=
p_descriptor
;
printf
(
"Leak rate: %d
\n
"
,
smoothing_descriptor
->
i_sb_leak_rate
);
printf
(
"
\t\t
Size: %d
\n
"
,
smoothing_descriptor
->
i_sb_size
);
}
...
...
@@ -980,7 +980,7 @@ static void DumpSmoothingBufferDescriptor(const void *p_descriptor)
*****************************************************************************/
static
void
DumpSTDDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_std_dr_t
*
std_descriptor
=
p_descriptor
;
const
dvbpsi_
mpeg_
std_dr_t
*
std_descriptor
=
p_descriptor
;
printf
(
"Leak valid flag: %d
\n
"
,
std_descriptor
->
b_leak_valid_flag
);
}
...
...
@@ -989,7 +989,7 @@ static void DumpSTDDescriptor(const void *p_descriptor)
*****************************************************************************/
static
void
DumpIBPDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_ibp_dr_t
*
ibp_descriptor
=
p_descriptor
;
const
dvbpsi_
mpeg_
ibp_dr_t
*
ibp_descriptor
=
p_descriptor
;
printf
(
"Closed GOP flag: %d
\n
"
,
ibp_descriptor
->
b_closed_gop_flag
);
printf
(
"
\t\t
Identical GOP flag: %d
\n
"
,
ibp_descriptor
->
b_identical_gop_flag
);
printf
(
"
\t\t
Max GOP length: %"
PRIu16
"
\n
"
,
ibp_descriptor
->
i_max_gop_length
);
...
...
@@ -1044,7 +1044,7 @@ static const char* MPEG4VideoProfileToString(dvbpsi_mpeg4_visual_profile_and_lev
static
void
DumpMPEG4VideoDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_mpeg4_video_dr_t
*
mpeg4_descriptor
=
p_descriptor
;
const
dvbpsi_mpeg
_mpeg
4_video_dr_t
*
mpeg4_descriptor
=
p_descriptor
;
printf
(
"MPEG-4 Video Profile and Level : %s (0x%02x)
\n
"
,
MPEG4VideoProfileToString
(
mpeg4_descriptor
->
i_mpeg4_visual_profile_and_level
),
mpeg4_descriptor
->
i_mpeg4_visual_profile_and_level
);
...
...
@@ -1052,7 +1052,7 @@ static void DumpMPEG4VideoDescriptor(const void *p_descriptor)
static
void
DumpMPEG4AudioDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_mpeg4_audio_dr_t
*
mpeg4_descriptor
=
p_descriptor
;
const
dvbpsi_mpeg
_mpeg
4_audio_dr_t
*
mpeg4_descriptor
=
p_descriptor
;
printf
(
"MPEG-4 Audio Profile and Level : %s (0x%02x)
\n
"
,
AACProfileToString
(
mpeg4_descriptor
->
i_mpeg4_audio_profile_and_level
),
mpeg4_descriptor
->
i_mpeg4_audio_profile_and_level
);
...
...
@@ -1060,7 +1060,7 @@ static void DumpMPEG4AudioDescriptor(const void *p_descriptor)
static
void
DumpContentLabellingDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_content_labelling_dr_t
*
p_content_lbl_dr
=
p_descriptor
;
const
dvbpsi_
mpeg_
content_labelling_dr_t
*
p_content_lbl_dr
=
p_descriptor
;
printf
(
"Metadata application format : 0x%04"
PRIx16
"
\n
"
,
p_content_lbl_dr
->
i_metadata_application_format
);
if
(
p_content_lbl_dr
->
i_metadata_application_format
==
0xFFFF
)
...
...
@@ -1115,7 +1115,7 @@ static void DumpContentLabellingDescriptor(const void *p_descriptor)
*****************************************************************************/
static
void
DumpSystemClockDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_system_clock_dr_t
*
p_clock_descriptor
=
p_descriptor
;
const
dvbpsi_
mpeg_
system_clock_dr_t
*
p_clock_descriptor
=
p_descriptor
;
printf
(
"External clock: %s, Accuracy: %E
\n
"
,
p_clock_descriptor
->
b_external_clock_ref
?
"Yes"
:
"No"
,
p_clock_descriptor
->
i_clock_accuracy_integer
*
...
...
@@ -1127,7 +1127,7 @@ static void DumpSystemClockDescriptor(const void *p_descriptor)
*****************************************************************************/
static
void
DumpStreamIdentifierDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_stream_identifier_dr_t
*
p_si_descriptor
=
p_descriptor
;
const
dvbpsi_
dvb_
stream_identifier_dr_t
*
p_si_descriptor
=
p_descriptor
;
printf
(
"Component tag: %d
\n
"
,
p_si_descriptor
->
i_component_tag
);
}
...
...
@@ -1136,7 +1136,7 @@ static void DumpStreamIdentifierDescriptor(const void *p_descriptor)
*****************************************************************************/
static
void
DumpCAIdentifierDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_ca_identifier_dr_t
*
p_ca_descriptor
=
p_descriptor
;
const
dvbpsi_
dvb_
ca_identifier_dr_t
*
p_ca_descriptor
=
p_descriptor
;
printf
(
"CA system id
\n
"
);
for
(
int
i
=
0
;
i
<
p_ca_descriptor
->
i_number
;
i
++
)
printf
(
"
\t
%d: %d
\n
"
,
i
,
p_ca_descriptor
->
p_system
[
i
].
i_ca_system_id
);
...
...
@@ -1271,7 +1271,7 @@ static const char *GetContentSubCategory( const int i_type )
static
void
DumpContentDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_content_dr_t
*
p_content_descriptor
=
p_descriptor
;
const
dvbpsi_
dvb_
content_dr_t
*
p_content_descriptor
=
p_descriptor
;
dr_content_category_t
content_category
[]
=
{
{
DVBPSI_CONTENT_CAT_UNDEFINED
,
"Undefined"
},
{
DVBPSI_CONTENT_CAT_MOVIE
,
"Movie"
},
...
...
@@ -1310,7 +1310,7 @@ static void DumpContentDescriptor(const void *p_descriptor)
static
void
DumpSubtitleDescriptor
(
const
void
*
p_descriptor
)
{
int
a
;
const
dvbpsi_subtitling_dr_t
*
p_subtitle_descriptor
=
p_descriptor
;
const
dvbpsi_
dvb_
subtitling_dr_t
*
p_subtitle_descriptor
=
p_descriptor
;
printf
(
"%d subtitles,
\n
"
,
p_subtitle_descriptor
->
i_subtitles_number
);
for
(
a
=
0
;
a
<
p_subtitle_descriptor
->
i_subtitles_number
;
++
a
)
...
...
@@ -1410,7 +1410,7 @@ static const char *AACProfileToString(dvbpsi_aac_profile_and_level_t profile)
*****************************************************************************/
static
void
DumpAACDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_aac_dr_t
*
p_aac_descriptor
=
p_descriptor
;
const
dvbpsi_
dvb_
aac_dr_t
*
p_aac_descriptor
=
p_descriptor
;
printf
(
"AAC audio descriptor
\n
"
);
printf
(
"
\t
profile and level: %s (0x%02x)
\n
"
,
AACProfileToString
(
p_aac_descriptor
->
i_profile_and_level
),
...
...
@@ -1487,7 +1487,7 @@ static void DumpAACDescriptor(const void *p_descriptor)
*****************************************************************************/
static
void
DumpTimeShiftedServiceDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_tshifted_service_dr_t
*
p_ts_service
=
p_descriptor
;
const
dvbpsi_
dvb_
tshifted_service_dr_t
*
p_ts_service
=
p_descriptor
;
printf
(
"Time Shifted Service
\n
"
);
printf
(
"
\t
reference service id:%d"
,
p_ts_service
->
i_ref_service_id
);
}
...
...
@@ -1497,7 +1497,7 @@ static void DumpTimeShiftedServiceDescriptor(const void *p_descriptor)
*****************************************************************************/
static
void
DumpTimeShiftedEventDescriptor
(
const
void
*
p_descriptor
)
{
const
dvbpsi_tshifted_ev_dr_t
*
p_ts_event
=
p_descriptor
;
const
dvbpsi_
dvb_
tshifted_ev_dr_t
*
p_ts_event
=
p_descriptor
;
printf
(
"Time Shifted Event"
);
printf
(
"
\t
reference service id:%d"
,
p_ts_event
->
i_ref_service_id
);
printf
(
"
\t
reference event id:%d"
,
p_ts_event
->
i_ref_event_id
);
...
...
@@ -1510,7 +1510,7 @@ static void DumpTimeShiftedEventDescriptor(const void *p_descriptor)
static
void
DumpCUEIDescriptor
(
const
void
*
p_descriptor
)
{
const
char
*
cuei_stream_type
;
const
dvbpsi_cuei_dr_t
*
p_cuei_descriptor
=
p_descriptor
;
const
dvbpsi_
scte_
cuei_dr_t
*
p_cuei_descriptor
=
p_descriptor
;
assert
(
p_cuei_descriptor
);
...
...
@@ -1682,69 +1682,69 @@ static void DumpDescriptor(dvbpsi_descriptor_t *p_descriptor)
printf
(
"
\"
a52
\"
(%s)
\n
"
,
GetDescriptorName
(
p_descriptor
->
i_tag
));
return
;
case
0x7c
:
p_decoded
=
dvbpsi_
DecodeAACD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_dvb_aac_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpAACDescriptor
;
break
;
case
0x08
:
p_decoded
=
dvbpsi_
DecodeSystemClockD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_mpeg_system_clock_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpSystemClockDescriptor
;
break
;
#ifdef TS_USE_DVB_CUEI
case
0x8a
:
p_decoded
=
dvbpsi_
DecodeCUEID
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_scte_cuei_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpCUEIDescriptor
;
break
;
#endif
case
0x0e
:
p_decoded
=
dvbpsi_
DecodeMaxBitrateD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_mpeg_max_bitrate_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpMaxBitrateDescriptor
;
break
;
case
0x10
:
p_decoded
=
dvbpsi_
DecodeSmoothingBufferD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_mpeg_smoothing_buffer_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpSmoothingBufferDescriptor
;
break
;
case
0x11
:
p_decoded
=
dvbpsi_
DecodeSTDD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_mpeg_std_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpSTDDescriptor
;
break
;
case
0x12
:
p_decoded
=
dvbpsi_
DecodeIBPD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_mpeg_ibp_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpIBPDescriptor
;
break
;
case
0x1b
:
p_decoded
=
dvbpsi_
DecodeMPEG4VideoD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_mpeg_mpeg4_video_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpMPEG4VideoDescriptor
;
break
;
case
0x1c
:
p_decoded
=
dvbpsi_
DecodeMPEG4AudioD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_mpeg_mpeg4_audio_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpMPEG4AudioDescriptor
;
break
;
case
0x24
:
p_decoded
=
dvbpsi_
DecodeContentLabellingD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_mpeg_content_labelling_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpContentLabellingDescriptor
;
break
;
case
0x4c
:
p_decoded
=
dvbpsi_
DecodeTimeShiftedServiceD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_dvb_tshifted_service_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpTimeShiftedServiceDescriptor
;
break
;
case
0x4f
:
p_decoded
=
dvbpsi_
DecodeTimeShiftedEventD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_dvb_tshifted_ev_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpTimeShiftedEventDescriptor
;
break
;
case
0x52
:
p_decoded
=
dvbpsi_
DecodeStreamIdentifierD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_dvb_stream_identifier_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpStreamIdentifierDescriptor
;
break
;
case
0x53
:
p_decoded
=
dvbpsi_
DecodeCAIdentifierD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_dvb_ca_identifier_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpCAIdentifierDescriptor
;
break
;
case
0x54
:
p_decoded
=
dvbpsi_
DecodeContentD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_dvb_content_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpContentDescriptor
;
break
;
case
0x59
:
p_decoded
=
dvbpsi_
DecodeSubtitlingD
r
(
p_descriptor
);
p_decoded
=
dvbpsi_
decode_dvb_subtitling_d
r
(
p_descriptor
);
dump_dr_fn
=
DumpSubtitleDescriptor
;
break
;
}
...
...
src/descriptors/dr_02.c
View file @
61277eae
...
...
@@ -41,11 +41,11 @@
#include "dr_02.h"
/*****************************************************************************
* dvbpsi_
DecodeVStreamD
r
* dvbpsi_
decode_mpeg_vstream_d
r
*****************************************************************************/
dvbpsi_
vstream_dr_t
*
dvbpsi_DecodeVStreamD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
mpeg_vstream_dr_t
*
dvbpsi_decode_mpeg_vstream_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_vstream_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
vstream_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x02
))
...
...
@@ -56,7 +56,7 @@ dvbpsi_vstream_dr_t * dvbpsi_DecodeVStreamDr(dvbpsi_descriptor_t * p_descriptor)
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
vstream_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_vstream_dr_t
));
p_decoded
=
(
dvbpsi_
mpeg_vstream_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mpeg
_vstream_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
/* Decode data and check the length */
...
...
@@ -88,9 +88,9 @@ dvbpsi_vstream_dr_t * dvbpsi_DecodeVStreamDr(dvbpsi_descriptor_t * p_descriptor)
/*****************************************************************************
* dvbpsi_
GenVStreamD
r
* dvbpsi_
gen_mpeg_vstream_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenVStreamDr
(
dvbpsi
_vstream_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_vstream_dr
(
dvbpsi_mpeg
_vstream_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -123,7 +123,7 @@ dvbpsi_descriptor_t * dvbpsi_GenVStreamDr(dvbpsi_vstream_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_vstream_dr_t
));
sizeof
(
dvbpsi_
mpeg_
vstream_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_02.h
View file @
61277eae
...
...
@@ -41,20 +41,20 @@ extern "C" {
/*****************************************************************************
* dvbpsi_vstream_dr_t
* dvbpsi_
mpeg_
vstream_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_vstream_dr_s
* \struct dvbpsi_
mpeg_
vstream_dr_s
* \brief "video stream" descriptor structure.
*
* This structure is used to store a decoded "video stream" descriptor.
* (ISO/IEC 13818-1 section 2.6.2).
*/
/*!
* \typedef struct dvbpsi_
vstream_dr_s dvbpsi
_vstream_dr_t
* \brief dvbpsi_vstream_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_vstream_dr_s dvbpsi_mpeg
_vstream_dr_t
* \brief dvbpsi_
mpeg_
vstream_dr_t type definition.
*/
typedef
struct
dvbpsi_vstream_dr_s
typedef
struct
dvbpsi_
mpeg_
vstream_dr_s
{
bool
b_multiple_frame_rate
;
/*!< multiple_frame_rate_flag */
uint8_t
i_frame_rate_code
;
/*!< frame_rate_code */
...
...
@@ -67,36 +67,36 @@ typedef struct dvbpsi_vstream_dr_s
uint8_t
i_chroma_format
;
/*!< chroma_format */
bool
b_frame_rate_extension
;
/*!< frame_rate_extension_flag */
}
dvbpsi_vstream_dr_t
;
}
dvbpsi_
mpeg_
vstream_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeVStreamD
r
* dvbpsi_
decode_mpeg_vstream_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
vstream_dr_t * dvbpsi_DecodeVStreamD
r(
* \fn dvbpsi_
mpeg_vstream_dr_t * dvbpsi_decode_mpeg_vstream_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "video stream" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "video stream" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
vstream_dr_t
*
dvbpsi_DecodeVStreamD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
mpeg_vstream_dr_t
*
dvbpsi_decode_mpeg_vstream_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenVStreamD
r
* dvbpsi_
gen_mpeg_vstream_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenVStreamD
r(
dvbpsi_vstream_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_vstream_d
r(
dvbpsi_
mpeg_
vstream_dr_t * p_decoded, bool b_duplicate)
* \brief "video stream" descriptor generator.
* \param p_decoded pointer to a decoded "video stream" descriptor structure
* \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenVStreamDr
(
dvbpsi
_vstream_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_vstream_dr
(
dvbpsi_mpeg
_vstream_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_03.c
View file @
61277eae
...
...
@@ -42,11 +42,11 @@
/*****************************************************************************
* dvbpsi_
DecodeAStreamD
r
* dvbpsi_
decode_mpeg_astream_d
r
*****************************************************************************/
dvbpsi_
astream_dr_t
*
dvbpsi_DecodeAStreamD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
mpeg_astream_dr_t
*
dvbpsi_decode_mpeg_astream_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_astream_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
astream_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x03
))
...
...
@@ -57,7 +57,7 @@ dvbpsi_astream_dr_t * dvbpsi_DecodeAStreamDr(dvbpsi_descriptor_t * p_descriptor)
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
astream_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_astream_dr_t
));
p_decoded
=
(
dvbpsi_
mpeg_astream_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mpeg
_astream_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
/* Decode data and check the length */
...
...
@@ -79,9 +79,9 @@ dvbpsi_astream_dr_t * dvbpsi_DecodeAStreamDr(dvbpsi_descriptor_t * p_descriptor)
/*****************************************************************************
* dvbpsi_
GenAStreamD
r
* dvbpsi_
gen_mpeg_astream_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenAStreamDr
(
dvbpsi
_astream_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_astream_dr
(
dvbpsi_mpeg
_astream_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -103,7 +103,7 @@ dvbpsi_descriptor_t *dvbpsi_GenAStreamDr(dvbpsi_astream_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_astream_dr_t
));
sizeof
(
dvbpsi_
mpeg_
astream_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_03.h
View file @
61277eae
...
...
@@ -41,56 +41,56 @@ extern "C" {
/*****************************************************************************
* dvbpsi_astream_dr_t
* dvbpsi_
mpeg_
astream_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_astream_dr_s
* \struct dvbpsi_
mpeg_
astream_dr_s
* \brief "audio stream" descriptor structure.
*
* This structure is used to store a decoded "audio stream" descriptor.
* (ISO/IEC 13818-1 section 2.6.4).
*/
/*!
* \typedef struct dvbpsi_
astream_dr_s dvbpsi
_astream_dr_t
* \brief dvbpsi_astream_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_astream_dr_s dvbpsi_mpeg
_astream_dr_t
* \brief dvbpsi_
mpeg_
astream_dr_t type definition.
*/
typedef
struct
dvbpsi_astream_dr_s
typedef
struct
dvbpsi_
mpeg_
astream_dr_s
{
bool
b_free_format
;
/*!< free_format_flag */
uint8_t
i_id
;
/*!< ID */
uint8_t
i_layer
;
/*!< layer */
bool
b_variable_rate_audio_indicator
;
/*!< variable_rate_audio_indicator */
}
dvbpsi_astream_dr_t
;
}
dvbpsi_
mpeg_
astream_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeAStreamD
r
* dvbpsi_
decode_mpeg_astream_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
astream_dr_t * dvbpsi_DecodeAStreamD
r(
* \fn dvbpsi_
mpeg_astream_dr_t * dvbpsi_decode_mpeg_astream_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "audio stream" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "audio stream" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
astream_dr_t
*
dvbpsi_DecodeAStreamD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
mpeg_astream_dr_t
*
dvbpsi_decode_mpeg_astream_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenAStreamD
r
* dvbpsi_
gen_mpeg_astream_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenAStreamD
r(
dvbpsi_astream_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_astream_d
r(
dvbpsi_
mpeg_
astream_dr_t * p_decoded, bool b_duplicate)
* \brief "audio stream" descriptor generator.
* \param p_decoded pointer to a decoded "video stream" descriptor structure
* \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenAStreamDr
(
dvbpsi
_astream_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_astream_dr
(
dvbpsi_mpeg
_astream_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_04.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodeHierarchyD
r
* dvbpsi_
decode_mpeg_hierarchy_d
r
*****************************************************************************/
dvbpsi_
hierarchy_dr_t
*
dvbpsi_DecodeHierarchyD
r
(
dvbpsi_
mpeg_hierarchy_dr_t
*
dvbpsi_decode_mpeg_hierarchy_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_hierarchy_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
hierarchy_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x04
))
...
...
@@ -58,7 +58,7 @@ dvbpsi_hierarchy_dr_t * dvbpsi_DecodeHierarchyDr(
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
hierarchy_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_hierarchy_dr_t
));
p_decoded
=
(
dvbpsi_
mpeg_hierarchy_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mpeg
_hierarchy_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
/* Decode data and check the length */
...
...
@@ -80,9 +80,9 @@ dvbpsi_hierarchy_dr_t * dvbpsi_DecodeHierarchyDr(
/*****************************************************************************
* dvbpsi_
GenHierarchyD
r
* dvbpsi_
gen_mpeg_hierarchy_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenHierarchyDr
(
dvbpsi
_hierarchy_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_hierarchy_dr
(
dvbpsi_mpeg
_hierarchy_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -101,7 +101,7 @@ dvbpsi_descriptor_t * dvbpsi_GenHierarchyDr(dvbpsi_hierarchy_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_hierarchy_dr_t
));
sizeof
(
dvbpsi_
mpeg_
hierarchy_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_04.h
View file @
61277eae
...
...
@@ -41,57 +41,57 @@ extern "C" {
/*****************************************************************************
* dvbpsi_hierarchy_dr_t
* dvbpsi_
mpeg_
hierarchy_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_hierarchy_dr_s
* \struct dvbpsi_
mpeg_
hierarchy_dr_s
* \brief "hierarchy" descriptor structure.
*
* This structure is used to store a decoded "hierarchy" descriptor.
* (ISO/IEC 13818-1 section 2.6.6).
*/
/*!
* \typedef struct dvbpsi_
hierarchy_dr_s dvbpsi
_hierarchy_dr_t
* \brief dvbpsi_hierarchy_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_hierarchy_dr_s dvbpsi_mpeg
_hierarchy_dr_t
* \brief dvbpsi_
mpeg_
hierarchy_dr_t type definition.
*/
typedef
struct
dvbpsi_hierarchy_dr_s
typedef
struct
dvbpsi_
mpeg_
hierarchy_dr_s
{
uint8_t
i_h_type
;
/*!< hierarchy_type */
uint8_t
i_h_layer_index
;
/*!< hierarchy_layer_index */
uint8_t
i_h_embedded_layer
;
/*!< hierarchy_embedded_layer */
uint8_t
i_h_priority
;
/*!< hierarchy_priority */
}
dvbpsi_hierarchy_dr_t
;
}
dvbpsi_
mpeg_
hierarchy_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeHierarchyD
r
* dvbpsi_
decode_mpeg_hierarchy_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
hierarchy_dr_t * dvbpsi_DecodeHierarchyD
r(
* \fn dvbpsi_
mpeg_hierarchy_dr_t * dvbpsi_decode_mpeg_hierarchy_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "hierarchy" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "hierarchy" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
hierarchy_dr_t
*
dvbpsi_DecodeHierarchyD
r
(
dvbpsi_
mpeg_hierarchy_dr_t
*
dvbpsi_decode_mpeg_hierarchy_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenHierarchyD
r
* dvbpsi_
gen_mpeg_hierarchy_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenHierarchyD
r(
dvbpsi_hierarchy_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_hierarchy_d
r(
dvbpsi_
mpeg_
hierarchy_dr_t * p_decoded, bool b_duplicate)
* \brief "hierarchy" descriptor generator.
* \param p_decoded pointer to a decoded "hierarchy" descriptor structure
* \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenHierarchyDr
(
dvbpsi
_hierarchy_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_hierarchy_dr
(
dvbpsi_mpeg
_hierarchy_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_05.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodeRegistrationD
r
* dvbpsi_
decode_mpeg_registration_d
r
*****************************************************************************/
dvbpsi_
registration_dr_t
*
dvbpsi_DecodeRegistrationD
r
(
dvbpsi_
mpeg_registration_dr_t
*
dvbpsi_decode_mpeg_registration_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_registration_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
registration_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x05
))
...
...
@@ -58,8 +58,8 @@ dvbpsi_registration_dr_t * dvbpsi_DecodeRegistrationDr(
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_registration_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_registration_dr_t
));
p_decoded
=
(
dvbpsi_
mpeg_
registration_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_
mpeg_
registration_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
/* Decode data and check the length */
...
...
@@ -89,9 +89,9 @@ dvbpsi_registration_dr_t * dvbpsi_DecodeRegistrationDr(
/*****************************************************************************
* dvbpsi_
GenRegistrationD
r
* dvbpsi_
gen_mpeg_registration_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenRegistrationDr
(
dvbpsi
_registration_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_registration_dr
(
dvbpsi_mpeg
_registration_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_additional_length
>
251
)
...
...
@@ -119,7 +119,7 @@ dvbpsi_descriptor_t * dvbpsi_GenRegistrationDr(dvbpsi_registration_dr_t *p_decod
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_registration_dr_t
));
sizeof
(
dvbpsi_
mpeg_
registration_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_05.h
View file @
61277eae
...
...
@@ -41,58 +41,58 @@ extern "C" {
/*****************************************************************************
* dvbpsi_registration_dr_t
* dvbpsi_
mpeg_
registration_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_registration_dr_s
* \struct dvbpsi_
mpeg_
registration_dr_s
* \brief "registration" descriptor structure.
*
* This structure is used to store a decoded "registration" descriptor.
* (ISO/IEC 13818-1 section 2.6.8).
*/
/*!
* \typedef struct dvbpsi_
registration_dr_s dvbpsi
_registration_dr_t
* \brief dvbpsi_registration_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_registration_dr_s dvbpsi_mpeg
_registration_dr_t
* \brief dvbpsi_
mpeg_
registration_dr_t type definition.
*/
typedef
struct
dvbpsi_registration_dr_s
typedef
struct
dvbpsi_
mpeg_
registration_dr_s
{
uint32_t
i_format_identifier
;
/*!< format_identifier */
uint8_t
i_additional_length
;
/*!< length of the i_additional_info
array */
uint8_t
i_additional_info
[
251
];
/*!< additional_identification_info */
}
dvbpsi_registration_dr_t
;
}
dvbpsi_
mpeg_
registration_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeRegistrationD
r
* dvbpsi_
decode_mpeg_registration_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
registration_dr_t * dvbpsi_DecodeRegistrationD
r(
* \fn dvbpsi_
mpeg_registration_dr_t * dvbpsi_decode_mpeg_registration_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "registration" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "registration" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
registration_dr_t
*
dvbpsi_DecodeRegistrationD
r
(
dvbpsi_
mpeg_registration_dr_t
*
dvbpsi_decode_mpeg_registration_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenRegistrationD
r
* dvbpsi_
gen_mpeg_registration_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenRegistrationD
r(
dvbpsi_registration_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_registration_d
r(
dvbpsi_
mpeg_
registration_dr_t * p_decoded, bool b_duplicate)
* \brief "registration" descriptor generator.
* \param p_decoded pointer to a decoded "registration" descriptor structure
* \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenRegistrationD
r
(
dvbpsi_registration_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_registration_d
r
(
dvbpsi_
mpeg_
registration_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_06.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodeDSAlignmentD
r
* dvbpsi_
decode_mpeg_ds_alignment_d
r
*****************************************************************************/
dvbpsi_
ds_alignment_dr_t
*
dvbpsi_DecodeDSAlignmentD
r
(
dvbpsi_
mpeg_ds_alignment_dr_t
*
dvbpsi_decode_mpeg_ds_alignment_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_ds_alignment_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
ds_alignment_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x06
))
...
...
@@ -61,7 +61,7 @@ dvbpsi_ds_alignment_dr_t * dvbpsi_DecodeDSAlignmentDr(
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
ds_alignment_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_ds_alignment_dr_t
));
p_decoded
=
(
dvbpsi_
mpeg_ds_alignment_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mpeg
_ds_alignment_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
p_decoded
->
i_alignment_type
=
p_descriptor
->
p_data
[
0
];
...
...
@@ -73,10 +73,10 @@ dvbpsi_ds_alignment_dr_t * dvbpsi_DecodeDSAlignmentDr(
/*****************************************************************************
* dvbpsi_
GenDSAlignmentD
r
* dvbpsi_
gen_mpeg_ds_alignment_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenDSAlignmentD
r
(
dvbpsi_ds_alignment_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_ds_alignment_d
r
(
dvbpsi_
mpeg_
ds_alignment_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -92,7 +92,7 @@ dvbpsi_descriptor_t * dvbpsi_GenDSAlignmentDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_ds_alignment_dr_t
));
sizeof
(
dvbpsi_
mpeg_
ds_alignment_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_06.h
View file @
61277eae
...
...
@@ -41,47 +41,47 @@ extern "C" {
/*****************************************************************************
* dvbpsi_ds_alignment_dr_t
* dvbpsi_
mpeg_
ds_alignment_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_ds_alignment_dr_s
* \struct dvbpsi_
mpeg_
ds_alignment_dr_s
* \brief "data stream alignment" descriptor structure.
*
* This structure is used to store a decoded "data stream alignment"
* descriptor. (ISO/IEC 13818-1 section 2.6.10).
*/
/*!
* \typedef struct dvbpsi_
ds_alignment_dr_s dvbpsi
_ds_alignment_dr_t
* \brief dvbpsi_ds_alignment_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_ds_alignment_dr_s dvbpsi_mpeg
_ds_alignment_dr_t
* \brief dvbpsi_
mpeg_
ds_alignment_dr_t type definition.
*/
typedef
struct
dvbpsi_ds_alignment_dr_s
typedef
struct
dvbpsi_
mpeg_
ds_alignment_dr_s
{
uint8_t
i_alignment_type
;
/*!< alignment_type */
}
dvbpsi_ds_alignment_dr_t
;
}
dvbpsi_
mpeg_
ds_alignment_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeDSAlignmentD
r
* dvbpsi_
decode_mpeg_ds_alignment_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
ds_alignment_dr_t * dvbpsi_DecodeDSAlignmentD
r(
* \fn dvbpsi_
mpeg_ds_alignment_dr_t * dvbpsi_decode_mpeg_ds_alignment_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "data stream alignment" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "data stream alignment" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
ds_alignment_dr_t
*
dvbpsi_DecodeDSAlignmentD
r
(
dvbpsi_
mpeg_ds_alignment_dr_t
*
dvbpsi_decode_mpeg_ds_alignment_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenDSAlignmentD
r
* dvbpsi_
gen_mpeg_ds_alignment_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenDSAlignmentD
r(
dvbpsi_ds_alignment_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_ds_alignment_d
r(
dvbpsi_
mpeg_
ds_alignment_dr_t * p_decoded, bool b_duplicate)
* \brief "data stream alignment" descriptor generator.
* \param p_decoded pointer to a decoded "data stream alignment" descriptor
* structure
...
...
@@ -89,8 +89,8 @@ dvbpsi_ds_alignment_dr_t* dvbpsi_DecodeDSAlignmentDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenDSAlignmentD
r
(
dvbpsi_ds_alignment_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_ds_alignment_d
r
(
dvbpsi_
mpeg_
ds_alignment_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_07.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodeTargetBgGridD
r
* dvbpsi_
decode_mpeg_target_bg_grid_d
r
*****************************************************************************/
dvbpsi_
target_bg_grid_dr_t
*
dvbpsi_DecodeTargetBgGridD
r
(
dvbpsi_
mpeg_target_bg_grid_dr_t
*
dvbpsi_decode_mpeg_target_bg_grid_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_target_bg_grid_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
target_bg_grid_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x07
))
...
...
@@ -61,7 +61,7 @@ dvbpsi_target_bg_grid_dr_t * dvbpsi_DecodeTargetBgGridDr(
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
target_bg_grid_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_target_bg_grid_dr_t
));
p_decoded
=
(
dvbpsi_
mpeg_target_bg_grid_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mpeg
_target_bg_grid_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -80,9 +80,9 @@ dvbpsi_target_bg_grid_dr_t * dvbpsi_DecodeTargetBgGridDr(
/*****************************************************************************
* dvbpsi_
GenTargetBgGridD
r
* dvbpsi_
gen_mpeg_target_bg_grid_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenTargetBgGridDr
(
dvbpsi
_target_bg_grid_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_target_bg_grid_dr
(
dvbpsi_mpeg
_target_bg_grid_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -103,7 +103,7 @@ dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr(dvbpsi_target_bg_grid_dr_t * p_de
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_target_bg_grid_dr_t
));
sizeof
(
dvbpsi_
mpeg_
target_bg_grid_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_07.h
View file @
61277eae
...
...
@@ -41,49 +41,49 @@ extern "C" {
/*****************************************************************************
* dvbpsi_target_bg_grid_dr_t
* dvbpsi_
mpeg_
target_bg_grid_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_target_bg_grid_dr_s
* \struct dvbpsi_
mpeg_
target_bg_grid_dr_s
* \brief "target background grid" descriptor structure.
*
* This structure is used to store a decoded "target background grid"
* descriptor. (ISO/IEC 13818-1 section 2.6.12).
*/
/*!
* \typedef struct dvbpsi_
target_bg_grid_dr_s dvbpsi
_target_bg_grid_dr_t
* \brief dvbpsi_target_bg_grid_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_target_bg_grid_dr_s dvbpsi_mpeg
_target_bg_grid_dr_t
* \brief dvbpsi_
mpeg_
target_bg_grid_dr_t type definition.
*/
typedef
struct
dvbpsi_target_bg_grid_dr_s
typedef
struct
dvbpsi_
mpeg_
target_bg_grid_dr_s
{
uint16_t
i_horizontal_size
;
/*!< horizontal_size */
uint16_t
i_vertical_size
;
/*!< vertical_size */
uint8_t
i_pel_aspect_ratio
;
/*!< pel_aspect_ratio */
}
dvbpsi_target_bg_grid_dr_t
;
}
dvbpsi_
mpeg_
target_bg_grid_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeTargetBgGridD
r
* dvbpsi_
decode_mpeg_target_bg_grid_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
target_bg_grid_dr_t * dvbpsi_DecodeTargetBgGridD
r(
* \fn dvbpsi_
mpeg_target_bg_grid_dr_t * dvbpsi_decode_mpeg_target_bg_grid_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "target background grid" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "target background grid" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
target_bg_grid_dr_t
*
dvbpsi_DecodeTargetBgGridD
r
(
dvbpsi_
mpeg_target_bg_grid_dr_t
*
dvbpsi_decode_mpeg_target_bg_grid_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenTargetBgGridD
r
* dvbpsi_
gen_mpeg_target_bg_grid_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenTargetBgGridD
r(
dvbpsi_target_bg_grid_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_target_bg_grid_d
r(
dvbpsi_
mpeg_
target_bg_grid_dr_t * p_decoded, bool b_duplicate)
* \brief "target background grid" descriptor generator.
* \param p_decoded pointer to a decoded "target background grid" descriptor
* structure
...
...
@@ -91,8 +91,8 @@ dvbpsi_target_bg_grid_dr_t* dvbpsi_DecodeTargetBgGridDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenTargetBgGridD
r
(
dvbpsi_target_bg_grid_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_target_bg_grid_d
r
(
dvbpsi_
mpeg_
target_bg_grid_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_08.c
View file @
61277eae
...
...
@@ -42,11 +42,11 @@
/*****************************************************************************
* dvbpsi_
DecodeVWindowD
r
* dvbpsi_
decode_mpeg_vwindow_d
r
*****************************************************************************/
dvbpsi_
vwindow_dr_t
*
dvbpsi_DecodeVWindowD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
mpeg_vwindow_dr_t
*
dvbpsi_decode_mpeg_vwindow_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_vwindow_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
vwindow_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x08
))
...
...
@@ -60,7 +60,7 @@ dvbpsi_vwindow_dr_t * dvbpsi_DecodeVWindowDr(dvbpsi_descriptor_t * p_descriptor)
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
vwindow_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_vwindow_dr_t
));
p_decoded
=
(
dvbpsi_
mpeg_vwindow_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mpeg
_vwindow_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -79,9 +79,9 @@ dvbpsi_vwindow_dr_t * dvbpsi_DecodeVWindowDr(dvbpsi_descriptor_t * p_descriptor)
/*****************************************************************************
* dvbpsi_
GenVWindowD
r
* dvbpsi_
gen_mpeg_vwindow_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenVWindowDr
(
dvbpsi
_vwindow_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_vwindow_dr
(
dvbpsi_mpeg
_vwindow_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -103,7 +103,7 @@ dvbpsi_descriptor_t * dvbpsi_GenVWindowDr(dvbpsi_vwindow_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_vwindow_dr_t
));
sizeof
(
dvbpsi_
mpeg_
vwindow_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_08.h
View file @
61277eae
...
...
@@ -41,55 +41,55 @@ extern "C" {
/*****************************************************************************
* dvbpsi_vwindow_dr_t
* dvbpsi_
mpeg_
vwindow_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_vwindow_dr_s
* \struct dvbpsi_
mpeg_
vwindow_dr_s
* \brief "video window" descriptor structure.
*
* This structure is used to store a decoded "video window"
* descriptor. (ISO/IEC 13818-1 section 2.6.14).
*/
/*!
* \typedef struct dvbpsi_
vwindow_dr_s dvbpsi
_vwindow_dr_t
* \brief dvbpsi_vwindow_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_vwindow_dr_s dvbpsi_mpeg
_vwindow_dr_t
* \brief dvbpsi_
mpeg_
vwindow_dr_t type definition.
*/
typedef
struct
dvbpsi_vwindow_dr_s
typedef
struct
dvbpsi_
mpeg_
vwindow_dr_s
{
uint16_t
i_horizontal_offset
;
/*!< horizontal_offset */
uint16_t
i_vertical_offset
;
/*!< vertical_offset */
uint8_t
i_window_priority
;
/*!< window_priority */
}
dvbpsi_vwindow_dr_t
;
}
dvbpsi_
mpeg_
vwindow_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeVWindowD
r
* dvbpsi_
decode_mpeg_vwindow_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
vwindow_dr_t * dvbpsi_DecodeVWindowD
r(
* \fn dvbpsi_
mpeg_vwindow_dr_t * dvbpsi_decode_mpeg_vwindow_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "video window" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "video window" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
vwindow_dr_t
*
dvbpsi_DecodeVWindowD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
mpeg_vwindow_dr_t
*
dvbpsi_decode_mpeg_vwindow_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenVWindowD
r
* dvbpsi_
gen_mpeg_vwindow_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenVWindowD
r(
dvbpsi_vwindow_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_vwindow_d
r(
dvbpsi_
mpeg_
vwindow_dr_t * p_decoded, bool b_duplicate)
* \brief "video window" descriptor generator.
* \param p_decoded pointer to a decoded "video window" descriptor structure
* \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenVWindowDr
(
dvbpsi
_vwindow_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_vwindow_dr
(
dvbpsi_mpeg
_vwindow_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_09.c
View file @
61277eae
...
...
@@ -42,11 +42,11 @@
/*****************************************************************************
* dvbpsi_
DecodeCAD
r
* dvbpsi_
decode_mpeg_ca_d
r
*****************************************************************************/
dvbpsi_
ca_dr_t
*
dvbpsi_DecodeCAD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
mpeg_ca_dr_t
*
dvbpsi_decode_mpeg_ca_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_ca_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
ca_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x09
))
...
...
@@ -60,7 +60,7 @@ dvbpsi_ca_dr_t * dvbpsi_DecodeCADr(dvbpsi_descriptor_t * p_descriptor)
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
ca_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_ca_dr_t
));
p_decoded
=
(
dvbpsi_
mpeg_ca_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mpeg
_ca_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -83,9 +83,9 @@ dvbpsi_ca_dr_t * dvbpsi_DecodeCADr(dvbpsi_descriptor_t * p_descriptor)
}
/*****************************************************************************
* dvbpsi_
GenCAD
r
* dvbpsi_
gen_mpeg_ca_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenCADr
(
dvbpsi
_ca_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_ca_dr
(
dvbpsi_mpeg
_ca_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_private_length
>
251
)
...
...
@@ -112,7 +112,7 @@ dvbpsi_descriptor_t * dvbpsi_GenCADr(dvbpsi_ca_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_ca_dr_t
));
sizeof
(
dvbpsi_
mpeg_
ca_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_09.h
View file @
61277eae
...
...
@@ -41,20 +41,20 @@ extern "C" {
/*****************************************************************************
* dvbpsi_ca_dr_t
* dvbpsi_
mpeg_
ca_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_ca_dr_s
* \struct dvbpsi_
mpeg_
ca_dr_s
* \brief "conditional access" descriptor structure.
*
* This structure is used to store a decoded "conditional access"
* descriptor. (ISO/IEC 13818-1 section 2.6.16).
*/
/*!
* \typedef struct dvbpsi_
ca_dr_s dvbpsi
_ca_dr_t
* \brief dvbpsi_ca_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_ca_dr_s dvbpsi_mpeg
_ca_dr_t
* \brief dvbpsi_
mpeg_
ca_dr_t type definition.
*/
typedef
struct
dvbpsi_ca_dr_s
typedef
struct
dvbpsi_
mpeg_
ca_dr_s
{
uint16_t
i_ca_system_id
;
/*!< CA_system_ID */
uint16_t
i_ca_pid
;
/*!< CA_PID */
...
...
@@ -62,29 +62,29 @@ typedef struct dvbpsi_ca_dr_s
array */
uint8_t
i_private_data
[
251
];
/*!< private_data_byte */
}
dvbpsi_ca_dr_t
;
}
dvbpsi_
mpeg_
ca_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeCAD
r
* dvbpsi_
decode_mpeg_ca_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
ca_dr_t * dvbpsi_DecodeCAD
r(
* \fn dvbpsi_
mpeg_ca_dr_t * dvbpsi_decode_mpeg_ca_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "conditional access" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "conditional access" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
ca_dr_t
*
dvbpsi_DecodeCAD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
mpeg_ca_dr_t
*
dvbpsi_decode_mpeg_ca_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenCAD
r
* dvbpsi_
gen_mpeg_ca_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenCAD
r(
dvbpsi_ca_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_ca_d
r(
dvbpsi_
mpeg_
ca_dr_t * p_decoded, bool b_duplicate)
* \brief "conditional access" descriptor generator.
* \param p_decoded pointer to a decoded "conditional access" descriptor
* structure
...
...
@@ -92,7 +92,7 @@ dvbpsi_ca_dr_t* dvbpsi_DecodeCADr(dvbpsi_descriptor_t * p_descriptor);
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenCADr
(
dvbpsi
_ca_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_ca_dr
(
dvbpsi_mpeg
_ca_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_0a.c
View file @
61277eae
...
...
@@ -42,11 +42,11 @@
/*****************************************************************************
* dvbpsi_
DecodeISO639D
r
* dvbpsi_
decode_mpeg_iso639_d
r
*****************************************************************************/
dvbpsi_
iso639_dr_t
*
dvbpsi_DecodeISO639D
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
mpeg_iso639_dr_t
*
dvbpsi_decode_mpeg_iso639_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_iso639_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
iso639_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x0a
))
...
...
@@ -61,7 +61,7 @@ dvbpsi_iso639_dr_t * dvbpsi_DecodeISO639Dr(dvbpsi_descriptor_t * p_descriptor)
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
iso639_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_iso639_dr_t
));
p_decoded
=
(
dvbpsi_
mpeg_iso639_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mpeg
_iso639_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -85,9 +85,9 @@ dvbpsi_iso639_dr_t * dvbpsi_DecodeISO639Dr(dvbpsi_descriptor_t * p_descriptor)
/*****************************************************************************
* dvbpsi_
GenISO639D
r
* dvbpsi_
gen_mpeg_iso639_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenISO639Dr
(
dvbpsi
_iso639_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_iso639_dr
(
dvbpsi_mpeg
_iso639_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_code_count
>
64
)
...
...
@@ -116,7 +116,7 @@ dvbpsi_descriptor_t * dvbpsi_GenISO639Dr(dvbpsi_iso639_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_iso639_dr_t
));
sizeof
(
dvbpsi_
mpeg_
iso639_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_0a.h
View file @
61277eae
...
...
@@ -42,20 +42,20 @@ extern "C" {
#define DR_0A_API_VER 2
/*!< descriptor 0a API version */
/*****************************************************************************
* dvbpsi_iso639_dr_t
* dvbpsi_
mpeg_
iso639_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_iso639_dr_s
* \struct dvbpsi_
mpeg_
iso639_dr_s
* \brief "ISO 639 language" descriptor structure.
*
* This structure is used to store a decoded "ISO 639 language"
* descriptor. (ISO/IEC 13818-1 section 2.6.18).
*/
/*!
* \typedef struct dvbpsi_
iso639_dr_s dvbpsi
_iso639_dr_t
* \brief dvbpsi_iso639_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_iso639_dr_s dvbpsi_mpeg
_iso639_dr_t
* \brief dvbpsi_
mpeg_
iso639_dr_t type definition.
*/
typedef
struct
dvbpsi_iso639_dr_s
typedef
struct
dvbpsi_
mpeg_
iso639_dr_s
{
uint8_t
i_code_count
;
/*!< length of the i_iso_639_code
array */
...
...
@@ -64,29 +64,29 @@ typedef struct dvbpsi_iso639_dr_s
uint8_t
i_audio_type
;
/*!< audio_type */
}
code
[
64
];
/*!< list of ISO 639 codes */
}
dvbpsi_iso639_dr_t
;
}
dvbpsi_
mpeg_
iso639_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeISO639D
r
* dvbpsi_
decode_mpeg_iso639_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
iso639_dr_t * dvbpsi_DecodeISO639D
r(
* \fn dvbpsi_
mpeg_iso639_dr_t * dvbpsi_decode_mpeg_iso639_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "ISO 639 language" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "ISO 639 language" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
iso639_dr_t
*
dvbpsi_DecodeISO639D
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
mpeg_iso639_dr_t
*
dvbpsi_decode_mpeg_iso639_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenISO639D
r
* dvbpsi_
gen_mpeg_iso639_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenISO639D
r(
dvbpsi_iso639_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_iso639_d
r(
dvbpsi_
mpeg_
iso639_dr_t * p_decoded, bool b_duplicate)
* \brief "ISO 639 language" descriptor generator.
* \param p_decoded pointer to a decoded "ISO 639 language" descriptor
* structure
...
...
@@ -94,7 +94,7 @@ dvbpsi_iso639_dr_t* dvbpsi_DecodeISO639Dr(dvbpsi_descriptor_t * p_descriptor);
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenISO639Dr
(
dvbpsi
_iso639_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_iso639_dr
(
dvbpsi_mpeg
_iso639_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_0b.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodeSystemClockD
r
* dvbpsi_
decode_mpeg_system_clock_d
r
*****************************************************************************/
dvbpsi_
system_clock_dr_t
*
dvbpsi_DecodeSystemClockD
r
(
dvbpsi_
mpeg_system_clock_dr_t
*
dvbpsi_decode_mpeg_system_clock_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_system_clock_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
system_clock_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x0b
))
...
...
@@ -63,7 +63,7 @@ dvbpsi_system_clock_dr_t * dvbpsi_DecodeSystemClockDr(
/* Allocate memory */
p_decoded
=
(
dvbpsi_
system_clock_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_system_clock_dr_t
));
(
dvbpsi_
mpeg_system_clock_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mpeg
_system_clock_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -77,9 +77,9 @@ dvbpsi_system_clock_dr_t * dvbpsi_DecodeSystemClockDr(
}
/*****************************************************************************
* dvbpsi_
GenSystemClockD
r
* dvbpsi_
gen_mpeg_system_clock_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenSystemClockDr
(
dvbpsi
_system_clock_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_system_clock_dr
(
dvbpsi_mpeg
_system_clock_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -100,7 +100,7 @@ dvbpsi_descriptor_t * dvbpsi_GenSystemClockDr(dvbpsi_system_clock_dr_t * p_decod
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_system_clock_dr_t
));
sizeof
(
dvbpsi_
mpeg_
system_clock_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_0b.h
View file @
61277eae
...
...
@@ -41,50 +41,50 @@ extern "C" {
/*****************************************************************************
* dvbpsi_system_clock_dr_t
* dvbpsi_
mpeg_
system_clock_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_system_clock_dr_s
* \struct dvbpsi_
mpeg_
system_clock_dr_s
* \brief "system clock" descriptor structure.
*
* This structure is used to store a decoded "system clock"
* descriptor. (ISO/IEC 13818-1 section 2.6.20).
*/
/*!
* \typedef struct dvbpsi_
system_clock_dr_s dvbpsi
_system_clock_dr_t
* \brief dvbpsi_system_clock_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_system_clock_dr_s dvbpsi_mpeg
_system_clock_dr_t
* \brief dvbpsi_
mpeg_
system_clock_dr_t type definition.
*/
typedef
struct
dvbpsi_system_clock_dr_s
typedef
struct
dvbpsi_
mpeg_
system_clock_dr_s
{
bool
b_external_clock_ref
;
/*!< external_clock_reference_indicator
*/
uint8_t
i_clock_accuracy_integer
;
/*!< clock_accuracy_integer */
uint8_t
i_clock_accuracy_exponent
;
/*!< clock_accuracy_exponent */
}
dvbpsi_system_clock_dr_t
;
}
dvbpsi_
mpeg_
system_clock_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeSystemClockD
r
* dvbpsi_
decode_mpeg_system_clock_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
system_clock_dr_t * dvbpsi_DecodeSystemClockD
r(
* \fn dvbpsi_
mpeg_system_clock_dr_t * dvbpsi_decode_mpeg_system_clock_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "system clock" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "system clock" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
system_clock_dr_t
*
dvbpsi_DecodeSystemClockD
r
(
dvbpsi_
mpeg_system_clock_dr_t
*
dvbpsi_decode_mpeg_system_clock_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenSystemClockD
r
* dvbpsi_
gen_mpeg_system_clock_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenSystemClockD
r(
dvbpsi_system_clock_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_system_clock_d
r(
dvbpsi_
mpeg_
system_clock_dr_t * p_decoded, bool b_duplicate)
* \brief "system clock" descriptor generator.
* \param p_decoded pointer to a decoded "system clock" descriptor
* structure
...
...
@@ -92,8 +92,8 @@ dvbpsi_system_clock_dr_t* dvbpsi_DecodeSystemClockDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenSystemClockD
r
(
dvbpsi_system_clock_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_system_clock_d
r
(
dvbpsi_
mpeg_
system_clock_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_0c.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodeMxBuffUtilizationD
r
* dvbpsi_
decode_mpeg_mx_buff_utilization_d
r
*****************************************************************************/
dvbpsi_m
x_buff_utilization_dr_t
*
dvbpsi_DecodeMxBuffUtilizationD
r
(
dvbpsi_m
peg_mx_buff_utilization_dr_t
*
dvbpsi_decode_mpeg_mx_buff_utilization_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_mx_buff_utilization_dr_t
*
p_decoded
;
dvbpsi_m
peg_m
x_buff_utilization_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x0c
))
...
...
@@ -61,8 +61,8 @@ dvbpsi_mx_buff_utilization_dr_t * dvbpsi_DecodeMxBuffUtilizationDr(
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_mx_buff_utilization_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mx_buff_utilization_dr_t
));
p_decoded
=
(
dvbpsi_m
peg_m
x_buff_utilization_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_m
peg_m
x_buff_utilization_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -79,10 +79,10 @@ dvbpsi_mx_buff_utilization_dr_t * dvbpsi_DecodeMxBuffUtilizationDr(
/*****************************************************************************
* dvbpsi_
GenMxBuffUtilizationD
r
* dvbpsi_
gen_mpeg_mx_buff_utilization_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenMxBuffUtilizationD
r
(
dvbpsi_mx_buff_utilization_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_mx_buff_utilization_d
r
(
dvbpsi_m
peg_m
x_buff_utilization_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -102,7 +102,7 @@ dvbpsi_descriptor_t * dvbpsi_GenMxBuffUtilizationDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_mx_buff_utilization_dr_t
));
sizeof
(
dvbpsi_m
peg_m
x_buff_utilization_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_0c.h
View file @
61277eae
...
...
@@ -41,49 +41,49 @@ extern "C" {
/*****************************************************************************
* dvbpsi_mx_buff_utilization_dr_t
* dvbpsi_m
peg_m
x_buff_utilization_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_mx_buff_utilization_dr_s
* \struct dvbpsi_m
peg_m
x_buff_utilization_dr_s
* \brief "multiplex buffer utilization" descriptor structure.
*
* This structure is used to store a decoded "multiplex buffer utilization"
* descriptor. (ISO/IEC 13818-1 section 2.6.22).
*/
/*!
* \typedef struct dvbpsi_m
x_buff_utilization_dr_s dvbpsi
_mx_buff_utilization_dr_t
* \typedef struct dvbpsi_m
peg_mx_buff_utilization_dr_s dvbpsi_mpeg
_mx_buff_utilization_dr_t
* \brief dvbpsi_systemclock_dr_t type definition.
*/
typedef
struct
dvbpsi_mx_buff_utilization_dr_s
typedef
struct
dvbpsi_m
peg_m
x_buff_utilization_dr_s
{
bool
b_mdv_valid
;
/*!< mdv_valid_flag */
uint16_t
i_mx_delay_variation
;
/*!< multiplex_delay_variation */
uint8_t
i_mx_strategy
;
/*!< multiplex_strategy */
}
dvbpsi_mx_buff_utilization_dr_t
;
}
dvbpsi_m
peg_m
x_buff_utilization_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeMxBuffUtilizationD
r
* dvbpsi_
decode_mpeg_mx_buff_utilization_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_m
x_buff_utilization_dr_t * dvbpsi_DecodeMxBuffUtilizationD
r(
* \fn dvbpsi_m
peg_mx_buff_utilization_dr_t * dvbpsi_decode_mpeg_mx_buff_utilization_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "multiplex buffer utilization" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "multiplex buffer utilization" descriptor
* structure which contains the decoded data.
*/
dvbpsi_m
x_buff_utilization_dr_t
*
dvbpsi_DecodeMxBuffUtilizationD
r
(
dvbpsi_m
peg_mx_buff_utilization_dr_t
*
dvbpsi_decode_mpeg_mx_buff_utilization_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenMxBuffUtilizationD
r
* dvbpsi_
gen_mpeg_mx_buff_utilization_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenMxBuffUtilizationD
r(
dvbpsi_mx_buff_utilization_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_mx_buff_utilization_d
r(
dvbpsi_m
peg_m
x_buff_utilization_dr_t * p_decoded, bool b_duplicate)
* \brief "multiplex buffer utilization" descriptor generator.
* \param p_decoded pointer to a decoded "system clock" descriptor
* structure
...
...
@@ -91,8 +91,8 @@ dvbpsi_mx_buff_utilization_dr_t* dvbpsi_DecodeMxBuffUtilizationDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenMxBuffUtilizationD
r
(
dvbpsi_mx_buff_utilization_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_mx_buff_utilization_d
r
(
dvbpsi_m
peg_m
x_buff_utilization_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_0d.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodeCopyrightD
r
* dvbpsi_
decode_mpeg_copyright_d
r
*****************************************************************************/
dvbpsi_
copyright_dr_t
*
dvbpsi_DecodeCopyrightD
r
(
dvbpsi_
mpeg_copyright_dr_t
*
dvbpsi_decode_mpeg_copyright_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_copyright_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
copyright_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x0d
))
...
...
@@ -61,8 +61,8 @@ dvbpsi_copyright_dr_t * dvbpsi_DecodeCopyrightDr(
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_copyright_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_copyright_dr_t
));
p_decoded
=
(
dvbpsi_
mpeg_
copyright_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_
mpeg_
copyright_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -87,9 +87,9 @@ dvbpsi_copyright_dr_t * dvbpsi_DecodeCopyrightDr(
/*****************************************************************************
* dvbpsi_
GenCopyrightD
r
* dvbpsi_
gen_mpeg_copyright_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenCopyrightDr
(
dvbpsi
_copyright_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_copyright_dr
(
dvbpsi_mpeg
_copyright_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_additional_length
>
251
)
...
...
@@ -116,7 +116,7 @@ dvbpsi_descriptor_t * dvbpsi_GenCopyrightDr(dvbpsi_copyright_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_copyright_dr_t
));
sizeof
(
dvbpsi_
mpeg_
copyright_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_0d.h
View file @
61277eae
...
...
@@ -41,58 +41,58 @@ extern "C" {
/*****************************************************************************
* dvbpsi_copyright_dr_t
* dvbpsi_
mpeg_
copyright_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_copyright_dr_s
* \struct dvbpsi_
mpeg_
copyright_dr_s
* \brief "copyright" descriptor structure.
*
* This structure is used to store a decoded "copyright" descriptor.
* (ISO/IEC 13818-1 section 2.6.24).
*/
/*!
* \typedef struct dvbpsi_
copyright_dr_s dvbpsi
_copyright_dr_t
* \brief dvbpsi_copyright_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_copyright_dr_s dvbpsi_mpeg
_copyright_dr_t
* \brief dvbpsi_
mpeg_
copyright_dr_t type definition.
*/
typedef
struct
dvbpsi_copyright_dr_s
typedef
struct
dvbpsi_
mpeg_
copyright_dr_s
{
uint32_t
i_copyright_identifier
;
/*!< copyright_identifier */
uint8_t
i_additional_length
;
/*!< length of the i_additional_info
array */
uint8_t
i_additional_info
[
251
];
/*!< additional_copyright_info */
}
dvbpsi_copyright_dr_t
;
}
dvbpsi_
mpeg_
copyright_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeCopyrightD
r
* dvbpsi_
decode_mpeg_copyright_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
copyright_dr_t * dvbpsi_DecodeCopyrightD
r(
* \fn dvbpsi_
mpeg_copyright_dr_t * dvbpsi_decode_mpeg_copyright_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "copyright" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "copyright" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
copyright_dr_t
*
dvbpsi_DecodeCopyrightD
r
(
dvbpsi_
mpeg_copyright_dr_t
*
dvbpsi_decode_mpeg_copyright_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenCopyrightD
r
* dvbpsi_
gen_mpeg_copyright_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenCopyrightD
r(
dvbpsi_copyright_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_copyright_d
r(
dvbpsi_
mpeg_
copyright_dr_t * p_decoded, bool b_duplicate)
* \brief "copyright" descriptor generator.
* \param p_decoded pointer to a decoded "copyright" descriptor structure
* \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenCopyrightD
r
(
dvbpsi_copyright_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_copyright_d
r
(
dvbpsi_
mpeg_
copyright_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_0e.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodeMaxBitrateD
r
* dvbpsi_
decode_mpeg_max_bitrate_d
r
*****************************************************************************/
dvbpsi_m
ax_bitrate_dr_t
*
dvbpsi_DecodeMaxBitrateD
r
(
dvbpsi_m
peg_max_bitrate_dr_t
*
dvbpsi_decode_mpeg_max_bitrate_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_max_bitrate_dr_t
*
p_decoded
;
dvbpsi_m
peg_m
ax_bitrate_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x0e
))
...
...
@@ -61,7 +61,7 @@ dvbpsi_max_bitrate_dr_t * dvbpsi_DecodeMaxBitrateDr(
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_m
ax_bitrate_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_max_bitrate_dr_t
));
p_decoded
=
(
dvbpsi_m
peg_max_bitrate_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mpeg
_max_bitrate_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -76,9 +76,9 @@ dvbpsi_max_bitrate_dr_t * dvbpsi_DecodeMaxBitrateDr(
}
/*****************************************************************************
* dvbpsi_
GenMaxBitrateD
r
* dvbpsi_
gen_mpeg_max_bitrate_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenMaxBitrateDr
(
dvbpsi
_max_bitrate_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_max_bitrate_dr
(
dvbpsi_mpeg
_max_bitrate_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -96,7 +96,7 @@ dvbpsi_descriptor_t * dvbpsi_GenMaxBitrateDr(dvbpsi_max_bitrate_dr_t * p_decoded
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_max_bitrate_dr_t
));
sizeof
(
dvbpsi_m
peg_m
ax_bitrate_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_0e.h
View file @
61277eae
...
...
@@ -41,55 +41,55 @@ extern "C" {
/*****************************************************************************
* dvbpsi_max_bitrate_dr_t
* dvbpsi_m
peg_m
ax_bitrate_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_max_bitrate_dr_s
* \struct dvbpsi_m
peg_m
ax_bitrate_dr_s
* \brief "maximum bitrate" descriptor structure.
*
* This structure is used to store a decoded "maximum bitrate" descriptor.
* (ISO/IEC 13818-1 section 2.6.26).
*/
/*!
* \typedef struct dvbpsi_m
ax_bitrate_dr_s dvbpsi
_max_bitrate_dr_t
* \brief dvbpsi_max_bitrate_dr_t type definition.
* \typedef struct dvbpsi_m
peg_max_bitrate_dr_s dvbpsi_mpeg
_max_bitrate_dr_t
* \brief dvbpsi_m
peg_m
ax_bitrate_dr_t type definition.
*/
typedef
struct
dvbpsi_max_bitrate_dr_s
typedef
struct
dvbpsi_m
peg_m
ax_bitrate_dr_s
{
uint32_t
i_max_bitrate
;
/*!< maximum_bitrate */
}
dvbpsi_max_bitrate_dr_t
;
}
dvbpsi_m
peg_m
ax_bitrate_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeMaxBitrateD
r
* dvbpsi_
decode_mpeg_max_bitrate_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_m
ax_bitrate_dr_t * dvbpsi_DecodeMaxBitrateD
r(
* \fn dvbpsi_m
peg_max_bitrate_dr_t * dvbpsi_decode_mpeg_max_bitrate_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "maximum bitrate" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "maximum bitrate" descriptor structure which
* contains the decoded data.
*/
dvbpsi_m
ax_bitrate_dr_t
*
dvbpsi_DecodeMaxBitrateD
r
(
dvbpsi_m
peg_max_bitrate_dr_t
*
dvbpsi_decode_mpeg_max_bitrate_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenMaxBitrateD
r
* dvbpsi_
gen_mpeg_max_bitrate_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenMaxBitrateD
r(
dvbpsi_max_bitrate_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_max_bitrate_d
r(
dvbpsi_m
peg_m
ax_bitrate_dr_t * p_decoded, bool b_duplicate)
* \brief "maximum bitrate" descriptor generator.
* \param p_decoded pointer to a decoded "maximum bitrate" descriptor structure
* \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenMaxBitrateD
r
(
dvbpsi_max_bitrate_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_max_bitrate_d
r
(
dvbpsi_m
peg_m
ax_bitrate_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_0f.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodePrivateDataD
r
* dvbpsi_
decode_mpeg_private_data_d
r
*****************************************************************************/
dvbpsi_
private_data_dr_t
*
dvbpsi_DecodePrivateDataD
r
(
dvbpsi_
mpeg_private_data_dr_t
*
dvbpsi_decode_mpeg_private_data_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_private_data_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
private_data_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x0f
))
...
...
@@ -61,7 +61,7 @@ dvbpsi_private_data_dr_t * dvbpsi_DecodePrivateDataDr(
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
private_data_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_private_data_dr_t
));
p_decoded
=
(
dvbpsi_
mpeg_private_data_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mpeg
_private_data_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -77,10 +77,10 @@ dvbpsi_private_data_dr_t * dvbpsi_DecodePrivateDataDr(
/*****************************************************************************
* dvbpsi_
GenPrivateDataD
r
* dvbpsi_
gen_mpeg_private_data_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenPrivateDataD
r
(
dvbpsi_private_data_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_private_data_d
r
(
dvbpsi_
mpeg_
private_data_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -99,7 +99,7 @@ dvbpsi_descriptor_t * dvbpsi_GenPrivateDataDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_private_data_dr_t
));
sizeof
(
dvbpsi_
mpeg_
private_data_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_0f.h
View file @
61277eae
...
...
@@ -41,47 +41,47 @@ extern "C" {
/*****************************************************************************
* dvbpsi_private_data_dr_t
* dvbpsi_
mpeg_
private_data_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_private_data_dr_s
* \struct dvbpsi_
mpeg_
private_data_dr_s
* \brief "private data indicator" descriptor structure.
*
* This structure is used to store a decoded "private data indicator"
* descriptor. (ISO/IEC 13818-1 section 2.6.28).
*/
/*!
* \typedef struct dvbpsi_
private_data_dr_s dvbpsi
_private_data_dr_t
* \brief dvbpsi_private_data_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_private_data_dr_s dvbpsi_mpeg
_private_data_dr_t
* \brief dvbpsi_
mpeg_
private_data_dr_t type definition.
*/
typedef
struct
dvbpsi_private_data_dr_s
typedef
struct
dvbpsi_
mpeg_
private_data_dr_s
{
uint32_t
i_private_data
;
/*!< private_data_indicator */
}
dvbpsi_private_data_dr_t
;
}
dvbpsi_
mpeg_
private_data_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodePrivateDataD
r
* dvbpsi_
decode_mpeg_private_data_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
private_data_dr_t * dvbpsi_DecodePrivateDataD
r(
* \fn dvbpsi_
mpeg_private_data_dr_t * dvbpsi_decode_mpeg_private_data_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "private data indicator" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "private data indicator" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
private_data_dr_t
*
dvbpsi_DecodePrivateDataD
r
(
dvbpsi_
mpeg_private_data_dr_t
*
dvbpsi_decode_mpeg_private_data_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenPrivateDataD
r
* dvbpsi_
gen_mpeg_private_data_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenPrivateDataD
r(
dvbpsi_private_data_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_mpeg_private_data_d
r(
dvbpsi_
mpeg_
private_data_dr_t * p_decoded, bool b_duplicate)
* \brief "private data indicator" descriptor generator.
* \param p_decoded pointer to a decoded "private data indicator" descriptor
* structure
...
...
@@ -89,8 +89,8 @@ dvbpsi_private_data_dr_t* dvbpsi_DecodePrivateDataDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenPrivateDataD
r
(
dvbpsi_private_data_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_private_data_d
r
(
dvbpsi_
mpeg_
private_data_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_10.c
View file @
61277eae
...
...
@@ -33,10 +33,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "dr_10.h"
dvbpsi_
smoothing_buffer_dr_t
*
dvbpsi_DecodeSmoothingBufferD
r
(
dvbpsi_
mpeg_smoothing_buffer_dr_t
*
dvbpsi_decode_mpeg_smoothing_buffer_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_smoothing_buffer_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
smoothing_buffer_dr_t
*
p_decoded
;
/* check the tag. */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x10
))
...
...
@@ -50,7 +50,7 @@ dvbpsi_smoothing_buffer_dr_t* dvbpsi_DecodeSmoothingBufferDr(
if
(
p_descriptor
->
i_length
!=
6
)
return
NULL
;
p_decoded
=
(
dvbpsi_smoothing_buffer_dr_t
*
)
malloc
(
sizeof
(
*
p_decoded
));
p_decoded
=
(
dvbpsi_
mpeg_
smoothing_buffer_dr_t
*
)
malloc
(
sizeof
(
*
p_decoded
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -69,8 +69,8 @@ dvbpsi_smoothing_buffer_dr_t* dvbpsi_DecodeSmoothingBufferDr(
return
p_decoded
;
}
dvbpsi_descriptor_t
*
dvbpsi_
GenSmoothingBufferD
r
(
dvbpsi_smoothing_buffer_dr_t
*
p_decoded
)
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_smoothing_buffer_d
r
(
dvbpsi_
mpeg_
smoothing_buffer_dr_t
*
p_decoded
)
{
dvbpsi_descriptor_t
*
p_descriptor
=
dvbpsi_NewDescriptor
(
0x10
,
6
,
NULL
);
if
(
!
p_descriptor
)
...
...
src/descriptors/dr_10.h
View file @
61277eae
...
...
@@ -35,7 +35,7 @@ extern "C" {
#endif
/*!
* \struct dvbpsi_smoothing_buffer_dr_s
* \struct dvbpsi_
mpeg_
smoothing_buffer_dr_s
* \brief Smoothing buffer descriptor structure.
*
* This structure is used to store a decoded smoothing buffer descriptor.
...
...
@@ -43,17 +43,17 @@ extern "C" {
*/
/*!
* \typedef struct dvbpsi_
smoothing_buffer_dr_s dvbpsi
_smoothing_buffer_dr_t
* \brief dvbpsi_smoothing_buffer_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_smoothing_buffer_dr_s dvbpsi_mpeg
_smoothing_buffer_dr_t
* \brief dvbpsi_
mpeg_
smoothing_buffer_dr_t type definition.
*/
typedef
struct
dvbpsi_smoothing_buffer_dr_s
typedef
struct
dvbpsi_
mpeg_
smoothing_buffer_dr_s
{
/*! Value of the leak rate out of the SBn buffer, in units of 400 bits/s. */
uint32_t
i_sb_leak_rate
;
/*! Value of the size of the multiplexing buffer smoothing buffer SBn. */
uint32_t
i_sb_size
;
}
dvbpsi_smoothing_buffer_dr_t
;
}
dvbpsi_
mpeg_
smoothing_buffer_dr_t
;
/*!
* \brief Smoothing buffer descriptor decoder.
...
...
@@ -61,7 +61,7 @@ typedef struct dvbpsi_smoothing_buffer_dr_s
* \return A pointer to a new smoothing buffer descriptor structure which
* contains the decoded data.
*/
dvbpsi_
smoothing_buffer_dr_t
*
dvbpsi_DecodeSmoothingBufferD
r
(
dvbpsi_
mpeg_smoothing_buffer_dr_t
*
dvbpsi_decode_mpeg_smoothing_buffer_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*!
...
...
@@ -69,8 +69,8 @@ dvbpsi_smoothing_buffer_dr_t* dvbpsi_DecodeSmoothingBufferDr(
* \param p_decoded pointer to a decoded smoothing buffer descriptor structure.
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenSmoothingBufferD
r
(
dvbpsi_smoothing_buffer_dr_t
*
p_decoded
);
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_smoothing_buffer_d
r
(
dvbpsi_
mpeg_
smoothing_buffer_dr_t
*
p_decoded
);
#ifdef __cplusplus
}
...
...
src/descriptors/dr_11.c
View file @
61277eae
...
...
@@ -33,9 +33,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "dr_11.h"
dvbpsi_
std_dr_t
*
dvbpsi_DecodeSTDD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
mpeg_std_dr_t
*
dvbpsi_decode_mpeg_std_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_std_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
std_dr_t
*
p_decoded
;
/* check the tag. */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x11
))
...
...
@@ -49,7 +49,7 @@ dvbpsi_std_dr_t* dvbpsi_DecodeSTDDr(dvbpsi_descriptor_t * p_descriptor)
if
(
p_descriptor
->
i_length
!=
1
)
return
NULL
;
p_decoded
=
(
dvbpsi_std_dr_t
*
)
malloc
(
sizeof
(
*
p_decoded
));
p_decoded
=
(
dvbpsi_
mpeg_
std_dr_t
*
)
malloc
(
sizeof
(
*
p_decoded
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -60,7 +60,7 @@ dvbpsi_std_dr_t* dvbpsi_DecodeSTDDr(dvbpsi_descriptor_t * p_descriptor)
return
p_decoded
;
}
dvbpsi_descriptor_t
*
dvbpsi_
GenSTDDr
(
dvbpsi
_std_dr_t
*
p_decoded
)
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_std_dr
(
dvbpsi_mpeg
_std_dr_t
*
p_decoded
)
{
dvbpsi_descriptor_t
*
p_descriptor
=
dvbpsi_NewDescriptor
(
0x11
,
1
,
NULL
);
if
(
!
p_descriptor
)
...
...
src/descriptors/dr_11.h
View file @
61277eae
...
...
@@ -35,7 +35,7 @@ extern "C" {
#endif
/*!
* \struct dvbpsi_std_dr_s
* \struct dvbpsi_
mpeg_
std_dr_s
* \brief STD descriptor structure.
*
* This structure is used to store a decoded STD descriptor. (ISO/IEC 13818-1
...
...
@@ -43,13 +43,13 @@ extern "C" {
*/
/*!
* \typedef struct dvbpsi_
std_dr_s dvbpsi
_std_dr_t
* \brief dvbpsi_std_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_std_dr_s dvbpsi_mpeg
_std_dr_t
* \brief dvbpsi_
mpeg_
std_dr_t type definition.
*/
typedef
struct
dvbpsi_std_dr_s
typedef
struct
dvbpsi_
mpeg_
std_dr_s
{
bool
b_leak_valid_flag
;
/*!< leak_valid_flag */
}
dvbpsi_std_dr_t
;
}
dvbpsi_
mpeg_
std_dr_t
;
/*!
* \brief STD descriptor decoder.
...
...
@@ -57,14 +57,14 @@ typedef struct dvbpsi_std_dr_s
* \return A pointer to a new STD descriptor structure which contains the
* decoded data.
*/
dvbpsi_
std_dr_t
*
dvbpsi_DecodeSTDD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
mpeg_std_dr_t
*
dvbpsi_decode_mpeg_std_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*!
* \brief STD descriptor generator.
* \param p_decoded pointer to a decoded STD descriptor structure.
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenSTDDr
(
dvbpsi
_std_dr_t
*
p_decoded
);
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_std_dr
(
dvbpsi_mpeg
_std_dr_t
*
p_decoded
);
#ifdef __cplusplus
}
...
...
src/descriptors/dr_12.c
View file @
61277eae
...
...
@@ -33,9 +33,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "dr_12.h"
dvbpsi_
ibp_dr_t
*
dvbpsi_DecodeIBPD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
mpeg_ibp_dr_t
*
dvbpsi_decode_mpeg_ibp_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_ibp_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
ibp_dr_t
*
p_decoded
;
/* check the tag. */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x12
))
...
...
@@ -49,7 +49,7 @@ dvbpsi_ibp_dr_t* dvbpsi_DecodeIBPDr(dvbpsi_descriptor_t * p_descriptor)
if
(
p_descriptor
->
i_length
!=
2
)
return
NULL
;
p_decoded
=
(
dvbpsi_ibp_dr_t
*
)
malloc
(
sizeof
(
*
p_decoded
));
p_decoded
=
(
dvbpsi_
mpeg_
ibp_dr_t
*
)
malloc
(
sizeof
(
*
p_decoded
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -71,7 +71,7 @@ dvbpsi_ibp_dr_t* dvbpsi_DecodeIBPDr(dvbpsi_descriptor_t * p_descriptor)
return
p_decoded
;
}
dvbpsi_descriptor_t
*
dvbpsi_
GenIBPDr
(
dvbpsi
_ibp_dr_t
*
p_decoded
)
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_ibp_dr
(
dvbpsi_mpeg
_ibp_dr_t
*
p_decoded
)
{
dvbpsi_descriptor_t
*
p_descriptor
=
dvbpsi_NewDescriptor
(
0x12
,
2
,
NULL
);
if
(
!
p_descriptor
)
...
...
src/descriptors/dr_12.h
View file @
61277eae
...
...
@@ -35,7 +35,7 @@ extern "C" {
#endif
/*!
* \struct dvbpsi_ibp_dr_s
* \struct dvbpsi_
mpeg_
ibp_dr_s
* \brief IBP descriptor structure.
*
* This structure is used to store a decoded IBP descriptor. (ISO/IEC 13818-1
...
...
@@ -43,15 +43,15 @@ extern "C" {
*/
/*!
* \typedef struct dvbpsi_
ibp_dr_s dvbpsi
_ibp_dr_t
* \brief dvbpsi_ibp_dr_s type definition.
* \typedef struct dvbpsi_
mpeg_ibp_dr_s dvbpsi_mpeg
_ibp_dr_t
* \brief dvbpsi_
mpeg_
ibp_dr_s type definition.
*/
typedef
struct
dvbpsi_ibp_dr_s
typedef
struct
dvbpsi_
mpeg_
ibp_dr_s
{
bool
b_closed_gop_flag
;
/*!< closed_gop_flag */
bool
b_identical_gop_flag
;
/*!< identical_gop_flag */
uint16_t
i_max_gop_length
;
/*!< max_gop_length */
}
dvbpsi_ibp_dr_t
;
}
dvbpsi_
mpeg_
ibp_dr_t
;
/*!
* \brief IBP descriptor decoder.
...
...
@@ -59,14 +59,14 @@ typedef struct dvbpsi_ibp_dr_s
* \return A pointer to a new IBP descriptor structure which contains the
* decoded data.
*/
dvbpsi_
ibp_dr_t
*
dvbpsi_DecodeIBPD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
mpeg_ibp_dr_t
*
dvbpsi_decode_mpeg_ibp_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*!
* \brief IBP descriptor generator.
* \param p_decoded pointer to a decoded IBP descriptor structure.
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenIBPDr
(
dvbpsi
_ibp_dr_t
*
p_decoded
);
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_ibp_dr
(
dvbpsi_mpeg
_ibp_dr_t
*
p_decoded
);
#ifdef __cplusplus
}
...
...
src/descriptors/dr_13.c
View file @
61277eae
...
...
@@ -39,27 +39,27 @@ Decode Carousel Id Descriptor.
#include "dr_13.h"
static
dvbpsi_carousel_id_dr_t
*
NewCarouselDr
(
const
size_t
i_private
)
static
dvbpsi_
mpeg_
carousel_id_dr_t
*
NewCarouselDr
(
const
size_t
i_private
)
{
dvbpsi_carousel_id_dr_t
*
p_carousel
;
dvbpsi_
mpeg_
carousel_id_dr_t
*
p_carousel
;
if
(
i_private
<=
0
)
return
NULL
;
p_carousel
=
(
dvbpsi_carousel_id_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_carousel_id_dr_t
)
+
i_private
);
p_carousel
=
(
dvbpsi_
mpeg_
carousel_id_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_
mpeg_
carousel_id_dr_t
)
+
i_private
);
if
(
p_carousel
)
{
p_carousel
->
p_private_data
=
((
uint8_t
*
)
p_carousel
+
sizeof
(
dvbpsi_carousel_id_dr_t
));
p_carousel
->
p_private_data
=
((
uint8_t
*
)
p_carousel
+
sizeof
(
dvbpsi_
mpeg_
carousel_id_dr_t
));
p_carousel
->
i_private_data_len
=
i_private
;
}
return
p_carousel
;
}
/*****************************************************************************
* dvbpsi_
DecodeCarouselIdD
r
* dvbpsi_
decode_mpeg_carousel_id_d
r
*****************************************************************************/
dvbpsi_
carousel_id_dr_t
*
dvbpsi_DecodeCarouselIdD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
mpeg_carousel_id_dr_t
*
dvbpsi_decode_mpeg_carousel_id_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_carousel_id_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
carousel_id_dr_t
*
p_decoded
;
/* Check the tag */
if
(
p_descriptor
->
i_tag
!=
0x13
)
...
...
src/descriptors/dr_13.h
View file @
61277eae
...
...
@@ -31,38 +31,38 @@ Decode Carousel id Descriptor.
#define _DR_13_H
/*****************************************************************************
* dvbpsi_carousel_id_dr_s
* dvbpsi_
mpeg_
carousel_id_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_carousel_id_dr_s
* \struct dvbpsi_
mpeg_
carousel_id_dr_s
* \brief Data Broadcast id Descriptor
*
* This structure is used to store a decoded Carsouel ID descriptor.
*/
/*!
* \typedef struct dvbpsi_
carousel_id_dr_s dvbpsi
_carousel_id_dr_t
* \brief dvbpsi_carousel_id_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_carousel_id_dr_s dvbpsi_mpeg
_carousel_id_dr_t
* \brief dvbpsi_
mpeg_
carousel_id_dr_t type definition.
*/
typedef
struct
dvbpsi_carousel_id_dr_s
typedef
struct
dvbpsi_
mpeg_
carousel_id_dr_s
{
uint32_t
i_carousel_id
;
/*!< carousel identifier */
uint8_t
i_private_data_len
;
/*!< length of private data pointer in bytes */
uint8_t
*
p_private_data
;
/*!< memory is allocated right after sizeof struct,
when freeing this struct the private data is
freed at the same time. */
}
dvbpsi_carousel_id_dr_t
;
}
dvbpsi_
mpeg_
carousel_id_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeCarouselIdD
r
* dvbpsi_
decode_mpeg_carousel_id_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
carousel_id_dr_t *dvbpsi_DecodeCarouselIdD
r(
* \fn dvbpsi_
mpeg_carousel_id_dr_t *dvbpsi_decode_mpeg_carousel_id_d
r(
* dvbpsi_descriptor_t *p_descriptor)
* \brief Decode a Carousel id descriptor (tag 0x13)
* \param p_descriptor Raw descriptor to decode.
* \return NULL if the descriptor could not be decoded or a pointer to a
* dvbpsi_carousel_id_dr_t structure.
* dvbpsi_
mpeg_
carousel_id_dr_t structure.
*/
dvbpsi_
carousel_id_dr_t
*
dvbpsi_DecodeCarouselIdD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
mpeg_carousel_id_dr_t
*
dvbpsi_decode_mpeg_carousel_id_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
#endif
src/descriptors/dr_14.c
View file @
61277eae
...
...
@@ -39,18 +39,18 @@ Decode Assocation Tag Descriptor.
#include "dr_14.h"
static
dvbpsi_association_tag_dr_t
*
NewAssociationTagDr
(
const
size_t
i_selector
,
const
size_t
i_private
)
static
dvbpsi_
mpeg_
association_tag_dr_t
*
NewAssociationTagDr
(
const
size_t
i_selector
,
const
size_t
i_private
)
{
dvbpsi_association_tag_dr_t
*
p_tag
;
dvbpsi_
mpeg_
association_tag_dr_t
*
p_tag
;
if
((
i_selector
<=
0
)
||
(
i_private
<=
0
))
return
NULL
;
size_t
i_size
=
sizeof
(
dvbpsi_association_tag_dr_t
)
+
i_selector
+
i_private
;
p_tag
=
(
dvbpsi_association_tag_dr_t
*
)
calloc
(
1
,
i_size
);
size_t
i_size
=
sizeof
(
dvbpsi_
mpeg_
association_tag_dr_t
)
+
i_selector
+
i_private
;
p_tag
=
(
dvbpsi_
mpeg_
association_tag_dr_t
*
)
calloc
(
1
,
i_size
);
if
(
p_tag
)
{
p_tag
->
p_selector
=
((
uint8_t
*
)
p_tag
+
sizeof
(
dvbpsi_association_tag_dr_t
));
p_tag
->
p_selector
=
((
uint8_t
*
)
p_tag
+
sizeof
(
dvbpsi_
mpeg_
association_tag_dr_t
));
p_tag
->
i_selector_len
=
i_selector
;
p_tag
->
p_private_data
=
p_tag
->
p_selector
+
i_selector
;
...
...
@@ -60,11 +60,11 @@ static dvbpsi_association_tag_dr_t *NewAssociationTagDr(const size_t i_selector,
}
/*****************************************************************************
* dvbpsi_
DecodeAssociationTagD
r
* dvbpsi_
decode_mpeg_association_tag_d
r
*****************************************************************************/
dvbpsi_
association_tag_dr_t
*
dvbpsi_DecodeAssociationTagD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
mpeg_association_tag_dr_t
*
dvbpsi_decode_mpeg_association_tag_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_association_tag_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
association_tag_dr_t
*
p_decoded
;
uint8_t
selector_len
;
uint8_t
private_data_len
;
...
...
src/descriptors/dr_14.h
View file @
61277eae
...
...
@@ -31,19 +31,19 @@ Decode Association Tag Descriptor.
#define _DR_14_H
/*****************************************************************************
* dvbpsi_association_tag_dr_s
* dvbpsi_
mpeg_
association_tag_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_association_tag_dr_s
* \struct dvbpsi_
mpeg_
association_tag_dr_s
* \brief Data Broadcast id Descriptor
*
* This structure is used to store a decoded Association Tag descriptor.
*/
/*!
* \typedef struct dvbpsi_
association_tag_dr_s dvbpsi
_association_tag_dr_t
* \brief dvbpsi_association_tag_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_association_tag_dr_s dvbpsi_mpeg
_association_tag_dr_t
* \brief dvbpsi_
mpeg_
association_tag_dr_t type definition.
*/
typedef
struct
dvbpsi_association_tag_dr_s
typedef
struct
dvbpsi_
mpeg_
association_tag_dr_s
{
uint16_t
i_tag
;
/*!< association tag identifier */
uint16_t
i_use
;
/*!< indicator if association tag identifier is in use */
...
...
@@ -55,19 +55,19 @@ typedef struct dvbpsi_association_tag_dr_s
uint8_t
*
p_private_data
;
/*!< pointer to private data. Memory is allocated
right after sizeof struct, when freeing this
struct the private data is freed at the same time. */
}
dvbpsi_association_tag_dr_t
;
}
dvbpsi_
mpeg_
association_tag_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeAssociationTagD
r
* dvbpsi_
decode_mpeg_association_tag_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
association_tag_dr_t *dvbpsi_DecodeAssociationTagD
r(
* \fn dvbpsi_
mpeg_association_tag_dr_t *dvbpsi_decode_mpeg_association_tag_d
r(
* dvbpsi_descriptor_t *p_descriptor)
* \brief Decode a Association Tag descriptor (tag 0x14)
* \param p_descriptor Raw descriptor to decode.
* \return NULL if the descriptor could not be decoded or a pointer to a
* dvbpsi_association_tag_dr_t structure.
* dvbpsi_
mpeg_
association_tag_dr_t structure.
*/
dvbpsi_
association_tag_dr_t
*
dvbpsi_DecodeAssociationTagD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
mpeg_association_tag_dr_t
*
dvbpsi_decode_mpeg_association_tag_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
#endif
src/descriptors/dr_1b.c
View file @
61277eae
...
...
@@ -33,10 +33,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "dr_1b.h"
dvbpsi_mpeg
4_video_dr_t
*
dvbpsi_DecodeMPEG4VideoD
r
(
dvbpsi_mpeg
_mpeg4_video_dr_t
*
dvbpsi_decode_mpeg_mpeg4_video_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_mpeg4_video_dr_t
*
p_decoded
;
dvbpsi_mpeg
_mpeg
4_video_dr_t
*
p_decoded
;
/* check the tag. */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x1b
))
...
...
@@ -50,7 +50,7 @@ dvbpsi_mpeg4_video_dr_t* dvbpsi_DecodeMPEG4VideoDr(
if
(
p_descriptor
->
i_length
!=
1
)
return
NULL
;
p_decoded
=
(
dvbpsi_mpeg4_video_dr_t
*
)
malloc
(
sizeof
(
*
p_decoded
));
p_decoded
=
(
dvbpsi_mpeg
_mpeg
4_video_dr_t
*
)
malloc
(
sizeof
(
*
p_decoded
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -61,8 +61,8 @@ dvbpsi_mpeg4_video_dr_t* dvbpsi_DecodeMPEG4VideoDr(
return
p_decoded
;
}
dvbpsi_descriptor_t
*
dvbpsi_
GenMPEG4VideoD
r
(
dvbpsi_mpeg4_video_dr_t
*
p_decoded
)
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_mpeg4_video_d
r
(
dvbpsi_mpeg
_mpeg
4_video_dr_t
*
p_decoded
)
{
dvbpsi_descriptor_t
*
p_descriptor
=
dvbpsi_NewDescriptor
(
0x1b
,
1
,
NULL
);
if
(
!
p_descriptor
)
...
...
src/descriptors/dr_1b.h
View file @
61277eae
...
...
@@ -102,7 +102,7 @@ typedef enum dvbpsi_mpeg4_visual_profile_and_level_s
}
dvbpsi_mpeg4_visual_profile_and_level_t
;
/*!
* \struct dvbpsi_mpeg4_video_dr_s
* \struct dvbpsi_mpeg
_mpeg
4_video_dr_s
* \brief MPEG-4 video descriptor structure.
*
* This structure is used to store a decoded MPEG-4 video descriptor. (ISO/IEC
...
...
@@ -110,14 +110,14 @@ typedef enum dvbpsi_mpeg4_visual_profile_and_level_s
*/
/*!
* \typedef struct dvbpsi_mpeg
4_video_dr_s dvbpsi
_mpeg4_video_dr_t
* \brief dvbpsi_mpeg4_video_dr_t type definition.
* \typedef struct dvbpsi_mpeg
_mpeg4_video_dr_s dvbpsi_mpeg
_mpeg4_video_dr_t
* \brief dvbpsi_mpeg
_mpeg
4_video_dr_t type definition.
*/
typedef
struct
dvbpsi_mpeg4_video_dr_s
typedef
struct
dvbpsi_mpeg
_mpeg
4_video_dr_s
{
/*! MPEG-4_visual_profile_and_level */
dvbpsi_mpeg4_visual_profile_and_level_t
i_mpeg4_visual_profile_and_level
;
}
dvbpsi_mpeg4_video_dr_t
;
}
dvbpsi_mpeg
_mpeg
4_video_dr_t
;
/*!
* \brief MPEG-4 video descriptor decoder.
...
...
@@ -125,7 +125,7 @@ typedef struct dvbpsi_mpeg4_video_dr_s
* \return A pointer to a new MPEG-4 video descriptor structure which contains
* the decoded data.
*/
dvbpsi_mpeg
4_video_dr_t
*
dvbpsi_DecodeMPEG4VideoD
r
(
dvbpsi_mpeg
_mpeg4_video_dr_t
*
dvbpsi_decode_mpeg_mpeg4_video_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*!
...
...
@@ -133,8 +133,8 @@ dvbpsi_mpeg4_video_dr_t* dvbpsi_DecodeMPEG4VideoDr(
* \param p_decoded pointer to a decoded MPEG-4 video descriptor structure.
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenMPEG4VideoD
r
(
dvbpsi_mpeg4_video_dr_t
*
p_decoded
);
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_mpeg4_video_d
r
(
dvbpsi_mpeg
_mpeg
4_video_dr_t
*
p_decoded
);
#ifdef __cplusplus
}
...
...
src/descriptors/dr_1c.c
View file @
61277eae
...
...
@@ -33,10 +33,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "dr_1c.h"
dvbpsi_mpeg
4_audio_dr_t
*
dvbpsi_DecodeMPEG4AudioD
r
(
dvbpsi_mpeg
_mpeg4_audio_dr_t
*
dvbpsi_decode_mpeg_mpeg4_audio_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_mpeg4_audio_dr_t
*
p_decoded
;
dvbpsi_mpeg
_mpeg
4_audio_dr_t
*
p_decoded
;
/* check the tag. */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x1c
))
...
...
@@ -50,7 +50,7 @@ dvbpsi_mpeg4_audio_dr_t* dvbpsi_DecodeMPEG4AudioDr(
if
(
p_descriptor
->
i_length
!=
1
)
return
NULL
;
p_decoded
=
(
dvbpsi_mpeg4_audio_dr_t
*
)
malloc
(
sizeof
(
*
p_decoded
));
p_decoded
=
(
dvbpsi_mpeg
_mpeg
4_audio_dr_t
*
)
malloc
(
sizeof
(
*
p_decoded
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -61,8 +61,8 @@ dvbpsi_mpeg4_audio_dr_t* dvbpsi_DecodeMPEG4AudioDr(
return
p_decoded
;
}
dvbpsi_descriptor_t
*
dvbpsi_
GenMPEG4AudioD
r
(
dvbpsi_mpeg4_audio_dr_t
*
p_decoded
)
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_mpeg4_audio_d
r
(
dvbpsi_mpeg
_mpeg
4_audio_dr_t
*
p_decoded
)
{
dvbpsi_descriptor_t
*
p_descriptor
=
dvbpsi_NewDescriptor
(
0x1c
,
1
,
NULL
);
if
(
!
p_descriptor
)
...
...
src/descriptors/dr_1c.h
View file @
61277eae
...
...
@@ -37,7 +37,7 @@ extern "C" {
#endif
/*!
* \struct dvbpsi_mpeg4_audio_dr_s
* \struct dvbpsi_mpeg
_mpeg
4_audio_dr_s
* \brief MPEG-4 audio descriptor structure.
*
* This structure is used to store a decoded MPEG-4 audio descriptor. (ISO/IEC
...
...
@@ -45,14 +45,14 @@ extern "C" {
*/
/*!
* \typedef struct dvbpsi_mpeg
4_audio_dr_s dvbpsi
_mpeg4_audio_dr_t
* \brief dvbpsi_mpeg4_audio_dr_t type definition.
* \typedef struct dvbpsi_mpeg
_mpeg4_audio_dr_s dvbpsi_mpeg
_mpeg4_audio_dr_t
* \brief dvbpsi_mpeg
_mpeg
4_audio_dr_t type definition.
*/
typedef
struct
dvbpsi_mpeg4_audio_dr_s
typedef
struct
dvbpsi_mpeg
_mpeg
4_audio_dr_s
{
/*! MPEG-4_audio_profile_and_level */
dvbpsi_aac_profile_and_level_t
i_mpeg4_audio_profile_and_level
;
}
dvbpsi_mpeg4_audio_dr_t
;
}
dvbpsi_mpeg
_mpeg
4_audio_dr_t
;
/*!
* \brief MPEG-4 audio descriptor decoder.
...
...
@@ -60,7 +60,7 @@ typedef struct dvbpsi_mpeg4_audio_dr_s
* \return A pointer to a new MPEG-4 audio descriptor structure which contains
* the decoded data.
*/
dvbpsi_mpeg
4_audio_dr_t
*
dvbpsi_DecodeMPEG4AudioD
r
(
dvbpsi_mpeg
_mpeg4_audio_dr_t
*
dvbpsi_decode_mpeg_mpeg4_audio_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*!
...
...
@@ -68,8 +68,8 @@ dvbpsi_mpeg4_audio_dr_t* dvbpsi_DecodeMPEG4AudioDr(
* \param p_decoded pointer to a decoded MPEG-4 audio descriptor structure.
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenMPEG4AudioD
r
(
dvbpsi_mpeg4_audio_dr_t
*
p_decoded
);
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_mpeg4_audio_d
r
(
dvbpsi_mpeg
_mpeg
4_audio_dr_t
*
p_decoded
);
#ifdef __cplusplus
}
...
...
src/descriptors/dr_24.c
View file @
61277eae
...
...
@@ -39,7 +39,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* indicator}, and a reserved field. they all sum up to 24 bits. */
#define DR_24_MIN_SIZE 3
static
int
decode_content_reference_id
(
dvbpsi_content_labelling_dr_t
*
p_decoded
,
static
int
decode_content_reference_id
(
dvbpsi_
mpeg_
content_labelling_dr_t
*
p_decoded
,
const
uint8_t
**
pp_data
,
uint8_t
*
pi_left
)
{
uint8_t
i_left
=
*
pi_left
;
...
...
@@ -73,7 +73,7 @@ static int decode_content_reference_id(dvbpsi_content_labelling_dr_t *p_decoded,
return
0
;
}
static
int
decode_content_time_base_indicator
(
dvbpsi_content_labelling_dr_t
static
int
decode_content_time_base_indicator
(
dvbpsi_
mpeg_
content_labelling_dr_t
*
p_decoded
,
const
uint8_t
**
pp_data
,
uint8_t
*
pi_left
)
{
const
uint8_t
*
p_data
=
*
pp_data
;
...
...
@@ -144,10 +144,10 @@ static int decode_content_time_base_indicator(dvbpsi_content_labelling_dr_t
return
0
;
}
dvbpsi_
content_labelling_dr_t
*
dvbpsi_DecodeContentLabellingD
r
(
dvbpsi_
mpeg_content_labelling_dr_t
*
dvbpsi_decode_mpeg_content_labelling_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_content_labelling_dr_t
*
p_decoded
;
dvbpsi_
mpeg_
content_labelling_dr_t
*
p_decoded
;
const
uint8_t
*
p_data
=
p_descriptor
->
p_data
;
uint8_t
i_left
=
p_descriptor
->
i_length
;
...
...
@@ -226,7 +226,7 @@ err:
}
static
unsigned
int
generate_get_descriptor_size
(
const
dvbpsi_content_labelling_dr_t
*
p_decoded
)
dvbpsi_
mpeg_
content_labelling_dr_t
*
p_decoded
)
{
unsigned
int
size
=
DR_24_MIN_SIZE
+
p_decoded
->
i_private_data_len
;
...
...
@@ -251,7 +251,7 @@ static unsigned int generate_get_descriptor_size(const
}
static
bool
generate_check_struct_valid
(
const
dvbpsi_content_labelling_dr_t
*
p_decoded
)
dvbpsi_
mpeg_
content_labelling_dr_t
*
p_decoded
)
{
/* check if the pointers are valid if relevant sizes are nonzero. also,
* check if i_content_reference_id_record_length isn't zero if the flag is
...
...
@@ -272,8 +272,8 @@ static bool generate_check_struct_valid(const
return
true
;
}
dvbpsi_descriptor_t
*
dvbpsi_
GenContentLabellingD
r
(
dvbpsi_content_labelling_dr_t
*
p_decoded
)
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_content_labelling_d
r
(
dvbpsi_
mpeg_
content_labelling_dr_t
*
p_decoded
)
{
unsigned
int
size
;
dvbpsi_descriptor_t
*
p_descriptor
;
...
...
src/descriptors/dr_24.h
View file @
61277eae
...
...
@@ -35,7 +35,7 @@ extern "C" {
#endif
/*!
* \struct dvbpsi_content_labelling_dr_s
* \struct dvbpsi_
mpeg_
content_labelling_dr_s
* \brief Content labelling descriptor structure.
*
* This structure is used to store a decoded content labelling descriptor.
...
...
@@ -43,10 +43,10 @@ extern "C" {
*/
/*!
* \typedef struct dvbpsi_
content_labelling_dr_s dvbpsi
_content_labelling_dr_t
* \brief dvbpsi_content_labelling_dr_t type definition.
* \typedef struct dvbpsi_
mpeg_content_labelling_dr_s dvbpsi_mpeg
_content_labelling_dr_t
* \brief dvbpsi_
mpeg_
content_labelling_dr_t type definition.
*/
typedef
struct
dvbpsi_content_labelling_dr_s
typedef
struct
dvbpsi_
mpeg_
content_labelling_dr_s
{
uint16_t
i_metadata_application_format
;
/*!< metadata_application_format */
...
...
@@ -102,7 +102,7 @@ typedef struct dvbpsi_content_labelling_dr_s
* descriptor. Memory is allocated by the decoder when decoding, and by the
* caller when generating. */
uint8_t
*
p_private_data
;
}
dvbpsi_content_labelling_dr_t
;
}
dvbpsi_
mpeg_
content_labelling_dr_t
;
/*!
* \brief Content labelling descriptor decoder.
...
...
@@ -110,7 +110,7 @@ typedef struct dvbpsi_content_labelling_dr_s
* \return A pointer to a new content labelling descriptor structure which
* contains the decoded data.
*/
dvbpsi_
content_labelling_dr_t
*
dvbpsi_DecodeContentLabellingD
r
(
dvbpsi_
mpeg_content_labelling_dr_t
*
dvbpsi_decode_mpeg_content_labelling_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*!
...
...
@@ -118,8 +118,8 @@ dvbpsi_content_labelling_dr_t* dvbpsi_DecodeContentLabellingDr(
* \param p_decoded pointer to a decoded content labelling descriptor structure.
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenContentLabellingD
r
(
dvbpsi_content_labelling_dr_t
*
p_decoded
);
dvbpsi_descriptor_t
*
dvbpsi_
gen_mpeg_content_labelling_d
r
(
dvbpsi_
mpeg_
content_labelling_dr_t
*
p_decoded
);
#ifdef __cplusplus
}
...
...
src/descriptors/dr_40.c
View file @
61277eae
...
...
@@ -40,12 +40,12 @@
#include "dr_40.h"
/*****************************************************************************
* dvbpsi_
DecodeNetworkNameD
r
* dvbpsi_
decode_dvb_network_name_d
r
*****************************************************************************/
dvbpsi_
network_name_dr_t
*
dvbpsi_DecodeNetworkNameD
r
(
dvbpsi_
dvb_network_name_dr_t
*
dvbpsi_decode_dvb_network_name_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_network_name_dr_t
*
p_decoded
;
dvbpsi_
dvb_
network_name_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x40
))
...
...
@@ -56,7 +56,7 @@ dvbpsi_network_name_dr_t* dvbpsi_DecodeNetworkNameDr(
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
network_name_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_network_name_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_network_name_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_dvb
_network_name_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -75,10 +75,10 @@ dvbpsi_network_name_dr_t* dvbpsi_DecodeNetworkNameDr(
/*****************************************************************************
* dvbpsi_
GenNetworkNameD
r
* dvbpsi_
gen_dvb_network_name_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenNetworkNameD
r
(
dvbpsi_network_name_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_network_name_d
r
(
dvbpsi_
dvb_
network_name_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -98,7 +98,7 @@ dvbpsi_descriptor_t * dvbpsi_GenNetworkNameDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_network_name_dr_t
));
sizeof
(
dvbpsi_
dvb_
network_name_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_40.h
View file @
61277eae
...
...
@@ -39,51 +39,51 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_network_name_dr_t
* dvbpsi_
dvb_
network_name_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_network_name_dr_t
* \struct dvbpsi_
dvb_
network_name_dr_t
* \brief "network name" descriptor structure.
*
* This structure is used to store a decoded "network name"
* descriptor. (ETSI EN 300 468 section 6.2.27).
*/
/*!
* \typedef struct dvbpsi_network_nameg_dr_s dvbpsi_network_name_dr_t
* \brief dvbpsi_network_name_dr_t type definition.
* \typedef struct dvbpsi_network_nameg_dr_s dvbpsi_
dvb_
network_name_dr_t
* \brief dvbpsi_
dvb_
network_name_dr_t type definition.
*/
/*!
* \struct dvbpsi_network_name_dr_s
* \brief struct dvbpsi_
network_name_dr_s definition @see dvbpsi
_network_name_dr_t
* \struct dvbpsi_
dvb_
network_name_dr_s
* \brief struct dvbpsi_
dvb_network_name_dr_s definition @see dvbpsi_dvb
_network_name_dr_t
*/
typedef
struct
dvbpsi_network_name_dr_s
typedef
struct
dvbpsi_
dvb_
network_name_dr_s
{
uint8_t
i_name_length
;
/*!< length of the i_name_byte array */
uint8_t
i_name_byte
[
255
];
/*!< the name of the delivery system */
}
dvbpsi_network_name_dr_t
;
}
dvbpsi_
dvb_
network_name_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeNetworkNameD
r
* dvbpsi_
decode_dvb_network_name_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
network_name_dr_t * dvbpsi_DecodeNetworkNameD
r(
* \fn dvbpsi_
dvb_network_name_dr_t * dvbpsi_decode_dvb_network_name_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "network name" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "network name" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
network_name_dr_t
*
dvbpsi_DecodeNetworkNameD
r
(
dvbpsi_
dvb_network_name_dr_t
*
dvbpsi_decode_dvb_network_name_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenNetworkNameD
r
* dvbpsi_
gen_dvb_network_name_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenNetworkNameD
r(
dvbpsi_network_name_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_network_name_d
r(
dvbpsi_
dvb_
network_name_dr_t * p_decoded, bool b_duplicate)
* \brief "network name" descriptor generator.
* \param p_decoded pointer to a decoded "network name" descriptor
* structure
...
...
@@ -91,8 +91,8 @@ dvbpsi_network_name_dr_t* dvbpsi_DecodeNetworkNameDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenNetworkNameD
r
(
dvbpsi_network_name_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_network_name_d
r
(
dvbpsi_
dvb_
network_name_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
...
...
src/descriptors/dr_41.c
View file @
61277eae
...
...
@@ -40,12 +40,12 @@
#include "dr_41.h"
/*****************************************************************************
* dvbpsi_
DecodeServiceListD
r
* dvbpsi_
decode_dvb_service_list_d
r
*****************************************************************************/
dvbpsi_
service_list_dr_t
*
dvbpsi_DecodeServiceListD
r
(
dvbpsi_
dvb_service_list_dr_t
*
dvbpsi_decode_dvb_service_list_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_service_list_dr_t
*
p_decoded
;
dvbpsi_
dvb_
service_list_dr_t
*
p_decoded
;
/* Check the tag */
if
(
p_descriptor
->
i_tag
!=
0x41
)
...
...
@@ -63,7 +63,7 @@ dvbpsi_service_list_dr_t* dvbpsi_DecodeServiceListDr(
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
service_list_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_service_list_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_service_list_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_dvb
_service_list_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -84,10 +84,10 @@ dvbpsi_service_list_dr_t* dvbpsi_DecodeServiceListDr(
/*****************************************************************************
* dvbpsi_
GenServiceListD
r
* dvbpsi_
gen_dvb_service_list_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenServiceListD
r
(
dvbpsi_service_list_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_service_list_d
r
(
dvbpsi_
dvb_
service_list_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Check the length */
...
...
@@ -113,7 +113,7 @@ dvbpsi_descriptor_t * dvbpsi_GenServiceListDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_service_list_dr_t
));
sizeof
(
dvbpsi_
dvb_
service_list_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_41.h
View file @
61277eae
...
...
@@ -39,20 +39,20 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_network_name_dr_t
* dvbpsi_
dvb_
network_name_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_service_list_dr_s
* \struct dvbpsi_
dvb_
service_list_dr_s
* \brief "service list" descriptor structure.
*
* This structure is used to store a decoded "service list"
* descriptor. (ETSI EN 300 468 section 6.2.35).
*/
/*!
* \typedef struct dvbpsi_
service_list_dr_s dvbpsi
_service_list_dr_t
* \brief dvbpsi_service_list_dr_t type definition.
* \typedef struct dvbpsi_
dvb_service_list_dr_s dvbpsi_dvb
_service_list_dr_t
* \brief dvbpsi_
dvb_
service_list_dr_t type definition.
*/
typedef
struct
dvbpsi_service_list_dr_s
typedef
struct
dvbpsi_
dvb_
service_list_dr_s
{
uint8_t
i_service_count
;
/*!< length of the i_service_list
array */
...
...
@@ -61,29 +61,29 @@ typedef struct dvbpsi_service_list_dr_s
uint8_t
i_service_type
;
/*!< service type */
}
i_service
[
64
];
/*!< array of services */
}
dvbpsi_service_list_dr_t
;
}
dvbpsi_
dvb_
service_list_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeServiceListD
r
* dvbpsi_
decode_dvb_service_list_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
service_list_dr_t * dvbpsi_DecodeServiceListD
r(
* \fn dvbpsi_
dvb_service_list_dr_t * dvbpsi_decode_dvb_service_list_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "service list" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "service list" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
service_list_dr_t
*
dvbpsi_DecodeServiceListD
r
(
dvbpsi_
dvb_service_list_dr_t
*
dvbpsi_decode_dvb_service_list_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenServiceListD
r
* dvbpsi_
gen_dvb_service_list_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenServiceListD
r(
dvbpsi_service_list_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_service_list_d
r(
dvbpsi_
dvb_
service_list_dr_t * p_decoded, bool b_duplicate)
* \brief "service list" descriptor generator.
* \param p_decoded pointer to a decoded "service list" descriptor
* structure
...
...
@@ -91,8 +91,8 @@ dvbpsi_service_list_dr_t* dvbpsi_DecodeServiceListDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenServiceListD
r
(
dvbpsi_service_list_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_service_list_d
r
(
dvbpsi_
dvb_
service_list_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
...
...
src/descriptors/dr_42.c
View file @
61277eae
...
...
@@ -43,12 +43,12 @@
/*****************************************************************************
* dvbpsi_
DecodeStuffingD
r
* dvbpsi_
decode_dvb_stuffing_d
r
*****************************************************************************/
dvbpsi_
stuffing_dr_t
*
dvbpsi_DecodeStuffingD
r
(
dvbpsi_
dvb_stuffing_dr_t
*
dvbpsi_decode_dvb_stuffing_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_stuffing_dr_t
*
p_decoded
;
dvbpsi_
dvb_
stuffing_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x42
))
...
...
@@ -59,7 +59,7 @@ dvbpsi_stuffing_dr_t * dvbpsi_DecodeStuffingDr(
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
stuffing_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_stuffing_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_stuffing_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_stuffing_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -78,9 +78,9 @@ dvbpsi_stuffing_dr_t * dvbpsi_DecodeStuffingDr(
/*****************************************************************************
* dvbpsi_
GenStuffingD
r
* dvbpsi_
gen_dvb_stuffing_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenStuffingDr
(
dvbpsi
_stuffing_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_stuffing_dr
(
dvbpsi_dvb
_stuffing_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -100,7 +100,7 @@ dvbpsi_descriptor_t * dvbpsi_GenStuffingDr(dvbpsi_stuffing_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_stuffing_dr_t
));
sizeof
(
dvbpsi_
dvb_
stuffing_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_42.h
View file @
61277eae
...
...
@@ -42,49 +42,49 @@ extern "C" {
/*****************************************************************************
* dvbpsi_stuffing_dr_t
* dvbpsi_
dvb_
stuffing_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_stuffing_dr_s
* \struct dvbpsi_
dvb_
stuffing_dr_s
* \brief "stuffing" descriptor structure.
*
* This structure is used to store a decoded "stuffing"
* descriptor. (ETSI EN 300 468 section 6.2.35).
*/
/*!
* \typedef struct dvbpsi_
stuffing_dr_s dvbpsi
_stuffing_dr_t
* \brief dvbpsi_stuffing_dr_t type definition.
* \typedef struct dvbpsi_
dvb_stuffing_dr_s dvbpsi_dvb
_stuffing_dr_t
* \brief dvbpsi_
dvb_
stuffing_dr_t type definition.
*/
typedef
struct
dvbpsi_stuffing_dr_s
typedef
struct
dvbpsi_
dvb_
stuffing_dr_s
{
uint8_t
i_stuffing_length
;
/*!< length of the i_stuffing_byte
array */
uint8_t
i_stuffing_byte
[
255
];
/*!< stuffing_bytes */
}
dvbpsi_stuffing_dr_t
;
}
dvbpsi_
dvb_
stuffing_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeStuffingD
r
* dvbpsi_
decode_dvb_stuffing_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
stuffing_dr_t * dvbpsi_DecodeStuffingD
r(
* \fn dvbpsi_
dvb_stuffing_dr_t * dvbpsi_decode_dvb_stuffing_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "stuffing" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "stuffing" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
stuffing_dr_t
*
dvbpsi_DecodeStuffingD
r
(
dvbpsi_
dvb_stuffing_dr_t
*
dvbpsi_decode_dvb_stuffing_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenStuffingD
r
* dvbpsi_
gen_dvb_stuffing_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenStuffingD
r(
dvbpsi_stuffing_dr_t *p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_stuffing_d
r(
dvbpsi_
dvb_
stuffing_dr_t *p_decoded, bool b_duplicate)
* \brief "stuffing" descriptor generator.
* \param p_decoded pointer to a decoded "stuffing" descriptor
* structure
...
...
@@ -92,8 +92,8 @@ dvbpsi_stuffing_dr_t* dvbpsi_DecodeStuffingDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenStuffingD
r
(
dvbpsi_stuffing_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_stuffing_d
r
(
dvbpsi_
dvb_
stuffing_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_43.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodeSatDelivSysD
r
* dvbpsi_
decode_dvb_sat_deliv_sys_d
r
*****************************************************************************/
dvbpsi_
sat_deliv_sys_dr_t
*
dvbpsi_DecodeSatDelivSysD
r
(
dvbpsi_
dvb_sat_deliv_sys_dr_t
*
dvbpsi_decode_dvb_sat_deliv_sys_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_sat_deliv_sys_dr_t
*
p_decoded
;
dvbpsi_
dvb_
sat_deliv_sys_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x43
))
...
...
@@ -58,7 +58,7 @@ dvbpsi_sat_deliv_sys_dr_t * dvbpsi_DecodeSatDelivSysDr(
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
sat_deliv_sys_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_sat_deliv_sys_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_sat_deliv_sys_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_sat_deliv_sys_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -87,10 +87,10 @@ dvbpsi_sat_deliv_sys_dr_t * dvbpsi_DecodeSatDelivSysDr(
/*****************************************************************************
* dvbpsi_
GenSatDelivSysD
r
* dvbpsi_
gen_dvb_sat_deliv_sys_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenSatDelivSysD
r
(
dvbpsi_sat_deliv_sys_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_sat_deliv_sys_d
r
(
dvbpsi_
dvb_
sat_deliv_sys_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -121,7 +121,7 @@ dvbpsi_descriptor_t * dvbpsi_GenSatDelivSysDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_sat_deliv_sys_dr_t
));
sizeof
(
dvbpsi_
dvb_
sat_deliv_sys_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_43.h
View file @
61277eae
...
...
@@ -41,20 +41,20 @@ extern "C" {
/*****************************************************************************
* dvbpsi_sat_deliv_sys_dr_t
* dvbpsi_
dvb_
sat_deliv_sys_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_sat_deliv_sys_dr_s
* \struct dvbpsi_
dvb_
sat_deliv_sys_dr_s
* \brief satellite delivery system descriptor structure.
*
* This structure is used to store a decoded satellite delivery system
* descriptor. (ETSI EN 300 468 section 6.2.13.2).
*/
/*!
* \typedef struct dvbpsi_
sat_deliv_sys_dr_s dvbpsi
_sat_deliv_sys_dr_t
* \brief dvbpsi_sat_deliv_sys_dr_t type definition.
* \typedef struct dvbpsi_
dvb_sat_deliv_sys_dr_s dvbpsi_dvb
_sat_deliv_sys_dr_t
* \brief dvbpsi_
dvb_
sat_deliv_sys_dr_t type definition.
*/
typedef
struct
dvbpsi_sat_deliv_sys_dr_s
typedef
struct
dvbpsi_
dvb_
sat_deliv_sys_dr_s
{
uint32_t
i_frequency
;
/*!< frequency */
uint16_t
i_orbital_position
;
/*!< orbital position */
...
...
@@ -66,30 +66,30 @@ typedef struct dvbpsi_sat_deliv_sys_dr_s
uint32_t
i_symbol_rate
;
/*!< symbol rate */
uint8_t
i_fec_inner
;
/*!< FEC inner */
}
dvbpsi_sat_deliv_sys_dr_t
;
}
dvbpsi_
dvb_
sat_deliv_sys_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeSatDelivSysD
r
* dvbpsi_
decode_dvb_sat_deliv_sys_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
sat_deliv_sys_dr_t * dvbpsi_DecodeSatDelivSysD
r(
* \fn dvbpsi_
dvb_sat_deliv_sys_dr_t * dvbpsi_decode_dvb_sat_deliv_sys_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief satellite delivery system descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new satellite delivery system descriptor structure
* which contains the decoded data.
*/
dvbpsi_
sat_deliv_sys_dr_t
*
dvbpsi_DecodeSatDelivSysD
r
(
dvbpsi_
dvb_sat_deliv_sys_dr_t
*
dvbpsi_decode_dvb_sat_deliv_sys_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenSatDelivSysD
r
* dvbpsi_
gen_dvb_sat_deliv_sys_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenSatDelivSysD
r(
dvbpsi_sat_deliv_sys_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_sat_deliv_sys_d
r(
dvbpsi_
dvb_
sat_deliv_sys_dr_t * p_decoded, bool b_duplicate)
* \brief satellite delivery system descriptor generator.
* \param p_decoded pointer to a decoded satellite delivery system descriptor
* descriptor structure
...
...
@@ -97,8 +97,8 @@ dvbpsi_sat_deliv_sys_dr_t* dvbpsi_DecodeSatDelivSysDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenSatDelivSysD
r
(
dvbpsi_sat_deliv_sys_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_sat_deliv_sys_d
r
(
dvbpsi_
dvb_
sat_deliv_sys_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_44.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodeCableDelivSysD
r
* dvbpsi_
decode_dvb_cable_deliv_sys_d
r
*****************************************************************************/
dvbpsi_
cable_deliv_sys_dr_t
*
dvbpsi_DecodeCableDelivSysD
r
(
dvbpsi_
dvb_cable_deliv_sys_dr_t
*
dvbpsi_decode_dvb_cable_deliv_sys_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_cable_deliv_sys_dr_t
*
p_decoded
;
dvbpsi_
dvb_
cable_deliv_sys_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x44
))
...
...
@@ -59,7 +59,7 @@ dvbpsi_cable_deliv_sys_dr_t * dvbpsi_DecodeCableDelivSysDr(
/* Allocate memory */
p_decoded
=
(
dvbpsi_
cable_deliv_sys_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_cable_deliv_sys_dr_t
));
(
dvbpsi_
dvb_cable_deliv_sys_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_cable_deliv_sys_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -82,10 +82,10 @@ dvbpsi_cable_deliv_sys_dr_t * dvbpsi_DecodeCableDelivSysDr(
}
/*****************************************************************************
* dvbpsi_
GenCableDelivSysD
r
* dvbpsi_
gen_dvb_cable_deliv_sys_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenCableDelivSysD
r
(
dvbpsi_cable_deliv_sys_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_cable_deliv_sys_d
r
(
dvbpsi_
dvb_
cable_deliv_sys_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -114,7 +114,7 @@ dvbpsi_descriptor_t * dvbpsi_GenCableDelivSysDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_cable_deliv_sys_dr_t
));
sizeof
(
dvbpsi_
dvb_
cable_deliv_sys_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_44.h
View file @
61277eae
...
...
@@ -42,20 +42,20 @@ extern "C" {
/*****************************************************************************
* dvbpsi_cable_deliv_sys_dr_t
* dvbpsi_
dvb_
cable_deliv_sys_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_cable_deliv_sys_dr_s
* \struct dvbpsi_
dvb_
cable_deliv_sys_dr_s
* \brief cable delivery system descriptor structure.
*
* This structure is used to store a decoded cable delivery system
* descriptor. (ETSI EN 300 468 section 6.2.13.1).
*/
/*!
* \typedef struct dvbpsi_
cable_deliv_sys_dr_s dvbpsi
_cable_deliv_sys_dr_t
* \brief dvbpsi_cable_deliv_sys_dr_t type definition.
* \typedef struct dvbpsi_
dvb_cable_deliv_sys_dr_s dvbpsi_dvb
_cable_deliv_sys_dr_t
* \brief dvbpsi_
dvb_
cable_deliv_sys_dr_t type definition.
*/
typedef
struct
dvbpsi_cable_deliv_sys_dr_s
typedef
struct
dvbpsi_
dvb_
cable_deliv_sys_dr_s
{
uint32_t
i_frequency
;
/*!< frequency */
uint8_t
i_modulation
;
/*!< modulation type */
...
...
@@ -63,30 +63,30 @@ typedef struct dvbpsi_cable_deliv_sys_dr_s
uint8_t
i_fec_inner
;
/*!< FEC inner */
uint8_t
i_fec_outer
;
/*!< FEC outer*/
}
dvbpsi_cable_deliv_sys_dr_t
;
}
dvbpsi_
dvb_
cable_deliv_sys_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeCableDelivSysD
r
* dvbpsi_
decode_dvb_cable_deliv_sys_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
cable_deliv_sys_dr_t * dvbpsi_DecodeCableDelivSysD
r(
* \fn dvbpsi_
dvb_cable_deliv_sys_dr_t * dvbpsi_decode_dvb_cable_deliv_sys_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief cable delivery system descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new cable delivery system descriptor structure
* which contains the decoded data.
*/
dvbpsi_
cable_deliv_sys_dr_t
*
dvbpsi_DecodeCableDelivSysD
r
(
dvbpsi_
dvb_cable_deliv_sys_dr_t
*
dvbpsi_decode_dvb_cable_deliv_sys_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenCableDelivSysD
r
* dvbpsi_
gen_dvb_cable_deliv_sys_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenCableDelivSysD
r(
dvbpsi_cable_deliv_sys_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_cable_deliv_sys_d
r(
dvbpsi_
dvb_
cable_deliv_sys_dr_t * p_decoded, bool b_duplicate)
* \brief cable delivery system descriptor generator.
* \param p_decoded pointer to a decoded cable delivery system descriptor
* descriptor structure
...
...
@@ -94,8 +94,8 @@ dvbpsi_cable_deliv_sys_dr_t* dvbpsi_DecodeCableDelivSysDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenCableDelivSysD
r
(
dvbpsi_cable_deliv_sys_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_cable_deliv_sys_d
r
(
dvbpsi_
dvb_
cable_deliv_sys_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_45.c
View file @
61277eae
...
...
@@ -41,9 +41,9 @@
#include "dr_45.h"
/*****************************************************************************
* dvbpsi_
DecodeVBIDataD
r
* dvbpsi_
decode_dvb_vbi_d
r
*****************************************************************************/
dvbpsi_
vbi_dr_t
*
dvbpsi_DecodeVBIDataD
r
(
dvbpsi_
dvb_vbi_dr_t
*
dvbpsi_decode_dvb_vbi_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
...
...
@@ -61,13 +61,13 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
return
NULL
;
/* */
dvbpsi_vbi_dr_t
*
p_decoded
;
dvbpsi_
dvb_
vbi_dr_t
*
p_decoded
;
uint8_t
i_services_number
=
p_descriptor
->
i_length
/
2
;
if
(
i_services_number
>
DVBPSI_VBI_DR_MAX
)
i_services_number
=
DVBPSI_VBI_DR_MAX
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
vbi_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_vbi_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_vbi_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_vbi_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -101,9 +101,9 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
}
/*****************************************************************************
* dvbpsi_
GenVBIDataD
r
* dvbpsi_
gen_dvb_vbi_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenVBIDataDr
(
dvbpsi
_vbi_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_vbi_dr
(
dvbpsi_dvb
_vbi_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_services_number
>
DVBPSI_VBI_DR_MAX
)
...
...
@@ -142,7 +142,7 @@ dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(dvbpsi_vbi_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_vbi_dr_t
));
sizeof
(
dvbpsi_
dvb_
vbi_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_45.h
View file @
61277eae
...
...
@@ -93,53 +93,53 @@ typedef struct dvbpsi_vbidata_s
/*!
* \def DVBPSI_VBI_DR_MAX
* \brief Maximum number of dvbpsi_vbidata_t entries present in
* @see dvbpsi_vbi_dr_t
* @see dvbpsi_
dvb_
vbi_dr_t
*/
#define DVBPSI_VBI_DR_MAX 85
/*****************************************************************************
* dvbpsi_vbi_dr_t
* dvbpsi_
dvb_
vbi_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_vbi_dr_s
* \struct dvbpsi_
dvb_
vbi_dr_s
* \brief "teletext" descriptor structure.
*
* This structure is used to store a decoded "VBI data"
* descriptor. (ETSI EN 300 468 version 1.7.1 section 6.2.46).
*/
/*!
* \typedef struct dvbpsi_
vbi_dr_s dvbpsi
_vbi_dr_t
* \brief dvbpsi_vbi_dr_t type definition.
* \typedef struct dvbpsi_
dvb_vbi_dr_s dvbpsi_dvb
_vbi_dr_t
* \brief dvbpsi_
dvb_
vbi_dr_t type definition.
*/
typedef
struct
dvbpsi_vbi_dr_s
typedef
struct
dvbpsi_
dvb_
vbi_dr_s
{
uint8_t
i_services_number
;
/*!< service number */
dvbpsi_vbidata_t
p_services
[
DVBPSI_VBI_DR_MAX
];
/*!< services table */
}
dvbpsi_vbi_dr_t
;
}
dvbpsi_
dvb_
vbi_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeVBIDataD
r
* dvbpsi_
decode_dvb_vbi_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
vbi_dr_t * dvbpsi_DecodeVBIDataD
r(
* \fn dvbpsi_
dvb_vbi_dr_t * dvbpsi_decode_dvb_vbi_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "VBI data" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "VBI data" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
vbi_dr_t
*
dvbpsi_DecodeVBIDataD
r
(
dvbpsi_
dvb_vbi_dr_t
*
dvbpsi_decode_dvb_vbi_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenVBIDataD
r
* dvbpsi_
gen_dvb_vbi_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenVBIDataD
r(
dvbpsi_vbi_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_vbi_d
r(
dvbpsi_
dvb_
vbi_dr_t * p_decoded, bool b_duplicate)
* \brief "VBI data" descriptor generator.
* \param p_decoded pointer to a decoded "VBI data" descriptor
* structure
...
...
@@ -147,8 +147,8 @@ dvbpsi_vbi_dr_t* dvbpsi_DecodeVBIDataDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenVBIDataD
r
(
dvbpsi_vbi_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_vbi_d
r
(
dvbpsi_
dvb_
vbi_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
...
...
src/descriptors/dr_47.c
View file @
61277eae
...
...
@@ -43,12 +43,12 @@
/*****************************************************************************
* dvbpsi_
DecodeBouquetNameD
r
* dvbpsi_
decode_dvb_bouquet_name_d
r
*****************************************************************************/
dvbpsi_
bouquet_name_dr_t
*
dvbpsi_DecodeBouquetNameD
r
(
dvbpsi_
dvb_bouquet_name_dr_t
*
dvbpsi_decode_dvb_bouquet_name_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_bouquet_name_dr_t
*
p_decoded
;
dvbpsi_
dvb_
bouquet_name_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x47
))
...
...
@@ -59,7 +59,7 @@ dvbpsi_bouquet_name_dr_t * dvbpsi_DecodeBouquetNameDr(
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
bouquet_name_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_bouquet_name_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_bouquet_name_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_bouquet_name_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -78,9 +78,9 @@ dvbpsi_bouquet_name_dr_t * dvbpsi_DecodeBouquetNameDr(
/*****************************************************************************
* dvbpsi_
GenBouquetNameD
r
* dvbpsi_
gen_dvb_bouquet_name_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenBouquetNameDr
(
dvbpsi
_bouquet_name_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_bouquet_name_dr
(
dvbpsi_dvb
_bouquet_name_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -100,7 +100,7 @@ dvbpsi_descriptor_t * dvbpsi_GenBouquetNameDr(dvbpsi_bouquet_name_dr_t *p_decode
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_bouquet_name_dr_t
));
sizeof
(
dvbpsi_
dvb_
bouquet_name_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_47.h
View file @
61277eae
...
...
@@ -42,48 +42,48 @@ extern "C" {
/*****************************************************************************
* dvbpsi_bouquet_name_dr_t
* dvbpsi_
dvb_
bouquet_name_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_bouquet_name_dr_s
* \struct dvbpsi_
dvb_
bouquet_name_dr_s
* \brief "bouquet name" descriptor structure.
*
* This structure is used to store a decoded "bouquet name"
* descriptor. (ETSI EN 300 468 section 6.2.3).
*/
/*!
* \typedef struct dvbpsi_
bouquet_name_dr_s dvbpsi
_bouquet_name_dr_t
* \brief dvbpsi_bouquet_name_dr_t type definition.
* \typedef struct dvbpsi_
dvb_bouquet_name_dr_s dvbpsi_dvb
_bouquet_name_dr_t
* \brief dvbpsi_
dvb_
bouquet_name_dr_t type definition.
*/
typedef
struct
dvbpsi_bouquet_name_dr_s
typedef
struct
dvbpsi_
dvb_
bouquet_name_dr_s
{
uint8_t
i_name_length
;
/*!< length of thr i_char array */
uint8_t
i_char
[
255
];
/*!< char */
}
dvbpsi_bouquet_name_dr_t
;
}
dvbpsi_
dvb_
bouquet_name_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeBouquetNameD
r
* dvbpsi_
decode_dvb_bouquet_name_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
bouquet_name_dr_t * dvbpsi_DecodeBouquetNameD
r(
* \fn dvbpsi_
dvb_bouquet_name_dr_t * dvbpsi_decode_dvb_bouquet_name_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "bouquet name" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "bouquet name" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
bouquet_name_dr_t
*
dvbpsi_DecodeBouquetNameD
r
(
dvbpsi_
dvb_bouquet_name_dr_t
*
dvbpsi_decode_dvb_bouquet_name_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenBouquetNameD
r
* dvbpsi_
gen_dvb_bouquet_name_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenBouquetNameD
r(
dvbpsi_bouquet_name_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_bouquet_name_d
r(
dvbpsi_
dvb_
bouquet_name_dr_t * p_decoded, bool b_duplicate)
* \brief "bouquet name" descriptor generator.
* \param p_decoded pointer to a decoded "bouquet name" descriptor
* structure
...
...
@@ -91,8 +91,8 @@ dvbpsi_bouquet_name_dr_t* dvbpsi_DecodeBouquetNameDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenBouquetNameD
r
(
dvbpsi_bouquet_name_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_bouquet_name_d
r
(
dvbpsi_
dvb_
bouquet_name_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_48.c
View file @
61277eae
...
...
@@ -43,9 +43,9 @@
/*****************************************************************************
* dvbpsi_
DecodeServiceD
r
* dvbpsi_
decode_dvb_service_d
r
*****************************************************************************/
dvbpsi_
service_dr_t
*
dvbpsi_DecodeServiceD
r
(
dvbpsi_
dvb_service_dr_t
*
dvbpsi_decode_dvb_service_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
...
...
@@ -60,8 +60,8 @@ dvbpsi_service_dr_t * dvbpsi_DecodeServiceDr(
return
NULL
;
/* Allocate memory */
dvbpsi_service_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
service_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_service_dr_t
));
dvbpsi_
dvb_
service_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
dvb_service_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_dvb
_service_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -106,9 +106,9 @@ dvbpsi_service_dr_t * dvbpsi_DecodeServiceDr(
}
/*****************************************************************************
* dvbpsi_
GenServiceD
r
* dvbpsi_
gen_dvb_service_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenServiceDr
(
dvbpsi
_service_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_service_dr
(
dvbpsi_dvb
_service_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_service_provider_name_length
>
252
)
...
...
@@ -146,7 +146,7 @@ dvbpsi_descriptor_t * dvbpsi_GenServiceDr(dvbpsi_service_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_service_dr_t
));
sizeof
(
dvbpsi_
dvb_
service_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_48.h
View file @
61277eae
...
...
@@ -42,20 +42,20 @@ extern "C" {
/*****************************************************************************
* dvbpsi_service_dr_t
* dvbpsi_
dvb_
service_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_service_dr_s
* \struct dvbpsi_
dvb_
service_dr_s
* \brief "service" descriptor structure.
*
* This structure is used to store a decoded "service"
* descriptor. (ETSI EN 300 468 section 6.2.30).
*/
/*!
* \typedef struct dvbpsi_
service_dr_s dvbpsi
_service_dr_t
* \brief dvbpsi_service_dr_t type definition.
* \typedef struct dvbpsi_
dvb_service_dr_s dvbpsi_dvb
_service_dr_t
* \brief dvbpsi_
dvb_
service_dr_t type definition.
*/
typedef
struct
dvbpsi_service_dr_s
typedef
struct
dvbpsi_
dvb_
service_dr_s
{
uint8_t
i_service_type
;
/*!< service_type*/
uint8_t
i_service_provider_name_length
;
/*!< length of the
...
...
@@ -65,21 +65,21 @@ typedef struct dvbpsi_service_dr_s
i_service_name array*/
uint8_t
i_service_name
[
252
];
/*!< name of the service */
}
dvbpsi_service_dr_t
;
}
dvbpsi_
dvb_
service_dr_t
;
/*****************************************************************************
* dvbpsi_DecodeServiceDataDr
*****************************************************************************/
/*!
* \fn dvbpsi_
service_dr_t * dvbpsi_DecodeServiceD
r(
* \fn dvbpsi_
dvb_service_dr_t * dvbpsi_decode_dvb_service_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "service" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "service" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
service_dr_t
*
dvbpsi_DecodeServiceD
r
(
dvbpsi_
dvb_service_dr_t
*
dvbpsi_decode_dvb_service_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
...
...
@@ -87,8 +87,8 @@ dvbpsi_service_dr_t* dvbpsi_DecodeServiceDr(
* dvbpsi_GenServiceDataDr
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenServiceD
r(
dvbpsi_service_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_service_d
r(
dvbpsi_
dvb_
service_dr_t * p_decoded, bool b_duplicate)
* \brief "service" descriptor generator.
* \param p_decoded pointer to a decoded "service" descriptor
* structure
...
...
@@ -96,8 +96,8 @@ dvbpsi_service_dr_t* dvbpsi_DecodeServiceDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenServiceD
r
(
dvbpsi_service_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_service_d
r
(
dvbpsi_
dvb_
service_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_49.c
View file @
61277eae
...
...
@@ -40,12 +40,12 @@
#include "dr_49.h"
/*****************************************************************************
* dvbpsi_
DecodeCountryAvailability
* dvbpsi_
decode_dvb_country_availability_dr
*****************************************************************************/
dvbpsi_
country_availability_dr_t
*
dvbpsi_DecodeCountryAvailability
(
dvbpsi_
dvb_country_availability_dr_t
*
dvbpsi_decode_dvb_country_availability_dr
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_country_availability_dr_t
*
p_decoded
;
dvbpsi_
dvb_
country_availability_dr_t
*
p_decoded
;
/* Check the tag */
if
(
p_descriptor
->
i_tag
!=
0x49
)
...
...
@@ -63,7 +63,7 @@ dvbpsi_country_availability_dr_t* dvbpsi_DecodeCountryAvailability(
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
country_availability_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_country_availability_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_country_availability_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_dvb
_country_availability_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -85,10 +85,10 @@ dvbpsi_country_availability_dr_t* dvbpsi_DecodeCountryAvailability(
/*****************************************************************************
* dvbpsi_
GenCountryAvailabilityD
r
* dvbpsi_
gen_dvb_country_availability_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenCountryAvailabilityD
r
(
dvbpsi_country_availability_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_country_availability_d
r
(
dvbpsi_
dvb_
country_availability_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Check the length */
...
...
@@ -116,7 +116,7 @@ dvbpsi_descriptor_t * dvbpsi_GenCountryAvailabilityDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_country_availability_dr_t
));
sizeof
(
dvbpsi_
dvb_
country_availability_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_49.h
View file @
61277eae
...
...
@@ -40,24 +40,24 @@ extern "C" {
/*****************************************************************************
* dvbpsi_country_availability_dr_t
* dvbpsi_
dvb_
country_availability_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_country_availability_dr_t
* \struct dvbpsi_
dvb_
country_availability_dr_t
* \brief "country availability" descriptor structure.
*
* This structure is used to store a decoded "country availability"
* descriptor. (ETSI EN 300 468 section 6.2.10).
*/
/*!
* \typedef struct dvbpsi_
country_availability_dr_s dvbpsi
_country_availability_dr_t
* \brief dvbpsi_country_availability_dr_t type definition.
* \typedef struct dvbpsi_
dvb_country_availability_dr_s dvbpsi_dvb
_country_availability_dr_t
* \brief dvbpsi_
dvb_
country_availability_dr_t type definition.
*/
/*!
* \struct dvbpsi_country_availability_dr_s
* \brief dvbpsi_
country_availability_dr_s type definition @see dvbpsi
_country_availability_dr_t
* \struct dvbpsi_
dvb_
country_availability_dr_s
* \brief dvbpsi_
dvb_country_availability_dr_s type definition @see dvbpsi_dvb
_country_availability_dr_t
*/
typedef
struct
dvbpsi_country_availability_dr_s
typedef
struct
dvbpsi_
dvb_
country_availability_dr_s
{
bool
b_country_availability_flag
;
/*!< country availability flag */
uint8_t
i_code_count
;
/*!< length of the i_iso_639_code
...
...
@@ -66,28 +66,28 @@ typedef struct dvbpsi_country_availability_dr_s
iso_639_language_code_t
iso_639_code
;
/*!< ISO_639 language code */
}
code
[
84
];
/*!< ISO_639_language_code array */
}
dvbpsi_country_availability_dr_t
;
}
dvbpsi_
dvb_
country_availability_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeCountryAvailability
Dr
* dvbpsi_
decode_dvb_country_availability_dr
Dr
*****************************************************************************/
/*!
* \fn dvbpsi_
country_availability_dr_t * dvbpsi_DecodeCountryAvailability
(
* \fn dvbpsi_
dvb_country_availability_dr_t * dvbpsi_decode_dvb_country_availability_dr
(
dvbpsi_descriptor_t * p_descriptor)
* \brief "country availability" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "country availability" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
country_availability_dr_t
*
dvbpsi_DecodeCountryAvailability
(
dvbpsi_
dvb_country_availability_dr_t
*
dvbpsi_decode_dvb_country_availability_dr
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenCountryAvailabilityD
r
* dvbpsi_
gen_dvb_country_availability_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenCountryAvailabilityD
r(
dvbpsi_country_availability_dr_t * p_decoded,
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_country_availability_d
r(
dvbpsi_
dvb_
country_availability_dr_t * p_decoded,
bool b_duplicate)
* \brief "country availability" descriptor generator.
* \param p_decoded pointer to a decoded "country availability" descriptor
...
...
@@ -96,8 +96,8 @@ dvbpsi_country_availability_dr_t* dvbpsi_DecodeCountryAvailability(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenCountryAvailabilityD
r
(
dvbpsi_country_availability_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_country_availability_d
r
(
dvbpsi_
dvb_
country_availability_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
...
...
src/descriptors/dr_4a.c
View file @
61277eae
...
...
@@ -44,9 +44,9 @@
#define DR_4A_MIN_SIZE 7
/*****************************************************************************
* dvbpsi_
DecodeLinkageD
r
* dvbpsi_
decode_dvb_linkage_d
r
*****************************************************************************/
dvbpsi_
linkage_dr_t
*
dvbpsi_DecodeLinkageD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
dvb_linkage_dr_t
*
dvbpsi_decode_dvb_linkage_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
if
(
p_descriptor
->
i_tag
!=
0x4A
)
...
...
@@ -79,8 +79,8 @@ dvbpsi_linkage_dr_t* dvbpsi_DecodeLinkageDr(dvbpsi_descriptor_t * p_descriptor)
return
NULL
;
/* Allocate memory */
dvbpsi_linkage_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
linkage_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_linkage_dr_t
));
dvbpsi_
dvb_
linkage_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
dvb_linkage_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_dvb
_linkage_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -140,9 +140,9 @@ dvbpsi_linkage_dr_t* dvbpsi_DecodeLinkageDr(dvbpsi_descriptor_t * p_descriptor)
}
/*****************************************************************************
* dvbpsi_
GenCountryAvailabilityD
r
* dvbpsi_
gen_dvb_country_availability_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenLinkageDr
(
dvbpsi
_linkage_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_linkage_dr
(
dvbpsi_dvb
_linkage_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Check the length */
...
...
@@ -226,7 +226,7 @@ dvbpsi_descriptor_t * dvbpsi_GenLinkageDr(dvbpsi_linkage_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_linkage_dr_t
));
sizeof
(
dvbpsi_
dvb_
linkage_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_4a.h
View file @
61277eae
...
...
@@ -39,24 +39,24 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_linkage_dr_t
* dvbpsi_
dvb_
linkage_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_linkage_dr_t
* \struct dvbpsi_
dvb_
linkage_dr_t
* \brief "linkage" descriptor structure.
*
* This structure is used to store a decoded "linkage"
* descriptor. (ETSI EN 300 468 section 6.2.10).
*/
/*!
* \typedef struct dvbpsi_
linkage_dr_s dvbpsi
_linkage_dr_t
* \brief dvbpsi_linkage_dr_t type definition.
* \typedef struct dvbpsi_
dvb_linkage_dr_s dvbpsi_dvb
_linkage_dr_t
* \brief dvbpsi_
dvb_
linkage_dr_t type definition.
*/
/*!
* \struct dvbpsi_linkage_dr_s
* \brief struct dvbpsi_
linkage_dr_s @see dvbpsi
_linkage_dr_t
* \struct dvbpsi_
dvb_
linkage_dr_s
* \brief struct dvbpsi_
dvb_linkage_dr_s @see dvbpsi_dvb
_linkage_dr_t
*/
typedef
struct
dvbpsi_linkage_dr_s
typedef
struct
dvbpsi_
dvb_
linkage_dr_s
{
uint16_t
i_transport_stream_id
;
/*!< transport stream id */
uint16_t
i_original_network_id
;
/*!< original network id */
...
...
@@ -82,26 +82,26 @@ typedef struct dvbpsi_linkage_dr_s
array */
uint8_t
i_private_data
[
246
];
/*!< private data */
}
dvbpsi_linkage_dr_t
;
}
dvbpsi_
dvb_
linkage_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeLinkageD
r
* dvbpsi_
decode_dvb_linkage_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
linkage_dr_t * dvbpsi_DecodeLinkageD
r(
* \fn dvbpsi_
dvb_linkage_dr_t * dvbpsi_decode_dvb_linkage_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "linkage" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "linkage" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
linkage_dr_t
*
dvbpsi_DecodeLinkageD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_linkage_dr_t
*
dvbpsi_decode_dvb_linkage_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenLinkageD
r
* dvbpsi_
gen_dvb_linkage_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t *dvbpsi_
GenLinkageDr(dvbpsi
_linkage_dr_t *p_decoded,
* \fn dvbpsi_descriptor_t *dvbpsi_
gen_dvb_linkage_dr(dvbpsi_dvb
_linkage_dr_t *p_decoded,
bool b_duplicate);
* \brief "linkage" descriptor generator.
* \param p_decoded pointer to a decoded "linkage" descriptor structure
...
...
@@ -109,7 +109,7 @@ dvbpsi_linkage_dr_t* dvbpsi_DecodeLinkageDr(dvbpsi_descriptor_t * p_descriptor);
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenLinkageDr
(
dvbpsi
_linkage_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_linkage_dr
(
dvbpsi_dvb
_linkage_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
...
...
src/descriptors/dr_4b.c
View file @
61277eae
...
...
@@ -40,9 +40,9 @@
#include "dr_4b.h"
/*****************************************************************************
* dvbpsi_
DecodeNVODReferenceD
r
* dvbpsi_
decode_dvb_nvod_ref_d
r
*****************************************************************************/
dvbpsi_
nvod_ref_dr_t
*
dvbpsi_DecodeNVODReferenceD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
dvb_nvod_ref_dr_t
*
dvbpsi_decode_dvb_nvod_ref_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
if
(
p_descriptor
->
i_tag
!=
0x4B
)
...
...
@@ -59,8 +59,8 @@ dvbpsi_nvod_ref_dr_t* dvbpsi_DecodeNVODReferenceDr(dvbpsi_descriptor_t * p_descr
return
NULL
;
/* Allocate memory */
dvbpsi_nvod_ref_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
nvod_ref_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_nvod_ref_dr_t
));
dvbpsi_
dvb_
nvod_ref_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
dvb_nvod_ref_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_dvb
_nvod_ref_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -86,9 +86,9 @@ dvbpsi_nvod_ref_dr_t* dvbpsi_DecodeNVODReferenceDr(dvbpsi_descriptor_t * p_descr
}
/*****************************************************************************
* dvbpsi_
GenNVODReferenceD
r
* dvbpsi_
gen_dvb_nvod_ref_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenNVODReferenceDr
(
dvbpsi
_nvod_ref_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_nvod_ref_dr
(
dvbpsi_dvb
_nvod_ref_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -117,7 +117,7 @@ dvbpsi_descriptor_t * dvbpsi_GenNVODReferenceDr(dvbpsi_nvod_ref_dr_t * p_decoded
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_nvod_ref_dr_t
));
sizeof
(
dvbpsi_
dvb_
nvod_ref_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_4b.h
View file @
61277eae
...
...
@@ -44,12 +44,12 @@ extern "C" {
* \struct dvbpsi_nvod_ref_t
* \brief one "NVOD reference" structure.
*
* This structure is used since dvbpsi_nvod_ref_dr_t structure will contain
* This structure is used since dvbpsi_
dvb_
nvod_ref_dr_t structure will contain
* several of these structures
*/
/*!
* \typedef struct dvbpsi_nvod_ref_s dvbpsi_nvod_ref_t
* \brief dvbpsi_nvod_ref_dr_t type definition.
* \brief dvbpsi_
dvb_
nvod_ref_dr_t type definition.
*/
/*!
* \struct dvbpsi_nvod_ref_s
...
...
@@ -63,43 +63,43 @@ typedef struct dvbpsi_nvod_ref_s
}
dvbpsi_nvod_ref_t
;
/*****************************************************************************
* dvbpsi_nvod_ref_dr_t
* dvbpsi_
dvb_
nvod_ref_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_nvod_ref_dr_s
* \struct dvbpsi_
dvb_
nvod_ref_dr_s
* \brief "NVOD reference" descriptor structure.
*
* This structure is used to store a decoded "Near Video On Demand (NVOD) reference"
* descriptor. (ETSI EN 300 468 section 6.2.26).
*/
/*!
* \typedef struct dvbpsi_
nvod_ref_dr_s dvbpsi
_nvod_ref_dr_t
* \brief dvbpsi_nvod_ref_dr_t type definition.
* \typedef struct dvbpsi_
dvb_nvod_ref_dr_s dvbpsi_dvb
_nvod_ref_dr_t
* \brief dvbpsi_
dvb_
nvod_ref_dr_t type definition.
*/
typedef
struct
dvbpsi_nvod_ref_dr_s
typedef
struct
dvbpsi_
dvb_
nvod_ref_dr_s
{
uint8_t
i_references
;
/*!< number of nvod references */
dvbpsi_nvod_ref_t
p_nvod_refs
[
43
];
/*!< NVOD references */
}
dvbpsi_nvod_ref_dr_t
;
}
dvbpsi_
dvb_
nvod_ref_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeNVODReferenceD
r
* dvbpsi_
decode_dvb_nvod_ref_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
nvod_ref_dr_t * dvbpsi_DecodeNVODReferenceD
r(
* \fn dvbpsi_
dvb_nvod_ref_dr_t * dvbpsi_decode_dvb_nvod_ref_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "NVOD reference" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "NVOD reference" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
nvod_ref_dr_t
*
dvbpsi_DecodeNVODReferenceD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_nvod_ref_dr_t
*
dvbpsi_decode_dvb_nvod_ref_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenNVODReferenceD
r
* dvbpsi_
gen_dvb_nvod_ref_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t *dvbpsi_
GenNVODReferenceDr(dvbpsi
_nvod_ref_dr_t *p_decoded,
* \fn dvbpsi_descriptor_t *dvbpsi_
gen_dvb_nvod_ref_dr(dvbpsi_dvb
_nvod_ref_dr_t *p_decoded,
bool b_duplicate);
* \brief "NVOD reference" descriptor generator.
* \param p_decoded pointer to a decoded "NVOD reference" descriptor structure
...
...
@@ -107,7 +107,7 @@ dvbpsi_nvod_ref_dr_t* dvbpsi_DecodeNVODReferenceDr(dvbpsi_descriptor_t * p_descr
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenNVODReferenceDr
(
dvbpsi
_nvod_ref_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_nvod_ref_dr
(
dvbpsi_dvb
_nvod_ref_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
...
...
src/descriptors/dr_4c.c
View file @
61277eae
...
...
@@ -40,9 +40,9 @@
#include "dr_4c.h"
/*****************************************************************************
* dvbpsi_
DecodeTimeShiftedServiceD
r
* dvbpsi_
decode_dvb_tshifted_service_d
r
*****************************************************************************/
dvbpsi_
tshifted_service_dr_t
*
dvbpsi_DecodeTimeShiftedServiceD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
dvb_tshifted_service_dr_t
*
dvbpsi_decode_dvb_tshifted_service_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x4c
))
...
...
@@ -56,8 +56,8 @@ dvbpsi_tshifted_service_dr_t* dvbpsi_DecodeTimeShiftedServiceDr(dvbpsi_descripto
return
NULL
;
/* Allocate memory */
dvbpsi_tshifted_service_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
tshifted_service_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_tshifted_service_dr_t
));
dvbpsi_
dvb_
tshifted_service_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
dvb_tshifted_service_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_dvb
_tshifted_service_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -71,9 +71,9 @@ dvbpsi_tshifted_service_dr_t* dvbpsi_DecodeTimeShiftedServiceDr(dvbpsi_descripto
}
/*****************************************************************************
* dvbpsi_
GenTimeShiftedServiceD
r
* dvbpsi_
gen_dvb_tshifted_service_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenTimeShiftedServiceDr
(
dvbpsi
_tshifted_service_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_tshifted_service_dr
(
dvbpsi_dvb
_tshifted_service_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -90,7 +90,7 @@ dvbpsi_descriptor_t *dvbpsi_GenTimeShiftedServiceDr(dvbpsi_tshifted_service_dr_t
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_tshifted_service_dr_t
));
sizeof
(
dvbpsi_
dvb_
tshifted_service_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_4c.h
View file @
61277eae
...
...
@@ -39,46 +39,46 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_tshifted_service_dr_t
* dvbpsi_
dvb_
tshifted_service_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_tshifted_service_dr_t
* \struct dvbpsi_
dvb_
tshifted_service_dr_t
* \brief "time shifted service" descriptor structure.
*
* This structure is used to store a decoded "time shifted service"
* descriptor. (ETSI EN 300 468 section 6.2.45).
*/
/*!
* \typedef struct dvbpsi_
tshifted_service_dr_s dvbpsi
_tshifted_service_dr_t
* \brief dvbpsi_tshifted_service_dr_t type definition.
* \typedef struct dvbpsi_
dvb_tshifted_service_dr_s dvbpsi_dvb
_tshifted_service_dr_t
* \brief dvbpsi_
dvb_
tshifted_service_dr_t type definition.
*/
/*!
* \struct dvbpsi_tshifted_service_dr_s
* \brief struct dvbpsi_
tshifted_service_dr_s @see dvbpsi
_tshifted_service_dr_t
* \struct dvbpsi_
dvb_
tshifted_service_dr_s
* \brief struct dvbpsi_
dvb_tshifted_service_dr_s @see dvbpsi_dvb
_tshifted_service_dr_t
*/
typedef
struct
dvbpsi_tshifted_service_dr_s
typedef
struct
dvbpsi_
dvb_
tshifted_service_dr_s
{
uint16_t
i_ref_service_id
;
/*!< reference service id */
}
dvbpsi_tshifted_service_dr_t
;
}
dvbpsi_
dvb_
tshifted_service_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeTimeShiftedServiceD
r
* dvbpsi_
decode_dvb_tshifted_service_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
tshifted_service_dr_t *dvbpsi_DecodeTimeShiftedServiceD
r(
* \fn dvbpsi_
dvb_tshifted_service_dr_t *dvbpsi_decode_dvb_tshifted_service_d
r(
dvbpsi_descriptor_t *p_descriptor)
* \brief "time shifted service" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "time shifted service" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
tshifted_service_dr_t
*
dvbpsi_DecodeTimeShiftedServiceD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_tshifted_service_dr_t
*
dvbpsi_decode_dvb_tshifted_service_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenTimeShiftedServiceD
r
* dvbpsi_
gen_dvb_tshifted_service_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t *dvbpsi_
GenTimeShiftedServiceDr(dvbpsi
_tshifted_service_dr_t *p_decoded,
* \fn dvbpsi_descriptor_t *dvbpsi_
gen_dvb_tshifted_service_dr(dvbpsi_dvb
_tshifted_service_dr_t *p_decoded,
bool b_duplicate);
* \brief "time shifted service" descriptor generator.
* \param p_decoded pointer to a decoded "time shifted service" descriptor structure
...
...
@@ -86,7 +86,7 @@ dvbpsi_tshifted_service_dr_t* dvbpsi_DecodeTimeShiftedServiceDr(dvbpsi_descripto
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenTimeShiftedServiceDr
(
dvbpsi
_tshifted_service_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_tshifted_service_dr
(
dvbpsi_dvb
_tshifted_service_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
...
...
src/descriptors/dr_4d.c
View file @
61277eae
...
...
@@ -41,11 +41,11 @@
#include "dr_4d.h"
/*****************************************************************************
* dvbpsi_
DecodeShortEventD
r
* dvbpsi_
decode_dvb_short_event_d
r
*****************************************************************************/
dvbpsi_
short_event_dr_t
*
dvbpsi_DecodeShortEventD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
dvb_short_event_dr_t
*
dvbpsi_decode_dvb_short_event_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_short_event_dr_t
*
p_decoded
;
dvbpsi_
dvb_
short_event_dr_t
*
p_decoded
;
int
i_len1
;
int
i_len2
;
...
...
@@ -70,7 +70,7 @@ dvbpsi_short_event_dr_t * dvbpsi_DecodeShortEventDr(dvbpsi_descriptor_t * p_desc
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
p_decoded
=
malloc
(
sizeof
(
dvbpsi_short_event_dr_t
));
p_decoded
=
malloc
(
sizeof
(
dvbpsi_
dvb_
short_event_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -89,9 +89,9 @@ dvbpsi_short_event_dr_t * dvbpsi_DecodeShortEventDr(dvbpsi_descriptor_t * p_desc
}
/*****************************************************************************
* dvbpsi_
GenShortEventD
r
* dvbpsi_
gen_dvb_short_event_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenShortEventDr
(
dvbpsi
_short_event_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_short_event_dr
(
dvbpsi_dvb
_short_event_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
uint8_t
i_len1
=
p_decoded
->
i_event_name_length
;
...
...
@@ -116,7 +116,7 @@ dvbpsi_descriptor_t * dvbpsi_GenShortEventDr(dvbpsi_short_event_dr_t * p_decoded
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_short_event_dr_t
));
sizeof
(
dvbpsi_
dvb_
short_event_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_4d.h
View file @
61277eae
...
...
@@ -41,19 +41,19 @@ extern "C" {
/*****************************************************************************
* dvbpsi_short_event_dr_t
* dvbpsi_
dvb_
short_event_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_short_event_dr_s
* \struct dvbpsi_
dvb_
short_event_dr_s
* \brief "short event" descriptor structure.
*
* This structure is used to store a decoded "short event" descriptor.
*/
/*!
* \typedef struct dvbpsi_
short_event_dr_s dvbpsi
_short_event_dr_t
* \brief dvbpsi_short_event_dr_t type definition.
* \typedef struct dvbpsi_
dvb_short_event_dr_s dvbpsi_dvb
_short_event_dr_t
* \brief dvbpsi_
dvb_
short_event_dr_t type definition.
*/
typedef
struct
dvbpsi_short_event_dr_s
typedef
struct
dvbpsi_
dvb_
short_event_dr_s
{
uint8_t
i_iso_639_code
[
3
];
/*!< ISO 639 language code */
int
i_event_name_length
;
/*!< length of event name */
...
...
@@ -61,36 +61,36 @@ typedef struct dvbpsi_short_event_dr_s
int
i_text_length
;
/*!< text length */
uint8_t
i_text
[
256
];
/*!< "short event" text */
}
dvbpsi_short_event_dr_t
;
}
dvbpsi_
dvb_
short_event_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeShortEventD
r
* dvbpsi_
decode_dvb_short_event_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
short_event_dr_t * dvbpsi_DecodeShortEventD
r(
* \fn dvbpsi_
dvb_short_event_dr_t * dvbpsi_decode_dvb_short_event_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "short event" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "short event" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
short_event_dr_t
*
dvbpsi_DecodeShortEventD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_short_event_dr_t
*
dvbpsi_decode_dvb_short_event_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenShortEventD
r
* dvbpsi_
gen_dvb_short_event_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenShortEventD
r(
dvbpsi_short_event_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_short_event_d
r(
dvbpsi_
dvb_
short_event_dr_t * p_decoded, bool b_duplicate)
* \brief "short event" descriptor generator.
* \param p_decoded pointer to a decoded "video stream" descriptor structure
* \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenShortEventDr
(
dvbpsi
_short_event_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_short_event_dr
(
dvbpsi_dvb
_short_event_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_4e.c
View file @
61277eae
...
...
@@ -41,11 +41,11 @@
#include "dr_4e.h"
/*****************************************************************************
* dvbpsi_
DecodeExtendedEventD
r
* dvbpsi_
decode_dvb_extended_event_d
r
*****************************************************************************/
dvbpsi_
extended_event_dr_t
*
dvbpsi_DecodeExtendedEventD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
dvb_extended_event_dr_t
*
dvbpsi_decode_dvb_extended_event_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_extended_event_dr_t
*
p_decoded
;
dvbpsi_
dvb_
extended_event_dr_t
*
p_decoded
;
int
i_len
;
int
i_pos
;
uint8_t
*
p
;
...
...
@@ -60,7 +60,7 @@ dvbpsi_extended_event_dr_t * dvbpsi_DecodeExtendedEventDr(dvbpsi_descriptor_t *
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
p_decoded
=
malloc
(
sizeof
(
dvbpsi_extended_event_dr_t
));
p_decoded
=
malloc
(
sizeof
(
dvbpsi_
dvb_
extended_event_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -103,9 +103,9 @@ dvbpsi_extended_event_dr_t * dvbpsi_DecodeExtendedEventDr(dvbpsi_descriptor_t *
/*****************************************************************************
* dvbpsi_
GenExtendedEventD
r
* dvbpsi_
gen_dvb_extended_event_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenExtendedEventDr
(
dvbpsi
_extended_event_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_extended_event_dr
(
dvbpsi_dvb
_extended_event_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
int
i_len
;
...
...
@@ -151,7 +151,7 @@ dvbpsi_descriptor_t * dvbpsi_GenExtendedEventDr(dvbpsi_extended_event_dr_t * p_d
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_extended_event_dr_t
));
sizeof
(
dvbpsi_
dvb_
extended_event_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_4e.h
View file @
61277eae
...
...
@@ -41,19 +41,19 @@ extern "C" {
/*****************************************************************************
* dvbpsi_extended_event_dr_t
* dvbpsi_
dvb_
extended_event_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_extended_event_dr_s
* \struct dvbpsi_
dvb_
extended_event_dr_s
* \brief "extended event" descriptor structure.
*
* This structure is used to store a decoded "extended event" descriptor.
*/
/*!
* \typedef struct dvbpsi_
short_event_dr_s dvbpsi
_extended_event_dr_t
* \brief dvbpsi_extended_event_dr_t type definition.
* \typedef struct dvbpsi_
dvb_short_event_dr_s dvbpsi_dvb
_extended_event_dr_t
* \brief dvbpsi_
dvb_
extended_event_dr_t type definition.
*/
typedef
struct
dvbpsi_extended_event_dr_s
typedef
struct
dvbpsi_
dvb_
extended_event_dr_s
{
uint8_t
i_descriptor_number
;
/*!< descriptor number */
uint8_t
i_last_descriptor_number
;
/*!< last descriptor number */
...
...
@@ -70,36 +70,36 @@ typedef struct dvbpsi_extended_event_dr_s
uint8_t
*
i_text
;
/*!< text */
uint8_t
i_buffer
[
256
];
/*!< do not used*/
}
dvbpsi_extended_event_dr_t
;
}
dvbpsi_
dvb_
extended_event_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeExtendedEventD
r
* dvbpsi_
decode_dvb_extended_event_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
extended_event_dr_t * dvbpsi_DecodeExtendedEventD
r(
* \fn dvbpsi_
dvb_extended_event_dr_t * dvbpsi_decode_dvb_extended_event_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "short event" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "short event" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
extended_event_dr_t
*
dvbpsi_DecodeExtendedEventD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_extended_event_dr_t
*
dvbpsi_decode_dvb_extended_event_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenExtendedEventD
r
* dvbpsi_
gen_dvb_extended_event_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenExtendedEventD
r(
dvbpsi_extended_event_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_extended_event_d
r(
dvbpsi_
dvb_
extended_event_dr_t * p_decoded, bool b_duplicate)
* \brief "short event" descriptor generator.
* \param p_decoded pointer to a decoded "video stream" descriptor structure
* \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenExtendedEventDr
(
dvbpsi
_extended_event_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_extended_event_dr
(
dvbpsi_dvb
_extended_event_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_4f.c
View file @
61277eae
...
...
@@ -40,9 +40,9 @@
#include "dr_4f.h"
/*****************************************************************************
* dvbpsi_
DecodeTimeShiftedEventD
r
* dvbpsi_
decode_dvb_tshifted_ev_d
r
*****************************************************************************/
dvbpsi_
tshifted_ev_dr_t
*
dvbpsi_DecodeTimeShiftedEventD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_
dvb_tshifted_ev_dr_t
*
dvbpsi_decode_dvb_tshifted_ev_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
if
(
p_descriptor
->
i_tag
!=
0x4F
)
return
NULL
;
...
...
@@ -56,8 +56,8 @@ dvbpsi_tshifted_ev_dr_t* dvbpsi_DecodeTimeShiftedEventDr(dvbpsi_descriptor_t * p
return
NULL
;
/* Allocate memory */
dvbpsi_tshifted_ev_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
tshifted_ev_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_tshifted_ev_dr_t
));
dvbpsi_
dvb_
tshifted_ev_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
dvb_tshifted_ev_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_dvb
_tshifted_ev_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -73,9 +73,9 @@ dvbpsi_tshifted_ev_dr_t* dvbpsi_DecodeTimeShiftedEventDr(dvbpsi_descriptor_t * p
}
/*****************************************************************************
* dvbpsi_
GenTimeShiftedEventD
r
* dvbpsi_
gen_dvb_tshifted_ev_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenTimeShiftedEventDr
(
dvbpsi
_tshifted_ev_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_tshifted_ev_dr
(
dvbpsi_dvb
_tshifted_ev_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
dvbpsi_descriptor_t
*
p_descriptor
=
...
...
@@ -94,7 +94,7 @@ dvbpsi_descriptor_t *dvbpsi_GenTimeShiftedEventDr(dvbpsi_tshifted_ev_dr_t * p_de
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_tshifted_ev_dr_t
));
sizeof
(
dvbpsi_
dvb_
tshifted_ev_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_4f.h
View file @
61277eae
...
...
@@ -39,47 +39,47 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_tshifted_ev_dr_t
* dvbpsi_
dvb_
tshifted_ev_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_tshifted_ev_dr_t
* \struct dvbpsi_
dvb_
tshifted_ev_dr_t
* \brief "time shifted event" descriptor structure.
*
* This structure is used to store a decoded "time shifted event"
* descriptor. (ETSI EN 300 468 section 6.2.44).
*/
/*!
* \typedef struct dvbpsi_
tshifted_ev_dr_s dvbpsi
_tshifted_ev_dr_t
* \brief dvbpsi_tshifted_ev_dr_t type definition.
* \typedef struct dvbpsi_
dvb_tshifted_ev_dr_s dvbpsi_dvb
_tshifted_ev_dr_t
* \brief dvbpsi_
dvb_
tshifted_ev_dr_t type definition.
*/
/*!
* \struct dvbpsi_tshifted_ev_dr_s
* \brief struct dvbpsi_
tshifted_ev_dr_s @see dvbpsi
_tshifted_ev_dr_t
* \struct dvbpsi_
dvb_
tshifted_ev_dr_s
* \brief struct dvbpsi_
dvb_tshifted_ev_dr_s @see dvbpsi_dvb
_tshifted_ev_dr_t
*/
typedef
struct
dvbpsi_tshifted_ev_dr_s
typedef
struct
dvbpsi_
dvb_
tshifted_ev_dr_s
{
uint16_t
i_ref_service_id
;
/*!< reference service id */
uint16_t
i_ref_event_id
;
/*!< reference service id */
}
dvbpsi_tshifted_ev_dr_t
;
}
dvbpsi_
dvb_
tshifted_ev_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeTimeShiftedEventD
r
* dvbpsi_
decode_dvb_tshifted_ev_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
tshifted_ev_dr_t * dvbpsi_DecodeTimeShiftedEventD
r(
* \fn dvbpsi_
dvb_tshifted_ev_dr_t * dvbpsi_decode_dvb_tshifted_ev_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "time shifted event" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "time shifted event" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
tshifted_ev_dr_t
*
dvbpsi_DecodeTimeShiftedEventD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_tshifted_ev_dr_t
*
dvbpsi_decode_dvb_tshifted_ev_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenTimeShiftedEventD
r
* dvbpsi_
gen_dvb_tshifted_ev_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t *dvbpsi_
GenTimeShiftedEventDr(dvbpsi
_tshifted_ev_dr_t *p_decoded,
* \fn dvbpsi_descriptor_t *dvbpsi_
gen_dvb_tshifted_ev_dr(dvbpsi_dvb
_tshifted_ev_dr_t *p_decoded,
bool b_duplicate);
* \brief "time shifted event" descriptor generator.
* \param p_decoded pointer to a decoded "time shifted event" descriptor structure
...
...
@@ -87,7 +87,7 @@ dvbpsi_tshifted_ev_dr_t* dvbpsi_DecodeTimeShiftedEventDr(dvbpsi_descriptor_t * p
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenTimeShiftedEventDr
(
dvbpsi
_tshifted_ev_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_tshifted_ev_dr
(
dvbpsi_dvb
_tshifted_ev_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
...
...
src/descriptors/dr_50.c
View file @
61277eae
...
...
@@ -40,9 +40,9 @@
#include "dr_50.h"
/*****************************************************************************
* dvbpsi_
DecodeComponentD
r
* dvbpsi_
decode_dvb_component_d
r
*****************************************************************************/
dvbpsi_
component_dr_t
*
dvbpsi_DecodeComponentD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
dvb_component_dr_t
*
dvbpsi_decode_dvb_component_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
if
(
p_descriptor
->
i_tag
!=
0x50
)
...
...
@@ -57,8 +57,8 @@ dvbpsi_component_dr_t* dvbpsi_DecodeComponentDr(dvbpsi_descriptor_t * p_descript
return
NULL
;
/* Allocate memory */
dvbpsi_component_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
component_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_component_dr_t
));
dvbpsi_
dvb_
component_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
dvb_component_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_dvb
_component_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -90,9 +90,9 @@ dvbpsi_component_dr_t* dvbpsi_DecodeComponentDr(dvbpsi_descriptor_t * p_descript
}
/*****************************************************************************
* dvbpsi_
GenComponentD
r
* dvbpsi_
gen_dvb_component_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenComponentDr
(
dvbpsi
_component_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_component_dr
(
dvbpsi_dvb
_component_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -114,7 +114,7 @@ dvbpsi_descriptor_t *dvbpsi_GenComponentDr(dvbpsi_component_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_component_dr_t
));
sizeof
(
dvbpsi_
dvb_
component_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_50.h
View file @
61277eae
...
...
@@ -39,24 +39,24 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_component_dr_t
* dvbpsi_
dvb_
component_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_component_dr_t
* \struct dvbpsi_
dvb_
component_dr_t
* \brief "Component" descriptor structure.
*
* This structure is used to store a decoded "Component"
* descriptor. (ETSI EN 300 468 section 6.2.8).
*/
/*!
* \typedef struct dvbpsi_
component_dr_s dvbpsi
_component_dr_t
* \brief dvbpsi_component_dr_t type definition.
* \typedef struct dvbpsi_
dvb_component_dr_s dvbpsi_dvb
_component_dr_t
* \brief dvbpsi_
dvb_
component_dr_t type definition.
*/
/*!
* \struct dvbpsi_component_dr_s
* \brief struct dvbpsi_
component_dr_s @see dvbpsi
_component_dr_t
* \struct dvbpsi_
dvb_
component_dr_s
* \brief struct dvbpsi_
dvb_component_dr_s @see dvbpsi_dvb
_component_dr_t
*/
typedef
struct
dvbpsi_component_dr_t
typedef
struct
dvbpsi_
dvb_
component_dr_t
{
uint8_t
i_stream_content
;
/*!< stream content */
uint8_t
i_component_type
;
/*!< component type */
...
...
@@ -65,26 +65,26 @@ typedef struct dvbpsi_component_dr_t
int
i_text_length
;
/*!< text length */
uint8_t
*
i_text
;
/*!< text */
}
dvbpsi_component_dr_t
;
}
dvbpsi_
dvb_
component_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeComponentD
r
* dvbpsi_
decode_dvb_component_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
component_dr_t * dvbpsi_DecodeComponentD
r(
* \fn dvbpsi_
dvb_component_dr_t * dvbpsi_decode_dvb_component_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "Component" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "Component" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
component_dr_t
*
dvbpsi_DecodeComponentD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_component_dr_t
*
dvbpsi_decode_dvb_component_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenComponentD
r
* dvbpsi_
gen_dvb_component_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t *dvbpsi_
GenComponentDr(dvbpsi
_component_dr_t *p_decoded,
* \fn dvbpsi_descriptor_t *dvbpsi_
gen_dvb_component_dr(dvbpsi_dvb
_component_dr_t *p_decoded,
bool b_duplicate);
* \brief "Component" descriptor generator.
* \param p_decoded pointer to a decoded "Component" descriptor structure
...
...
@@ -92,7 +92,7 @@ dvbpsi_component_dr_t* dvbpsi_DecodeComponentDr(dvbpsi_descriptor_t * p_descript
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenComponentDr
(
dvbpsi
_component_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_component_dr
(
dvbpsi_dvb
_component_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
...
...
src/descriptors/dr_52.c
View file @
61277eae
...
...
@@ -41,12 +41,12 @@
/*****************************************************************************
* dvbpsi_
DecodeStreamIdentifierD
r
* dvbpsi_
decode_dvb_stream_identifier_d
r
*****************************************************************************/
dvbpsi_
stream_identifier_dr_t
*
dvbpsi_DecodeStreamIdentifierD
r
(
dvbpsi_
dvb_stream_identifier_dr_t
*
dvbpsi_decode_dvb_stream_identifier_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_stream_identifier_dr_t
*
p_decoded
;
dvbpsi_
dvb_
stream_identifier_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x52
))
...
...
@@ -60,7 +60,7 @@ dvbpsi_stream_identifier_dr_t * dvbpsi_DecodeStreamIdentifierDr(
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
stream_identifier_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_stream_identifier_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_stream_identifier_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_stream_identifier_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -73,10 +73,10 @@ dvbpsi_stream_identifier_dr_t * dvbpsi_DecodeStreamIdentifierDr(
/*****************************************************************************
* dvbpsi_
GenStreamIdentifierD
r
* dvbpsi_
gen_dvb_stream_identifier_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenStreamIdentifierD
r
(
dvbpsi_stream_identifier_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_stream_identifier_d
r
(
dvbpsi_
dvb_
stream_identifier_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -92,7 +92,7 @@ dvbpsi_descriptor_t * dvbpsi_GenStreamIdentifierDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_stream_identifier_dr_t
));
sizeof
(
dvbpsi_
dvb_
stream_identifier_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_52.h
View file @
61277eae
...
...
@@ -40,46 +40,46 @@ extern "C" {
/*****************************************************************************
* dvbpsi_stream_identifier_dr_s
* dvbpsi_
dvb_
stream_identifier_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_stream_identifier_dr_s
* \struct dvbpsi_
dvb_
stream_identifier_dr_s
* \brief "stream identifier" descriptor structure.
*
* This structure is used to store a decoded "stream identifier"
* descriptor. (ETSI EN 300 468 section 6.2.37).
*/
/*!
* \typedef struct dvbpsi_
stream_identifier_dr_s dvbpsi
_stream_identifier_dr_t
* \brief dvbpsi_stream_identifier_dr_t type definition.
* \typedef struct dvbpsi_
dvb_stream_identifier_dr_s dvbpsi_dvb
_stream_identifier_dr_t
* \brief dvbpsi_
dvb_
stream_identifier_dr_t type definition.
*/
typedef
struct
dvbpsi_stream_identifier_dr_s
typedef
struct
dvbpsi_
dvb_
stream_identifier_dr_s
{
uint8_t
i_component_tag
;
/*!< component tag*/
}
dvbpsi_stream_identifier_dr_t
;
}
dvbpsi_
dvb_
stream_identifier_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeStreamIdentifierD
r
* dvbpsi_
decode_dvb_stream_identifier_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
stream_identifier_dr_t * dvbpsi_DecodeStreamIdentifierD
r(
* \fn dvbpsi_
dvb_stream_identifier_dr_t * dvbpsi_decode_dvb_stream_identifier_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "stream identifier" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "stream identifier" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
stream_identifier_dr_t
*
dvbpsi_DecodeStreamIdentifierD
r
(
dvbpsi_
dvb_stream_identifier_dr_t
*
dvbpsi_decode_dvb_stream_identifier_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenStreamIdentifierD
r
* dvbpsi_
gen_dvb_stream_identifier_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenStreamIdentifierD
r(
dvbpsi_stream_identifier_dr_t *p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_stream_identifier_d
r(
dvbpsi_
dvb_
stream_identifier_dr_t *p_decoded, bool b_duplicate)
* \brief "stream identifier" descriptor generator.
* \param p_decoded pointer to a decoded "stream identifier" descriptor
* structure
...
...
@@ -87,8 +87,8 @@ dvbpsi_stream_identifier_dr_t* dvbpsi_DecodeStreamIdentifierDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenStreamIdentifierD
r
(
dvbpsi_stream_identifier_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_stream_identifier_d
r
(
dvbpsi_
dvb_
stream_identifier_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_53.c
View file @
61277eae
...
...
@@ -40,11 +40,11 @@
#include "dr_53.h"
/*****************************************************************************
* dvbpsi_
DecodeCAIdentifierD
r
* dvbpsi_
decode_dvb_ca_identifier_d
r
*****************************************************************************/
dvbpsi_
ca_identifier_dr_t
*
dvbpsi_DecodeCAIdentifierD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
dvb_ca_identifier_dr_t
*
dvbpsi_decode_dvb_ca_identifier_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_ca_identifier_dr_t
*
p_decoded
;
dvbpsi_
dvb_
ca_identifier_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x53
))
...
...
@@ -58,7 +58,7 @@ dvbpsi_ca_identifier_dr_t * dvbpsi_DecodeCAIdentifierDr(dvbpsi_descriptor_t *p_d
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
ca_identifier_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_ca_identifier_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_ca_identifier_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_dvb
_ca_identifier_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -81,9 +81,9 @@ dvbpsi_ca_identifier_dr_t * dvbpsi_DecodeCAIdentifierDr(dvbpsi_descriptor_t *p_d
/*****************************************************************************
* dvbpsi_
GenCAIdentifierD
r
* dvbpsi_
gen_dvb_ca_identifier_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenCAIdentifierDr
(
dvbpsi
_ca_identifier_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_ca_identifier_dr
(
dvbpsi_dvb
_ca_identifier_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_number
>
DVBPSI_CA_SYSTEM_ID_DR_MAX
)
...
...
@@ -106,7 +106,7 @@ dvbpsi_descriptor_t * dvbpsi_GenCAIdentifierDr(dvbpsi_ca_identifier_dr_t *p_deco
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_ca_identifier_dr_t
));
sizeof
(
dvbpsi_
dvb_
ca_identifier_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_53.h
View file @
61277eae
...
...
@@ -60,52 +60,52 @@ typedef struct dvbpsi_ca_system_s
/*!
* \def DVBPSI_CA_SYSTEM_ID_DR_MAX
* \brief Maximum number of dvbpsi_ca_system_t entries present in @see dvbpsi_ca_identifier_dr_t
* \brief Maximum number of dvbpsi_ca_system_t entries present in @see dvbpsi_
dvb_
ca_identifier_dr_t
*/
#define DVBPSI_CA_SYSTEM_ID_DR_MAX 127
/*****************************************************************************
* dvbpsi_ca_identifier_dr_s
* dvbpsi_
dvb_
ca_identifier_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_ca_identifier_dr_s
* \struct dvbpsi_
dvb_
ca_identifier_dr_s
* \brief "CA identifier" descriptor structure.
*
* This structure is used to store a decoded "CA identifier"
* descriptor. (ETSI EN 300 468 section 6.2.5).
*/
/*!
* \typedef struct dvbpsi_
ca_identifier_dr_s dvbpsi
_ca_identifier_dr_t
* \brief dvbpsi_ca_identifier_dr_t type definition.
* \typedef struct dvbpsi_
dvb_ca_identifier_dr_s dvbpsi_dvb
_ca_identifier_dr_t
* \brief dvbpsi_
dvb_
ca_identifier_dr_t type definition.
*/
typedef
struct
dvbpsi_ca_identifier_dr_s
typedef
struct
dvbpsi_
dvb_
ca_identifier_dr_s
{
uint8_t
i_number
;
/*!< number of CA system identifiers */
dvbpsi_ca_system_t
p_system
[
DVBPSI_CA_SYSTEM_ID_DR_MAX
];
/*!< CA system identifiers */
}
dvbpsi_ca_identifier_dr_t
;
}
dvbpsi_
dvb_
ca_identifier_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeCAIdentifierD
r
* dvbpsi_
decode_dvb_ca_identifier_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_da_identifier_dr_t * dvbpsi_
DecodeCAIdentifierD
r(
* \fn dvbpsi_da_identifier_dr_t * dvbpsi_
decode_dvb_ca_identifier_d
r(
dvbpsi_descriptor_t *p_descriptor)
* \brief "DA identifier" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "CA identifier" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
ca_identifier_dr_t
*
dvbpsi_DecodeCAIdentifierD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_ca_identifier_dr_t
*
dvbpsi_decode_dvb_ca_identifier_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenStreamIdentifierD
r
* dvbpsi_
gen_dvb_stream_identifier_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t *dvbpsi_
GenCAIdentifierD
r(
dvbpsi_ca_identifier_dr_t *p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t *dvbpsi_
gen_dvb_ca_identifier_d
r(
dvbpsi_
dvb_
ca_identifier_dr_t *p_decoded, bool b_duplicate)
* \brief "CA identifier" descriptor generator.
* \param p_decoded pointer to a decoded "CA identifier" descriptor
* structure
...
...
@@ -113,7 +113,7 @@ dvbpsi_ca_identifier_dr_t* dvbpsi_DecodeCAIdentifierDr(dvbpsi_descriptor_t *p_de
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenCAIdentifierDr
(
dvbpsi
_ca_identifier_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_ca_identifier_dr
(
dvbpsi_dvb
_ca_identifier_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_54.c
View file @
61277eae
...
...
@@ -40,9 +40,9 @@
/*****************************************************************************
* dvbpsi_
DecodeContentD
r
* dvbpsi_
decode_dvb_content_d
r
*****************************************************************************/
dvbpsi_
content_dr_t
*
dvbpsi_DecodeContentD
r
(
dvbpsi_
dvb_content_dr_t
*
dvbpsi_decode_dvb_content_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
...
...
@@ -58,8 +58,8 @@ dvbpsi_content_dr_t * dvbpsi_DecodeContentDr(
return
NULL
;
/* Allocate memory */
dvbpsi_content_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
content_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_content_dr_t
));
dvbpsi_
dvb_
content_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
dvb_content_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_content_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -81,10 +81,10 @@ dvbpsi_content_dr_t * dvbpsi_DecodeContentDr(
/*****************************************************************************
* dvbpsi_
GenContentD
r
* dvbpsi_
gen_dvb_content_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenContentD
r
(
dvbpsi_content_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_content_d
r
(
dvbpsi_
dvb_
content_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_contents_number
>
DVBPSI_CONTENT_DR_MAX
)
...
...
@@ -109,7 +109,7 @@ dvbpsi_descriptor_t * dvbpsi_GenContentDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_content_dr_t
));
sizeof
(
dvbpsi_
dvb_
content_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_54.h
View file @
61277eae
...
...
@@ -194,44 +194,44 @@ typedef struct dvbpsi_content_s
/*!
* \def DVBPSI_CONTENT_DR_MAX
* \brief Maximum number of dvbps_content_t entries present in @see dvbpsi_content_dr_t
* \brief Maximum number of dvbps_content_t entries present in @see dvbpsi_
dvb_
content_dr_t
*/
#define DVBPSI_CONTENT_DR_MAX 64
/*****************************************************************************
* dvbpsi_content_dr_t
* dvbpsi_
dvb_
content_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_content_dr_s
* \struct dvbpsi_
dvb_
content_dr_s
* \brief "content" descriptor structure.
*
* This structure is used to store a decoded "content"
* descriptor. (ETSI EN 300 468 section 6.2.9).
*/
/*!
* \typedef struct dvbpsi_
content_dr_s dvbpsi
_content_dr_t
* \brief dvbpsi_content_dr_t type definition.
* \typedef struct dvbpsi_
dvb_content_dr_s dvbpsi_dvb
_content_dr_t
* \brief dvbpsi_
dvb_
content_dr_t type definition.
*/
typedef
struct
dvbpsi_content_dr_s
typedef
struct
dvbpsi_
dvb_
content_dr_s
{
uint8_t
i_contents_number
;
/*!< number of content */
dvbpsi_content_t
p_content
[
DVBPSI_CONTENT_DR_MAX
];
/*!< parental rating table */
}
dvbpsi_content_dr_t
;
}
dvbpsi_
dvb_
content_dr_t
;
/*****************************************************************************
* dvbpsi_DecodeContentDataDr
*****************************************************************************/
/*!
* \fn dvbpsi_
content_dr_t * dvbpsi_DecodeContentD
r(
* \fn dvbpsi_
dvb_content_dr_t * dvbpsi_decode_dvb_content_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "content" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "content" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
content_dr_t
*
dvbpsi_DecodeContentD
r
(
dvbpsi_
dvb_content_dr_t
*
dvbpsi_decode_dvb_content_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
...
...
@@ -239,8 +239,8 @@ dvbpsi_content_dr_t* dvbpsi_DecodeContentDr(
* dvbpsi_GenContentDataDr
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenContentD
r(
dvbpsi_content_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_content_d
r(
dvbpsi_
dvb_
content_dr_t * p_decoded, bool b_duplicate)
* \brief "content" descriptor generator.
* \param p_decoded pointer to a decoded "content" descriptor
* structure
...
...
@@ -248,8 +248,8 @@ dvbpsi_content_dr_t* dvbpsi_DecodeContentDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenContentD
r
(
dvbpsi_content_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_content_d
r
(
dvbpsi_
dvb_
content_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_55.c
View file @
61277eae
...
...
@@ -42,9 +42,9 @@
/*****************************************************************************
* dvbpsi_
DecodeParentalRatingD
r
* dvbpsi_
decode_dvb_parental_rating_d
r
*****************************************************************************/
dvbpsi_
parental_rating_dr_t
*
dvbpsi_DecodeParentalRatingD
r
(
dvbpsi_
dvb_parental_rating_dr_t
*
dvbpsi_decode_dvb_parental_rating_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
...
...
@@ -60,8 +60,8 @@ dvbpsi_parental_rating_dr_t * dvbpsi_DecodeParentalRatingDr(
return
NULL
;
/* Allocate memory */
dvbpsi_parental_rating_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
parental_rating_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_parental_rating_dr_t
));
dvbpsi_
dvb_
parental_rating_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
dvb_parental_rating_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_parental_rating_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -87,10 +87,10 @@ dvbpsi_parental_rating_dr_t * dvbpsi_DecodeParentalRatingDr(
/*****************************************************************************
* dvbpsi_
GenParentalRatingD
r
* dvbpsi_
gen_dvb_parental_rating_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenParentalRatingD
r
(
dvbpsi_parental_rating_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_parental_rating_d
r
(
dvbpsi_
dvb_
parental_rating_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
uint8_t
i_length
;
...
...
@@ -128,7 +128,7 @@ dvbpsi_descriptor_t * dvbpsi_GenParentalRatingDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_parental_rating_dr_t
));
sizeof
(
dvbpsi_
dvb_
parental_rating_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_55.h
View file @
61277eae
...
...
@@ -66,40 +66,40 @@ typedef struct dvbpsi_parental_rating_s
#define DVBPSI_PARENTAL_RATING_DR_MAX 64
/*****************************************************************************
* dvbpsi_parental_rating_dr_t
* dvbpsi_
dvb_
parental_rating_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_parental_rating_dr_s
* \struct dvbpsi_
dvb_
parental_rating_dr_s
* \brief "parental_rating" descriptor structure.
*
* This structure is used to store a decoded "parental_rating"
* descriptor. (ETSI EN 300 468 section 6.2.26).
*/
/*!
* \typedef struct dvbpsi_
parental_rating_dr_s dvbpsi
_parental_rating_dr_t
* \brief dvbpsi_parental_rating_dr_t type definition.
* \typedef struct dvbpsi_
dvb_parental_rating_dr_s dvbpsi_dvb
_parental_rating_dr_t
* \brief dvbpsi_
dvb_
parental_rating_dr_t type definition.
*/
typedef
struct
dvbpsi_parental_rating_dr_s
typedef
struct
dvbpsi_
dvb_
parental_rating_dr_s
{
uint8_t
i_ratings_number
;
/*!< number of rating */
dvbpsi_parental_rating_t
p_parental_rating
[
DVBPSI_PARENTAL_RATING_DR_MAX
];
/*!< parental rating table */
}
dvbpsi_parental_rating_dr_t
;
}
dvbpsi_
dvb_
parental_rating_dr_t
;
/*****************************************************************************
* dvbpsi_DecodeParentalRatingDataDr
*****************************************************************************/
/*!
* \fn dvbpsi_
parental_rating_dr_t * dvbpsi_DecodeParentalRatingD
r(
* \fn dvbpsi_
dvb_parental_rating_dr_t * dvbpsi_decode_dvb_parental_rating_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "parental_rating" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "parental_rating" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
parental_rating_dr_t
*
dvbpsi_DecodeParentalRatingD
r
(
dvbpsi_
dvb_parental_rating_dr_t
*
dvbpsi_decode_dvb_parental_rating_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
...
...
@@ -107,8 +107,8 @@ dvbpsi_parental_rating_dr_t* dvbpsi_DecodeParentalRatingDr(
* dvbpsi_GenParentalRatingDataDr
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenParentalRatingD
r(
dvbpsi_parental_rating_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_parental_rating_d
r(
dvbpsi_
dvb_
parental_rating_dr_t * p_decoded, bool b_duplicate)
* \brief "parental_rating" descriptor generator.
* \param p_decoded pointer to a decoded "parental_rating" descriptor
* structure
...
...
@@ -116,8 +116,8 @@ dvbpsi_parental_rating_dr_t* dvbpsi_DecodeParentalRatingDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenParentalRatingD
r
(
dvbpsi_parental_rating_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_parental_rating_d
r
(
dvbpsi_
dvb_
parental_rating_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_56.c
View file @
61277eae
...
...
@@ -41,9 +41,9 @@
#include "dr_56.h"
/*****************************************************************************
* dvbpsi_
DecodeTeletextD
r
* dvbpsi_
decode_dvb_teletext_d
r
*****************************************************************************/
dvbpsi_
teletext_dr_t
*
dvbpsi_DecodeTeletextD
r
(
dvbpsi_
dvb_teletext_dr_t
*
dvbpsi_decode_dvb_teletext_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
...
...
@@ -63,8 +63,8 @@ dvbpsi_teletext_dr_t * dvbpsi_DecodeTeletextDr(
return
NULL
;
/* Allocate memory */
dvbpsi_teletext_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
teletext_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_teletext_dr_t
));
dvbpsi_
dvb_
teletext_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
dvb_teletext_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_teletext_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -95,9 +95,9 @@ dvbpsi_teletext_dr_t * dvbpsi_DecodeTeletextDr(
/*****************************************************************************
* dvbpsi_
GenTeletextD
r
* dvbpsi_
gen_dvb_teletext_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenTeletextDr
(
dvbpsi
_teletext_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_teletext_dr
(
dvbpsi_dvb
_teletext_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_pages_number
>
DVBPSI_TELETEXT_DR_MAX
)
...
...
@@ -129,7 +129,7 @@ dvbpsi_descriptor_t * dvbpsi_GenTeletextDr(dvbpsi_teletext_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_teletext_dr_t
));
sizeof
(
dvbpsi_
dvb_
teletext_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_56.h
View file @
61277eae
...
...
@@ -65,52 +65,52 @@ typedef struct dvbpsi_teletextpage_s
/*!
* \def DVBPSI_TELETEXT_DR_MAX
* \brief Maximum number of dvbpsi_teletextpage_t entries present in
* @see dvbpsi_teletext_dr_t
* @see dvbpsi_
dvb_
teletext_dr_t
*/
#define DVBPSI_TELETEXT_DR_MAX 51
/*****************************************************************************
* dvbpsi_teletext_dr_t
* dvbpsi_
dvb_
teletext_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_teletext_dr_s
* \struct dvbpsi_
dvb_
teletext_dr_s
* \brief "teletext" descriptor structure.
*
* This structure is used to store a decoded "teletext"
* descriptor. (ETSI EN 300 468 version 1.7.1 section 6.2.42 and 6.2.47).
*/
/*!
* \typedef struct dvbpsi_
teletext_dr_s dvbpsi
_teletext_dr_t
* \brief dvbpsi_teletext_dr_t type definition.
* \typedef struct dvbpsi_
dvb_teletext_dr_s dvbpsi_dvb
_teletext_dr_t
* \brief dvbpsi_
dvb_
teletext_dr_t type definition.
*/
typedef
struct
dvbpsi_teletext_dr_s
typedef
struct
dvbpsi_
dvb_
teletext_dr_s
{
uint8_t
i_pages_number
;
/*!< number of pages */
dvbpsi_teletextpage_t
p_pages
[
DVBPSI_TELETEXT_DR_MAX
];
/*!< teletext pages */
}
dvbpsi_teletext_dr_t
;
}
dvbpsi_
dvb_
teletext_dr_t
;
/*****************************************************************************
* dvbpsi_DecodeTeletextDataDr
*****************************************************************************/
/*!
* \fn dvbpsi_
teletext_dr_t * dvbpsi_DecodeTeletextD
r(
* \fn dvbpsi_
dvb_teletext_dr_t * dvbpsi_decode_dvb_teletext_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "teletext" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "teletext" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
teletext_dr_t
*
dvbpsi_DecodeTeletextD
r
(
dvbpsi_
dvb_teletext_dr_t
*
dvbpsi_decode_dvb_teletext_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenTeletextD
r
* dvbpsi_
gen_dvb_teletext_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenTeletextD
r(
dvbpsi_teletext_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_teletext_d
r(
dvbpsi_
dvb_
teletext_dr_t * p_decoded, bool b_duplicate)
* \brief "teletext" descriptor generator.
* \param p_decoded pointer to a decoded "teletext" descriptor
* structure
...
...
@@ -118,8 +118,8 @@ dvbpsi_teletext_dr_t* dvbpsi_DecodeTeletextDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenTeletextD
r
(
dvbpsi_teletext_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_teletext_d
r
(
dvbpsi_
dvb_
teletext_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_58.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@
/*****************************************************************************
* dvbpsi_
DecodeLocalTimeOffsetD
r
* dvbpsi_
decode_dvb_local_time_offset_d
r
*****************************************************************************/
dvbpsi_
local_time_offset_dr_t
*
dvbpsi_DecodeLocalTimeOffsetD
r
(
dvbpsi_
dvb_local_time_offset_dr_t
*
dvbpsi_decode_dvb_local_time_offset_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_local_time_offset_dr_t
*
p_decoded
;
dvbpsi_
dvb_
local_time_offset_dr_t
*
p_decoded
;
uint8_t
*
p_data
,
*
p_end
;
dvbpsi_local_time_offset_t
*
p_current
;
...
...
@@ -60,7 +60,7 @@ dvbpsi_local_time_offset_dr_t * dvbpsi_DecodeLocalTimeOffsetDr(
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
local_time_offset_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_local_time_offset_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_local_time_offset_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_local_time_offset_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -100,10 +100,10 @@ dvbpsi_local_time_offset_dr_t * dvbpsi_DecodeLocalTimeOffsetDr(
}
/*****************************************************************************
* dvbpsi_
GenLocalTimeOffsetD
r
* dvbpsi_
gen_dvb_local_time_offset_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenLocalTimeOffsetD
r
(
dvbpsi_local_time_offset_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_local_time_offset_d
r
(
dvbpsi_
dvb_
local_time_offset_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_local_time_offsets_number
>
DVBPSI_LOCAL_TIME_OFFSET_DR_MAX
)
...
...
@@ -147,7 +147,7 @@ dvbpsi_descriptor_t * dvbpsi_GenLocalTimeOffsetDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_local_time_offset_dr_t
));
sizeof
(
dvbpsi_
dvb_
local_time_offset_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_58.h
View file @
61277eae
...
...
@@ -68,53 +68,53 @@ typedef struct dvbpsi_local_time_offset_s
/*!
* \def DVBPSI_LOCAL_TIME_OFFSET_DR_MAX
* \brief Maximum number of dvbpsi_local_time_offset_t entries present in
* @see dvbpsi_local_time_offset_dr_t
* @see dvbpsi_
dvb_
local_time_offset_dr_t
*/
#define DVBPSI_LOCAL_TIME_OFFSET_DR_MAX 19
/*****************************************************************************
* dvbpsi_local_time_offset_dr_t
* dvbpsi_
dvb_
local_time_offset_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_local_time_offset_dr_s
* \struct dvbpsi_
dvb_
local_time_offset_dr_s
* \brief "local time offset" descriptor structure.
*
* This structure is used to store a decoded "local time offset"
* descriptor. (ETSI EN 300 468 section 6.2.19).
*/
/*!
* \typedef struct dvbpsi_
local_time_offset_dr_s dvbpsi
_local_time_offset_dr_t
* \brief dvbpsi_local_time_offset_dr_t type definition.
* \typedef struct dvbpsi_
dvb_local_time_offset_dr_s dvbpsi_dvb
_local_time_offset_dr_t
* \brief dvbpsi_
dvb_
local_time_offset_dr_t type definition.
*/
typedef
struct
dvbpsi_local_time_offset_dr_s
typedef
struct
dvbpsi_
dvb_
local_time_offset_dr_s
{
uint8_t
i_local_time_offsets_number
;
/*!< local time offset number */
dvbpsi_local_time_offset_t
p_local_time_offset
[
DVBPSI_LOCAL_TIME_OFFSET_DR_MAX
];
/*!< local time offset */
}
dvbpsi_local_time_offset_dr_t
;
}
dvbpsi_
dvb_
local_time_offset_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeLocalTimeOffsetD
r
* dvbpsi_
decode_dvb_local_time_offset_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
local_time_offset_dr_t * dvbpsi_DecodeLocalTimeOffsetD
r(
* \fn dvbpsi_
dvb_local_time_offset_dr_t * dvbpsi_decode_dvb_local_time_offset_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "local time offset" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "local time offset" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
local_time_offset_dr_t
*
dvbpsi_DecodeLocalTimeOffsetD
r
(
dvbpsi_
dvb_local_time_offset_dr_t
*
dvbpsi_decode_dvb_local_time_offset_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenLocalTimeOffsetD
r
* dvbpsi_
gen_dvb_local_time_offset_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenLocalTimeOffsetD
r(
dvbpsi_local_time_offset_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_local_time_offset_d
r(
dvbpsi_
dvb_
local_time_offset_dr_t * p_decoded, bool b_duplicate)
* \brief "local time offset" descriptor generator.
* \param p_decoded pointer to a decoded "local time offset" descriptor
* structure
...
...
@@ -122,8 +122,8 @@ dvbpsi_local_time_offset_dr_t* dvbpsi_DecodeLocalTimeOffsetDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenLocalTimeOffsetD
r
(
dvbpsi_local_time_offset_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_local_time_offset_d
r
(
dvbpsi_
dvb_
local_time_offset_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_59.c
View file @
61277eae
...
...
@@ -43,13 +43,13 @@
/*****************************************************************************
* dvbpsi_
DecodeSubtitlingD
r
* dvbpsi_
decode_dvb_subtitling_d
r
*****************************************************************************/
dvbpsi_
subtitling_dr_t
*
dvbpsi_DecodeSubtitlingD
r
(
dvbpsi_
dvb_subtitling_dr_t
*
dvbpsi_decode_dvb_subtitling_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
int
i_subtitles_number
;
dvbpsi_subtitling_dr_t
*
p_decoded
;
dvbpsi_
dvb_
subtitling_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x59
))
...
...
@@ -67,7 +67,7 @@ dvbpsi_subtitling_dr_t * dvbpsi_DecodeSubtitlingDr(
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
subtitling_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_subtitling_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_subtitling_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_subtitling_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -100,10 +100,10 @@ dvbpsi_subtitling_dr_t * dvbpsi_DecodeSubtitlingDr(
/*****************************************************************************
* dvbpsi_
GenSubtitlingD
r
* dvbpsi_
gen_dvb_subtitling_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenSubtitlingD
r
(
dvbpsi_subtitling_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_subtitling_d
r
(
dvbpsi_
dvb_
subtitling_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_subtitles_number
>
DVBPSI_SUBTITLING_DR_MAX
)
...
...
@@ -141,7 +141,7 @@ dvbpsi_descriptor_t * dvbpsi_GenSubtitlingDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_subtitling_dr_t
));
sizeof
(
dvbpsi_
dvb_
subtitling_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_59.h
View file @
61277eae
...
...
@@ -64,44 +64,44 @@ typedef struct dvbpsi_subtitle_s
/*!
* \def DVBPSI_SUBTITLING_DR_MAX
* \brief Maximum number of dvbpsi_subtitle_t entries present in
* @see dvbpsi_subtitling_dr_t
* @see dvbpsi_
dvb_
subtitling_dr_t
*/
#define DVBPSI_SUBTITLING_DR_MAX 20
/*****************************************************************************
* dvbpsi_subtitling_dr_t
* dvbpsi_
dvb_
subtitling_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_subtitling_dr_s
* \struct dvbpsi_
dvb_
subtitling_dr_s
* \brief "subtitling" descriptor structure.
*
* This structure is used to store a decoded "subtitling"
* descriptor. (ETSI EN 300 468 section 6.2.30).
*/
/*!
* \typedef struct dvbpsi_
subtitling_dr_s dvbpsi
_subtitling_dr_t
* \brief dvbpsi_subtitling_dr_t type definition.
* \typedef struct dvbpsi_
dvb_subtitling_dr_s dvbpsi_dvb
_subtitling_dr_t
* \brief dvbpsi_
dvb_
subtitling_dr_t type definition.
*/
typedef
struct
dvbpsi_subtitling_dr_s
typedef
struct
dvbpsi_
dvb_
subtitling_dr_s
{
uint8_t
i_subtitles_number
;
/*!< subtiles number */
dvbpsi_subtitle_t
p_subtitle
[
DVBPSI_SUBTITLING_DR_MAX
];
/*!< subtitles */
}
dvbpsi_subtitling_dr_t
;
}
dvbpsi_
dvb_
subtitling_dr_t
;
/*****************************************************************************
* dvbpsi_DecodeSubtitlingDataDr
*****************************************************************************/
/*!
* \fn dvbpsi_
subtitling_dr_t * dvbpsi_DecodeSubtitlingD
r(
* \fn dvbpsi_
dvb_subtitling_dr_t * dvbpsi_decode_dvb_subtitling_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "subtitling" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "subtitling" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
subtitling_dr_t
*
dvbpsi_DecodeSubtitlingD
r
(
dvbpsi_
dvb_subtitling_dr_t
*
dvbpsi_decode_dvb_subtitling_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
...
...
@@ -109,8 +109,8 @@ dvbpsi_subtitling_dr_t* dvbpsi_DecodeSubtitlingDr(
* dvbpsi_GenSubtitlingDataDr
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenSubtitlingD
r(
dvbpsi_subtitling_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_subtitling_d
r(
dvbpsi_
dvb_
subtitling_dr_t * p_decoded, bool b_duplicate)
* \brief "subtitling" descriptor generator.
* \param p_decoded pointer to a decoded "subtitling" descriptor
* structure
...
...
@@ -118,8 +118,8 @@ dvbpsi_subtitling_dr_t* dvbpsi_DecodeSubtitlingDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenSubtitlingD
r
(
dvbpsi_subtitling_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_subtitling_d
r
(
dvbpsi_
dvb_
subtitling_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_5a.c
View file @
61277eae
...
...
@@ -42,9 +42,9 @@
/*****************************************************************************
* dvbpsi_
DecodeTerrDelivSysD
r
* dvbpsi_
decode_dvb_terr_deliv_sys_d
r
*****************************************************************************/
dvbpsi_
terr_deliv_sys_dr_t
*
dvbpsi_DecodeTerrDelivSysD
r
(
dvbpsi_
dvb_terr_deliv_sys_dr_t
*
dvbpsi_decode_dvb_terr_deliv_sys_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
...
...
@@ -56,8 +56,8 @@ dvbpsi_terr_deliv_sys_dr_t * dvbpsi_DecodeTerrDelivSysDr(
return
p_descriptor
->
p_decoded
;
/* Allocate memory */
dvbpsi_terr_deliv_sys_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
terr_deliv_sys_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_terr_deliv_sys_dr_t
));
dvbpsi_
dvb_
terr_deliv_sys_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
dvb_terr_deliv_sys_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_terr_deliv_sys_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -84,10 +84,10 @@ dvbpsi_terr_deliv_sys_dr_t * dvbpsi_DecodeTerrDelivSysDr(
}
/*****************************************************************************
* dvbpsi_
GenTerrDelivSysD
r
* dvbpsi_
gen_dvb_terr_deliv_sys_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenTerrDelivSysD
r
(
dvbpsi_terr_deliv_sys_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_terr_deliv_sys_d
r
(
dvbpsi_
dvb_
terr_deliv_sys_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -122,7 +122,7 @@ dvbpsi_descriptor_t * dvbpsi_GenTerrDelivSysDr(
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_terr_deliv_sys_dr_t
));
sizeof
(
dvbpsi_
dvb_
terr_deliv_sys_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_5a.h
View file @
61277eae
...
...
@@ -41,20 +41,20 @@ extern "C" {
/*****************************************************************************
* dvbpsi_terr_deliv_sys_dr_t
* dvbpsi_
dvb_
terr_deliv_sys_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_terr_deliv_sys_dr_s
* \struct dvbpsi_
dvb_
terr_deliv_sys_dr_s
* \brief terrestrial delivery system descriptor structure.
*
* This structure is used to store a decoded terrestrial delivery system
* descriptor. (ETSI EN 300 468 section 6.2.13.4).
*/
/*!
* \typedef struct dvbpsi_
terr_deliv_sys_dr_s dvbpsi
_terr_deliv_sys_dr_t
* \brief dvbpsi_terr_deliv_sys_dr_t type definition.
* \typedef struct dvbpsi_
dvb_terr_deliv_sys_dr_s dvbpsi_dvb
_terr_deliv_sys_dr_t
* \brief dvbpsi_
dvb_
terr_deliv_sys_dr_t type definition.
*/
typedef
struct
dvbpsi_terr_deliv_sys_dr_s
typedef
struct
dvbpsi_
dvb_
terr_deliv_sys_dr_s
{
uint32_t
i_centre_frequency
;
/*!< centre frequency */
uint8_t
i_bandwidth
;
/*!< bandwidth */
...
...
@@ -69,30 +69,30 @@ typedef struct dvbpsi_terr_deliv_sys_dr_s
uint8_t
i_transmission_mode
;
/*!< transmission_mode */
uint8_t
i_other_frequency_flag
;
/*!< other_frequency_flag */
}
dvbpsi_terr_deliv_sys_dr_t
;
}
dvbpsi_
dvb_
terr_deliv_sys_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeTerrDelivSysD
r
* dvbpsi_
decode_dvb_terr_deliv_sys_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
terr_deliv_sys_dr_t * dvbpsi_DecodeTerrDelivSysD
r(
* \fn dvbpsi_
dvb_terr_deliv_sys_dr_t * dvbpsi_decode_dvb_terr_deliv_sys_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief terrestrial delivery system descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new terrestrial delivery system descriptor structure
* which contains the decoded data.
*/
dvbpsi_
terr_deliv_sys_dr_t
*
dvbpsi_DecodeTerrDelivSysD
r
(
dvbpsi_
dvb_terr_deliv_sys_dr_t
*
dvbpsi_decode_dvb_terr_deliv_sys_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenTerrDelivSysD
r
* dvbpsi_
gen_dvb_terr_deliv_sys_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenTerrDelivSysD
r(
dvbpsi_terr_deliv_sys_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_terr_deliv_sys_d
r(
dvbpsi_
dvb_
terr_deliv_sys_dr_t * p_decoded, bool b_duplicate)
* \brief terrestrial delivery system descriptor generator.
* \param p_decoded pointer to a decoded terrestrial delivery system descriptor
* descriptor structure
...
...
@@ -100,8 +100,8 @@ dvbpsi_terr_deliv_sys_dr_t* dvbpsi_DecodeTerrDelivSysDr(
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenTerrDelivSysD
r
(
dvbpsi_terr_deliv_sys_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_terr_deliv_sys_d
r
(
dvbpsi_
dvb_
terr_deliv_sys_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_62.c
View file @
61277eae
...
...
@@ -40,11 +40,11 @@ Decode Frequency List Descriptor.
#include "dr_62.h"
/*****************************************************************************
* dvbpsi_
DecodeFrequencyListD
r
* dvbpsi_
decode_dvb_frequency_list_d
r
*****************************************************************************/
dvbpsi_
frequency_list_dr_t
*
dvbpsi_DecodeFrequencyListD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
dvb_frequency_list_dr_t
*
dvbpsi_decode_dvb_frequency_list_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_frequency_list_dr_t
*
p_decoded
;
dvbpsi_
dvb_
frequency_list_dr_t
*
p_decoded
;
int
i
;
/* Check the tag */
if
(
p_descriptor
->
i_tag
!=
0x62
)
...
...
@@ -58,7 +58,7 @@ dvbpsi_frequency_list_dr_t *dvbpsi_DecodeFrequencyListDr(dvbpsi_descriptor_t *p_
if
((
p_descriptor
->
i_length
-
1
)
%
4
)
return
NULL
;
p_decoded
=
(
dvbpsi_
frequency_list_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_frequency_list_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_frequency_list_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_frequency_list_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
src/descriptors/dr_62.h
View file @
61277eae
...
...
@@ -35,37 +35,37 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_frequency_list_dr_s
* dvbpsi_
dvb_
frequency_list_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_frequency_list_dr_s
* \struct dvbpsi_
dvb_
frequency_list_dr_s
* \brief Frequency List Descriptor
*
* This structure is used to store a decoded Frequency List descriptor.
*/
/*!
* \typedef struct dvbpsi_
frequency_list_dr_s dvbpsi
_frequency_list_dr_t
* \brief dvbpsi_frequency_list_dr_t type definition.
* \typedef struct dvbpsi_
dvb_frequency_list_dr_s dvbpsi_dvb
_frequency_list_dr_t
* \brief dvbpsi_
dvb_
frequency_list_dr_t type definition.
*/
typedef
struct
dvbpsi_frequency_list_dr_s
typedef
struct
dvbpsi_
dvb_
frequency_list_dr_s
{
uint8_t
i_coding_type
;
/*!< Coding type, 1 = Satellite, 2 = Cable, 3 = Terrestrial */
uint8_t
i_number_of_frequencies
;
/*!< Number of center frequencies present */
uint32_t
p_center_frequencies
[
63
];
/*!< Center frequency as defined by a delivery_system_descriptor */
}
dvbpsi_frequency_list_dr_t
;
}
dvbpsi_
dvb_
frequency_list_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeFrequencyListD
r
* dvbpsi_
decode_dvb_frequency_list_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
frequency_list_dr_t *dvbpsi_DecodeFrequencyListD
r(
* \fn dvbpsi_
dvb_frequency_list_dr_t *dvbpsi_decode_dvb_frequency_list_d
r(
* dvbpsi_descriptor_t *p_descriptor)
* \brief Decode a Frequency List descriptor (tag 0x62)
* \param p_descriptor Raw descriptor to decode.
* \return NULL if the descriptor could not be decoded or a pointer to a
* dvbpsi_frequency_list_dr_t structure.
* dvbpsi_
dvb_
frequency_list_dr_t structure.
*/
dvbpsi_
frequency_list_dr_t
*
dvbpsi_DecodeFrequencyListD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_frequency_list_dr_t
*
dvbpsi_decode_dvb_frequency_list_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_Bcd8ToUint32
...
...
src/descriptors/dr_66.c
View file @
61277eae
...
...
@@ -39,29 +39,29 @@ Decode Data Broadcast Id Descriptor.
#include "dr_66.h"
static
dvbpsi_data_broadcast_id_dr_t
*
NewDataBroadcastDr
(
const
size_t
i_private
)
static
dvbpsi_d
vb_d
ata_broadcast_id_dr_t
*
NewDataBroadcastDr
(
const
size_t
i_private
)
{
dvbpsi_data_broadcast_id_dr_t
*
p_bcast
;
dvbpsi_d
vb_d
ata_broadcast_id_dr_t
*
p_bcast
;
if
(
i_private
<=
0
)
return
NULL
;
p_bcast
=
(
dvbpsi_data_broadcast_id_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_data_broadcast_id_dr_t
)
+
i_private
);
p_bcast
=
(
dvbpsi_d
vb_d
ata_broadcast_id_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_d
vb_d
ata_broadcast_id_dr_t
)
+
i_private
);
if
(
p_bcast
)
{
p_bcast
->
p_id_selector
=
((
uint8_t
*
)
p_bcast
+
sizeof
(
dvbpsi_data_broadcast_id_dr_t
));
p_bcast
->
p_id_selector
=
((
uint8_t
*
)
p_bcast
+
sizeof
(
dvbpsi_d
vb_d
ata_broadcast_id_dr_t
));
p_bcast
->
i_id_selector_len
=
i_private
;
}
return
p_bcast
;
}
/*****************************************************************************
* dvbpsi_
DecodeDataBroadcastIdD
r
* dvbpsi_
decode_dvb_data_broadcast_id_d
r
*****************************************************************************/
dvbpsi_d
ata_broadcast_id_dr_t
*
dvbpsi_DecodeDataBroadcastIdD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_d
vb_data_broadcast_id_dr_t
*
dvbpsi_decode_dvb_data_broadcast_id_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_data_broadcast_id_dr_t
*
p_decoded
;
dvbpsi_d
vb_d
ata_broadcast_id_dr_t
*
p_decoded
;
/* Check the tag */
if
(
p_descriptor
->
i_tag
!=
0x66
)
...
...
src/descriptors/dr_66.h
View file @
61277eae
...
...
@@ -31,38 +31,38 @@ Decode Data Broadcast id Descriptor.
#define _DR_66_H
/*****************************************************************************
* dvbpsi_data_broadcast_id_dr_s
* dvbpsi_d
vb_d
ata_broadcast_id_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_data_broadcast_id_dr_s
* \struct dvbpsi_d
vb_d
ata_broadcast_id_dr_s
* \brief Data Broadcast id Descriptor
*
* This structure is used to store a decoded Data Broadcast id descriptor.
*/
/*!
* \typedef struct dvbpsi_d
ata_broadcast_id_dr_s dvbpsi
_data_broadcast_id_dr_t
* \brief dvbpsi_data_broadcast_id_dr_t type definition.
* \typedef struct dvbpsi_d
vb_data_broadcast_id_dr_s dvbpsi_dvb
_data_broadcast_id_dr_t
* \brief dvbpsi_d
vb_d
ata_broadcast_id_dr_t type definition.
*/
typedef
struct
dvbpsi_data_broadcast_id_dr_s
typedef
struct
dvbpsi_d
vb_d
ata_broadcast_id_dr_s
{
uint16_t
i_data_broadcast_id
;
/*!< broadcast identifier */
uint8_t
i_id_selector_len
;
/*!< length of selector data in bytes */
uint8_t
*
p_id_selector
;
/*!< pointer to selector data. Memory is allocated
right after sizeof struct, when freeing this
struct the private data is freed at the same time. */
}
dvbpsi_data_broadcast_id_dr_t
;
}
dvbpsi_d
vb_d
ata_broadcast_id_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeDataBroadcastIdD
r
* dvbpsi_
decode_dvb_data_broadcast_id_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_d
ata_broadcast_id_dr_t *dvbpsi_DecodeDataBroadcastIdD
r(
* \fn dvbpsi_d
vb_data_broadcast_id_dr_t *dvbpsi_decode_dvb_data_broadcast_id_d
r(
* dvbpsi_descriptor_t *p_descriptor)
* \brief Decode a Data broadcast id descriptor (tag 0x66)
* \param p_descriptor Raw descriptor to decode.
* \return NULL if the descriptor could not be decoded or a pointer to a
* dvbpsi_data_broadcast_id_dr_t structure.
* dvbpsi_d
vb_d
ata_broadcast_id_dr_t structure.
*/
dvbpsi_d
ata_broadcast_id_dr_t
*
dvbpsi_DecodeDataBroadcastIdD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_d
vb_data_broadcast_id_dr_t
*
dvbpsi_decode_dvb_data_broadcast_id_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
#endif
src/descriptors/dr_69.c
View file @
61277eae
...
...
@@ -42,11 +42,11 @@
/*****************************************************************************
* dvbpsi_
DecodePDCD
r
* dvbpsi_
decode_dvb_PDC_d
r
*****************************************************************************/
dvbpsi_
PDC_dr_t
*
dvbpsi_DecodePDCD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
dvb_PDC_dr_t
*
dvbpsi_decode_dvb_PDC_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_PDC_dr_t
*
p_decoded
;
dvbpsi_
dvb_
PDC_dr_t
*
p_decoded
;
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x69
))
...
...
@@ -61,7 +61,7 @@ dvbpsi_PDC_dr_t * dvbpsi_DecodePDCDr(dvbpsi_descriptor_t * p_descriptor)
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_
PDC_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_PDC_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_PDC_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_PDC_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -79,9 +79,9 @@ dvbpsi_PDC_dr_t * dvbpsi_DecodePDCDr(dvbpsi_descriptor_t * p_descriptor)
/*****************************************************************************
* dvbpsi_
GenPDCD
r
* dvbpsi_
gen_dvb_PDC_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenPDCDr
(
dvbpsi
_PDC_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_PDC_dr
(
dvbpsi_dvb
_PDC_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
...
...
@@ -102,7 +102,7 @@ dvbpsi_descriptor_t * dvbpsi_GenPDCDr(dvbpsi_PDC_dr_t * p_decoded,
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_PDC_dr_t
));
sizeof
(
dvbpsi_
dvb_
PDC_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_69.h
View file @
61277eae
...
...
@@ -40,53 +40,53 @@ extern "C" {
/*****************************************************************************
* dvbpsi_PDC_dr_t
* dvbpsi_
dvb_
PDC_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_PDC_dr_s
* \struct dvbpsi_
dvb_
PDC_dr_s
* \brief PDC descriptor structure.
*
* This structure is used to store a decoded PDC descriptor.
* (ETSI EN 300 231).
*/
/*!
* \typedef struct dvbpsi_
PDC_dr_s dvbpsi
_PDC_dr_t
* \brief dvbpsi_PDC_dr_t type definition.
* \typedef struct dvbpsi_
dvb_PDC_dr_s dvbpsi_dvb
_PDC_dr_t
* \brief dvbpsi_
dvb_
PDC_dr_t type definition.
*/
typedef
struct
dvbpsi_PDC_dr_s
typedef
struct
dvbpsi_
dvb_
PDC_dr_s
{
/* pdc[0] ~= day; PDC[1] ~= month; PDC[2] ~= hour; PDC[3] ~= min; */
uint8_t
i_PDC
[
4
];
/*!< PDC */
}
dvbpsi_PDC_dr_t
;
}
dvbpsi_
dvb_
PDC_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodePDCD
r
* dvbpsi_
decode_dvb_PDC_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
PDC_dr_t * dvbpsi_DecodePDCD
r(
* \fn dvbpsi_
dvb_PDC_dr_t * dvbpsi_decode_dvb_PDC_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief PDC descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "video stream" descriptor structure which
* contains the decoded data.
*/
dvbpsi_
PDC_dr_t
*
dvbpsi_DecodePDCD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_PDC_dr_t
*
dvbpsi_decode_dvb_PDC_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenPDCD
r
* dvbpsi_
gen_dvb_PDC_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenPDCD
r(
dvbpsi_PDC_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_dvb_PDC_d
r(
dvbpsi_
dvb_
PDC_dr_t * p_decoded, bool b_duplicate)
* \brief PDC descriptor generator.
* \param p_decoded pointer to a decoded PDC descriptor structure
* \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenPDCDr
(
dvbpsi
_PDC_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_PDC_dr
(
dvbpsi_dvb
_PDC_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/dr_73.c
View file @
61277eae
...
...
@@ -40,11 +40,11 @@ Decode Default Authority Descriptor.
#include "dr_73.h"
/*****************************************************************************
* dvbpsi_
DecodeDefaultAuthorityD
r
* dvbpsi_
decode_dvb_default_authority_d
r
*****************************************************************************/
dvbpsi_d
efault_authority_dr_t
*
dvbpsi_DecodeDefaultAuthorityD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_d
vb_default_authority_dr_t
*
dvbpsi_decode_dvb_default_authority_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_default_authority_dr_t
*
p_decoded
;
dvbpsi_d
vb_d
efault_authority_dr_t
*
p_decoded
;
/* Check the tag */
if
(
p_descriptor
->
i_tag
!=
0x73
)
...
...
@@ -54,7 +54,7 @@ dvbpsi_default_authority_dr_t *dvbpsi_DecodeDefaultAuthorityDr(dvbpsi_descriptor
if
(
p_descriptor
->
p_decoded
)
return
p_descriptor
->
p_decoded
;
p_decoded
=
(
dvbpsi_d
efault_authority_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_default_authority_dr_t
));
p_decoded
=
(
dvbpsi_d
vb_default_authority_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_default_authority_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
src/descriptors/dr_73.h
View file @
61277eae
...
...
@@ -35,34 +35,34 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_content_id_dr_s
* dvbpsi_
dvb_
content_id_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_default_authority_dr_s
* \struct dvbpsi_d
vb_d
efault_authority_dr_s
* \brief Default Authority Descriptor
*
* This structure is used to store a decoded Default Authority descriptor.
*/
/*!
* \typedef struct dvbpsi_d
efault_authority_dr_s dvbpsi
_default_authority_dr_t
* \brief dvbpsi_default_authority_dr_t type definition.
* \typedef struct dvbpsi_d
vb_default_authority_dr_s dvbpsi_dvb
_default_authority_dr_t
* \brief dvbpsi_d
vb_d
efault_authority_dr_t type definition.
*/
typedef
struct
dvbpsi_default_authority_dr_s
typedef
struct
dvbpsi_d
vb_d
efault_authority_dr_s
{
uint8_t
authority
[
255
];
/*!< default authority descriptor */
}
dvbpsi_default_authority_dr_t
;
}
dvbpsi_d
vb_d
efault_authority_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeLCND
r
* dvbpsi_
decode_eacem_lcn_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_d
efault_authority_dr_t *dvbpsi_DecodeDefaultAuthorityD
r(dvbpsi_descriptor_t *p_descriptor)
* \fn dvbpsi_d
vb_default_authority_dr_t *dvbpsi_decode_dvb_default_authority_d
r(dvbpsi_descriptor_t *p_descriptor)
* \brief Decode a Default Authority descriptor (tag 0x73)
* \param p_descriptor Raw descriptor to decode.
* \return NULL if the descriptor could not be decoded or a pointer to a
* dvbpsi_default_authority_dr_t structure.
* dvbpsi_d
vb_d
efault_authority_dr_t structure.
*/
dvbpsi_d
efault_authority_dr_t
*
dvbpsi_DecodeDefaultAuthorityD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_d
vb_default_authority_dr_t
*
dvbpsi_decode_dvb_default_authority_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
#ifdef __cplusplus
};
...
...
src/descriptors/dr_76.c
View file @
61277eae
...
...
@@ -40,11 +40,11 @@ Decode Content Identifier Descriptor.
#include "dr_76.h"
/*****************************************************************************
* dvbpsi_
DecodeLCND
r
* dvbpsi_
decode_eacem_lcn_d
r
*****************************************************************************/
dvbpsi_
content_id_dr_t
*
dvbpsi_DecodeContentIdD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
dvb_content_id_dr_t
*
dvbpsi_decode_dvb_content_id_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_content_id_dr_t
*
p_decoded
;
dvbpsi_
dvb_
content_id_dr_t
*
p_decoded
;
int
byte
;
/* Check the tag */
...
...
@@ -59,7 +59,7 @@ dvbpsi_content_id_dr_t *dvbpsi_DecodeContentIdDr(dvbpsi_descriptor_t *p_descript
if
(
p_descriptor
->
i_length
>
ARRAY_SIZE
(
p_decoded
->
p_entries
))
p_descriptor
->
i_length
=
ARRAY_SIZE
(
p_decoded
->
p_entries
);
p_decoded
=
(
dvbpsi_
content_id_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_content_id_dr_t
));
p_decoded
=
(
dvbpsi_
dvb_content_id_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_dvb
_content_id_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
src/descriptors/dr_76.h
View file @
61277eae
...
...
@@ -89,40 +89,40 @@ typedef struct dvbpsi_crid_entry_s
/*!
* \def DVBPSI_CRID_ENTRY_DR_MAX
* \brief Maximum number of dvbpsi_crid_entry_t entries present in
* @see dvbpsi_content_id_dr_t
* @see dvbpsi_
dvb_
content_id_dr_t
*/
#define DVBPSI_CRID_ENTRY_DR_MAX 85
/*****************************************************************************
* dvbpsi_content_id_dr_s
* dvbpsi_
dvb_
content_id_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_content_id_dr_s
* \struct dvbpsi_
dvb_
content_id_dr_s
* \brief Content Identifier Descriptor
*
* This structure is used to store a decoded Content Identifier descriptor.
*/
/*!
* \typedef struct dvbpsi_
content_id_dr_s dvbpsi
_content_id_dr_t
* \brief dvbpsi_content_id_dr_t type definition.
* \typedef struct dvbpsi_
dvb_content_id_dr_s dvbpsi_dvb
_content_id_dr_t
* \brief dvbpsi_
dvb_
content_id_dr_t type definition.
*/
typedef
struct
dvbpsi_content_id_dr_s
typedef
struct
dvbpsi_
dvb_
content_id_dr_s
{
uint8_t
i_number_of_entries
;
/*!< Number of CRID entries present. */
dvbpsi_crid_entry_t
p_entries
[
DVBPSI_CRID_ENTRY_DR_MAX
];
/*!< Array of CRID entries. */
}
dvbpsi_content_id_dr_t
;
}
dvbpsi_
dvb_
content_id_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeLCND
r
* dvbpsi_
decode_eacem_lcn_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
content_id_dr_s dvbpsi_DecodeContentIdD
r(dvbpsi_descriptor_t *p_descriptor)
* \fn dvbpsi_
dvb_content_id_dr_s dvbpsi_decode_dvb_content_id_d
r(dvbpsi_descriptor_t *p_descriptor)
* \brief Decode a Content Identifier descriptor (tag 0x76)
* \param p_descriptor Raw descriptor to decode.
* \return NULL if the descriptor could not be decoded or a pointer to a
* dvbpsi_content_id_dr_t structure.
* dvbpsi_
dvb_
content_id_dr_t structure.
*/
dvbpsi_
content_id_dr_t
*
dvbpsi_DecodeContentIdD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_content_id_dr_t
*
dvbpsi_decode_dvb_content_id_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
#ifdef __cplusplus
};
...
...
src/descriptors/dr_7c.c
View file @
61277eae
...
...
@@ -219,9 +219,9 @@ static uint8_t dvbpsi_aac_type_to_hex(const dvbpsi_aac_type_t type)
}
/*****************************************************************************
* dvbpsi_
DecodeAACD
r
* dvbpsi_
decode_dvb_aac_d
r
*****************************************************************************/
dvbpsi_
aac_dr_t
*
dvbpsi_DecodeAACD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
dvb_aac_dr_t
*
dvbpsi_decode_dvb_aac_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x7c
))
...
...
@@ -235,8 +235,8 @@ dvbpsi_aac_dr_t *dvbpsi_DecodeAACDr(dvbpsi_descriptor_t *p_descriptor)
return
NULL
;
/* Allocate memory */
dvbpsi_aac_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
aac_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_aac_dr_t
));
dvbpsi_
dvb_
aac_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
dvb_aac_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_dvb
_aac_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -253,13 +253,13 @@ dvbpsi_aac_dr_t *dvbpsi_DecodeAACDr(dvbpsi_descriptor_t *p_descriptor)
if
(
p_descriptor
->
i_length
>
1
)
{
uint8_t
i_info_length
=
p_descriptor
->
i_length
-
(
p_decoded
->
b_type
?
3
:
2
);
dvbpsi_
aac_dr_t
*
p_tmp
=
realloc
(
p_decoded
,
sizeof
(
dvbpsi
_aac_dr_t
)
+
i_info_length
);
dvbpsi_
dvb_aac_dr_t
*
p_tmp
=
realloc
(
p_decoded
,
sizeof
(
dvbpsi_dvb
_aac_dr_t
)
+
i_info_length
);
if
(
!
p_tmp
)
{
free
(
p_decoded
);
return
NULL
;
}
p_decoded
->
p_additional_info
=
((
uint8_t
*
)
p_tmp
+
sizeof
(
dvbpsi_aac_dr_t
));
p_decoded
->
p_additional_info
=
((
uint8_t
*
)
p_tmp
+
sizeof
(
dvbpsi_
dvb_
aac_dr_t
));
p_decoded
->
i_additional_info_length
=
i_info_length
;
uint8_t
i_data
=
p_decoded
->
b_type
?
3
:
2
;
...
...
@@ -273,9 +273,9 @@ dvbpsi_aac_dr_t *dvbpsi_DecodeAACDr(dvbpsi_descriptor_t *p_descriptor)
}
/*****************************************************************************
* dvbpsi_
GenAACD
r
* dvbpsi_
gen_dvb_aac_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenAACDr
(
dvbpsi
_aac_dr_t
*
p_decoded
,
bool
b_duplicate
)
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_aac_dr
(
dvbpsi_dvb
_aac_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
uint8_t
i_length
=
p_decoded
->
b_type
?
3
+
p_decoded
->
i_additional_info_length
:
1
;
...
...
@@ -306,7 +306,7 @@ dvbpsi_descriptor_t *dvbpsi_GenAACDr(dvbpsi_aac_dr_t *p_decoded, bool b_duplicat
{
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_aac_dr_t
));
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_
dvb_
aac_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_7c.h
View file @
61277eae
...
...
@@ -85,16 +85,16 @@ typedef enum dvbpsi_aac_type_s
}
dvbpsi_aac_type_t
;
/*!
* \struct dvbpsi_aac_dr_s
* \struct dvbpsi_
dvb_
aac_dr_s
* \brief "AAC Audio" descriptor structure.
*
* The AAC Audio descriptor is used to label the PIDs that carry AAC audio data.
*/
/*!
* \typedef struct dvbpsi_
aac_dr_s dvbpsi
_aac_dr_t
* \brief dvbpsi_aac_dr_t type definition.
* \typedef struct dvbpsi_
dvb_aac_dr_s dvbpsi_dvb
_aac_dr_t
* \brief dvbpsi_
dvb_
aac_dr_t type definition.
*/
typedef
struct
dvbpsi_aac_dr_s
typedef
struct
dvbpsi_
dvb_
aac_dr_s
{
dvbpsi_aac_profile_and_level_t
i_profile_and_level
;
/*!< Specifies the Profile and Level used in MPEG-4 AAC,
...
...
@@ -109,32 +109,32 @@ typedef struct dvbpsi_aac_dr_s
right after sizeof struct, when freeing this struct
the additional info bytes field is freed at the same time. */
}
dvbpsi_aac_dr_t
;
}
dvbpsi_
dvb_
aac_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeAACD
r
* dvbpsi_
decode_dvb_aac_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
aac_dr_t * dvbpsi_DecodeAACD
r(dvbpsi_descriptor_t * p_descriptor)
* \fn dvbpsi_
dvb_aac_dr_t * dvbpsi_decode_dvb_aac_d
r(dvbpsi_descriptor_t * p_descriptor)
* \brief "AAC Audio" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "AAC" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
aac_dr_t
*
dvbpsi_DecodeAACD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
dvb_aac_dr_t
*
dvbpsi_decode_dvb_aac_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenAACD
r
* dvbpsi_
gen_dvb_aac_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t *dvbpsi_
GenAACDr(dvbpsi
_aac_dr_t *p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t *dvbpsi_
gen_dvb_aac_dr(dvbpsi_dvb
_aac_dr_t *p_decoded, bool b_duplicate)
* \brief "AAC" descriptor generator.
* \param p_decoded pointer to a decoded "AAC" descriptor structure
* \param b_duplicate if true then duplicate the p_decoded structure into
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenAACDr
(
dvbpsi
_aac_dr_t
*
p_decoded
,
bool
b_duplicate
);
dvbpsi_descriptor_t
*
dvbpsi_
gen_dvb_aac_dr
(
dvbpsi_dvb
_aac_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
};
...
...
src/descriptors/dr_81.c
View file @
61277eae
...
...
@@ -40,11 +40,11 @@ Decode AC-3 Audio Descriptor.
#include "dr_81.h"
/*****************************************************************************
* dvbpsi_
DecodeAc3AudioD
r
* dvbpsi_
decode_atsc_ac3_audio_d
r
*****************************************************************************/
dvbpsi_a
c3_audio_dr_t
*
dvbpsi_DecodeAc3AudioD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_a
tsc_ac3_audio_dr_t
*
dvbpsi_decode_atsc_ac3_audio_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_ac3_audio_dr_t
*
p_decoded
;
dvbpsi_a
tsc_a
c3_audio_dr_t
*
p_decoded
;
uint8_t
*
buf
=
p_descriptor
->
p_data
;
/* Check the tag */
...
...
@@ -59,7 +59,7 @@ dvbpsi_ac3_audio_dr_t *dvbpsi_DecodeAc3AudioDr(dvbpsi_descriptor_t *p_descriptor
if
(
p_descriptor
->
i_length
<
3
)
return
NULL
;
p_decoded
=
(
dvbpsi_a
c3_audio_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi
_ac3_audio_dr_t
));
p_decoded
=
(
dvbpsi_a
tsc_ac3_audio_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_atsc
_ac3_audio_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
src/descriptors/dr_81.h
View file @
61277eae
...
...
@@ -35,19 +35,19 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_ac3_audio_dr_s
* dvbpsi_a
tsc_a
c3_audio_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_ac3_audio_dr_s
* \struct dvbpsi_a
tsc_a
c3_audio_dr_s
* \brief AC-3 Audio Descriptor
*
* This structure is used to store a decoded AC-3 Audio descriptor.
*/
/*!
* \typedef struct dvbpsi_a
c3_audio_dr_s dvbpsi
_ac3_audio_dr_t
* \brief dvbpsi_ac3_audio_dr_t type definition.
* \typedef struct dvbpsi_a
tsc_ac3_audio_dr_s dvbpsi_atsc
_ac3_audio_dr_t
* \brief dvbpsi_a
tsc_a
c3_audio_dr_t type definition.
*/
typedef
struct
dvbpsi_ac3_audio_dr_s
typedef
struct
dvbpsi_a
tsc_a
c3_audio_dr_s
{
uint8_t
i_sample_rate_code
;
/*!< sample rate code (3bits) */
uint8_t
i_bsid
;
/*!< bsid (5bits) */
...
...
@@ -68,19 +68,19 @@ typedef struct dvbpsi_ac3_audio_dr_s
int
b_language_flag_2
;
/*!< language flag */
uint8_t
language
[
3
];
/*!< language code */
uint8_t
language_2
[
3
];
/*!< language code */
}
dvbpsi_ac3_audio_dr_t
;
}
dvbpsi_a
tsc_a
c3_audio_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeAc3AudioD
r
* dvbpsi_
decode_atsc_ac3_audio_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_a
c3_audio_dr_t dvbpsi_DecodeAc3AudioD
r(dvbpsi_descriptor_t *p_descriptor)
* \fn dvbpsi_a
tsc_ac3_audio_dr_t dvbpsi_decode_atsc_ac3_audio_d
r(dvbpsi_descriptor_t *p_descriptor)
* \brief Decode a AC-3 Audio descriptor (tag 0x81)
* \param p_descriptor Raw descriptor to decode.
* \return NULL if the descriptor could not be decoded or a pointer to a
* dvbpsi_ac3_audio_dr_t structure.
* dvbpsi_a
tsc_a
c3_audio_dr_t structure.
*/
dvbpsi_a
c3_audio_dr_t
*
dvbpsi_DecodeAc3AudioD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_a
tsc_ac3_audio_dr_t
*
dvbpsi_decode_atsc_ac3_audio_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
#ifdef __cplusplus
}
...
...
src/descriptors/dr_83.c
View file @
61277eae
...
...
@@ -40,11 +40,11 @@ Decode Logical Channel Number Descriptor.
#include "dr_83.h"
/*****************************************************************************
* dvbpsi_
DecodeLCND
r
* dvbpsi_
decode_eacem_lcn_d
r
*****************************************************************************/
dvbpsi_
lcn_dr_t
*
dvbpsi_DecodeLCND
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
eacem_lcn_dr_t
*
dvbpsi_decode_eacem_lcn_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_lcn_dr_t
*
p_decoded
;
dvbpsi_
eacem_
lcn_dr_t
*
p_decoded
;
int
i
;
/* Check the tag */
...
...
@@ -59,7 +59,7 @@ dvbpsi_lcn_dr_t *dvbpsi_DecodeLCNDr(dvbpsi_descriptor_t *p_descriptor)
if
(
p_descriptor
->
i_length
%
4
)
return
NULL
;
p_decoded
=
(
dvbpsi_
lcn_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_lcn_dr_t
));
p_decoded
=
(
dvbpsi_
eacem_lcn_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_eacem
_lcn_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -85,9 +85,9 @@ dvbpsi_lcn_dr_t *dvbpsi_DecodeLCNDr(dvbpsi_descriptor_t *p_descriptor)
}
/*****************************************************************************
* dvbpsi_
GenLCND
r
* dvbpsi_
gen_eacem_lcn_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenLCNDr
(
dvbpsi
_lcn_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_eacem_lcn_dr
(
dvbpsi_eacem
_lcn_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_number_of_entries
>
63
)
...
...
@@ -108,9 +108,9 @@ dvbpsi_descriptor_t* dvbpsi_GenLCNDr(dvbpsi_lcn_dr_t* p_decoded,
if
(
b_duplicate
)
{
dvbpsi_
lcn_dr_t
*
p_dup
=
(
dvbpsi_lcn_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_lcn_dr_t
));
dvbpsi_
eacem_lcn_dr_t
*
p_dup
=
(
dvbpsi_eacem_lcn_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_eacem
_lcn_dr_t
));
if
(
NULL
!=
p_dup
)
memcpy
(
p_dup
,
p_decoded
,
sizeof
(
dvbpsi_lcn_dr_t
));
memcpy
(
p_dup
,
p_decoded
,
sizeof
(
dvbpsi_
eacem_
lcn_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup
;
}
...
...
src/descriptors/dr_83.h
View file @
61277eae
...
...
@@ -55,42 +55,42 @@ typedef struct dvbpsi_lcn_entry_s
}
dvbpsi_lcn_entry_t
;
/*****************************************************************************
* dvbpsi_lcn_dr_s
* dvbpsi_
eacem_
lcn_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_lcn_dr_s
* \struct dvbpsi_
eacem_
lcn_dr_s
* \brief Logical Channel Number Descriptor
*
* This structure is used to store a decoded Logical Channel Number descriptor.
*/
/*!
* \typedef struct dvbpsi_
lcn_dr_s dvbpsi
_lcn_dr_t
* \brief dvbpsi_lcn_dr_t type definition.
* \typedef struct dvbpsi_
eacem_lcn_dr_s dvbpsi_eacem
_lcn_dr_t
* \brief dvbpsi_
eacem_
lcn_dr_t type definition.
*/
typedef
struct
dvbpsi_lcn_dr_s
typedef
struct
dvbpsi_
eacem_
lcn_dr_s
{
uint8_t
i_number_of_entries
;
/*!< Number of LCN entries present. */
dvbpsi_lcn_entry_t
p_entries
[
64
];
/*!< Array of LCN entries. */
}
dvbpsi_lcn_dr_t
;
}
dvbpsi_
eacem_
lcn_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeLCND
r
* dvbpsi_
decode_eacem_lcn_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
lcn_dr_t dvbpsi_DecodeLCND
r(dvbpsi_descriptor_t *p_descriptor)
* \fn dvbpsi_
eacem_lcn_dr_t dvbpsi_decode_eacem_lcn_d
r(dvbpsi_descriptor_t *p_descriptor)
* \brief Decode a Logical Channel Number descriptor (tag 0x83)
* \param p_descriptor Raw descriptor to decode.
* \return NULL if the descriptor could not be decoded or a pointer to a
* dvbpsi_lcn_dr_t structure.
* dvbpsi_
eacem_
lcn_dr_t structure.
*/
dvbpsi_
lcn_dr_t
*
dvbpsi_DecodeLCND
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
eacem_lcn_dr_t
*
dvbpsi_decode_eacem_lcn_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenLCND
r
* dvbpsi_
gen_eacem_lcn_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t *dvbpsi_
GenLCND
r(
dvbpsi_lcn_dr_t* p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t *dvbpsi_
gen_eacem_lcn_d
r(
dvbpsi_
eacem_
lcn_dr_t* p_decoded, bool b_duplicate)
* \brief "logical_channel" descriptor generator.
* \param p_decoded pointer to a decoded "logical_channel" descriptor
* structure
...
...
@@ -98,7 +98,7 @@ dvbpsi_lcn_dr_t *dvbpsi_DecodeLCNDr(dvbpsi_descriptor_t *p_descriptor);
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenLCNDr
(
dvbpsi
_lcn_dr_t
*
p_decoded
,
bool
b_duplicate
);
dvbpsi_descriptor_t
*
dvbpsi_
gen_eacem_lcn_dr
(
dvbpsi_eacem
_lcn_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
};
...
...
src/descriptors/dr_86.c
View file @
61277eae
...
...
@@ -40,11 +40,11 @@ Decode Caption Service Descriptor.
#include "dr_86.h"
/*****************************************************************************
* dvbpsi_
DecodeCaptionServiceD
r
* dvbpsi_
decode_atsc_caption_service_d
r
*****************************************************************************/
dvbpsi_
caption_service_dr_t
*
dvbpsi_DecodeCaptionServiceD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
atsc_caption_service_dr_t
*
dvbpsi_decode_atsc_caption_service_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_caption_service_dr_t
*
p_decoded
;
dvbpsi_
atsc_
caption_service_dr_t
*
p_decoded
;
uint8_t
*
buf
=
p_descriptor
->
p_data
;
/* Check the tag */
...
...
@@ -59,7 +59,7 @@ dvbpsi_caption_service_dr_t *dvbpsi_DecodeCaptionServiceDr(dvbpsi_descriptor_t *
if
((
p_descriptor
->
i_length
-
1
)
%
6
)
return
NULL
;
p_decoded
=
(
dvbpsi_
caption_service_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_caption_service_dr_t
));
p_decoded
=
(
dvbpsi_
atsc_caption_service_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_atsc
_caption_service_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
src/descriptors/dr_86.h
View file @
61277eae
...
...
@@ -58,35 +58,35 @@ typedef struct dvbpsi_caption_service_s
}
dvbpsi_caption_service_t
;
/*****************************************************************************
* dvbpsi_caption_service_dr_s
* dvbpsi_
atsc_
caption_service_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_caption_service_dr_s
* \struct dvbpsi_
atsc_
caption_service_dr_s
* \brief Caption Service Descriptor
*
* This structure is used to store a decoded Caption Service descriptor.
*/
/*!
* \typedef struct dvbpsi_
caption_service_dr_s dvbpsi
_caption_service_dr_t
* \brief dvbpsi_caption_service_dr_t type definition.
* \typedef struct dvbpsi_
atsc_caption_service_dr_s dvbpsi_atsc
_caption_service_dr_t
* \brief dvbpsi_
atsc_
caption_service_dr_t type definition.
*/
typedef
struct
dvbpsi_caption_service_dr_s
typedef
struct
dvbpsi_
atsc_
caption_service_dr_s
{
uint8_t
i_number_of_services
;
/*!< Number of Captions services */
dvbpsi_caption_service_t
services
[
0x1f
];
/*!< Caption services array */
}
dvbpsi_caption_service_dr_t
;
}
dvbpsi_
atsc_
caption_service_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeCaptionServiceD
r
* dvbpsi_
decode_atsc_caption_service_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
caption_service_dr_t dvbpsi_DecodeCaptionServiceD
r(dvbpsi_descriptor_t *p_descriptor)
* \fn dvbpsi_
atsc_caption_service_dr_t dvbpsi_decode_atsc_caption_service_d
r(dvbpsi_descriptor_t *p_descriptor)
* \brief Decode a Caption Service descriptor (tag 0x86)
* \param p_descriptor Raw descriptor to decode.
* \return NULL if the descriptor could not be decoded or a pointer to a
* dvbpsi_caption_service_dr_t structure.
* dvbpsi_
atsc_
caption_service_dr_t structure.
*/
dvbpsi_
caption_service_dr_t
*
dvbpsi_DecodeCaptionServiceD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
atsc_caption_service_dr_t
*
dvbpsi_decode_atsc_caption_service_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
#ifdef __cplusplus
}
...
...
src/descriptors/dr_8a.c
View file @
61277eae
...
...
@@ -41,9 +41,9 @@
#include "dr_8a.h"
/*****************************************************************************
* dvbpsi_
DecodeCUEID
r
* dvbpsi_
decode_scte_cuei_d
r
*****************************************************************************/
dvbpsi_
cuei_dr_t
*
dvbpsi_DecodeCUEID
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
scte_cuei_dr_t
*
dvbpsi_decode_scte_cuei_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
/* Check the tag */
if
(
!
dvbpsi_CanDecodeAsDescriptor
(
p_descriptor
,
0x8a
))
...
...
@@ -57,8 +57,8 @@ dvbpsi_cuei_dr_t * dvbpsi_DecodeCUEIDr(dvbpsi_descriptor_t * p_descriptor)
return
NULL
;
/* Allocate memory */
dvbpsi_cuei_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
cuei_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_cuei_dr_t
));
dvbpsi_
scte_
cuei_dr_t
*
p_decoded
;
p_decoded
=
(
dvbpsi_
scte_cuei_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_scte
_cuei_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
@@ -80,9 +80,9 @@ dvbpsi_cuei_dr_t * dvbpsi_DecodeCUEIDr(dvbpsi_descriptor_t * p_descriptor)
}
/*****************************************************************************
* dvbpsi_
GenCUEID
r
* dvbpsi_
gen_scte_cuei_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenCUEIDr
(
dvbpsi
_cuei_dr_t
*
p_decoded
,
bool
b_duplicate
)
dvbpsi_descriptor_t
*
dvbpsi_
gen_scte_cuei_dr
(
dvbpsi_scte
_cuei_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
/* Create the descriptor */
dvbpsi_descriptor_t
*
p_descriptor
=
dvbpsi_NewDescriptor
(
0x8a
,
0x01
,
NULL
);
...
...
@@ -97,7 +97,7 @@ dvbpsi_descriptor_t * dvbpsi_GenCUEIDr(dvbpsi_cuei_dr_t * p_decoded, bool b_dupl
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_cuei_dr_t
));
sizeof
(
dvbpsi_
scte_
cuei_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_8a.h
View file @
61277eae
...
...
@@ -38,45 +38,45 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_cuei_dr_t
* dvbpsi_
scte_
cuei_dr_t
*****************************************************************************/
/*!
* \struct dvbpsi_cuei_dr_s
* \struct dvbpsi_
scte_
cuei_dr_s
* \brief "CUE Identifier" descriptor structure.
*
* The CUE Identifier descriptor is used to label the PIDs
* that carry splice commands. (SCTE 35 2004 section 6.2.)
*/
/*!
* \typedef struct dvbpsi_
cuei_dr_s dvbpsi
_cuei_dr_t
* \brief dvbpsi_cuei_dr_t type definition.
* \typedef struct dvbpsi_
scte_cuei_dr_s dvbpsi_scte
_cuei_dr_t
* \brief dvbpsi_
scte_
cuei_dr_t type definition.
*/
typedef
struct
dvbpsi_cuei_dr_s
typedef
struct
dvbpsi_
scte_
cuei_dr_s
{
uint8_t
i_cue_stream_type
;
/*!< indicate type of splice commands */
}
dvbpsi_cuei_dr_t
;
}
dvbpsi_
scte_
cuei_dr_t
;
/*****************************************************************************
* dvbpsi_DecodeCUEIDataDr
*****************************************************************************/
/*!
* \fn dvbpsi_
cuei_dr_t * dvbpsi_DecodeCUEID
r(dvbpsi_descriptor_t * p_descriptor)
* \fn dvbpsi_
scte_cuei_dr_t * dvbpsi_decode_scte_cuei_d
r(dvbpsi_descriptor_t * p_descriptor)
* \brief "CUEI" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "CUEI" descriptor structure
* which contains the decoded data.
*/
dvbpsi_
cuei_dr_t
*
dvbpsi_DecodeCUEID
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
scte_cuei_dr_t
*
dvbpsi_decode_scte_cuei_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_GenCUEIDataDr
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenCUEID
r(
dvbpsi_cuei_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_scte_cuei_d
r(
dvbpsi_
scte_
cuei_dr_t * p_decoded, bool b_duplicate)
* \brief "CUEI" descriptor generator.
* \param p_decoded pointer to a decoded "CUEI" descriptor
* structure
...
...
@@ -84,7 +84,7 @@ dvbpsi_cuei_dr_t* dvbpsi_DecodeCUEIDr(dvbpsi_descriptor_t * p_descriptor);
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenCUEIDr
(
dvbpsi
_cuei_dr_t
*
p_decoded
,
bool
b_duplicate
);
dvbpsi_descriptor_t
*
dvbpsi_
gen_scte_cuei_dr
(
dvbpsi_scte
_cuei_dr_t
*
p_decoded
,
bool
b_duplicate
);
#ifdef __cplusplus
...
...
src/descriptors/dr_a0.c
View file @
61277eae
...
...
@@ -42,17 +42,17 @@ Decode Extended Channel Name Descriptor.
/*****************************************************************************
* dvbpsi_ExtendedChannelNameDr - deprecated
*****************************************************************************/
dvbpsi_extended_channel_name_dr_t
*
dvbpsi_ExtendedChannelNameDr
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
atsc_
extended_channel_name_dr_t
*
dvbpsi_ExtendedChannelNameDr
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
return
dvbpsi_
DecodeExtendedChannelNameD
r
(
p_descriptor
);
return
dvbpsi_
decode_atsc_extended_channel_name_d
r
(
p_descriptor
);
}
/*****************************************************************************
* dvbpsi_
DecodeExtendedChannelNameD
r
* dvbpsi_
decode_atsc_extended_channel_name_d
r
*****************************************************************************/
dvbpsi_
extended_channel_name_dr_t
*
dvbpsi_DecodeExtendedChannelNameD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
atsc_extended_channel_name_dr_t
*
dvbpsi_decode_atsc_extended_channel_name_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_extended_channel_name_dr_t
*
p_decoded
;
dvbpsi_
atsc_
extended_channel_name_dr_t
*
p_decoded
;
/* Check the tag */
if
(
p_descriptor
->
i_tag
!=
0xA0
)
...
...
@@ -66,7 +66,7 @@ dvbpsi_extended_channel_name_dr_t *dvbpsi_DecodeExtendedChannelNameDr(dvbpsi_des
if
(
!
p_descriptor
->
i_length
)
return
NULL
;
p_decoded
=
(
dvbpsi_
extended_channel_name_dr_t
*
)
malloc
(
sizeof
(
dvbpsi
_extended_channel_name_dr_t
));
p_decoded
=
(
dvbpsi_
atsc_extended_channel_name_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_atsc
_extended_channel_name_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
...
...
src/descriptors/dr_a0.h
View file @
61277eae
...
...
@@ -35,49 +35,49 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_extended_channel_name_dr_s
* dvbpsi_
atsc_
extended_channel_name_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_extended_channel_name_dr_s
* \struct dvbpsi_
atsc_
extended_channel_name_dr_s
* \brief Extended Channel Name Descriptor
*
* This structure is used to store a decoded Extended Channel Name descriptor.
*/
/*!
* \typedef struct dvbpsi_
extended_channel_name_dr_s dvbpsi
_extended_channel_name_dr_t
* \brief dvbpsi_extended_channel_name_dr_t type definition.
* \typedef struct dvbpsi_
atsc_extended_channel_name_dr_s dvbpsi_atsc
_extended_channel_name_dr_t
* \brief dvbpsi_
atsc_
extended_channel_name_dr_t type definition.
*/
typedef
struct
dvbpsi_extended_channel_name_dr_s
typedef
struct
dvbpsi_
atsc_
extended_channel_name_dr_s
{
uint8_t
i_long_channel_name_length
;
/*!< Length in bytes */
uint8_t
i_long_channel_name
[
256
];
/*!< multiple string structure format. */
}
dvbpsi_extended_channel_name_dr_t
;
}
dvbpsi_
atsc_
extended_channel_name_dr_t
;
/*****************************************************************************
* dvbpsi_ExtendedChannelNameDr - deprecated
*****************************************************************************/
/*!
* \fn dvbpsi_extended_channel_name_dr_t dvbpsi_ExtendedChannelNameDr(dvbpsi_descriptor_t *p_descriptor)
* \brief Function is deprecated use dvbpsi_
DecodeExtendedChannelNameD
r instead.
* \fn dvbpsi_
atsc_
extended_channel_name_dr_t dvbpsi_ExtendedChannelNameDr(dvbpsi_descriptor_t *p_descriptor)
* \brief Function is deprecated use dvbpsi_
decode_atsc_extended_channel_name_d
r instead.
* \param p_descriptor Raw descriptor to decode.
* \return NULL if the descriptor could not be decoded or a pointer to a
* dvbpsi_extended_channel_name_dr_t structure.
* dvbpsi_
atsc_
extended_channel_name_dr_t structure.
*/
__attribute__
((
deprecated
))
dvbpsi_extended_channel_name_dr_t
*
dvbpsi_ExtendedChannelNameDr
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
atsc_
extended_channel_name_dr_t
*
dvbpsi_ExtendedChannelNameDr
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
DecodeExtendedChannelNameD
r
* dvbpsi_
decode_atsc_extended_channel_name_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
extended_channel_name_dr_t dvbpsi_DecodeExtendedChannelNameD
r(dvbpsi_descriptor_t *p_descriptor)
* \fn dvbpsi_
atsc_extended_channel_name_dr_t dvbpsi_decode_atsc_extended_channel_name_d
r(dvbpsi_descriptor_t *p_descriptor)
* \brief Decode a Extended Channel Name descriptor (tag 0xA0)
* \param p_descriptor Raw descriptor to decode.
* \return NULL if the descriptor could not be decoded or a pointer to a
* dvbpsi_extended_channel_name_dr_t structure.
* dvbpsi_
atsc_
extended_channel_name_dr_t structure.
*/
dvbpsi_
extended_channel_name_dr_t
*
dvbpsi_DecodeExtendedChannelNameD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
atsc_extended_channel_name_dr_t
*
dvbpsi_decode_atsc_extended_channel_name_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
#ifdef __cplusplus
}
...
...
src/descriptors/dr_a1.c
View file @
61277eae
...
...
@@ -42,12 +42,12 @@ Service Location Descriptor.
/*****************************************************************************
* dvbpsi_
DecodeServiceLocationD
r
* dvbpsi_
decode_atsc_service_location_d
r
*****************************************************************************/
dvbpsi_service_location_dr_t
*
dvbpsi_
DecodeServiceLocationD
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
dvbpsi_
atsc_
service_location_dr_t
*
dvbpsi_
decode_atsc_service_location_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
)
{
dvbpsi_service_location_dr_t
*
p_decoded
;
dvbpsi_
atsc_
service_location_dr_t
*
p_decoded
;
uint8_t
*
buf
=
p_descriptor
->
p_data
;
/* Check the tag */
...
...
@@ -63,12 +63,12 @@ dvbpsi_DecodeServiceLocationDr (dvbpsi_descriptor_t * p_descriptor)
return
NULL
;
/* Allocate memory */
p_decoded
=
(
dvbpsi_service_location_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_service_location_dr_t
));
p_decoded
=
(
dvbpsi_
atsc_
service_location_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_
atsc_
service_location_dr_t
));
if
(
!
p_decoded
)
return
NULL
;
memset
(
p_decoded
,
0
,
sizeof
(
dvbpsi_service_location_dr_t
));
memset
(
p_decoded
,
0
,
sizeof
(
dvbpsi_
atsc_
service_location_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_decoded
;
...
...
@@ -93,10 +93,10 @@ dvbpsi_DecodeServiceLocationDr (dvbpsi_descriptor_t * p_descriptor)
/*****************************************************************************
* dvbpsi_
GenServiceLocationD
r
* dvbpsi_
gen_atsc_service_location_d
r
*****************************************************************************/
dvbpsi_descriptor_t
*
dvbpsi_
GenServiceLocationD
r
(
dvbpsi_service_location_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_atsc_service_location_d
r
(
dvbpsi_
atsc_
service_location_dr_t
*
p_decoded
,
bool
b_duplicate
)
{
if
(
p_decoded
->
i_number_elements
>
42
)
...
...
@@ -130,7 +130,7 @@ dvbpsi_descriptor_t* dvbpsi_GenServiceLocationDr(
if
(
b_duplicate
)
{
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_decoded
,
sizeof
(
dvbpsi_service_location_dr_t
));
sizeof
(
dvbpsi_
atsc_
service_location_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_a1.h
View file @
61277eae
...
...
@@ -56,49 +56,49 @@ typedef struct dvbpsi_service_location_element_s
}
dvbpsi_service_location_element_t
;
/*****************************************************************************
* dvbpsi_service_location_dr_s
* dvbpsi_
atsc_
service_location_dr_s
*****************************************************************************/
/*!
* \struct dvbpsi_service_location_dr_s
* \struct dvbpsi_
atsc_
service_location_dr_s
* \brief "service" descriptor structure.
*
* This structure is used to store a decoded "service location"
* descriptor.
*/
/*!
* \typedef struct dvbpsi_
service_location_dr_s dvbpsi
_service_location_dr_t
* \brief dvbpsi_service_location_dr_t type definition.
* \typedef struct dvbpsi_
atsc_service_location_dr_s dvbpsi_atsc
_service_location_dr_t
* \brief dvbpsi_
atsc_
service_location_dr_t type definition.
*/
typedef
struct
dvbpsi_service_location_dr_s
typedef
struct
dvbpsi_
atsc_
service_location_dr_s
{
uint16_t
i_pcr_pid
;
/*!< PCR_PID */
uint8_t
i_number_elements
;
/*!< number of elements used for this service */
dvbpsi_service_location_element_t
elements
[
0xff
];
/*!< service location elements array */
}
dvbpsi_service_location_dr_t
;
}
dvbpsi_
atsc_
service_location_dr_t
;
/*****************************************************************************
* dvbpsi_
DecodeServiceLocationD
r
* dvbpsi_
decode_atsc_service_location_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_
service_location_dr_t * dvbpsi_DecodeServiceLocationD
r(
* \fn dvbpsi_
atsc_service_location_dr_t * dvbpsi_decode_atsc_service_location_d
r(
dvbpsi_descriptor_t * p_descriptor)
* \brief "service location" descriptor decoder.
* \param p_descriptor pointer to the descriptor structure
* \return a pointer to a new "service" descriptor structure
* which contains the decoded data.
*/
dvbpsi_service_location_dr_t
*
dvbpsi_
DecodeServiceLocationD
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
dvbpsi_
atsc_
service_location_dr_t
*
dvbpsi_
decode_atsc_service_location_d
r
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_
GenServiceLocationD
r
* dvbpsi_
gen_atsc_service_location_d
r
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_
GenServiceLocationD
r(
dvbpsi_service_location_dr_t * p_decoded, bool b_duplicate)
* \fn dvbpsi_descriptor_t * dvbpsi_
gen_atsc_service_location_d
r(
dvbpsi_
atsc_
service_location_dr_t * p_decoded, bool b_duplicate)
* \brief "service" descriptor generator.
* \param p_decoded pointer to a decoded "service" descriptor
* structure
...
...
@@ -106,8 +106,8 @@ dvbpsi_service_location_dr_t
* the descriptor
* \return a pointer to a new descriptor structure which contains encoded data.
*/
dvbpsi_descriptor_t
*
dvbpsi_
GenServiceLocationD
r
(
dvbpsi_service_location_dr_t
*
p_decoded
,
dvbpsi_descriptor_t
*
dvbpsi_
gen_atsc_service_location_d
r
(
dvbpsi_
atsc_
service_location_dr_t
*
p_decoded
,
bool
b_duplicate
);
...
...
src/descriptors/types/aac_profile.h
View file @
61277eae
...
...
@@ -40,7 +40,7 @@ extern "C" {
#endif
/*****************************************************************************
* dvbpsi_aac_dr_t
* dvbpsi_
dvb_
aac_dr_t
*****************************************************************************/
/*!
* \enum dvbpsi_aac_profile_and_level_s
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment