summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/source.h
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2011-05-17 21:56:10 +0100
committerColin Guthrie <colin@mageia.org>2011-06-22 21:55:27 +0100
commit5d35375aa758fde7d9f3d6467e2506aca9784597 (patch)
tree13a5eef2e1a06d0d5a9a76a83f0c90d085819e06 /src/pulsecore/source.h
parent30597b7c2747a52b1025e1172d73825e148fdec9 (diff)
capture: Add the passthrough format negotiation to capture streams.
This helps to keep the API more symmetrical and also potentially allows support for passthrough monitor sources at some point in the future.
Diffstat (limited to 'src/pulsecore/source.h')
-rw-r--r--src/pulsecore/source.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/pulsecore/source.h b/src/pulsecore/source.h
index 9e8e2ada..3cdc77ae 100644
--- a/src/pulsecore/source.h
+++ b/src/pulsecore/source.h
@@ -108,31 +108,35 @@ struct pa_source {
* context. If this is NULL a PA_SOURCE_MESSAGE_GET_VOLUME message
* will be sent to the IO thread instead. If refresh_volume is
* FALSE neither this function is called nor a message is sent. */
- void (*get_volume)(pa_source *s); /* dito */
+ void (*get_volume)(pa_source *s); /* ditto */
/* Called when the volume shall be changed. Called from main loop
* context. If this is NULL a PA_SOURCE_MESSAGE_SET_VOLUME message
* will be sent to the IO thread instead. */
- void (*set_volume)(pa_source *s); /* dito */
+ void (*set_volume)(pa_source *s); /* ditto */
/* Called when the mute setting is queried. Called from main loop
* context. If this is NULL a PA_SOURCE_MESSAGE_GET_MUTE message
* will be sent to the IO thread instead. If refresh_mute is
* FALSE neither this function is called nor a message is sent.*/
- void (*get_mute)(pa_source *s); /* dito */
+ void (*get_mute)(pa_source *s); /* ditto */
/* Called when the mute setting shall be changed. Called from main
* loop context. If this is NULL a PA_SOURCE_MESSAGE_SET_MUTE
* message will be sent to the IO thread instead. */
- void (*set_mute)(pa_source *s); /* dito */
+ void (*set_mute)(pa_source *s); /* ditto */
/* Called when a the requested latency is changed. Called from IO
* thread context. */
- void (*update_requested_latency)(pa_source *s); /* dito */
+ void (*update_requested_latency)(pa_source *s); /* ditto */
/* Called whenever the port shall be changed. Called from main
* thread. */
- int (*set_port)(pa_source *s, pa_device_port *port); /*dito */
+ int (*set_port)(pa_source *s, pa_device_port *port); /*ditto */
+
+ /* Called to get the list of formats supported by the source, sorted
+ * in descending order of preference. */
+ pa_idxset* (*get_formats)(pa_source *s); /* ditto */
/* Contains copies of the above data so that the real-time worker
* thread can work without access locking */
@@ -265,6 +269,10 @@ int pa_source_update_status(pa_source*s);
int pa_source_suspend(pa_source *s, pa_bool_t suspend, pa_suspend_cause_t cause);
int pa_source_suspend_all(pa_core *c, pa_bool_t suspend, pa_suspend_cause_t cause);
+/* Is the source in passthrough mode? (that is, is this a monitor source for a sink
+ * that has a passthrough sink input connected to it. */
+pa_bool_t pa_source_is_passthrough(pa_source *s);
+
void pa_source_set_volume(pa_source *source, const pa_cvolume *volume, pa_bool_t save);
const pa_cvolume *pa_source_get_volume(pa_source *source, pa_bool_t force_refresh);
@@ -285,6 +293,10 @@ pa_queue *pa_source_move_all_start(pa_source *s, pa_queue *q);
void pa_source_move_all_finish(pa_source *s, pa_queue *q, pa_bool_t save);
void pa_source_move_all_fail(pa_queue *q);
+pa_idxset* pa_source_get_formats(pa_source *s);
+pa_bool_t pa_source_check_format(pa_source *s, pa_format_info *f);
+pa_idxset* pa_source_check_formats(pa_source *s, pa_idxset *in_formats);
+
/*** To be called exclusively by the source driver, from IO context */
void pa_source_post(pa_source*s, const pa_memchunk *chunk);