From 0ac2cfce6d1a3d7ab5af6aca659e46625c32d3c4 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 28 Feb 2011 13:23:23 +0530 Subject: core: Add extended stream API to support compressed formats This is the beginning of work to support compressed formats natively in PulseAudio. This adds a pa_stream_new_extended() that takes a format structure, sends it to the server (=> protocol extension) and has the server negotiate with the appropropriate sink to figure out what format it should use. This is work in progress, and works only with PCM streams. Actual compressed format support in some sink needs to be implemented, and extensive testing is required. More details on how this is supposed to work is available at: http://pulseaudio.org/wiki/PassthroughSupport --- src/pulse/stream.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/pulse/stream.h') diff --git a/src/pulse/stream.h b/src/pulse/stream.h index dd67db73..48bf09df 100644 --- a/src/pulse/stream.h +++ b/src/pulse/stream.h @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -356,6 +357,16 @@ pa_stream* pa_stream_new_with_proplist( const pa_channel_map *map /**< The desired channel map, or NULL for default */, pa_proplist *p /**< The initial property list */); +/* Create a new, unconnected stream with the specified name, the set of formats + * this client can provide, and an initial list of properties. While + * connecting, the server will select the most appropriate format which the + * client must then provide. \since 1.0 */ +pa_stream *pa_stream_new_extended( + pa_context *c /**< The context to create this stream in */, + const char *name /**< A name for this stream */, + pa_format_info * const * formats /**< The list of formats that can be provided */, + pa_proplist *p /**< The initial property list */); + /** Decrease the reference counter by one */ void pa_stream_unref(pa_stream *s); -- cgit From dedbc942ab2090320856c36d6673db12026efdc1 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 8 Mar 2011 20:16:00 +0530 Subject: stream: Add API to get a stream's pa_format_info --- src/pulse/stream.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pulse/stream.h') diff --git a/src/pulse/stream.h b/src/pulse/stream.h index 48bf09df..b265fae6 100644 --- a/src/pulse/stream.h +++ b/src/pulse/stream.h @@ -709,6 +709,9 @@ const pa_sample_spec* pa_stream_get_sample_spec(pa_stream *s); /** Return a pointer to the stream's channel map. */ const pa_channel_map* pa_stream_get_channel_map(pa_stream *s); +/** Return a pointer to the stream's format \since 1.0 */ +const pa_format_info* pa_stream_get_format_info(pa_stream *s); + /** Return the per-stream server-side buffer metrics of the * stream. Only valid after the stream has been connected successfuly * and if the server is at least PulseAudio 0.9. This will return the -- cgit