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
62a01b89
Commit
62a01b89
authored
Jul 14, 2008
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fix a bunch of warnings, mostly due to missing or invalid prototypes.
parent
80b5d69f
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
85 additions
and
77 deletions
+85
-77
examples/connect.c
examples/connect.c
+2
-0
examples/decode_mpeg.c
examples/decode_mpeg.c
+13
-13
examples/decode_pat.c
examples/decode_pat.c
+2
-2
examples/decode_pmt.c
examples/decode_pmt.c
+8
-8
examples/decode_sdt.c
examples/decode_sdt.c
+4
-4
misc/gen_crc.c
misc/gen_crc.c
+1
-1
misc/gen_pat.c
misc/gen_pat.c
+1
-1
misc/gen_pmt.c
misc/gen_pmt.c
+1
-1
misc/test_dr.c
misc/test_dr.c
+33
-33
src/descriptors/dr_4e.c
src/descriptors/dr_4e.c
+0
-1
src/tables/cat.c
src/tables/cat.c
+1
-1
src/tables/eit.c
src/tables/eit.c
+2
-2
src/tables/nit.c
src/tables/nit.c
+3
-3
src/tables/pat.c
src/tables/pat.c
+1
-1
src/tables/pmt.c
src/tables/pmt.c
+3
-3
src/tables/sdt.c
src/tables/sdt.c
+3
-3
src/tables/tot_private.h
src/tables/tot_private.h
+7
-0
No files found.
examples/connect.c
View file @
62a01b89
...
@@ -44,6 +44,8 @@
...
@@ -44,6 +44,8 @@
#include <netinet/udp.h>
#include <netinet/udp.h>
#include <arpa/inet.h>
#include <arpa/inet.h>
#include "connect.h"
int
create_tcp_connection
(
const
char
*
ipaddress
,
int
port
)
int
create_tcp_connection
(
const
char
*
ipaddress
,
int
port
)
{
{
struct
sockaddr_in
addr_ctl
;
struct
sockaddr_in
addr_ctl
;
...
...
examples/decode_mpeg.c
View file @
62a01b89
...
@@ -137,12 +137,12 @@ typedef struct
...
@@ -137,12 +137,12 @@ typedef struct
/*****************************************************************************
/*****************************************************************************
* Local prototypes
* Local prototypes
*****************************************************************************/
*****************************************************************************/
void
DumpPMT
(
void
*
p_data
,
dvbpsi_pmt_t
*
p_pmt
);
static
void
DumpPMT
(
void
*
p_data
,
dvbpsi_pmt_t
*
p_pmt
);
/*****************************************************************************
/*****************************************************************************
* ReadPacket
* ReadPacket
*****************************************************************************/
*****************************************************************************/
int
ReadPacket
(
int
i_fd
,
uint8_t
*
p_dst
)
static
int
ReadPacket
(
int
i_fd
,
uint8_t
*
p_dst
)
{
{
int
i
=
187
;
int
i
=
187
;
int
i_rc
=
1
;
int
i_rc
=
1
;
...
@@ -164,7 +164,7 @@ int ReadPacket( int i_fd, uint8_t* p_dst )
...
@@ -164,7 +164,7 @@ int ReadPacket( int i_fd, uint8_t* p_dst )
}
}
#ifdef HAVE_SYS_SOCKET_H
#ifdef HAVE_SYS_SOCKET_H
int
ReadPacketFromSocket
(
int
i_socket
,
uint8_t
*
p_dst
,
size_t
i_size
)
static
int
ReadPacketFromSocket
(
int
i_socket
,
uint8_t
*
p_dst
,
size_t
i_size
)
{
{
int
i_rc
=
-
1
;
int
i_rc
=
-
1
;
...
@@ -172,14 +172,14 @@ int ReadPacketFromSocket( int i_socket, uint8_t* p_dst, size_t i_size)
...
@@ -172,14 +172,14 @@ int ReadPacketFromSocket( int i_socket, uint8_t* p_dst, size_t i_size)
i_rc
=
read
(
i_socket
,
p_dst
,
i_size
);
i_rc
=
read
(
i_socket
,
p_dst
,
i_size
);
if
(
i_rc
<
0
)
printf
(
"READ INTERRUPTED BY SIGNAL
\n
"
);
if
(
i_rc
<
0
)
printf
(
"READ INTERRUPTED BY SIGNAL
\n
"
);
if
(
i_rc
==
0
)
printf
(
"READ RETURNS 0
\n
"
);
if
(
i_rc
==
0
)
printf
(
"READ RETURNS 0
\n
"
);
return
(
i_rc
<=
i_size
)
?
1
:
0
;
return
(
i_rc
<=
(
int
)
i_size
)
?
1
:
0
;
}
}
#endif
#endif
/*****************************************************************************
/*****************************************************************************
* DumpPAT
* DumpPAT
*****************************************************************************/
*****************************************************************************/
void
DumpPAT
(
void
*
p_data
,
dvbpsi_pat_t
*
p_pat
)
static
void
DumpPAT
(
void
*
p_data
,
dvbpsi_pat_t
*
p_pat
)
{
{
dvbpsi_pat_program_t
*
p_program
=
p_pat
->
p_first_program
;
dvbpsi_pat_program_t
*
p_program
=
p_pat
->
p_first_program
;
ts_stream_t
*
p_stream
=
(
ts_stream_t
*
)
p_data
;
ts_stream_t
*
p_stream
=
(
ts_stream_t
*
)
p_data
;
...
@@ -211,7 +211,7 @@ void DumpPAT(void* p_data, dvbpsi_pat_t* p_pat)
...
@@ -211,7 +211,7 @@ void DumpPAT(void* p_data, dvbpsi_pat_t* p_pat)
/*****************************************************************************
/*****************************************************************************
* GetTypeName
* GetTypeName
*****************************************************************************/
*****************************************************************************/
char
*
GetTypeName
(
uint8_t
type
)
static
char
const
*
GetTypeName
(
uint8_t
type
)
{
{
switch
(
type
)
switch
(
type
)
{
{
...
@@ -256,7 +256,7 @@ char* GetTypeName(uint8_t type)
...
@@ -256,7 +256,7 @@ char* GetTypeName(uint8_t type)
/*****************************************************************************
/*****************************************************************************
* DumpMaxBitrateDescriptor
* DumpMaxBitrateDescriptor
*****************************************************************************/
*****************************************************************************/
void
DumpMaxBitrateDescriptor
(
dvbpsi_max_bitrate_dr_t
*
bitrate_descriptor
)
static
void
DumpMaxBitrateDescriptor
(
dvbpsi_max_bitrate_dr_t
*
bitrate_descriptor
)
{
{
printf
(
"Bitrate: %d
\n
"
,
bitrate_descriptor
->
i_max_bitrate
);
printf
(
"Bitrate: %d
\n
"
,
bitrate_descriptor
->
i_max_bitrate
);
}
}
...
@@ -264,7 +264,7 @@ void DumpMaxBitrateDescriptor(dvbpsi_max_bitrate_dr_t* bitrate_descriptor)
...
@@ -264,7 +264,7 @@ void DumpMaxBitrateDescriptor(dvbpsi_max_bitrate_dr_t* bitrate_descriptor)
/*****************************************************************************
/*****************************************************************************
* DumpSystemClockDescriptor
* DumpSystemClockDescriptor
*****************************************************************************/
*****************************************************************************/
void
DumpSystemClockDescriptor
(
dvbpsi_system_clock_dr_t
*
p_clock_descriptor
)
static
void
DumpSystemClockDescriptor
(
dvbpsi_system_clock_dr_t
*
p_clock_descriptor
)
{
{
printf
(
"External clock: %s, Accuracy: %E
\n
"
,
printf
(
"External clock: %s, Accuracy: %E
\n
"
,
p_clock_descriptor
->
b_external_clock_ref
?
"Yes"
:
"No"
,
p_clock_descriptor
->
b_external_clock_ref
?
"Yes"
:
"No"
,
...
@@ -275,7 +275,7 @@ void DumpSystemClockDescriptor(dvbpsi_system_clock_dr_t* p_clock_descriptor)
...
@@ -275,7 +275,7 @@ void DumpSystemClockDescriptor(dvbpsi_system_clock_dr_t* p_clock_descriptor)
/*****************************************************************************
/*****************************************************************************
* DumpStreamIdentifierDescriptor
* DumpStreamIdentifierDescriptor
*****************************************************************************/
*****************************************************************************/
void
DumpStreamIdentifierDescriptor
(
dvbpsi_stream_identifier_dr_t
*
p_si_descriptor
)
static
void
DumpStreamIdentifierDescriptor
(
dvbpsi_stream_identifier_dr_t
*
p_si_descriptor
)
{
{
printf
(
"Component tag: %d
\n
"
,
printf
(
"Component tag: %d
\n
"
,
p_si_descriptor
->
i_component_tag
);
p_si_descriptor
->
i_component_tag
);
...
@@ -284,7 +284,7 @@ void DumpStreamIdentifierDescriptor(dvbpsi_stream_identifier_dr_t* p_si_descript
...
@@ -284,7 +284,7 @@ void DumpStreamIdentifierDescriptor(dvbpsi_stream_identifier_dr_t* p_si_descript
/*****************************************************************************
/*****************************************************************************
* DumpSubtitleDescriptor
* DumpSubtitleDescriptor
*****************************************************************************/
*****************************************************************************/
void
DumpSubtitleDescriptor
(
dvbpsi_subtitling_dr_t
*
p_subtitle_descriptor
)
static
void
DumpSubtitleDescriptor
(
dvbpsi_subtitling_dr_t
*
p_subtitle_descriptor
)
{
{
int
a
;
int
a
;
...
@@ -304,7 +304,7 @@ void DumpSubtitleDescriptor(dvbpsi_subtitling_dr_t* p_subtitle_descriptor)
...
@@ -304,7 +304,7 @@ void DumpSubtitleDescriptor(dvbpsi_subtitling_dr_t* p_subtitle_descriptor)
/*****************************************************************************
/*****************************************************************************
* DumpDescriptors
* DumpDescriptors
*****************************************************************************/
*****************************************************************************/
void
DumpDescriptors
(
const
char
*
str
,
dvbpsi_descriptor_t
*
p_descriptor
)
static
void
DumpDescriptors
(
const
char
*
str
,
dvbpsi_descriptor_t
*
p_descriptor
)
{
{
int
i
;
int
i
;
...
@@ -338,7 +338,7 @@ void DumpDescriptors(const char* str, dvbpsi_descriptor_t* p_descriptor)
...
@@ -338,7 +338,7 @@ void DumpDescriptors(const char* str, dvbpsi_descriptor_t* p_descriptor)
/*****************************************************************************
/*****************************************************************************
* DumpPMT
* DumpPMT
*****************************************************************************/
*****************************************************************************/
void
DumpPMT
(
void
*
p_data
,
dvbpsi_pmt_t
*
p_pmt
)
static
void
DumpPMT
(
void
*
p_data
,
dvbpsi_pmt_t
*
p_pmt
)
{
{
dvbpsi_pmt_es_t
*
p_es
=
p_pmt
->
p_first_es
;
dvbpsi_pmt_es_t
*
p_es
=
p_pmt
->
p_first_es
;
ts_stream_t
*
p_stream
=
(
ts_stream_t
*
)
p_data
;
ts_stream_t
*
p_stream
=
(
ts_stream_t
*
)
p_data
;
...
@@ -367,7 +367,7 @@ void DumpPMT(void* p_data, dvbpsi_pmt_t* p_pmt)
...
@@ -367,7 +367,7 @@ void DumpPMT(void* p_data, dvbpsi_pmt_t* p_pmt)
/*****************************************************************************
/*****************************************************************************
* usage
* usage
*****************************************************************************/
*****************************************************************************/
void
usage
(
char
*
name
)
static
void
usage
(
char
*
name
)
{
{
#ifdef HAVE_SYS_SOCKET_H
#ifdef HAVE_SYS_SOCKET_H
printf
(
"Usage: %s [--file <filename>|--udp <ipaddress> --port <port> -mtu <mtu>|--help]
\n
"
,
name
);
printf
(
"Usage: %s [--file <filename>|--udp <ipaddress> --port <port> -mtu <mtu>|--help]
\n
"
,
name
);
...
...
examples/decode_pat.c
View file @
62a01b89
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
/*****************************************************************************
/*****************************************************************************
* ReadPacket
* ReadPacket
*****************************************************************************/
*****************************************************************************/
int
ReadPacket
(
int
i_fd
,
uint8_t
*
p_dst
)
static
int
ReadPacket
(
int
i_fd
,
uint8_t
*
p_dst
)
{
{
int
i
=
187
;
int
i
=
187
;
int
i_rc
=
1
;
int
i_rc
=
1
;
...
@@ -79,7 +79,7 @@ int ReadPacket(int i_fd, uint8_t* p_dst)
...
@@ -79,7 +79,7 @@ int ReadPacket(int i_fd, uint8_t* p_dst)
/*****************************************************************************
/*****************************************************************************
* DumpPAT
* DumpPAT
*****************************************************************************/
*****************************************************************************/
void
DumpPAT
(
void
*
p_zero
,
dvbpsi_pat_t
*
p_pat
)
static
void
DumpPAT
(
void
*
p_zero
,
dvbpsi_pat_t
*
p_pat
)
{
{
dvbpsi_pat_program_t
*
p_program
=
p_pat
->
p_first_program
;
dvbpsi_pat_program_t
*
p_program
=
p_pat
->
p_first_program
;
printf
(
"
\n
"
);
printf
(
"
\n
"
);
...
...
examples/decode_pmt.c
View file @
62a01b89
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
/*****************************************************************************
/*****************************************************************************
* ReadPacket
* ReadPacket
*****************************************************************************/
*****************************************************************************/
int
ReadPacket
(
int
i_fd
,
uint8_t
*
p_dst
)
static
int
ReadPacket
(
int
i_fd
,
uint8_t
*
p_dst
)
{
{
int
i
=
187
;
int
i
=
187
;
int
i_rc
=
1
;
int
i_rc
=
1
;
...
@@ -87,7 +87,7 @@ int ReadPacket(int i_fd, uint8_t* p_dst)
...
@@ -87,7 +87,7 @@ int ReadPacket(int i_fd, uint8_t* p_dst)
/*****************************************************************************
/*****************************************************************************
* GetTypeName
* GetTypeName
*****************************************************************************/
*****************************************************************************/
char
*
GetTypeName
(
uint8_t
type
)
static
char
*
GetTypeName
(
uint8_t
type
)
{
{
switch
(
type
)
switch
(
type
)
{
{
...
@@ -132,7 +132,7 @@ char* GetTypeName(uint8_t type)
...
@@ -132,7 +132,7 @@ char* GetTypeName(uint8_t type)
/*****************************************************************************
/*****************************************************************************
* DumpMaxBitrateDescriptor
* DumpMaxBitrateDescriptor
*****************************************************************************/
*****************************************************************************/
void
DumpMaxBitrateDescriptor
(
dvbpsi_max_bitrate_dr_t
*
bitrate_descriptor
)
static
void
DumpMaxBitrateDescriptor
(
dvbpsi_max_bitrate_dr_t
*
bitrate_descriptor
)
{
{
printf
(
"Bitrate: %d
\n
"
,
bitrate_descriptor
->
i_max_bitrate
);
printf
(
"Bitrate: %d
\n
"
,
bitrate_descriptor
->
i_max_bitrate
);
}
}
...
@@ -140,7 +140,7 @@ void DumpMaxBitrateDescriptor(dvbpsi_max_bitrate_dr_t* bitrate_descriptor)
...
@@ -140,7 +140,7 @@ void DumpMaxBitrateDescriptor(dvbpsi_max_bitrate_dr_t* bitrate_descriptor)
/*****************************************************************************
/*****************************************************************************
* DumpSystemClockDescriptor
* DumpSystemClockDescriptor
*****************************************************************************/
*****************************************************************************/
void
DumpSystemClockDescriptor
(
dvbpsi_system_clock_dr_t
*
p_clock_descriptor
)
static
void
DumpSystemClockDescriptor
(
dvbpsi_system_clock_dr_t
*
p_clock_descriptor
)
{
{
printf
(
"External clock: %s, Accuracy: %E
\n
"
,
printf
(
"External clock: %s, Accuracy: %E
\n
"
,
p_clock_descriptor
->
b_external_clock_ref
?
"Yes"
:
"No"
,
p_clock_descriptor
->
b_external_clock_ref
?
"Yes"
:
"No"
,
...
@@ -151,7 +151,7 @@ void DumpSystemClockDescriptor(dvbpsi_system_clock_dr_t* p_clock_descriptor)
...
@@ -151,7 +151,7 @@ void DumpSystemClockDescriptor(dvbpsi_system_clock_dr_t* p_clock_descriptor)
/*****************************************************************************
/*****************************************************************************
* DumpStreamIdentifierDescriptor
* DumpStreamIdentifierDescriptor
*****************************************************************************/
*****************************************************************************/
void
DumpStreamIdentifierDescriptor
(
dvbpsi_stream_identifier_dr_t
*
p_si_descriptor
)
static
void
DumpStreamIdentifierDescriptor
(
dvbpsi_stream_identifier_dr_t
*
p_si_descriptor
)
{
{
printf
(
"Component tag: %d
\n
"
,
printf
(
"Component tag: %d
\n
"
,
p_si_descriptor
->
i_component_tag
);
p_si_descriptor
->
i_component_tag
);
...
@@ -160,7 +160,7 @@ void DumpStreamIdentifierDescriptor(dvbpsi_stream_identifier_dr_t* p_si_descript
...
@@ -160,7 +160,7 @@ void DumpStreamIdentifierDescriptor(dvbpsi_stream_identifier_dr_t* p_si_descript
/*****************************************************************************
/*****************************************************************************
* DumpSubtitleDescriptor
* DumpSubtitleDescriptor
*****************************************************************************/
*****************************************************************************/
void
DumpSubtitleDescriptor
(
dvbpsi_subtitling_dr_t
*
p_subtitle_descriptor
)
static
void
DumpSubtitleDescriptor
(
dvbpsi_subtitling_dr_t
*
p_subtitle_descriptor
)
{
{
int
a
;
int
a
;
...
@@ -180,7 +180,7 @@ void DumpSubtitleDescriptor(dvbpsi_subtitling_dr_t* p_subtitle_descriptor)
...
@@ -180,7 +180,7 @@ void DumpSubtitleDescriptor(dvbpsi_subtitling_dr_t* p_subtitle_descriptor)
/*****************************************************************************
/*****************************************************************************
* DumpDescriptors
* DumpDescriptors
*****************************************************************************/
*****************************************************************************/
void
DumpDescriptors
(
const
char
*
str
,
dvbpsi_descriptor_t
*
p_descriptor
)
static
void
DumpDescriptors
(
const
char
*
str
,
dvbpsi_descriptor_t
*
p_descriptor
)
{
{
int
i
;
int
i
;
...
@@ -215,7 +215,7 @@ void DumpDescriptors(const char* str, dvbpsi_descriptor_t* p_descriptor)
...
@@ -215,7 +215,7 @@ void DumpDescriptors(const char* str, dvbpsi_descriptor_t* p_descriptor)
/*****************************************************************************
/*****************************************************************************
* DumpPMT
* DumpPMT
*****************************************************************************/
*****************************************************************************/
void
DumpPMT
(
void
*
p_zero
,
dvbpsi_pmt_t
*
p_pmt
)
static
void
DumpPMT
(
void
*
p_zero
,
dvbpsi_pmt_t
*
p_pmt
)
{
{
dvbpsi_pmt_es_t
*
p_es
=
p_pmt
->
p_first_es
;
dvbpsi_pmt_es_t
*
p_es
=
p_pmt
->
p_first_es
;
printf
(
"
\n
"
);
printf
(
"
\n
"
);
...
...
examples/decode_sdt.c
View file @
62a01b89
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
/*****************************************************************************
/*****************************************************************************
* ReadPacket
* ReadPacket
*****************************************************************************/
*****************************************************************************/
int
ReadPacket
(
int
i_fd
,
uint8_t
*
p_dst
)
static
int
ReadPacket
(
int
i_fd
,
uint8_t
*
p_dst
)
{
{
int
i
=
187
;
int
i
=
187
;
int
i_rc
=
1
;
int
i_rc
=
1
;
...
@@ -84,7 +84,7 @@ int ReadPacket(int i_fd, uint8_t* p_dst)
...
@@ -84,7 +84,7 @@ int ReadPacket(int i_fd, uint8_t* p_dst)
/*****************************************************************************
/*****************************************************************************
* DumpDescriptors
* DumpDescriptors
*****************************************************************************/
*****************************************************************************/
void
DumpDescriptors
(
const
char
*
str
,
dvbpsi_descriptor_t
*
p_descriptor
)
static
void
DumpDescriptors
(
const
char
*
str
,
dvbpsi_descriptor_t
*
p_descriptor
)
{
{
while
(
p_descriptor
)
while
(
p_descriptor
)
{
{
...
@@ -101,7 +101,7 @@ void DumpDescriptors(const char* str, dvbpsi_descriptor_t* p_descriptor)
...
@@ -101,7 +101,7 @@ void DumpDescriptors(const char* str, dvbpsi_descriptor_t* p_descriptor)
/*****************************************************************************
/*****************************************************************************
* DumpSDT
* DumpSDT
*****************************************************************************/
*****************************************************************************/
void
DumpSDT
(
void
*
p_zero
,
dvbpsi_sdt_t
*
p_sdt
)
static
void
DumpSDT
(
void
*
p_zero
,
dvbpsi_sdt_t
*
p_sdt
)
{
{
dvbpsi_sdt_service_t
*
p_service
=
p_sdt
->
p_first_service
;
dvbpsi_sdt_service_t
*
p_service
=
p_sdt
->
p_first_service
;
printf
(
"
\n
"
);
printf
(
"
\n
"
);
...
@@ -126,7 +126,7 @@ void DumpSDT(void* p_zero, dvbpsi_sdt_t* p_sdt)
...
@@ -126,7 +126,7 @@ void DumpSDT(void* p_zero, dvbpsi_sdt_t* p_sdt)
/*****************************************************************************
/*****************************************************************************
* NewSubtable
* NewSubtable
*****************************************************************************/
*****************************************************************************/
void
NewSubtable
(
void
*
p_zero
,
dvbpsi_handle
h_dvbpsi
,
static
void
NewSubtable
(
void
*
p_zero
,
dvbpsi_handle
h_dvbpsi
,
uint8_t
i_table_id
,
uint16_t
i_extension
)
uint8_t
i_table_id
,
uint16_t
i_extension
)
{
{
if
(
i_table_id
==
0x42
)
if
(
i_table_id
==
0x42
)
...
...
misc/gen_crc.c
View file @
62a01b89
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
/*****************************************************************************
/*****************************************************************************
* main
* main
*****************************************************************************/
*****************************************************************************/
int
main
()
int
main
(
void
)
{
{
uint32_t
table
[
256
];
uint32_t
table
[
256
];
uint32_t
i
,
j
,
k
;
uint32_t
i
,
j
,
k
;
...
...
misc/gen_pat.c
View file @
62a01b89
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
/*****************************************************************************
/*****************************************************************************
* writePSI
* writePSI
*****************************************************************************/
*****************************************************************************/
void
writePSI
(
uint8_t
*
p_packet
,
dvbpsi_psi_section_t
*
p_section
)
static
void
writePSI
(
uint8_t
*
p_packet
,
dvbpsi_psi_section_t
*
p_section
)
{
{
p_packet
[
0
]
=
0x47
;
p_packet
[
0
]
=
0x47
;
...
...
misc/gen_pmt.c
View file @
62a01b89
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
/*****************************************************************************
/*****************************************************************************
* writePSI
* writePSI
*****************************************************************************/
*****************************************************************************/
void
writePSI
(
uint8_t
*
p_packet
,
dvbpsi_psi_section_t
*
p_section
)
static
void
writePSI
(
uint8_t
*
p_packet
,
dvbpsi_psi_section_t
*
p_section
)
{
{
p_packet
[
0
]
=
0x47
;
p_packet
[
0
]
=
0x47
;
...
...
misc/test_dr.c
View file @
62a01b89
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
/* video stream (b_mpeg2 = false) */
/* video stream (b_mpeg2 = false) */
int
main_vstream_1
(
)
static
int
main_vstream_1
(
void
)
{
{
BOZO_VARS
(
vstream
);
BOZO_VARS
(
vstream
);
BOZO_START
(
video
stream
(
b_mpeg2
=
false
));
BOZO_START
(
video
stream
(
b_mpeg2
=
false
));
...
@@ -88,7 +88,7 @@ int main_vstream_1()
...
@@ -88,7 +88,7 @@ int main_vstream_1()
}
}
/* video stream (b_mpeg2 = true) */
/* video stream (b_mpeg2 = true) */
int
main_vstream_2
(
)
static
int
main_vstream_2
(
void
)
{
{
BOZO_VARS
(
vstream
);
BOZO_VARS
(
vstream
);
BOZO_START
(
video
stream
(
b_mpeg2
=
true
));
BOZO_START
(
video
stream
(
b_mpeg2
=
true
));
...
@@ -206,7 +206,7 @@ int main_vstream_2()
...
@@ -206,7 +206,7 @@ int main_vstream_2()
}
}
/* audio stream */
/* audio stream */
int
main_astream_
(
)
static
int
main_astream_
(
void
)
{
{
BOZO_VARS
(
astream
);
BOZO_VARS
(
astream
);
BOZO_START
(
audio
stream
);
BOZO_START
(
audio
stream
);
...
@@ -249,7 +249,7 @@ int main_astream_()
...
@@ -249,7 +249,7 @@ int main_astream_()
}
}
/* hierarchy */
/* hierarchy */
int
main_hierarchy_
(
)
static
int
main_hierarchy_
(
void
)
{
{
BOZO_VARS
(
hierarchy
);
BOZO_VARS
(
hierarchy
);
BOZO_START
(
hierarchy
);
BOZO_START
(
hierarchy
);
...
@@ -306,7 +306,7 @@ int main_hierarchy_()
...
@@ -306,7 +306,7 @@ int main_hierarchy_()
}
}
/* registration */
/* registration */
int
main_registration_
(
)
static
int
main_registration_
(
void
)
{
{
BOZO_VARS
(
registration
);
BOZO_VARS
(
registration
);
BOZO_START
(
registration
);
BOZO_START
(
registration
);
...
@@ -328,7 +328,7 @@ int main_registration_()
...
@@ -328,7 +328,7 @@ int main_registration_()
}
}
/* data stream alignment */
/* data stream alignment */
int
main_ds_alignment_
(
)
static
int
main_ds_alignment_
(
void
)
{
{
BOZO_VARS
(
ds_alignment
);
BOZO_VARS
(
ds_alignment
);
BOZO_START
(
data
stream
alignment
);
BOZO_START
(
data
stream
alignment
);
...
@@ -349,7 +349,7 @@ int main_ds_alignment_()
...
@@ -349,7 +349,7 @@ int main_ds_alignment_()
}
}
/* target background grid */
/* target background grid */
int
main_target_bg_grid_
(
)
static
int
main_target_bg_grid_
(
void
)
{
{
BOZO_VARS
(
target_bg_grid
);
BOZO_VARS
(
target_bg_grid
);
BOZO_START
(
target
background
grid
);
BOZO_START
(
target
background
grid
);
...
@@ -392,7 +392,7 @@ int main_target_bg_grid_()
...
@@ -392,7 +392,7 @@ int main_target_bg_grid_()
}
}
/* video window */
/* video window */
int
main_vwindow_
(
)
static
int
main_vwindow_
(
void
)
{
{
BOZO_VARS
(
vwindow
);
BOZO_VARS
(
vwindow
);
BOZO_START
(
video
window
);
BOZO_START
(
video
window
);
...
@@ -435,7 +435,7 @@ int main_vwindow_()
...
@@ -435,7 +435,7 @@ int main_vwindow_()
}
}
/* conditional access */
/* conditional access */
int
main_ca_
(
)
static
int
main_ca_
(
void
)
{
{
BOZO_VARS
(
ca
);
BOZO_VARS
(
ca
);
BOZO_START
(
conditional
access
);
BOZO_START
(
conditional
access
);
...
@@ -468,7 +468,7 @@ int main_ca_()
...
@@ -468,7 +468,7 @@ int main_ca_()
}
}
/* system clock */
/* system clock */
int
main_system_clock_
(
)
static
int
main_system_clock_
(
void
)
{
{
BOZO_VARS
(
system_clock
);
BOZO_VARS
(
system_clock
);
BOZO_START
(
system
clock
);
BOZO_START
(
system
clock
);
...
@@ -511,7 +511,7 @@ int main_system_clock_()
...
@@ -511,7 +511,7 @@ int main_system_clock_()
}
}
/* multiplex buffer utilization */
/* multiplex buffer utilization */
int
main_mx_buff_utilization_
(
)
static
int
main_mx_buff_utilization_
(
void
)
{
{
BOZO_VARS
(
mx_buff_utilization
);
BOZO_VARS
(
mx_buff_utilization
);
BOZO_START
(
multiplex
buffer
utilization
);
BOZO_START
(
multiplex
buffer
utilization
);
...
@@ -554,7 +554,7 @@ int main_mx_buff_utilization_()
...
@@ -554,7 +554,7 @@ int main_mx_buff_utilization_()
}
}
/* copyright */
/* copyright */
int
main_copyright_
(
)
static
int
main_copyright_
(
void
)
{
{
BOZO_VARS
(
copyright
);
BOZO_VARS
(
copyright
);
BOZO_START
(
copyright
);
BOZO_START
(
copyright
);
...
@@ -576,7 +576,7 @@ int main_copyright_()
...
@@ -576,7 +576,7 @@ int main_copyright_()
}
}
/* maximum bitrate */
/* maximum bitrate */
int
main_max_bitrate_
(
)
static
int
main_max_bitrate_
(
void
)
{
{
BOZO_VARS
(
max_bitrate
);
BOZO_VARS
(
max_bitrate
);
BOZO_START
(
maximum
bitrate
);
BOZO_START
(
maximum
bitrate
);
...
@@ -597,7 +597,7 @@ int main_max_bitrate_()
...
@@ -597,7 +597,7 @@ int main_max_bitrate_()
}
}
/* private data indicator */
/* private data indicator */
int
main_private_data_
(
)
static
int
main_private_data_
(
void
)
{
{
BOZO_VARS
(
private_data
);
BOZO_VARS
(
private_data
);
BOZO_START
(
private
data
indicator
);
BOZO_START
(
private
data
indicator
);
...
@@ -618,7 +618,7 @@ int main_private_data_()
...
@@ -618,7 +618,7 @@ int main_private_data_()
}
}
/* service */
/* service */
int
main_service_
(
)
static
int
main_service_
(
void
)
{
{
BOZO_VARS
(
service
);
BOZO_VARS
(
service
);
BOZO_START
(
service
);
BOZO_START
(
service
);
...
@@ -642,7 +642,7 @@ int main_service_()
...
@@ -642,7 +642,7 @@ int main_service_()
/* main function */
/* main function */
int
main
()
int
main
(
void
)
{
{
int
i_err
=
0
;
int
i_err
=
0
;
...
...
src/descriptors/dr_4e.c
View file @
62a01b89
...
@@ -130,7 +130,6 @@ dvbpsi_descriptor_t * dvbpsi_GenExtendedEventDr(dvbpsi_extended_event_dr_t * p_d
...
@@ -130,7 +130,6 @@ dvbpsi_descriptor_t * dvbpsi_GenExtendedEventDr(dvbpsi_extended_event_dr_t * p_d
if
(
p_descriptor
)
if
(
p_descriptor
)
{
{
uint8_t
*
p
=
&
p_descriptor
->
p_data
[
0
];
uint8_t
*
p
=
&
p_descriptor
->
p_data
[
0
];
int
i
;
/* Encode data */
/* Encode data */
p
[
0
]
=
(
p_decoded
->
i_descriptor_number
<<
4
)
|
p
[
0
]
=
(
p_decoded
->
i_descriptor_number
<<
4
)
|
...
...
src/tables/cat.c
View file @
62a01b89
...
@@ -334,7 +334,7 @@ void dvbpsi_GatherCATSections(dvbpsi_decoder_t* p_decoder,
...
@@ -334,7 +334,7 @@ void dvbpsi_GatherCATSections(dvbpsi_decoder_t* p_decoder,
/* Chain the sections */
/* Chain the sections */
if
(
p_cat_decoder
->
i_last_section_number
)
if
(
p_cat_decoder
->
i_last_section_number
)
{
{
for
(
i
=
0
;
i
<=
p_cat_decoder
->
i_last_section_number
-
1
;
i
++
)
for
(
i
=
0
;
(
int
)
i
<=
p_cat_decoder
->
i_last_section_number
-
1
;
i
++
)
p_cat_decoder
->
ap_sections
[
i
]
->
p_next
=
p_cat_decoder
->
ap_sections
[
i
]
->
p_next
=
p_cat_decoder
->
ap_sections
[
i
+
1
];
p_cat_decoder
->
ap_sections
[
i
+
1
];
}
}
...
...
src/tables/eit.c
View file @
62a01b89
...
@@ -530,13 +530,13 @@ void dvbpsi_DecodeEITSections(dvbpsi_eit_t* p_eit,
...
@@ -530,13 +530,13 @@ void dvbpsi_DecodeEITSections(dvbpsi_eit_t* p_eit,
|
((
uint32_t
)(
p_byte
[
8
])
<<
8
)
|
p_byte
[
9
];
|
((
uint32_t
)(
p_byte
[
8
])
<<
8
)
|
p_byte
[
9
];
uint8_t
i_running_status
=
(
uint8_t
)(
p_byte
[
10
])
>>
5
;
uint8_t
i_running_status
=
(
uint8_t
)(
p_byte
[
10
])
>>
5
;
int
b_free_ca
=
(
int
)(
p_byte
[
10
]
&
0x10
)
>>
4
;
int
b_free_ca
=
(
int
)(
p_byte
[
10
]
&
0x10
)
>>
4
;
uint16_t
i_length
=
((
uint16_t
)(
p_byte
[
10
]
&
0xf
)
<<
8
)
|
p_byte
[
11
];
uint16_t
i_
ev_
length
=
((
uint16_t
)(
p_byte
[
10
]
&
0xf
)
<<
8
)
|
p_byte
[
11
];
dvbpsi_eit_event_t
*
p_event
=
dvbpsi_EITAddEvent
(
p_eit
,
dvbpsi_eit_event_t
*
p_event
=
dvbpsi_EITAddEvent
(
p_eit
,
i_event_id
,
i_start_time
,
i_duration
,
i_event_id
,
i_start_time
,
i_duration
,
i_running_status
,
b_free_ca
);
i_running_status
,
b_free_ca
);
/* Event descriptors */
/* Event descriptors */
p_byte
+=
12
;
p_byte
+=
12
;
p_end
=
p_byte
+
i_length
;
p_end
=
p_byte
+
i_
ev_
length
;
while
(
p_byte
+
2
<=
p_end
)
while
(
p_byte
+
2
<=
p_end
)
{
{
uint8_t
i_tag
=
p_byte
[
0
];
uint8_t
i_tag
=
p_byte
[
0
];
...
...
src/tables/nit.c
View file @
62a01b89
...
@@ -462,7 +462,7 @@ void dvbpsi_GatherNITSections(dvbpsi_decoder_t * p_decoder,
...
@@ -462,7 +462,7 @@ void dvbpsi_GatherNITSections(dvbpsi_decoder_t * p_decoder,
/* Chain the sections */
/* Chain the sections */
if
(
p_nit_decoder
->
i_last_section_number
)
if
(
p_nit_decoder
->
i_last_section_number
)
{
{
for
(
i
=
0
;
i
<=
p_nit_decoder
->
i_last_section_number
-
1
;
i
++
)
for
(
i
=
0
;
(
int
)
i
<=
p_nit_decoder
->
i_last_section_number
-
1
;
i
++
)
p_nit_decoder
->
ap_sections
[
i
]
->
p_next
=
p_nit_decoder
->
ap_sections
[
i
]
->
p_next
=
p_nit_decoder
->
ap_sections
[
i
+
1
];
p_nit_decoder
->
ap_sections
[
i
+
1
];
}
}
...
@@ -526,11 +526,11 @@ void dvbpsi_DecodeNITSections(dvbpsi_nit_t* p_nit,
...
@@ -526,11 +526,11 @@ void dvbpsi_DecodeNITSections(dvbpsi_nit_t* p_nit,
{
{
uint16_t
i_ts_id
=
((
uint16_t
)
p_byte
[
0
]
<<
8
)
|
p_byte
[
1
];
uint16_t
i_ts_id
=
((
uint16_t
)
p_byte
[
0
]
<<
8
)
|
p_byte
[
1
];
uint16_t
i_orig_network_id
=
((
uint16_t
)
p_byte
[
2
]
<<
8
)
|
p_byte
[
3
];
uint16_t
i_orig_network_id
=
((
uint16_t
)
p_byte
[
2
]
<<
8
)
|
p_byte
[
3
];
uint16_t
i_length
=
((
uint16_t
)(
p_byte
[
4
]
&
0x0f
)
<<
8
)
|
p_byte
[
5
];
uint16_t
i_
ts_
length
=
((
uint16_t
)(
p_byte
[
4
]
&
0x0f
)
<<
8
)
|
p_byte
[
5
];
dvbpsi_nit_ts_t
*
p_ts
=
dvbpsi_NITAddTS
(
p_nit
,
i_ts_id
,
i_orig_network_id
);
dvbpsi_nit_ts_t
*
p_ts
=
dvbpsi_NITAddTS
(
p_nit
,
i_ts_id
,
i_orig_network_id
);
/* - TS descriptors */
/* - TS descriptors */
p_byte
+=
6
;
p_byte
+=
6
;
p_end2
=
p_byte
+
i_length
;
p_end2
=
p_byte
+
i_
ts_
length
;
if
(
p_end2
>
p_section
->
p_payload_end
)
if
(
p_end2
>
p_section
->
p_payload_end
)
{
{
p_end2
=
p_section
->
p_payload_end
;
p_end2
=
p_section
->
p_payload_end
;
...
...
src/tables/pat.c
View file @
62a01b89
...
@@ -352,7 +352,7 @@ void dvbpsi_GatherPATSections(dvbpsi_decoder_t* p_decoder,
...
@@ -352,7 +352,7 @@ void dvbpsi_GatherPATSections(dvbpsi_decoder_t* p_decoder,
/* Chain the sections */
/* Chain the sections */
if
(
p_pat_decoder
->
i_last_section_number
)
if
(
p_pat_decoder
->
i_last_section_number
)
{
{
for
(
i
=
0
;
i
<=
p_pat_decoder
->
i_last_section_number
-
1
;
i
++
)
for
(
i
=
0
;
(
int
)
i
<=
p_pat_decoder
->
i_last_section_number
-
1
;
i
++
)
p_pat_decoder
->
ap_sections
[
i
]
->
p_next
=
p_pat_decoder
->
ap_sections
[
i
]
->
p_next
=
p_pat_decoder
->
ap_sections
[
i
+
1
];
p_pat_decoder
->
ap_sections
[
i
+
1
];
}
}
...
...
src/tables/pmt.c
View file @
62a01b89
...
@@ -427,7 +427,7 @@ void dvbpsi_GatherPMTSections(dvbpsi_decoder_t* p_decoder,
...
@@ -427,7 +427,7 @@ void dvbpsi_GatherPMTSections(dvbpsi_decoder_t* p_decoder,
/* Chain the sections */
/* Chain the sections */
if
(
p_pmt_decoder
->
i_last_section_number
)
if
(
p_pmt_decoder
->
i_last_section_number
)
{
{
for
(
i
=
0
;
i
<=
p_pmt_decoder
->
i_last_section_number
-
1
;
i
++
)
for
(
i
=
0
;
(
int
)
i
<=
p_pmt_decoder
->
i_last_section_number
-
1
;
i
++
)
p_pmt_decoder
->
ap_sections
[
i
]
->
p_next
=
p_pmt_decoder
->
ap_sections
[
i
]
->
p_next
=
p_pmt_decoder
->
ap_sections
[
i
+
1
];
p_pmt_decoder
->
ap_sections
[
i
+
1
];
}
}
...
@@ -482,11 +482,11 @@ void dvbpsi_DecodePMTSections(dvbpsi_pmt_t* p_pmt,
...
@@ -482,11 +482,11 @@ void dvbpsi_DecodePMTSections(dvbpsi_pmt_t* p_pmt,
{
{
uint8_t
i_type
=
p_byte
[
0
];
uint8_t
i_type
=
p_byte
[
0
];
uint16_t
i_pid
=
((
uint16_t
)(
p_byte
[
1
]
&
0x1f
)
<<
8
)
|
p_byte
[
2
];
uint16_t
i_pid
=
((
uint16_t
)(
p_byte
[
1
]
&
0x1f
)
<<
8
)
|
p_byte
[
2
];
uint16_t
i_length
=
((
uint16_t
)(
p_byte
[
3
]
&
0x0f
)
<<
8
)
|
p_byte
[
4
];
uint16_t
i_
es_
length
=
((
uint16_t
)(
p_byte
[
3
]
&
0x0f
)
<<
8
)
|
p_byte
[
4
];
dvbpsi_pmt_es_t
*
p_es
=
dvbpsi_PMTAddES
(
p_pmt
,
i_type
,
i_pid
);
dvbpsi_pmt_es_t
*
p_es
=
dvbpsi_PMTAddES
(
p_pmt
,
i_type
,
i_pid
);
/* - ES descriptors */
/* - ES descriptors */
p_byte
+=
5
;
p_byte
+=
5
;
p_end
=
p_byte
+
i_length
;
p_end
=
p_byte
+
i_
es_
length
;
if
(
p_end
>
p_section
->
p_payload_end
)
if
(
p_end
>
p_section
->
p_payload_end
)
{
{
p_end
=
p_section
->
p_payload_end
;
p_end
=
p_section
->
p_payload_end
;
...
...
src/tables/sdt.c
View file @
62a01b89
...
@@ -428,7 +428,7 @@ void dvbpsi_GatherSDTSections(dvbpsi_decoder_t * p_psi_decoder,
...
@@ -428,7 +428,7 @@ void dvbpsi_GatherSDTSections(dvbpsi_decoder_t * p_psi_decoder,
/* Chain the sections */
/* Chain the sections */
if
(
p_sdt_decoder
->
i_last_section_number
)
if
(
p_sdt_decoder
->
i_last_section_number
)
{
{
for
(
i
=
0
;
i
<=
p_sdt_decoder
->
i_last_section_number
-
1
;
i
++
)
for
(
i
=
0
;
(
int
)
i
<=
p_sdt_decoder
->
i_last_section_number
-
1
;
i
++
)
p_sdt_decoder
->
ap_sections
[
i
]
->
p_next
=
p_sdt_decoder
->
ap_sections
[
i
]
->
p_next
=
p_sdt_decoder
->
ap_sections
[
i
+
1
];
p_sdt_decoder
->
ap_sections
[
i
+
1
];
}
}
...
@@ -473,14 +473,14 @@ void dvbpsi_DecodeSDTSections(dvbpsi_sdt_t* p_sdt,
...
@@ -473,14 +473,14 @@ void dvbpsi_DecodeSDTSections(dvbpsi_sdt_t* p_sdt,
int
b_eit_present
=
(
int
)((
p_byte
[
2
])
&
0x1
);
int
b_eit_present
=
(
int
)((
p_byte
[
2
])
&
0x1
);
uint8_t
i_running_status
=
(
uint8_t
)(
p_byte
[
3
])
>>
5
;
uint8_t
i_running_status
=
(
uint8_t
)(
p_byte
[
3
])
>>
5
;
int
b_free_ca
=
(
int
)((
p_byte
[
3
]
&
0x10
)
>>
4
);
int
b_free_ca
=
(
int
)((
p_byte
[
3
]
&
0x10
)
>>
4
);
uint16_t
i_length
=
((
uint16_t
)(
p_byte
[
3
]
&
0xf
)
<<
8
)
|
p_byte
[
4
];
uint16_t
i_
srv_
length
=
((
uint16_t
)(
p_byte
[
3
]
&
0xf
)
<<
8
)
|
p_byte
[
4
];
dvbpsi_sdt_service_t
*
p_service
=
dvbpsi_SDTAddService
(
p_sdt
,
dvbpsi_sdt_service_t
*
p_service
=
dvbpsi_SDTAddService
(
p_sdt
,
i_service_id
,
b_eit_schedule
,
b_eit_present
,
i_service_id
,
b_eit_schedule
,
b_eit_present
,
i_running_status
,
b_free_ca
);
i_running_status
,
b_free_ca
);
/* Service descriptors */
/* Service descriptors */
p_byte
+=
5
;
p_byte
+=
5
;
p_end
=
p_byte
+
i_length
;
p_end
=
p_byte
+
i_
srv_
length
;
if
(
p_end
>
p_section
->
p_payload_end
)
break
;
if
(
p_end
>
p_section
->
p_payload_end
)
break
;
while
(
p_byte
+
2
<=
p_end
)
while
(
p_byte
+
2
<=
p_end
)
...
...
src/tables/tot_private.h
View file @
62a01b89
...
@@ -52,6 +52,13 @@ void dvbpsi_GatherTOTSections(dvbpsi_decoder_t* p_decoder,
...
@@ -52,6 +52,13 @@ void dvbpsi_GatherTOTSections(dvbpsi_decoder_t* p_decoder,
dvbpsi_psi_section_t
*
p_section
);
dvbpsi_psi_section_t
*
p_section
);
/*****************************************************************************
* dvbpsi_ValidTOTSection
*****************************************************************************
* Check the CRC_32 if the section has b_syntax_indicator set.
*****************************************************************************/
int
dvbpsi_ValidTOTSection
(
dvbpsi_psi_section_t
*
p_section
);
/*****************************************************************************
/*****************************************************************************
* dvbpsi_DecodeTOTSections
* dvbpsi_DecodeTOTSections
*****************************************************************************
*****************************************************************************
...
...
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