tinycompress: tinycompress fixes
- Add get_metadata() and set_metadata() API support
- Add support to send codec specific data
Bug: 123065627
Test: make
Change-Id: I9c3f39e22d7246fbb7cf665a4b5ce71a74e07495
diff --git a/include/tinycompress/tinycompress.h b/include/tinycompress/tinycompress.h
index 9f95b87..0ab7134 100644
--- a/include/tinycompress/tinycompress.h
+++ b/include/tinycompress/tinycompress.h
@@ -82,6 +82,10 @@
struct compress;
struct snd_compr_tstamp;
+#ifdef ENABLE_EXTENDED_COMPRESS_FORMAT
+union snd_codec_options;
+struct snd_compr_metadata;
+#endif
/*
* compress_open: open a new compress stream
* returns the valid struct compress on success, NULL on failure
@@ -235,6 +239,20 @@
int compress_set_gapless_metadata(struct compress *compress,
struct compr_gapless_mdata *mdata);
+#ifdef ENABLE_EXTENDED_COMPRESS_FORMAT
+/*
+ * compress_set_next_track_param: set params of next compress stream in gapless
+ *
+ * return 0 on success, negative on error
+ *
+ * @compress: compress stream for which codec options has to be set
+ * @codec_options: codec options of compress stream based on codec type
+ */
+
+int compress_set_next_track_param(struct compress *compress,
+ union snd_codec_options *codec_options);
+#endif
+
/*
* is_codec_supported:check if the given codec is supported
* returns true when supported, false if not
@@ -291,6 +309,15 @@
/* utility functions */
unsigned int compress_get_alsa_rate(unsigned int rate);
+#ifdef ENABLE_EXTENDED_COMPRESS_FORMAT
+/* set metadata */
+int compress_set_metadata(struct compress *compress,
+ struct snd_compr_metadata *mdata);
+
+/* get metadata */
+int compress_get_metadata(struct compress *compress,
+ struct snd_compr_metadata *mdata);
+#endif
#if defined(__cplusplus)
}