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
cf130d44
Commit
cf130d44
authored
Jul 18, 2015
by
Daniel Kamil Kozar
Committed by
Jean-Paul Saman
Jan 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tests for the NVOD reference descriptor
Signed-off-by:
Jean-Paul Saman
<
jpsaman@videolan.org
>
parent
7878a7aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
misc/dr.xml
misc/dr.xml
+4
-0
misc/test_dr.c
misc/test_dr.c
+22
-0
misc/test_dr_cmp.h
misc/test_dr_cmp.h
+12
-0
No files found.
misc/dr.xml
View file @
cf130d44
...
...
@@ -281,4 +281,8 @@
<array
name=
"i_private_data"
len_name=
"i_private_data_length"
min_size=
"0"
max_size=
"242"
/>
</descriptor>
<descriptor
name=
"Near Video On Demand reference"
sname=
"nvod_ref"
fname=
"NVODReference"
>
<array
name=
"p_nvod_refs"
len_name=
"i_references"
min_size=
"1"
type=
"dvbpsi_nvod_ref_t"
/>
</descriptor>
</dr>
misc/test_dr.c
View file @
cf130d44
...
...
@@ -1808,6 +1808,27 @@ static int main_linkage_5(void)
return
i_err
;
}
/* Near Video On Demand reference */
static
int
main_nvod_ref_
(
void
)
{
BOZO_VARS
(
nvod_ref
);
BOZO_START
(
Near
Video
On
Demand
reference
);
/* check p_nvod_refs */
BOZO_init_array
(
i_references
);
BOZO_begin_array
(
p_nvod_refs
,
i_references
,
1
)
BOZO_DOJOB
(
NVODReference
);
BOZO_check_array_begin
(
p_nvod_refs
,
i_references
)
BOZO_check_array_cmp
(
p_nvod_refs
,
i_references
,
dvbpsi_nvod_ref_t
)
BOZO_CLEAN
();
BOZO_end_array
(
p_nvod_refs
,
ARRAY_SIZE
(
s_decoded
.
p_nvod_refs
))
BOZO_END
(
Near
Video
On
Demand
reference
);
return
i_err
;
}
/* main function */
int
main
(
void
)
...
...
@@ -1850,6 +1871,7 @@ int main(void)
i_err
|=
main_linkage_3
();
i_err
|=
main_linkage_4
();
i_err
|=
main_linkage_5
();
i_err
|=
main_nvod_ref_
();
if
(
i_err
)
fprintf
(
stderr
,
"At least one test has FAILED !!!
\n
"
);
...
...
misc/test_dr_cmp.h
View file @
cf130d44
...
...
@@ -18,3 +18,15 @@ static int compare_dvbpsi_service_list_service_s(const void *s1, const void *s2)
a
->
i_service_type
>
b
->
i_service_type
)
return
1
;
else
return
0
;
}
static
int
compare_dvbpsi_nvod_ref_t
(
const
void
*
s1
,
const
void
*
s2
)
{
const
dvbpsi_nvod_ref_t
*
a
=
s1
,
*
b
=
s2
;
if
(
a
->
i_transport_stream_id
<
b
->
i_transport_stream_id
||
a
->
i_original_network_id
<
b
->
i_original_network_id
||
a
->
i_service_id
<
b
->
i_service_id
)
return
-
1
;
else
if
(
a
->
i_transport_stream_id
>
b
->
i_transport_stream_id
||
a
->
i_original_network_id
>
b
->
i_original_network_id
||
a
->
i_service_id
>
b
->
i_service_id
)
return
1
;
else
return
0
;
}
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