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
88185c53
Commit
88185c53
authored
Jun 24, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/tables/sis.*: Make dvbpsi_NewSIS() and dvbpsi_DeleteSIS() functions.
parent
0f344e17
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
15 deletions
+30
-15
src/tables/sis.c
src/tables/sis.c
+25
-0
src/tables/sis.h
src/tables/sis.h
+5
-15
No files found.
src/tables/sis.c
View file @
88185c53
...
...
@@ -175,6 +175,19 @@ void dvbpsi_InitSIS(dvbpsi_sis_t *p_sis, uint8_t i_protocol_version)
p_sis
->
i_ecrc
=
0
;
}
/*****************************************************************************
* dvbpsi_NewSIS
*****************************************************************************
* Allocate and Initialize a new dvbpsi_sis_t structure.
*****************************************************************************/
dvbpsi_sis_t
*
dvbpsi_NewSIS
(
uint8_t
i_protocol_version
)
{
dvbpsi_sis_t
*
p_sis
=
(
dvbpsi_sis_t
*
)
malloc
(
sizeof
(
dvbpsi_sis_t
));
if
(
p_sis
!=
NULL
)
dvbpsi_InitSIS
(
p_sis
,
i_protocol_version
);
return
p_sis
;
}
/*****************************************************************************
* dvbpsi_EmptySIS
*****************************************************************************
...
...
@@ -190,6 +203,18 @@ void dvbpsi_EmptySIS(dvbpsi_sis_t* p_sis)
/* FIXME: free alignment stuffing */
}
/*****************************************************************************
* dvbpsi_DeleteSIS
*****************************************************************************
* Clean and Delete a dvbpsi_sis_t structure.
*****************************************************************************/
void
dvbpsi_DeleteSIS
(
dvbpsi_sis_t
*
p_sis
)
{
if
(
p_sis
)
dvbpsi_EmptySIS
(
p_sis
);
free
(
p_sis
);
}
/*****************************************************************************
* dvbpsi_SISAddDescriptor
*****************************************************************************
...
...
src/tables/sis.h
View file @
88185c53
...
...
@@ -345,18 +345,12 @@ void dvbpsi_DetachSIS(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi
void
dvbpsi_InitSIS
(
dvbpsi_sis_t
*
p_sis
,
uint8_t
i_protocol_version
);
/*!
* \
def dvbpsi_NewSIS(p_sis,
i_protocol_version)
* \
fn dvbpsi_sis_t* dvbpsi_NewSIS(uint8_t
i_protocol_version)
* \brief Allocate and initialize a new dvbpsi_sis_t structure.
* \param p_sis pointer to the SIS structure
* \param i_protocol_version SIS protocol version (currently 0)
* \return
nothing.
* \return
p_sis pointer to the SIS structure
*/
#define dvbpsi_NewSIS(p_sis, i_protocol_version) \
do { \
p_sis = (dvbpsi_sis_t*)malloc(sizeof(dvbpsi_sis_t)); \
if(p_sis != NULL) \
dvbpsi_InitSIS(p_sis, i_protocol_version); \
} while(0);
dvbpsi_sis_t
*
dvbpsi_NewSIS
(
uint8_t
i_protocol_version
);
/*****************************************************************************
* dvbpsi_EmptySIS/dvbpsi_DeleteSIS
...
...
@@ -370,16 +364,12 @@ do { \
void
dvbpsi_EmptySIS
(
dvbpsi_sis_t
*
p_sis
);
/*!
* \
def dvbpsi_DeleteSIS(
p_sis)
* \
fn void dvbpsi_DeleteSIS(dvbpsi_sis_t *
p_sis)
* \brief Clean and free a dvbpsi_sis_t structure.
* \param p_sis pointer to the SIS structure
* \return nothing.
*/
#define dvbpsi_DeleteSIS(p_sis) \
do { \
dvbpsi_EmptySIS(p_sis); \
free(p_sis); \
} while(0);
void
dvbpsi_DeleteSIS
(
dvbpsi_sis_t
*
p_sis
);
/*****************************************************************************
* dvbpsi_SISAddDescriptor
...
...
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