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
774d741b
Commit
774d741b
authored
Jun 24, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/tables/tot.*: Make dvbpsi_NewTOT() and dvbpsi_DeleteTOT() functions.
parent
8487fbef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
16 deletions
+31
-16
src/tables/tot.c
src/tables/tot.c
+25
-0
src/tables/tot.h
src/tables/tot.h
+6
-16
No files found.
src/tables/tot.c
View file @
774d741b
...
@@ -152,6 +152,19 @@ void dvbpsi_InitTOT(dvbpsi_tot_t* p_tot, uint64_t i_utc_time)
...
@@ -152,6 +152,19 @@ void dvbpsi_InitTOT(dvbpsi_tot_t* p_tot, uint64_t i_utc_time)
p_tot
->
p_first_descriptor
=
NULL
;
p_tot
->
p_first_descriptor
=
NULL
;
}
}
/*****************************************************************************
* dvbpsi_NewTOT
*****************************************************************************
* Allocate and Initialize a new dvbpsi_tot_t structure.
*****************************************************************************/
dvbpsi_tot_t
*
dvbpsi_NewTOT
(
uint64_t
i_utc_time
)
{
dvbpsi_tot_t
*
p_tot
=
(
dvbpsi_tot_t
*
)
malloc
(
sizeof
(
dvbpsi_tot_t
));
if
(
p_tot
!=
NULL
)
dvbpsi_InitTOT
(
p_tot
,
i_utc_time
);
return
p_tot
;
}
/*****************************************************************************
/*****************************************************************************
* dvbpsi_EmptyTOT
* dvbpsi_EmptyTOT
*****************************************************************************
*****************************************************************************
...
@@ -163,6 +176,18 @@ void dvbpsi_EmptyTOT(dvbpsi_tot_t* p_tot)
...
@@ -163,6 +176,18 @@ void dvbpsi_EmptyTOT(dvbpsi_tot_t* p_tot)
p_tot
->
p_first_descriptor
=
NULL
;
p_tot
->
p_first_descriptor
=
NULL
;
}
}
/*****************************************************************************
* dvbpsi_NewTOT
*****************************************************************************
* Clean and Delete dvbpsi_tot_t structure.
*****************************************************************************/
void
dvbpsi_DeleteTOT
(
dvbpsi_tot_t
*
p_tot
)
{
if
(
p_tot
)
dvbpsi_EmptyTOT
(
p_tot
);
free
(
p_tot
);
}
/*****************************************************************************
/*****************************************************************************
* dvbpsi_TOTAddDescriptor
* dvbpsi_TOTAddDescriptor
*****************************************************************************
*****************************************************************************
...
...
src/tables/tot.h
View file @
774d741b
/*****************************************************************************
/*****************************************************************************
* tot.h
* tot.h
* Copyright (C) 2001-201
0
VideoLAN
* Copyright (C) 2001-201
1
VideoLAN
* $Id$
* $Id$
*
*
* Authors: Johann Hanne
* Authors: Johann Hanne
...
@@ -119,18 +119,12 @@ void dvbpsi_DetachTOT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
...
@@ -119,18 +119,12 @@ void dvbpsi_DetachTOT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
void
dvbpsi_InitTOT
(
dvbpsi_tot_t
*
p_tot
,
uint64_t
i_utc_time
);
void
dvbpsi_InitTOT
(
dvbpsi_tot_t
*
p_tot
,
uint64_t
i_utc_time
);
/*!
/*!
* \
def dvbpsi_NewTOT(p_tot,
i_utc_time)
* \
fn dvbpsi_tot_t *dvbpsi_NewTOT(uint64_t
i_utc_time)
* \brief Allocate and initialize a new dvbpsi_tot_t structure.
* \brief Allocate and initialize a new dvbpsi_tot_t structure.
* \param p_tot pointer to the TDT/TOT structure
* \param i_utc_time the time in UTC
* \param i_utc_time the time in UTC
* \return
nothing.
* \return
p_tot pointer to the TDT/TOT structure
*/
*/
#define dvbpsi_NewTOT(p_tot, i_utc_time) \
dvbpsi_tot_t
*
dvbpsi_NewTOT
(
uint64_t
i_utc_time
);
do { \
p_tot = (dvbpsi_tot_t*)malloc(sizeof(dvbpsi_tot_t)); \
if(p_tot != NULL) \
dvbpsi_InitTOT(p_tot, i_utc_time); \
} while(0);
/*****************************************************************************
/*****************************************************************************
* dvbpsi_EmptyTOT/dvbpsi_DeleteTOT
* dvbpsi_EmptyTOT/dvbpsi_DeleteTOT
...
@@ -144,16 +138,12 @@ do { \
...
@@ -144,16 +138,12 @@ do { \
void
dvbpsi_EmptyTOT
(
dvbpsi_tot_t
*
p_tot
);
void
dvbpsi_EmptyTOT
(
dvbpsi_tot_t
*
p_tot
);
/*!
/*!
* \
def dvbpsi_DeleteTOT(
p_tot)
* \
fn dvbpsi_DeleteTOT(dvbpsi_tot_t*
p_tot)
* \brief Clean and free a dvbpsi_tot_t structure.
* \brief Clean and free a dvbpsi_tot_t structure.
* \param p_tot pointer to the TDT/TOT structure
* \param p_tot pointer to the TDT/TOT structure
* \return nothing.
* \return nothing.
*/
*/
#define dvbpsi_DeleteTOT(p_tot) \
void
dvbpsi_DeleteTOT
(
dvbpsi_tot_t
*
p_tot
);
do { \
dvbpsi_EmptyTOT(p_tot); \
free(p_tot); \
} while(0);
/*****************************************************************************
/*****************************************************************************
* dvbpsi_TOTAddDescriptor
* dvbpsi_TOTAddDescriptor
...
...
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