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
a771fcb3
Commit
a771fcb3
authored
Feb 03, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc: update API's used
parent
7cfea795
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
36 deletions
+51
-36
misc/dr.xsl
misc/dr.xsl
+2
-2
misc/gen_pat.c
misc/gen_pat.c
+16
-9
misc/gen_pmt.c
misc/gen_pmt.c
+16
-8
misc/test_dr.c
misc/test_dr.c
+17
-17
No files found.
misc/dr.xsl
View file @
a771fcb3
...
...
@@ -37,7 +37,7 @@
<xsl:apply-templates
mode=
"code"
/>
/* main function */
int main()
int main(
void
)
{
int i_err = 0;
<xsl:apply-templates
mode=
"main"
/>
...
...
@@ -60,7 +60,7 @@ int main()
<xsl:template
match=
"descriptor"
mode=
"code"
>
/*
<xsl:value-of
select=
"@name"
/>
*/
int main_
<xsl:value-of
select=
"@sname"
/>
_
<xsl:value-of
select=
"@msuffix"
/>
(
)
static int main_
<xsl:value-of
select=
"@sname"
/>
_
<xsl:value-of
select=
"@msuffix"
/>
(void
)
{
BOZO_VARS(
<xsl:value-of
select=
"@sname"
/>
);
BOZO_START(
<xsl:value-of
select=
"@name"
/>
);
...
...
misc/gen_pat.c
View file @
a771fcb3
/*****************************************************************************
* gen_pat.c: PAT generator
*----------------------------------------------------------------------------
* Copyright (C) 2001-201
0
VideoLAN
* Copyright (C) 2001-201
1
VideoLAN
* $Id: gen_pat.c,v 1.3 2002/10/07 14:15:14 sam Exp $
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
...
...
@@ -46,7 +46,6 @@
#include <dvbpsi/pat.h>
#endif
/*****************************************************************************
* writePSI
*****************************************************************************/
...
...
@@ -95,6 +94,10 @@ static void writePSI(uint8_t* p_packet, dvbpsi_psi_section_t* p_section)
}
}
static
void
message
(
dvbpsi_t
*
handle
,
const
char
*
msg
)
{
fprintf
(
stderr
,
"%s
\n
"
,
msg
);
}
/*****************************************************************************
* main
...
...
@@ -108,6 +111,10 @@ int main(int i_argc, char* pa_argv[])
dvbpsi_psi_section_t
*
p_section5
,
*
p_section6
;
int
i
;
dvbpsi_t
*
p_dvbpsi
=
dvbpsi_NewHandle
(
&
message
,
DVBPSI_MSG_DEBUG
);
if
(
p_dvbpsi
==
NULL
)
return
1
;
/* PAT generation */
dvbpsi_InitPAT
(
&
pat
,
1
,
0
,
0
);
dvbpsi_PATAddProgram
(
&
pat
,
0
,
0x12
);
...
...
@@ -117,23 +124,23 @@ int main(int i_argc, char* pa_argv[])
for
(
i
=
4
;
i
<
43
;
i
++
)
dvbpsi_PATAddProgram
(
&
pat
,
i
,
i
);
p_section1
=
dvbpsi_GenPATSections
(
&
pat
,
4
);
p_section1
=
dvbpsi_GenPATSections
(
p_dvbpsi
,
&
pat
,
4
);
pat
.
b_current_next
=
1
;
p_section2
=
dvbpsi_GenPATSections
(
&
pat
,
8
);
p_section2
=
dvbpsi_GenPATSections
(
p_dvbpsi
,
&
pat
,
8
);
pat
.
i_version
=
1
;
pat
.
b_current_next
=
0
;
p_section3
=
dvbpsi_GenPATSections
(
&
pat
,
16
);
p_section3
=
dvbpsi_GenPATSections
(
p_dvbpsi
,
&
pat
,
16
);
pat
.
b_current_next
=
1
;
p_section4
=
dvbpsi_GenPATSections
(
&
pat
,
300
);
p_section4
=
dvbpsi_GenPATSections
(
p_dvbpsi
,
&
pat
,
300
);
pat
.
i_version
=
2
;
pat
.
b_current_next
=
0
;
p_section5
=
dvbpsi_GenPATSections
(
&
pat
,
16
);
p_section5
=
dvbpsi_GenPATSections
(
p_dvbpsi
,
&
pat
,
16
);
pat
.
b_current_next
=
1
;
p_section6
=
dvbpsi_GenPATSections
(
&
pat
,
16
);
p_section6
=
dvbpsi_GenPATSections
(
p_dvbpsi
,
&
pat
,
16
);
/* TS packets generation */
packet
[
0
]
=
0x47
;
...
...
@@ -147,7 +154,6 @@ int main(int i_argc, char* pa_argv[])
writePSI
(
packet
,
p_section5
);
writePSI
(
packet
,
p_section6
);
dvbpsi_DeletePSISections
(
p_section1
);
dvbpsi_DeletePSISections
(
p_section2
);
dvbpsi_DeletePSISections
(
p_section3
);
...
...
@@ -157,6 +163,7 @@ int main(int i_argc, char* pa_argv[])
dvbpsi_EmptyPAT
(
&
pat
);
dvbpsi_DeleteHandle
(
p_dvbpsi
);
return
0
;
}
misc/gen_pmt.c
View file @
a771fcb3
/*****************************************************************************
* gen_pmt.c: PMT generator
*----------------------------------------------------------------------------
* Copyright (C) 2001-201
0
VideoLAN
* Copyright (C) 2001-201
1
VideoLAN
* $Id$
*
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
...
...
@@ -97,6 +97,10 @@ static void writePSI(uint8_t* p_packet, dvbpsi_psi_section_t* p_section)
}
}
static
void
message
(
dvbpsi_t
*
handle
,
const
char
*
msg
)
{
fprintf
(
stderr
,
"%s
\n
"
,
msg
);
}
/*****************************************************************************
* main
...
...
@@ -111,6 +115,10 @@ int main(int i_argc, char* pa_argv[])
dvbpsi_psi_section_t
*
p_section3
,
*
p_section4
;
dvbpsi_psi_section_t
*
p_section5
,
*
p_section6
;
dvbpsi_t
*
p_dvbpsi
=
dvbpsi_NewHandle
(
&
message
,
DVBPSI_MSG_DEBUG
);
if
(
p_dvbpsi
==
NULL
)
return
1
;
/* PMT generation */
dvbpsi_InitPMT
(
&
pmt
,
12
,
0
,
0
,
42
);
dvbpsi_PMTAddDescriptor
(
&
pmt
,
12
,
26
,
data
);
...
...
@@ -123,23 +131,23 @@ int main(int i_argc, char* pa_argv[])
dvbpsi_PMTESAddDescriptor
(
p_es
,
2
,
1
,
data
+
4
);
dvbpsi_PMTESAddDescriptor
(
p_es
,
0
,
4
,
data
+
7
);
p_section1
=
dvbpsi_GenPMTSections
(
&
pmt
);
p_section1
=
dvbpsi_GenPMTSections
(
p_dvbpsi
,
&
pmt
);
pmt
.
b_current_next
=
1
;
p_section2
=
dvbpsi_GenPMTSections
(
&
pmt
);
p_section2
=
dvbpsi_GenPMTSections
(
p_dvbpsi
,
&
pmt
);
pmt
.
i_version
=
1
;
pmt
.
b_current_next
=
0
;
p_section3
=
dvbpsi_GenPMTSections
(
&
pmt
);
p_section3
=
dvbpsi_GenPMTSections
(
p_dvbpsi
,
&
pmt
);
pmt
.
b_current_next
=
1
;
p_section4
=
dvbpsi_GenPMTSections
(
&
pmt
);
p_section4
=
dvbpsi_GenPMTSections
(
p_dvbpsi
,
&
pmt
);
pmt
.
i_version
=
2
;
pmt
.
b_current_next
=
0
;
p_section5
=
dvbpsi_GenPMTSections
(
&
pmt
);
p_section5
=
dvbpsi_GenPMTSections
(
p_dvbpsi
,
&
pmt
);
pmt
.
b_current_next
=
1
;
p_section6
=
dvbpsi_GenPMTSections
(
&
pmt
);
p_section6
=
dvbpsi_GenPMTSections
(
p_dvbpsi
,
&
pmt
);
/* TS packets generation */
packet
[
0
]
=
0x47
;
...
...
@@ -163,7 +171,7 @@ int main(int i_argc, char* pa_argv[])
dvbpsi_DeletePSISections
(
p_section6
);
dvbpsi_EmptyPMT
(
&
pmt
);
dvbpsi_DeleteHandle
(
p_dvbpsi
);
return
0
;
}
misc/test_dr.c
View file @
a771fcb3
...
...
@@ -25,14 +25,14 @@
#include "test_dr.h"
/* video stream (b_mpeg2 = false) */
static
int
main_vstream_1
(
void
)
{
BOZO_VARS
(
vstream
);
BOZO_START
(
video
stream
(
b_mpeg2
=
false
));
/* check b_multiple_frame_rate */
BOZO_init_boolean
(
b_multiple_frame_rate
,
0
);
BOZO_init_integer
(
i_frame_rate_code
,
0
);
...
...
@@ -93,7 +93,7 @@ static int main_vstream_2(void)
BOZO_VARS
(
vstream
);
BOZO_START
(
video
stream
(
b_mpeg2
=
true
));
/* check b_multiple_frame_rate */
BOZO_init_boolean
(
b_multiple_frame_rate
,
0
);
BOZO_init_integer
(
i_frame_rate_code
,
0
);
...
...
@@ -211,7 +211,7 @@ static int main_astream_(void)
BOZO_VARS
(
astream
);
BOZO_START
(
audio
stream
);
/* check b_free_format */
BOZO_init_boolean
(
b_free_format
,
0
);
BOZO_init_integer
(
i_id
,
0
);
...
...
@@ -254,7 +254,7 @@ static int main_hierarchy_(void)
BOZO_VARS
(
hierarchy
);
BOZO_START
(
hierarchy
);
/* check i_h_type */
BOZO_init_integer
(
i_h_type
,
0
);
BOZO_init_integer
(
i_h_layer_index
,
0
);
...
...
@@ -311,7 +311,7 @@ static int main_registration_(void)
BOZO_VARS
(
registration
);
BOZO_START
(
registration
);
/* check i_format_identifier */
s_decoded
.
i_additional_length
=
0
;
BOZO_init_integer
(
i_format_identifier
,
0
);
...
...
@@ -333,7 +333,7 @@ static int main_ds_alignment_(void)
BOZO_VARS
(
ds_alignment
);
BOZO_START
(
data
stream
alignment
);
/* check i_alignment_type */
BOZO_init_integer
(
i_alignment_type
,
0
);
BOZO_begin_integer
(
i_alignment_type
,
8
)
...
...
@@ -354,7 +354,7 @@ static int main_target_bg_grid_(void)
BOZO_VARS
(
target_bg_grid
);
BOZO_START
(
target
background
grid
);
/* check i_horizontal_size */
BOZO_init_integer
(
i_horizontal_size
,
0
);
BOZO_init_integer
(
i_vertical_size
,
0
);
...
...
@@ -397,7 +397,7 @@ static int main_vwindow_(void)
BOZO_VARS
(
vwindow
);
BOZO_START
(
video
window
);
/* check i_horizontal_offset */
BOZO_init_integer
(
i_horizontal_offset
,
0
);
BOZO_init_integer
(
i_vertical_offset
,
0
);
...
...
@@ -440,7 +440,7 @@ static int main_ca_(void)
BOZO_VARS
(
ca
);
BOZO_START
(
conditional
access
);
/* check i_ca_system_id */
s_decoded
.
i_private_length
=
0
;
BOZO_init_integer
(
i_ca_system_id
,
0
);
...
...
@@ -473,7 +473,7 @@ static int main_system_clock_(void)
BOZO_VARS
(
system_clock
);
BOZO_START
(
system
clock
);
/* check b_external_clock_ref */
BOZO_init_boolean
(
b_external_clock_ref
,
0
);
BOZO_init_integer
(
i_clock_accuracy_integer
,
0
);
...
...
@@ -516,7 +516,7 @@ static int main_mx_buff_utilization_(void)
BOZO_VARS
(
mx_buff_utilization
);
BOZO_START
(
multiplex
buffer
utilization
);
/* check b_mdv_valid */
BOZO_init_boolean
(
b_mdv_valid
,
0
);
BOZO_init_integer
(
i_mx_delay_variation
,
0
);
...
...
@@ -559,7 +559,7 @@ static int main_copyright_(void)
BOZO_VARS
(
copyright
);
BOZO_START
(
copyright
);
/* check i_copyright_identifier */
s_decoded
.
i_additional_length
=
0
;
BOZO_init_integer
(
i_copyright_identifier
,
0
);
...
...
@@ -581,7 +581,7 @@ static int main_max_bitrate_(void)
BOZO_VARS
(
max_bitrate
);
BOZO_START
(
maximum
bitrate
);
/* check i_max_bitrate */
BOZO_init_integer
(
i_max_bitrate
,
0
);
BOZO_begin_integer
(
i_max_bitrate
,
22
)
...
...
@@ -602,7 +602,7 @@ static int main_private_data_(void)
BOZO_VARS
(
private_data
);
BOZO_START
(
private
data
indicator
);
/* check i_private_data */
BOZO_init_integer
(
i_private_data
,
0
);
BOZO_begin_integer
(
i_private_data
,
32
)
...
...
@@ -623,7 +623,7 @@ static int main_service_(void)
BOZO_VARS
(
service
);
BOZO_START
(
service
);
/* check i_service_type */
s_decoded
.
i_service_provider_name_length
=
0
;
s_decoded
.
i_service_name_length
=
0
;
...
...
@@ -645,7 +645,7 @@ static int main_service_(void)
int
main
(
void
)
{
int
i_err
=
0
;
i_err
|=
main_vstream_1
();
i_err
|=
main_vstream_2
();
i_err
|=
main_astream_
();
...
...
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