From c3839c76377ea7662f29364ae66718e8ac6233af Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Fri, 25 Feb 2011 12:35:14 +0530 Subject: core: Add a pa_format_info structure This will be used to represent the format of data provided by the client for both compressed and PCM formats in a new extended API. --- src/map-file | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/map-file') diff --git a/src/map-file b/src/map-file index 1fffaff9..181af9ea 100644 --- a/src/map-file +++ b/src/map-file @@ -160,6 +160,10 @@ pa_ext_stream_restore_set_subscribe_cb; pa_ext_stream_restore_subscribe; pa_ext_stream_restore_test; pa_ext_stream_restore_write; +pa_format_info_copy; +pa_format_info_free; +pa_format_info_new; +pa_format_info_valid; pa_frame_size; pa_get_binary_name; pa_get_fqdn; -- cgit 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/map-file | 1 + 1 file changed, 1 insertion(+) (limited to 'src/map-file') diff --git a/src/map-file b/src/map-file index 181af9ea..b4196f15 100644 --- a/src/map-file +++ b/src/map-file @@ -265,6 +265,7 @@ pa_stream_get_timing_info; pa_stream_is_corked; pa_stream_is_suspended; pa_stream_new; +pa_stream_new_extended; pa_stream_new_with_proplist; pa_stream_peek; pa_stream_prebuf; -- cgit From 54c391e6db550c5519df0ebb37f2197eed440c92 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 1 Mar 2011 16:34:06 +0530 Subject: format: Add convenience API to check if a format is PCM or not --- src/map-file | 1 + 1 file changed, 1 insertion(+) (limited to 'src/map-file') diff --git a/src/map-file b/src/map-file index b4196f15..3b1de105 100644 --- a/src/map-file +++ b/src/map-file @@ -162,6 +162,7 @@ pa_ext_stream_restore_test; pa_ext_stream_restore_write; pa_format_info_copy; pa_format_info_free; +pa_format_info_is_pcm; pa_format_info_new; pa_format_info_valid; pa_frame_size; -- cgit From 8631f4e2c44b47db76795bebdbab54914a1f3ea0 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 8 Mar 2011 20:15:36 +0530 Subject: format: Add some convenience functions for printing --- src/map-file | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/map-file') diff --git a/src/map-file b/src/map-file index 3b1de105..5283a5e3 100644 --- a/src/map-file +++ b/src/map-file @@ -146,6 +146,7 @@ pa_cvolume_set_fade; pa_cvolume_set_position; pa_cvolume_snprint; pa_cvolume_valid; +pa_encoding_to_string; pa_ext_device_manager_delete; pa_ext_device_manager_enable_role_device_priority_routing; pa_ext_device_manager_read; @@ -164,6 +165,7 @@ pa_format_info_copy; pa_format_info_free; pa_format_info_is_pcm; pa_format_info_new; +pa_format_info_snprint; pa_format_info_valid; pa_frame_size; pa_get_binary_name; -- 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/map-file | 1 + 1 file changed, 1 insertion(+) (limited to 'src/map-file') diff --git a/src/map-file b/src/map-file index 5283a5e3..1acc6e98 100644 --- a/src/map-file +++ b/src/map-file @@ -258,6 +258,7 @@ pa_stream_get_channel_map; pa_stream_get_context; pa_stream_get_device_index; pa_stream_get_device_name; +pa_stream_get_format_info; pa_stream_get_index; pa_stream_get_latency; pa_stream_get_monitor_stream; -- cgit From 13a33abf45f31417076f283ca7da9d9f74892286 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 29 Mar 2011 17:16:08 +0530 Subject: format: Export pa_format_info_is_compatible in API This allows clients to perform checks between formats as well. --- src/map-file | 1 + 1 file changed, 1 insertion(+) (limited to 'src/map-file') diff --git a/src/map-file b/src/map-file index 1acc6e98..8d683405 100644 --- a/src/map-file +++ b/src/map-file @@ -163,6 +163,7 @@ pa_ext_stream_restore_test; pa_ext_stream_restore_write; pa_format_info_copy; pa_format_info_free; +pa_format_info_is_compatible; pa_format_info_is_pcm; pa_format_info_new; pa_format_info_snprint; -- cgit From 8d076d09902fe618e69f3d71e42299bffe2af437 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Wed, 13 Apr 2011 14:05:18 +0530 Subject: format: Extend properties to handle lists/ranges This replaces the simple string used by pa_format_info's proplist with a JSON string (accessed via new API only). This allows us to express lists and ranges more cleanly, and embed type information for future extensibility. We use json-c for JSON parsing. This is a lightweight depdency (32 KB on my system) and avoids the hassle of having to reinvent a JSON parser. Also included is a test which verifies functionality and is valgrind-clean. --- src/map-file | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/map-file') diff --git a/src/map-file b/src/map-file index 8d683405..a12f30d1 100644 --- a/src/map-file +++ b/src/map-file @@ -166,6 +166,11 @@ pa_format_info_free; pa_format_info_is_compatible; pa_format_info_is_pcm; pa_format_info_new; +pa_format_info_set_prop_int; +pa_format_info_set_prop_int_array; +pa_format_info_set_prop_int_range; +pa_format_info_set_prop_string; +pa_format_info_set_prop_string_array; pa_format_info_snprint; pa_format_info_valid; pa_frame_size; -- cgit From 1404db3d47c77ef3a360feed4ae8932cc8e443a0 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Wed, 13 Apr 2011 15:37:25 +0530 Subject: format: Add some convenience API for setting properties Adds functions to set sample format, rate, channels and channel map on a format to make life easier for users of the API. --- src/map-file | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/map-file') diff --git a/src/map-file b/src/map-file index a12f30d1..026ac10f 100644 --- a/src/map-file +++ b/src/map-file @@ -166,11 +166,15 @@ pa_format_info_free; pa_format_info_is_compatible; pa_format_info_is_pcm; pa_format_info_new; +pa_format_info_set_channel_map; +pa_format_info_set_channels; pa_format_info_set_prop_int; pa_format_info_set_prop_int_array; pa_format_info_set_prop_int_range; pa_format_info_set_prop_string; pa_format_info_set_prop_string_array; +pa_format_info_set_rate; +pa_format_info_set_sample_format; pa_format_info_snprint; pa_format_info_valid; pa_frame_size; -- cgit