Commit graph

669 commits

Author SHA1 Message Date
Arun Raghavan
8baf8e90c2 format: Add API to query a property's type
Since a given property can be single-valued, an array or (in the case of
ints) a range, clients need an API to figure out what type of value a
property holds. This adds such an API. The actual property type
enumeration is kept in the PA_PROP_* namespace and not the
PA_FORMAT_INFO* namespace so that it can later be reused for properties
generically if required.
2012-03-05 20:00:31 +05:30
Arun Raghavan
8f850403c0 format: Trivial reorganisation
Moves all the property setters together
2012-03-05 20:00:31 +05:30
Arun Raghavan
59af940dd5 format: Add more property getters
This adds integer range/array and string array property getters to the
pa_format_info API. Corresponding tests added as well to ensure the code
is valgrind-clean.

The corresponding functions are added to map-file manually for now.
2012-03-05 20:00:31 +05:30
Arun Raghavan
c60f698f1e format: Expose pa_format_info<->pa_sample_spec conversion functions
These utility functions could be handy to clients.
pa_format_info_to_sample_spec_fake() isn't made public, but the return
value is changed to keep in sync with pa_format_info_to_sample_spec().
2012-03-05 20:00:31 +05:30
Arun Raghavan
63429b67c7 format: Don't assert on errors in getters
This makes handling errors in getter functions more graceful, rather
than triggering warnings/asserts. Better to be less trigger-happy about
these things since this is now public-facing API.
2012-03-05 20:00:31 +05:30
Arun Raghavan
6f20d39a1c format: Export pa_format_info int and string property getters
We currently only have setters and clients need to be able to query
these values as well. The return types for these functions needed to be
changed to int since this is public API now.
2012-03-05 20:00:31 +05:30
Maarten Lankhorst
e91e78bb54 pulse: Fix old bug in stream_free
Signed-off-by: Maarten Lankhorst<m.b.lankhorst@gmail.com>
2012-02-19 19:02:08 +02:00
Arun Raghavan
9eabf7a0cf format: Add "since 1.0" documentation tags where they were missing 2012-02-07 13:07:01 +05:30
Peter Meerwald
b351e06817 fix the ever-popular 'the the' typo
some are comments, some are user-visible doxygen text and documentation
2012-01-28 17:51:59 +02:00
Peter Meerwald
2da8b1fa63 pulse: Document general error handling. 2012-01-28 15:07:20 +02:00
Peter Meerwald
910bc7c2b4 pulse: Turn the anonymous error code enum into pa_error_code_t.
The purpose is to make it possible to link to the
enumeration in doxygen.
2012-01-14 16:30:45 +02:00
Arun Raghavan
177cfb1f1c stream: Clarify the sign of error return codes
The returned error values are all negative, but the documentation did
not explicitly mention this. Thanks to Vincent Penquerc'h for pointing
this out.
2012-01-14 10:19:32 +05:30
Arun Raghavan
0d41bcfcbf doc: Clarify pa_stream_get_latency() return value
Clarifies that the latency is returned via an inout parameter and the
return value is an error code or 0 on success.
2011-12-30 23:50:19 +05:30
Peter Meerwald
8942d2369d stream: Fix typos and formatting in stream.h doxygen documentation 2011-12-12 23:57:55 +00:00
Peter Meerwald
525311abfb mainloop: Fix typos and rewording of thread-mainloop.h doxygen documentation 2011-12-12 23:57:55 +00:00
Peter Meerwald
57a50cdaec simple: Fix typos in simple.h doxygen documentation 2011-12-12 23:57:54 +00:00
Peter Meerwald
107ee0b69a stream: Fix 'e g' as 'e.g.\ ' 2011-12-12 23:57:54 +00:00
Peter Meerwald
398e350885 error: Fix spelling of 'initialization' in errortab for PA_ERR_MODINITFAILED
Also update the related translations.
2011-12-12 23:57:54 +00:00
Peter Meerwald
d6512750fd proplist: Consistently use parameter name p for a pa_proplist* in prototype 2011-12-12 23:57:54 +00:00
Peter Meerwald
9e22ff0f03 utf8: Fix doxygen file description for utf8.h 2011-12-12 23:57:54 +00:00
Peter Meerwald
8049bd0b19 proplist: Fix typos in doxygen documentation 2011-12-12 23:57:54 +00:00
Peter Meerwald
8eb0516058 proplist: Add doxygen file description for proplist.h 2011-12-12 23:57:54 +00:00
Peter Meerwald
4e429a51a3 introspect: Fix unresolved doxygen link pa_port_available_t 2011-12-12 23:57:54 +00:00
Peter Meerwald
ddd7a91f5d format: Add description for format.h 2011-12-12 23:57:50 +00:00
Peter Meerwald
6e7e5d6fa0 format: Add periods to fix brief documentation for pa_format_info_is_pcm() 2011-12-12 22:47:52 +00:00
Peter Meerwald
66b2755361 format: Fix unknown doxygen command \second 2011-12-12 22:46:22 +00:00
Peter Meerwald
564997e487 def: Document that pa_buffer_attr.maxlength is in bytes.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42919
2011-12-12 22:39:58 +00:00
Peter Meerwald
d735857942 stream: Fix comments 2011-12-12 22:39:52 +00:00
Peter Meerwald
c6b95d5235 pstream: Fix spelling of 'receive'.
These functions are not exported in the map file and thus do
not form part of the API and can be corrected without any problem.
2011-12-12 22:36:39 +00:00
Maarten Bosmans
e8028304b3 win32: Avoid some compiler warnings when cross-compiling for mingw32
Autoconf documentation says that AC_FUNC_SELECT_ARGTYPES shouldn't be used anyway.
2011-11-27 16:24:48 +00:00
David Henningsson
961ec210a6 Introduce "available" concept for ports, and communicate that to clients. Bump protocol version to 24.
Note: There is still no notification when status availability changes.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-11-26 13:47:33 +02:00
Antti-Ville Jansson
7d05ac606b stream: Fix upload samples' cleanup
In pa_create_stream_callback, a stream is inserted into
s->context->record_streams only if it's a record stream. Otherwise it's
inserted into s->context->playback_streams. However, in stream_unlink the
stream is removed from s->context->playback_streams only if it's a playback
stream and otherwise it's removed from s->context->record_streams.

