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
7f132123
Commit
7f132123
authored
Jun 24, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/tables/pat.*: Make dvbpsi_NewPat() and dvbpsi_DeletePAT() functions.
parent
3b681a1b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
15 deletions
+34
-15
src/tables/pat.c
src/tables/pat.c
+28
-0
src/tables/pat.h
src/tables/pat.h
+6
-15
No files found.
src/tables/pat.c
View file @
7f132123
...
...
@@ -109,12 +109,28 @@ void dvbpsi_DetachPAT(dvbpsi_t *p_dvbpsi)
void
dvbpsi_InitPAT
(
dvbpsi_pat_t
*
p_pat
,
uint16_t
i_ts_id
,
uint8_t
i_version
,
bool
b_current_next
)
{
assert
(
p_pat
);
p_pat
->
i_ts_id
=
i_ts_id
;
p_pat
->
i_version
=
i_version
;
p_pat
->
b_current_next
=
b_current_next
;
p_pat
->
p_first_program
=
NULL
;
}
/*****************************************************************************
* dvbpsi_NewPAT
*****************************************************************************
* Allocate and Initialize a newly allocated dvbpsi_pat_t structure.
*****************************************************************************/
dvbpsi_pat_t
*
dvbpsi_NewPAT
(
uint16_t
i_ts_id
,
uint8_t
i_version
,
bool
b_current_next
)
{
dvbpsi_pat_t
*
p_pat
=
(
dvbpsi_pat_t
*
)
malloc
(
sizeof
(
dvbpsi_pat_t
));
if
(
p_pat
)
dvbpsi_InitPAT
(
p_pat
,
i_ts_id
,
i_version
,
b_current_next
);
return
p_pat
;
}
/*****************************************************************************
* dvbpsi_EmptyPAT
*****************************************************************************
...
...
@@ -133,6 +149,18 @@ void dvbpsi_EmptyPAT(dvbpsi_pat_t* p_pat)
p_pat
->
p_first_program
=
NULL
;
}
/*****************************************************************************
* dvbpsi_DeletePAT
*****************************************************************************
* Clean and Delete dvbpsi_pat_t structure.
*****************************************************************************/
void
dvbpsi_DeletePAT
(
dvbpsi_pat_t
*
p_pat
)
{
if
(
p_pat
)
dvbpsi_EmptyPAT
(
p_pat
);
free
(
p_pat
);
}
/*****************************************************************************
* dvbpsi_PATAddProgram
*****************************************************************************
...
...
src/tables/pat.h
View file @
7f132123
...
...
@@ -142,20 +142,15 @@ void dvbpsi_InitPAT(dvbpsi_pat_t* p_pat, uint16_t i_ts_id, uint8_t i_version,
bool
b_current_next
);
/*!
* \def dvbpsi_NewPAT(p_pat, i_ts_id, i_version, b_current_next)
* \def dvbpsi_pat_t *dvbpsi_NewPAT(uint16_t i_ts_id, uint8_t i_version,
* bool b_current_next);
* \brief Allocate and initialize a new dvbpsi_pat_t structure.
* \param p_pat pointer to the PAT structure
* \param i_ts_id transport stream ID
* \param i_version PAT version
* \param b_current_next current next indicator
* \return
nothing.
* \return
p_pat pointer to the PAT structure
*/
#define dvbpsi_NewPAT(p_pat, i_ts_id, i_version, b_current_next) \
do { \
p_pat = (dvbpsi_pat_t*)malloc(sizeof(dvbpsi_pat_t)); \
if(p_pat != NULL) \
dvbpsi_InitPAT(p_pat, i_ts_id, i_version, b_current_next); \
} while(0);
dvbpsi_pat_t
*
dvbpsi_NewPAT
(
uint16_t
i_ts_id
,
uint8_t
i_version
,
bool
b_current_next
);
/*****************************************************************************
* dvbpsi_EmptyPAT/dvbpsi_DeletePAT
...
...
@@ -169,16 +164,12 @@ do { \
void
dvbpsi_EmptyPAT
(
dvbpsi_pat_t
*
p_pat
);
/*!
* \def
dvbpsi_DeletePAT(p
_pat)
* \def
void dvbpsi_DeletePAT(dvbpsi_pat_t (*
_pat)
* \brief Clean and free a dvbpsi_pat_t structure.
* \param p_pat pointer to the PAT structure
* \return nothing.
*/
#define dvbpsi_DeletePAT(p_pat) \
do { \
dvbpsi_EmptyPAT(p_pat); \
free(p_pat); \
} while(0);
void
dvbpsi_DeletePAT
(
dvbpsi_pat_t
*
p_pat
);
/*****************************************************************************
* dvbpsi_PATAddProgram
...
...
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