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
0f344e17
Commit
0f344e17
authored
Jun 24, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/tables/sdt.*: Make dvbpsi_NewSDT() and dvbpsi_DeleteSDT() functions.
parent
81d3a7c9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
15 deletions
+35
-15
src/tables/sdt.c
src/tables/sdt.c
+28
-0
src/tables/sdt.h
src/tables/sdt.h
+7
-15
No files found.
src/tables/sdt.c
View file @
0f344e17
...
...
@@ -161,6 +161,8 @@ void dvbpsi_DetachSDT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi
void
dvbpsi_InitSDT
(
dvbpsi_sdt_t
*
p_sdt
,
uint16_t
i_ts_id
,
uint8_t
i_version
,
bool
b_current_next
,
uint16_t
i_network_id
)
{
assert
(
p_sdt
);
p_sdt
->
i_ts_id
=
i_ts_id
;
p_sdt
->
i_version
=
i_version
;
p_sdt
->
b_current_next
=
b_current_next
;
...
...
@@ -168,6 +170,20 @@ void dvbpsi_InitSDT(dvbpsi_sdt_t* p_sdt, uint16_t i_ts_id, uint8_t i_version,
p_sdt
->
p_first_service
=
NULL
;
}
/*****************************************************************************
* dvbpsi_NewSDT
*****************************************************************************
* Allocate and Initialize a new dvbpsi_sdt_t structure.
*****************************************************************************/
dvbpsi_sdt_t
*
dvbpsi_NewSDT
(
uint16_t
i_ts_id
,
uint8_t
i_version
,
bool
b_current_next
,
uint16_t
i_network_id
)
{
dvbpsi_sdt_t
*
p_sdt
=
(
dvbpsi_sdt_t
*
)
malloc
(
sizeof
(
dvbpsi_sdt_t
));
if
(
p_sdt
!=
NULL
)
dvbpsi_InitSDT
(
p_sdt
,
i_ts_id
,
i_version
,
b_current_next
,
i_network_id
);
return
p_sdt
;
}
/*****************************************************************************
* dvbpsi_EmptySDT
*****************************************************************************
...
...
@@ -187,6 +203,18 @@ void dvbpsi_EmptySDT(dvbpsi_sdt_t* p_sdt)
p_sdt
->
p_first_service
=
NULL
;
}
/*****************************************************************************
* dvbpsi_DeleteSDT
*****************************************************************************
* Clean and Delete dvbpsi_sdt_t structure.
*****************************************************************************/
void
dvbpsi_DeleteSDT
(
dvbpsi_sdt_t
*
p_sdt
)
{
if
(
p_sdt
)
dvbpsi_EmptySDT
(
p_sdt
);
free
(
p_sdt
);
}
/*****************************************************************************
* dvbpsi_SDTAddService
*****************************************************************************
...
...
src/tables/sdt.h
View file @
0f344e17
...
...
@@ -156,21 +156,17 @@ void dvbpsi_InitSDT(dvbpsi_sdt_t *p_sdt, uint16_t i_ts_id, uint8_t i_version,
bool
b_current_next
,
uint16_t
i_network_id
);
/*!
* \def dvbpsi_NewSDT(p_sdt, i_ts_id, i_version, b_current_next, i_network_id)
* \fn dvbpsi_sdt_t *dvbpsi_NewSDT(uint16_t i_ts_id, uint8_t i_version,
bool b_current_next, uint16_t i_network_id)
* \brief Allocate and initialize a new dvbpsi_sdt_t structure.
* \param p_sdt pointer to the SDT structure
* \param i_ts_id transport stream ID
* \param i_version SDT version
* \param b_current_next current next indicator
* \param i_network_id original network id
* \return
nothing.
* \return
p_sdt pointer to the SDT structure
*/
#define dvbpsi_NewSDT(p_sdt, i_ts_id, i_version, b_current_next,i_network_id) \
do { \
p_sdt = (dvbpsi_sdt_t*)malloc(sizeof(dvbpsi_sdt_t)); \
if(p_sdt != NULL) \
dvbpsi_InitSDT(p_sdt, i_ts_id, i_version, b_current_next, i_network_id); \
} while(0);
dvbpsi_sdt_t
*
dvbpsi_NewSDT
(
uint16_t
i_ts_id
,
uint8_t
i_version
,
bool
b_current_next
,
uint16_t
i_network_id
);
/*****************************************************************************
* dvbpsi_EmptySDT/dvbpsi_DeleteSDT
...
...
@@ -184,16 +180,12 @@ do { \
void
dvbpsi_EmptySDT
(
dvbpsi_sdt_t
*
p_sdt
);
/*!
* \
def dvbpsi_DeleteSDT(
p_sdt)
* \
fn void dvbpsi_DeleteSDT(dvbpsi_sdt_t *
p_sdt)
* \brief Clean and free a dvbpsi_sdt_t structure.
* \param p_sdt pointer to the SDT structure
* \return nothing.
*/
#define dvbpsi_DeleteSDT(p_sdt) \
do { \
dvbpsi_EmptySDT(p_sdt); \
free(p_sdt); \
} while(0);
void
dvbpsi_DeleteSDT
(
dvbpsi_sdt_t
*
p_sdt
);
/*****************************************************************************
* dvbpsi_SDTAddService
...
...
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