Thus, if the stream is an upload stream, we first insert it into
s->context->playback_streams in pa_create_stream_callback and then try to
remove it unsuccessfully from s->context->record_streams in stream_unlink. This
means that we are leaking hashmap entries until the context is freed,
constantly consuming more memory with applications that upload and unload a
large number of samples through one context.

Of course, this begs the question whether upload streams even belong in either
of those hashmaps. I don't want to mess around with the code too much at this
point though, so this patch should be a sufficient improvement.
2011-11-14 10:54:18 +05:30
Arun Raghavan
667289679f doc: Correct intended roles property documentation
The documentation says we expect a comma-separate list of intended
roles, but the code splits the string on whitespaces, so this corrects
the documentation to match the implementation.
2011-10-28 14:44:53 +02:00
Pierre-Louis Bossart
f0ec495938 sink,source: support for rate update
Avoid resampling or use integer resampling when supported by the
sinks/sources

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2011-10-17 20:09:46 +05:30
Maarten Bosmans
3b7c6b21f4 Do something sensible when compiled without iconv support
Without this fix, pacat won't start up, because it is unable to set the stream name.
2011-10-11 22:48:21 +05:30
Maarten Bosmans
9e92b1977b doc: Add some more doxygen tags to existing comments 2011-10-04 09:40:05 +01:00
Tanu Kaskinen
666261ece8 memblockq: Improve debuggability by storing a name and a sample spec.
These are not used for anything at this point, but this
makes it easy to add ad-hoc debug prints that show the
memblockq name and to convert between bytes and usecs.
2011-10-01 13:25:16 +01:00
Colin Guthrie
7563e0bbb5 libpulse: Always return a three part version number in API calls.
For both the headers and the library we should provide clean, three part
strings as this has been what we've previously done in the past
and some external systems apparently rely on this format. While it's not
something we've officially commented on before, there is no real advantage
to us to change it so let's not try to tidy things up too much
considering some third party apps (e.g. Skype) seem to dislike a two
part version string.
2011-10-01 13:21:03 +01:00
Arun Raghavan
6878140662 extended: Fix doxygen comment style typos
Thanks to Rémi Denis-Courmont for pointing this out on IRC.
2011-09-27 18:57:48 +05:30
Arun Raghavan
a9c85074cb def: Hide server-side sink/source flags
This makes sure that sink/source flags that are used on the server side
only are not leaked to clients.
2011-09-14 14:02:12 +05:30
Arun Raghavan
ec4f256493 stream: Relax assert for extended API
For some reason this assert wasn't triggered earlier -- we shouldn't be
looking at the stream sample_spec if the formats API is used.
2011-09-14 13:55:58 +05:30
Colin Guthrie
aa3142ab20 volume: Rename 'sync volume' to 'deferred volume'.
This just covers Lennart's concern over the terminology used.

The majority of this change is simply the following command:
 grep -rli sync[-_]volume . | xargs sed -i 's/sync_volume/deferred_volume/g;s/PA_SINK_SYNC_VOLUME/PA_SINK_DEFERRED_VOLUME/g;s/PA_SOURCE_SYNC_VOLUME/PA_SOURCE_DEFERRED_VOLUME/g;s/sync-volume/deferred-volume/g'

Some minor tweaks were added on top to tidy up formatting and
a couple of phrases were clarified too.
2011-09-13 21:15:49 +01:00
Maarten Bosmans
dfd706da71 Squash the last gcc warnings 2011-09-03 12:17:13 +02:00
Maarten Bosmans
55fdb0162c Remove extra ; s where they are not allowed in strict C99 2011-08-25 18:21:49 +05:30
Maarten Bosmans
c5dca7cf2b More spelling fixes 2011-08-25 11:27:47 +01:00
Maarten Bosmans
231645d4fc Spelling fixes in public headers 2011-08-25 11:27:35 +01:00
Colin Guthrie
d6b9e61b90 device-restore: Change the API to include type information (sink vs. source)
This changes the API, but as we have not released yet, this is OK.
2011-08-18 17:33:08 +01:00
Colin Guthrie
cc117be62b def: Add a new enum to allow differntiation between sinks and sources.
This is for bits of code or API where the concepts and constructs are
extensibly the same for sinks and sources. To avoid duplication we can
simply define our structure/API and then use this enum to differentiate
the two.
2011-08-18 17:10:13 +01:00
Arun Raghavan
a6ad2d860a sink: Add PA_SINK_SET_FORMATS macro
Required for testing the existence of the flag
2011-08-18 14:56:41 +05:30
Arun Raghavan
2677911e92 source: Remove the PA_SOURCE_PASSTHROUGH flag
This isn't actually used anywhere, and PA_SINK_PASSTHROUGH was also
removed.
2011-08-17 09:00:47 +05:30