aboutsummaryrefslogtreecommitdiffstats
path: root/src/pq_codec.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-27 16:42:14 +0200
committerHarald Welte <laforge@gnumonks.org>2017-05-27 16:42:14 +0200
commitf3d2ad6a19a4303e8e914f4efb1bef36ab2e6b79 (patch)
treede7ca771b46e11b49e1416241ee939ceb8f93079 /src/pq_codec.c
parentd192d8c017492a740353780d115bd4fc6cec20e9 (diff)
add some more comments throughout the code
Diffstat (limited to 'src/pq_codec.c')
-rw-r--r--src/pq_codec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pq_codec.c b/src/pq_codec.c
index 82b79e7..42baf23 100644
--- a/src/pq_codec.c
+++ b/src/pq_codec.c
@@ -25,6 +25,11 @@
#include <gapk/procqueue.h>
+/*! Add a codecl to the processing queue
+ * \param pq Processing Queue to which the codec is added
+ * \param[in] codec description
+ * \param[in] encode (1) or decode (0)
+ * \returns 0 on success; negative on error */
int
pq_queue_codec(struct pq *pq, const struct codec_desc *codec, int enc_dec_n)
{
@@ -32,10 +37,12 @@ pq_queue_codec(struct pq *pq, const struct codec_desc *codec, int enc_dec_n)
const struct format_desc *fmt;
struct pq_item *item;
+ /* allocate a new item to the processing queue */
item = pq_add_item(pq);
if (!item)
return -ENOMEM;
+ /* initialize the codec, if there is an init function */
if (codec->codec_init) {
item->state = codec->codec_init();
if (!item->state)