aboutsummaryrefslogtreecommitdiffstats
path: root/include/gapk/formats.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-28 10:31:48 +0200
committerHarald Welte <laforge@gnumonks.org>2017-05-28 10:44:10 +0200
commit494d92c3c7c2197381807f999d9d2a6ba23299e4 (patch)
treeabe23f1851d2ff31651de062974c609652cc4071 /include/gapk/formats.h
parent5912848d2edbf61158ac7edc72c2302649a0d9ed (diff)
more API documentation
Diffstat (limited to 'include/gapk/formats.h')
-rw-r--r--include/gapk/formats.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/gapk/formats.h b/include/gapk/formats.h
index 5e1a262..4b2418a 100644
--- a/include/gapk/formats.h
+++ b/include/gapk/formats.h
@@ -53,6 +53,11 @@ enum format_type {
#include <gapk/codecs.h> /* need to import here because or enum interdep */
+/*! call-back for actual format conversion function
+ * \param[out] dst caller-allocated buffer for output data
+ * \param[in] src input data
+ * \param[in] src_len length of input data \a src
+ * \returns number of output bytes written to \a dst; negative on error */
typedef int (*fmt_conv_cb_t)(uint8_t *dst, const uint8_t *src, unsigned int src_len);
struct format_desc {
@@ -61,11 +66,14 @@ struct format_desc {
const char * name;
const char * description;
+ /*! length of frames in this format (as opposed to canonical) */
unsigned int frame_len;
fmt_conv_cb_t conv_from_canon;
fmt_conv_cb_t conv_to_canon;
+ /*! length of a (global) header at start of file */
unsigned int header_len;
+ /*! exact match for (global) header at start of file */
const uint8_t * header;
};