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
1154dee6
Commit
1154dee6
authored
Sep 15, 2015
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chain.c: Rename dvbpsi_decoder_chain_del() to dvbpsi_decoder_chain_remove()
parent
481d11ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
14 deletions
+15
-14
misc/test_chain.c
misc/test_chain.c
+8
-8
src/chain.c
src/chain.c
+3
-2
src/chain.h
src/chain.h
+4
-4
No files found.
misc/test_chain.c
View file @
1154dee6
...
...
@@ -154,7 +154,7 @@ static bool chain_release(dvbpsi_t *p_dvbpsi, const int count)
fprintf
(
stderr
,
"failed to find decoder (%d:%d) in chain
\n
"
,
i
,
i
);
return
false
;
}
if
(
!
dvbpsi_decoder_chain_
del
(
p_dvbpsi
,
p_dec
))
{
if
(
!
dvbpsi_decoder_chain_
remove
(
p_dvbpsi
,
p_dec
))
{
fprintf
(
stderr
,
"failed to delete decoder (%d:%d) from chain
\n
"
,
i
,
i
);
return
false
;
}
...
...
@@ -177,7 +177,7 @@ static bool chain_release_with_extension(dvbpsi_t *p_dvbpsi, const int count)
fprintf
(
stderr
,
"failed to find decoder (%d:%d) in chain
\n
"
,
i
,
i_extension
);
return
false
;
}
if
(
!
dvbpsi_decoder_chain_
del
(
p_dvbpsi
,
p_dec
))
{
if
(
!
dvbpsi_decoder_chain_
remove
(
p_dvbpsi
,
p_dec
))
{
fprintf
(
stderr
,
"failed to delete decoder (%d:%d) from chain
\n
"
,
i
,
i_extension
);
return
false
;
}
...
...
@@ -226,21 +226,21 @@ int main(int i_argc, char* pa_argv[])
dvbpsi_decoder_chain_dump
(
p_dvbpsi
);
#endif
/* Test dvbpsi_decoder_chain_
del
() */
/* Test dvbpsi_decoder_chain_
remove
() */
if
(
!
chain_release
(
p_dvbpsi
,
CHAIN_DECODERS
))
{
TEST_FAILED
(
"dvbpsi_decoder_chain_
del
"
);
TEST_FAILED
(
"dvbpsi_decoder_chain_
remove
"
);
dvbpsi_delete
(
p_dvbpsi
);
return
1
;
}
TEST_PASSED
(
"dvbpsi_decoder_chain_
del
"
);
TEST_PASSED
(
"dvbpsi_decoder_chain_
remove
"
);
/* Test dvbpsi_decoder_chain_
del
() */
/* Test dvbpsi_decoder_chain_
remove
() */
if
(
!
chain_release_with_extension
(
p_dvbpsi
,
CHAIN_DECODERS
))
{
TEST_FAILED
(
"dvbpsi_decoder_chain_
del
with extensions"
);
TEST_FAILED
(
"dvbpsi_decoder_chain_
remove
with extensions"
);
dvbpsi_delete
(
p_dvbpsi
);
return
1
;
}
TEST_PASSED
(
"dvbpsi_decoder_chain_
del
with extensions"
);
TEST_PASSED
(
"dvbpsi_decoder_chain_
remove
with extensions"
);
p_dvbpsi
->
p_decoder
=
NULL
;
dvbpsi_delete
(
p_dvbpsi
);
...
...
src/chain.c
View file @
1154dee6
...
...
@@ -43,6 +43,7 @@
#include "psi.h"
#include "chain.h"
/*****************************************************************************
* dvbpsi_decoder_chain_add
*****************************************************************************
...
...
@@ -87,11 +88,11 @@ bool dvbpsi_decoder_chain_add(dvbpsi_t *p_dvbpsi, dvbpsi_decoder_t *p_decoder)
}
/*****************************************************************************
* dvbpsi_decoder_chain_
del
* dvbpsi_decoder_chain_
remove
*****************************************************************************
* Remove decoder from chain
*****************************************************************************/
bool
dvbpsi_decoder_chain_
del
(
dvbpsi_t
*
p_dvbpsi
,
const
dvbpsi_decoder_t
*
p_decoder
)
bool
dvbpsi_decoder_chain_
remove
(
dvbpsi_t
*
p_dvbpsi
,
const
dvbpsi_decoder_t
*
p_decoder
)
{
if
(
!
p_decoder
)
return
false
;
...
...
src/chain.h
View file @
1154dee6
...
...
@@ -52,20 +52,20 @@ extern "C" {
bool
dvbpsi_decoder_chain_add
(
dvbpsi_t
*
p_dvbpsi
,
dvbpsi_decoder_t
*
p_decoder
);
/*****************************************************************************
* dvbpsi_decoder_chain_
del
* dvbpsi_decoder_chain_
remove
*****************************************************************************/
/*!
* \fn bool dvbpsi_decoder_chain_
del
(dvbpsi_t *p_dvbpsi, const dvbpsi_decoder_t *p_decoder)
* \fn bool dvbpsi_decoder_chain_
remove
(dvbpsi_t *p_dvbpsi, const dvbpsi_decoder_t *p_decoder)
* \brief Deletes decoder from the chain in handle 'p_dvbpsi' at dvbpsi_t::dvbpsi_decoder_t
* \note Use @see dvbpsi_decoder_chain_get() to find the decoder pointer, then call
* dvbpsi_decoder_chain_
del
() to remove the pointer from the chain. The caller is
* dvbpsi_decoder_chain_
remove
() to remove the pointer from the chain. The caller is
* responsible for freeing the associated memory of the just removed decoder pointer
* and needs to call decoder_delete(p_decoder).
* \param p_dvbpsi pointer to dvbpsi_t handle
* \param p_decoder pointer to dvbpsi_decoder_t for deletion from chain
* \return true on success, false on failure
*/
bool
dvbpsi_decoder_chain_
del
(
dvbpsi_t
*
p_dvbpsi
,
const
dvbpsi_decoder_t
*
p_decoder
);
bool
dvbpsi_decoder_chain_
remove
(
dvbpsi_t
*
p_dvbpsi
,
const
dvbpsi_decoder_t
*
p_decoder
);
/*****************************************************************************
* dvbpsi_decoder_chain_get
...
...
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