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
dd6d44b5
Commit
dd6d44b5
authored
Mar 28, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/dvbpsi.{c,h}: changed dvbpsi_PushPacket() prototype
Change prototype of dvbpsi_PushPacket() to return bool iso void
parent
5901abc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
src/dvbpsi.c
src/dvbpsi.c
+7
-6
src/dvbpsi.h
src/dvbpsi.h
+3
-3
No files found.
src/dvbpsi.c
View file @
dd6d44b5
...
...
@@ -212,7 +212,7 @@ bool dvbpsi_HasDecoder(dvbpsi_t *p_dvbpsi)
*****************************************************************************
* Injection of a TS packet into a PSI decoder.
*****************************************************************************/
void
dvbpsi_PushPacket
(
dvbpsi_t
*
handle
,
uint8_t
*
p_data
)
bool
dvbpsi_PushPacket
(
dvbpsi_t
*
handle
,
uint8_t
*
p_data
)
{
uint8_t
i_expected_counter
;
/* Expected continuity counter */
dvbpsi_psi_section_t
*
p_section
;
/* Current section */
...
...
@@ -231,7 +231,7 @@ void dvbpsi_PushPacket(dvbpsi_t *handle, uint8_t* p_data)
if
(
p_data
[
0
]
!=
0x47
)
{
dvbpsi_error
(
handle
,
"PSI decoder"
,
"not a TS packet"
);
return
;
return
false
;
}
/* Continuity check */
...
...
@@ -250,7 +250,7 @@ void dvbpsi_PushPacket(dvbpsi_t *handle, uint8_t* p_data)
"TS duplicate (received %d, expected %d) for PID %d"
,
p_decoder
->
i_continuity_counter
,
i_expected_counter
,
((
uint16_t
)(
p_data
[
1
]
&
0x1f
)
<<
8
)
|
p_data
[
2
]);
return
;
return
false
;
}
if
(
i_expected_counter
!=
p_decoder
->
i_continuity_counter
)
...
...
@@ -270,7 +270,7 @@ void dvbpsi_PushPacket(dvbpsi_t *handle, uint8_t* p_data)
/* Return if no payload in the TS packet */
if
(
!
(
p_data
[
3
]
&
0x10
))
return
;
return
false
;
/* Skip the adaptation_field if present */
if
(
p_data
[
3
]
&
0x20
)
...
...
@@ -287,7 +287,7 @@ void dvbpsi_PushPacket(dvbpsi_t *handle, uint8_t* p_data)
p_section
=
p_decoder
->
p_current_section
;
/* If the psi decoder needs a beg
ginning of
section and a new section
/* If the psi decoder needs a beg
inning of a
section and a new section
begins in the packet then initialize the dvbpsi_psi_section_t structure */
if
(
p_section
==
NULL
)
{
...
...
@@ -308,7 +308,7 @@ void dvbpsi_PushPacket(dvbpsi_t *handle, uint8_t* p_data)
else
{
/* No new section => return */
return
;
return
false
;
}
}
...
...
@@ -439,6 +439,7 @@ void dvbpsi_PushPacket(dvbpsi_t *handle, uint8_t* p_data)
i_available
=
0
;
}
}
return
true
;
}
/*****************************************************************************
...
...
src/dvbpsi.h
View file @
dd6d44b5
...
...
@@ -133,15 +133,15 @@ void dvbpsi_DeleteHandle(dvbpsi_t *handle);
* dvbpsi_PushPacket
*****************************************************************************/
/*!
* \fn
void
dvbpsi_PushPacket(dvbpsi_t *p_dvbpsi, uint8_t* p_data)
* \fn
bool
dvbpsi_PushPacket(dvbpsi_t *p_dvbpsi, uint8_t* p_data)
* \brief Injection of a TS packet into a PSI decoder.
* \param p_dvbpsi handle to dvbpsi with attached decoder
* \param p_data pointer to a 188 bytes playload of a TS packet
* \return
nothing
.
* \return
true when packet has been handled, false on error
.
*
* Injection of a TS packet into a PSI decoder.
*/
void
dvbpsi_PushPacket
(
dvbpsi_t
*
p_dvbpsi
,
uint8_t
*
p_data
);
bool
dvbpsi_PushPacket
(
dvbpsi_t
*
p_dvbpsi
,
uint8_t
*
p_data
);
/*****************************************************************************
* The following definitions are just here to allow external decoders but
...
...
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