Commit 1154dee6 authored by Jean-Paul Saman's avatar Jean-Paul Saman

chain.c: Rename dvbpsi_decoder_chain_del() to dvbpsi_decoder_chain_remove()

parent 481d11ab
......@@ -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);
......
......@@ -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;
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment