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
9dacd4f1
Commit
9dacd4f1
authored
Jun 24, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/tables/eit.*: Make dvbpsi_NewEIT() and dvbpsi_DeleteEIT() functions.
parent
479ad4cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
15 deletions
+40
-15
src/tables/eit.c
src/tables/eit.c
+29
-0
src/tables/eit.h
src/tables/eit.h
+11
-15
No files found.
src/tables/eit.c
View file @
9dacd4f1
...
...
@@ -171,6 +171,23 @@ void dvbpsi_InitEIT(dvbpsi_eit_t* p_eit, uint16_t i_service_id, uint8_t i_versio
p_eit
->
p_first_event
=
NULL
;
}
/*****************************************************************************
* dvbpsi_NewEIT
*****************************************************************************
* Allocate and Initialize a new dvbpsi_eit_t structure.
*****************************************************************************/
dvbpsi_eit_t
*
dvbpsi_NewtEIT
(
uint16_t
i_service_id
,
uint8_t
i_version
,
bool
b_current_next
,
uint16_t
i_ts_id
,
uint16_t
i_network_id
,
uint8_t
i_segment_last_section_number
,
uint8_t
i_last_table_id
)
{
dvbpsi_eit_t
*
p_eit
=
(
dvbpsi_eit_t
*
)
malloc
(
sizeof
(
dvbpsi_eit_t
));
if
(
p_eit
!=
NULL
)
dvbpsi_InitEIT
(
p_eit
,
i_service_id
,
i_version
,
b_current_next
,
i_ts_id
,
i_network_id
,
i_segment_last_section_number
,
i_last_table_id
);
return
p_eit
;
}
/*****************************************************************************
* dvbpsi_EmptyEIT
*****************************************************************************
...
...
@@ -190,6 +207,18 @@ void dvbpsi_EmptyEIT(dvbpsi_eit_t* p_eit)
p_eit
->
p_first_event
=
NULL
;
}
/*****************************************************************************
* dvbpsi_DeleteEIT
*****************************************************************************
* Clean a dvbpsi_eit_t structure.
*****************************************************************************/
void
dvbpsi_DeleteEIT
(
dvbpsi_eit_t
*
p_eit
)
{
if
(
p_eit
)
dvbpsi_EmptyEIT
(
p_eit
);
free
(
p_eit
);
}
/*****************************************************************************
* dvbpsi_EITAddEvent
*****************************************************************************
...
...
src/tables/eit.h
View file @
9dacd4f1
...
...
@@ -165,9 +165,11 @@ void dvbpsi_InitEIT(dvbpsi_eit_t* p_eit, uint16_t i_service_id, uint8_t i_versio
uint8_t
i_last_table_id
);
/*!
* \def dvbpsi_NewEIT(p_eit, i_ts_id, i_version, b_current_next, i_network_id)
* \fn dvbpsi_eit_t* dvbpsi_NewtEIT(uint16_t i_service_id,
uint8_t i_version, bool b_current_next, uint16_t i_ts_id,
uint16_t i_network_id, uint8_t i_segment_last_section_number,
uint8_t i_last_table_id)
* \brief Allocate and initialize a new dvbpsi_eit_t structure.
* \param p_eit pointer to the EIT structure
* \param i_service_id service ID
* \param i_version EIT version
* \param b_current_next current next indicator
...
...
@@ -175,14 +177,12 @@ void dvbpsi_InitEIT(dvbpsi_eit_t* p_eit, uint16_t i_service_id, uint8_t i_versio
* \param i_network_id original network id
* \param i_segment_last_section_number segment_last_section_number
* \param i_last_table_id i_last_table_id
* \return
nothing.
* \return
p_eit pointer to the EIT structure
*/
#define dvbpsi_NewEIT(p_eit, i_service_id, i_version, b_current_next, i_ts_id, i_network_id, i_segment_last_section_number, i_last_table_id) \
do { \
p_eit = (dvbpsi_eit_t*)malloc(sizeof(dvbpsi_eit_t)); \
if(p_eit != NULL) \
dvbpsi_InitEIT(p_eit, i_service_id, i_version, b_current_next, i_ts_id, i_network_id, i_segment_last_section_number, i_last_table_id); \
} while(0);
dvbpsi_eit_t
*
dvbpsi_NewtEIT
(
uint16_t
i_service_id
,
uint8_t
i_version
,
bool
b_current_next
,
uint16_t
i_ts_id
,
uint16_t
i_network_id
,
uint8_t
i_segment_last_section_number
,
uint8_t
i_last_table_id
);
/*****************************************************************************
* dvbpsi_EmptyEIT/dvbpsi_DeleteEIT
...
...
@@ -196,16 +196,12 @@ do { \
void
dvbpsi_EmptyEIT
(
dvbpsi_eit_t
*
p_eit
);
/*!
* \
def dvbpsi_DeleteEIT(
p_eit)
* \
fn void dvbpsi_DeleteEIT(dvbpsi_eit_t *
p_eit)
* \brief Clean and free a dvbpsi_eit_t structure.
* \param p_eit pointer to the EIT structure
* \return nothing.
*/
#define dvbpsi_DeleteEIT(p_eit) \
do { \
dvbpsi_EmptyEIT(p_eit); \
free(p_eit); \
} while(0);
void
dvbpsi_DeleteEIT
(
dvbpsi_eit_t
*
p_eit
);
/*****************************************************************************
* dvbpsi_EITAddEvent
...
...
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