sink,source: Handle equal default and alternate sample rates
[platform/upstream/pulseaudio.git] / src / pulsecore / tagstruct.h
index e7d0705..5f729bc 100644 (file)
 #include <inttypes.h>
 #include <sys/types.h>
 #include <sys/time.h>
-#include <time.h>
 
 #include <pulse/sample.h>
+#include <pulse/format.h>
 #include <pulse/channelmap.h>
 #include <pulse/volume.h>
 #include <pulse/proplist.h>
-#include <pulse/gccmacro.h>
 
 #include <pulsecore/macro.h>
 
 typedef struct pa_tagstruct pa_tagstruct;
 
+/* Due to a stupid design flaw, proplists may only be at the END of a
+ * packet or not before a STRING! Don't forget that! We can't really
+ * fix this without breaking compat. */
+
 enum {
     PA_TAG_INVALID = 0,
     PA_TAG_STRING = 't',
@@ -54,7 +57,9 @@ enum {
     PA_TAG_USEC = 'U'  /* 64bit unsigned */,
     PA_TAG_CHANNEL_MAP = 'm',
     PA_TAG_CVOLUME = 'v',
-    PA_TAG_PROPLIST = 'P'
+    PA_TAG_PROPLIST = 'P',
+    PA_TAG_VOLUME = 'V',
+    PA_TAG_FORMAT_INFO = 'f',
 };
 
 pa_tagstruct *pa_tagstruct_new(const uint8_t* data, size_t length);
@@ -79,6 +84,8 @@ void pa_tagstruct_put_usec(pa_tagstruct*t, pa_usec_t u);
 void pa_tagstruct_put_channel_map(pa_tagstruct *t, const pa_channel_map *map);
 void pa_tagstruct_put_cvolume(pa_tagstruct *t, const pa_cvolume *cvolume);
 void pa_tagstruct_put_proplist(pa_tagstruct *t, pa_proplist *p);
+void pa_tagstruct_put_volume(pa_tagstruct *t, pa_volume_t volume);
+void pa_tagstruct_put_format_info(pa_tagstruct *t, pa_format_info *f);
 
 int pa_tagstruct_get(pa_tagstruct *t, ...);
 
@@ -95,6 +102,7 @@ int pa_tagstruct_get_usec(pa_tagstruct*t, pa_usec_t *u);
 int pa_tagstruct_get_channel_map(pa_tagstruct *t, pa_channel_map *map);
 int pa_tagstruct_get_cvolume(pa_tagstruct *t, pa_cvolume *v);
 int pa_tagstruct_get_proplist(pa_tagstruct *t, pa_proplist *p);
-
+int pa_tagstruct_get_volume(pa_tagstruct *t, pa_volume_t *v);
+int pa_tagstruct_get_format_info(pa_tagstruct *t, pa_format_info *f);
 
 #endif