summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink.h
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2011-02-28 13:00:20 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-05-02 10:17:20 +0530
commit47e0f91aa2ca6eb3ea8b7be8aa03cd03a28c3fbe (patch)
tree95affbf919114825f55b2c9fb3bc9160e9e11af6 /src/pulsecore/sink.h
parent3767c9c4e8107a3e78f387466b45384d64644d94 (diff)
sink: Extend API for compressed formats support
This adds a get_formats() vfunc for sinks to provide a list of formats they can support. pa_sink_check_formats() can be used during or after routing to determine what formats from a stream the sink can support.
Diffstat (limited to 'src/pulsecore/sink.h')
-rw-r--r--src/pulsecore/sink.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pulsecore/sink.h b/src/pulsecore/sink.h
index b61ba333..a96dd90a 100644
--- a/src/pulsecore/sink.h
+++ b/src/pulsecore/sink.h
@@ -199,6 +199,10 @@ struct pa_sink {
* thread. */
int (*set_port)(pa_sink *s, pa_device_port *port); /* ditto */
+ /* Called to get the list of formats supported by the sink, sorted
+ * in descending order of preference. */
+ pa_idxset* (*get_formats)(pa_sink *s); /* ditto */
+
/* Contains copies of the above data so that the real-time worker
* thread can work without access locking */
struct {
@@ -398,6 +402,9 @@ pa_queue *pa_sink_move_all_start(pa_sink *s, pa_queue *q);
void pa_sink_move_all_finish(pa_sink *s, pa_queue *q, pa_bool_t save);
void pa_sink_move_all_fail(pa_queue *q);
+pa_idxset* pa_sink_get_formats(pa_sink *s);
+pa_idxset* pa_sink_check_formats(pa_sink *s, pa_idxset *in_formats);
+
/*** To be called exclusively by the sink driver, from IO context */
void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result);