| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
The barrier is not used when pthread is not available.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
After the rework to the add pa_sink_input_new_data_set_sink() (and
the source equiv) calling with a NULL sink object will hit an assert.
This caused crashes with the esd protocol and there was the potential
(albeit unlikely) for a crash when creating a sink input without any
sinks available (module-always-sink mitigates this risk but it's still
a potential crasher).
|
|
|
|
| |
Makes diff'ing with sink-input.c easier
|
|
|
|
|
|
| |
This was added to ensure symmetry between playback and recording streams
code, but in reality this makes little sense practically speaking and thus
it is removed.
|
| |
|
|
|
|
|
|
| |
This gets the negotiated format of source outputs in
pa_context_get_source_output*(). Also prints the format and volume
in 'pactl list'.
|
|
|
|
|
|
|
| |
This piggy backs onto the previous changes for protocol 22 and
thus does not bump the version. This and the previous commits should be
seen as mostly atomic. Apologies for any bisecting issues this causes
(although I would expect these to be minimal)
|
|
|
|
|
| |
This gets the list of supported formats for a source in
pa_context_get_source_info*(). Also prints these in 'pactl list'.
|
|
|
|
|
| |
This helps to keep the API more symmetrical and also potentially
allows support for passthrough monitor sources at some point in the future.
|
|
|
|
|
| |
Mostly typo fixes but also a change to make a function relating
to sink inputs use more generic variable names.
|
|
|
|
|
|
|
|
| |
The "rm" basm constraint doesn't work with my version of gcc (4.5.2),
not even in a simple example. Since we usually only have 5 registers
available on i386, force it to be memory on that architecture.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
|
| |
This clarifies some ownership issues with the formats idxset on the
server side so we don't end up leaking formats on errors.
|
|
|
|
|
|
|
|
| |
We were calculating new latency based on the latency set on the old
sink/source, rather than the actual latency requested by the client.
Over a series of moves, this will lead the latency being ~halved each
time, resulting in an eventual rewind flood from a latency that cannot
be handled.
|
|
|
|
|
| |
This makes windows.h include less headers.
Otherwise boolean is typedef'ed and that clashes with libjson.
|
| |
|
| |
|
|
|
|
|
| |
Channel map handling in the extended API was broken. Thanks for Milos_SD
for pointing this out on IRC.
|
|
|
|
|
|
|
|
|
|
|
| |
support)
The proplist used may never be freed if an error condition was found with
CHECK_VALIDITY macro and the formats idxset was never freed regardless
of error state.
This change fixes adds a new maco CHECK_VALIDITY_GOTO() which allows
for cleanup to be done before returning.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
When the sink format changes and we kill the stream, clients need a way
to know (a) what device they should reconnect to, and (b) what the
stream running time was when the stream got killed (pa_stream_get_time()
won't work after the stream has been killed). This adds these two bits
of information in the event callback's proplist parameter.
|
| |
| |
| |
| |
| |
| |
| | |
This event is emitted if the sink-input could not be moved to a new sink
because it doesn't support the format of the sink-input. Clients can
reconnect their stream with a different format if they wish or
gracefully exit.
|
| | |
|
| |
| |
| |
| |
| |
| | |
The assertion message is misleading, since the passthrough connection
can fail for reasons the client has no control over (like other sink
inputs being connected).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since we currently have two mechanisms to signal a passthrough
connection (non-PCM format or PA_SINK_INPUT_PASSTHROUGH flag), we move
all the related checks into functions and use those everywhere.
This makes things more consistent, and should we decide to get rid of
the flag, we only need to change pa_sink_input_*_is_passthrough()
accordingly.
|
| |
| |
| |
| |
| | |
This gets the negotiated format of sink inputs in
pa_context_get_sink_input*(). Also prints the format in 'pactl list'.
|
| |
| |
| |
| |
| | |
This gets the list of supported formats for a sink in
pa_context_get_sink_info*(). Also prints these in 'pactl list'.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In most cases it is expected that clients cannot consume compressed
data from monitor sources, so we suspend the monitor source when the
sink goes into passthrough mode.
Eventually, when the extended API includes client notifications for
changed formats, we should emit a notification on the monitor so that
clients can decide what they want to do when this happens (disconnect or
consume the data anyway).
|
| | |
|
| |
| |
| |
| |
| |
| | |
This adds some checks that I'd postponed and adds a
"should-be-good-enough" guess for tlength when using a compressed
format.
|
| |
| |
| |
| |
| |
| | |
This will eventually be replaced by a hook to let clients know that the
stream has moved so that they can gracefully reconnect and renegotiate a
supported format.
|
| |
| |
| |
| | |
We weren't freeing the sink formats idxset.
|
| |
| |
| |
| |
| |
| | |
We frequently need to free an idxset containing pa_format_infos, so
define an internal free function that can be used directly with this
(instead of defining it once-per-file).
|
| |
| |
| |
| | |
Handles bad format input more gracefully and returns an error instead.
|
| |
| |
| |
| | |
This is easier for clients to grok than INVALID.
|
| |
| |
| |
| |
| | |
Removes a couple of warnings and simplifies the assertion logic that
verifies format negotiation was successful.
|
| |
| |
| |
| |
| |
| |
| | |
This removes the passthrough flag from sinks since we will drop
exclusively passthrough sinks in favour of providing a list of formats
supported by each sink. We can still determine whether a sink is in
passthrough mode by checking if any non-PCM streams are attached to it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
|/
|
|
| |
invoking pa_make_realtime()
|
|
|
|
|
|
|
|
|
|
| |
Commit 65ef80b fixed building with xcb-util >= 0.3.8, but the reply is never
checked (possible SIGSEGV if the reply is NULL) nor freed (memory leak at each
call of the functions).
Also, remove include and dependencies on xcb-atom, as it was only meaningful
for xcb_atom_get() and STRING, and depend instead on xcb >= 1.6 for
XCB_ATOM_STRING.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's possible that the memblockq of a sink input is rewound to a negative read
index if the sink input is moved between sinks shortly after its creation. When
this happens, pa_memblockq_peek() returns a memchunk whose 'memblock' field is
NULL and whose 'length' field indicates the length of the gap caused by the
negative read index. This will trigger an assert in play-memblockq.c.
If the memblockq had a silence memchunk, pa_memblockq_peek() would return
silence for the duration of the gap and the assert would be avoided. However,
this approach would prevent the sink input from being drained and is thus not
possible. Instead, we handle the aforementioned situation by dropping the gap
indicated by the 'length' field of the memchunk and by peeking the actual data
that comes after the gap.
This scenario seems to be quite rare in everyday use, but it causes a severe
bug in the handheld world. The assert can be triggered e.g. by loading two null
sinks, playing a sample from the cache to one of them and then moving the
created sink input between the two sinks. The rewinds done by the null sinks
seem to be quite long (I don't know if this is normal behaviour or something
fishy in module-null-sink).
See also:
6bd34156b130c07b130de10111a12ef6dab18b52
virtual-sink: Fix a crash when moving the sink to a new master right after setup.
https://tango.0pointer.de/pipermail/pulseaudio-discuss/2011-February/009105.html
Reproduce:
This problem can be reproduced with the following script:
SAMPLE_PATH="/usr/share/sounds/alsa/"
SAMPLE="Front_Left"
pactl remove-sample $SAMPLE 2> /dev/null
pactl upload-sample $SAMPLE_PATH$SAMPLE.wav
mod1=`pactl load-module module-null-sink sink_name=null1`
mod2=`pactl load-module module-null-sink sink_name=null2`
pactl play-sample $SAMPLE null1
input=`pactl list | grep "Sink Input #" | tail -n 1 | cut -d# -f2`
echo "Sample $SAMPLE playing as Sink Input #$input"
pactl move-sink-input $input null2
pactl move-sink-input $input null1
pactl unload-module $mod1
pactl unload-module $mod2
|
|
|
|
|
|
| |
The xcb_atom_get functions were removed from xcb-util. Changed these to
xcb_intern_atom/xcb_intern_atom_reply. Also, STRING is now
XCB_ATOM_STRING.
|
|
|
|
|
|
|
|
| |
There were several memory leaks. In addition to those,
pa_dbus_protocol_add_interface() used a string from the
caller as a key to a hashmap, instead of a copy of the
string. This caused trouble when the caller freed the
string while the key was still in use in the hashmap.
|
|
|
|
|
| |
Newer generations of libpthread have functions to set and get the thread
names. If available, use them.
|