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
ef8352ef
Commit
ef8352ef
authored
Jun 24, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/tables/cat.*: Make dvbpsi_NewCAT() and dvbpsi_DeleteCAT() functions.
parent
dd248c84
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
18 deletions
+32
-18
src/tables/cat.c
src/tables/cat.c
+25
-0
src/tables/cat.h
src/tables/cat.h
+7
-18
No files found.
src/tables/cat.c
View file @
ef8352ef
...
...
@@ -115,6 +115,19 @@ void dvbpsi_InitCAT(dvbpsi_cat_t* p_cat, uint8_t i_version, bool b_current_next)
p_cat
->
p_first_descriptor
=
NULL
;
}
/*****************************************************************************
* dvbpsi_NewCAT
*****************************************************************************
* Allocate and Initialize a dvbpsi_cat_t structure.
*****************************************************************************/
dvbpsi_cat_t
*
dvbpsi_NewCAT
(
uint8_t
i_version
,
bool
b_current_next
)
{
dvbpsi_cat_t
*
p_cat
=
(
dvbpsi_cat_t
*
)
malloc
(
sizeof
(
dvbpsi_cat_t
));
if
(
p_cat
!=
NULL
)
dvbpsi_InitCAT
(
p_cat
,
i_version
,
b_current_next
);
return
p_cat
;
}
/*****************************************************************************
* dvbpsi_EmptyCAT
*****************************************************************************
...
...
@@ -126,6 +139,18 @@ void dvbpsi_EmptyCAT(dvbpsi_cat_t* p_cat)
p_cat
->
p_first_descriptor
=
NULL
;
}
/*****************************************************************************
* dvbpsi_DeleteCAT
*****************************************************************************
* Clean a dvbpsi_cat_t structure.
*****************************************************************************/
void
dvbpsi_DeleteCAT
(
dvbpsi_cat_t
*
p_cat
)
{
if
(
p_cat
)
dvbpsi_EmptyCAT
(
p_cat
);
free
(
p_cat
);
}
/*****************************************************************************
* dvbpsi_CATAddDescriptor
*****************************************************************************
...
...
src/tables/cat.h
View file @
ef8352ef
/*****************************************************************************
* cat.h
* Copyright (C) 2001-201
0
VideoLAN
* Copyright (C) 2001-201
1
VideoLAN
* $Id$
*
* Authors: Johann Hanne
...
...
@@ -118,21 +118,14 @@ void dvbpsi_InitCAT(dvbpsi_cat_t* p_cat,
uint8_t
i_version
,
bool
b_current_next
);
/*!
* \
def dvbpsi_NewCAT(p_cat
,
i_version,
b_current_next)
* \
fn dvbpsi_cat_t *dvbpsi_NewCAT(uint8_t i_version
,
* bool
b_current_next)
* \brief Allocate and initialize a new dvbpsi_cat_t structure.
* \param p_cat pointer to the CAT structure
* \param i_version CAT version
* \param b_current_next current next indicator
* \return
nothing.
* \return
p_cat pointer to the CAT structure
*/
#define dvbpsi_NewCAT(p_cat, \
i_version, b_current_next) \
do { \
p_cat = (dvbpsi_cat_t*)malloc(sizeof(dvbpsi_cat_t)); \
if(p_cat != NULL) \
dvbpsi_InitCAT(p_cat, i_version, b_current_next); \
} while(0);
dvbpsi_cat_t
*
dvbpsi_NewCAT
(
uint8_t
i_version
,
bool
b_current_next
);
/*****************************************************************************
* dvbpsi_EmptyCAT/dvbpsi_DeleteCAT
...
...
@@ -146,16 +139,12 @@ do { \
void
dvbpsi_EmptyCAT
(
dvbpsi_cat_t
*
p_cat
);
/*!
* \
def dvbpsi_DeleteCAT(
p_cat)
* \
fn void dvbpsi_DeleteCAT(dvbpsi_cat_t *
p_cat)
* \brief Clean and free a dvbpsi_cat_t structure.
* \param p_cat pointer to the CAT structure
* \return nothing.
*/
#define dvbpsi_DeleteCAT(p_cat) \
do { \
dvbpsi_EmptyCAT(p_cat); \
free(p_cat); \
} while(0);
void
dvbpsi_DeleteCAT
(
dvbpsi_cat_t
*
p_cat
);
/*****************************************************************************
* dvbpsi_CATAddDescriptor
...
...
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