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
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
19 deletions
+34
-19
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
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
;
}
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