summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
Commit message (Collapse)AuthorAgeFilesLines
* parecord: Automatically detect file format from extensionMaarten Bosmans2011-06-271-1/+1
| | | | And fix a small bug in pa_sndfile_format_from_string.
* win32: Make some unused-variable warnings go awayMaarten Bosmans2011-06-248-17/+29
|
* win32: Make once-test workMaarten Bosmans2011-06-241-0/+21
| | | | The barrier is not used when pthread is not available.
* Remove unnecessary #includesMaarten Bosmans2011-06-2288-146/+31
|
* esound,streams: Fix some crashes.Colin Guthrie2011-06-223-9/+14
| | | | | | | | | | 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).
* source-output: Trivial code moveArun Raghavan2011-06-221-52/+52
| | | | Makes diff'ing with sink-input.c easier
* capture: Remove support for synchronised capture streams.Colin Guthrie2011-06-223-86/+2
| | | | | | 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.
* streams: Tidy up includesColin Guthrie2011-06-222-2/+2
|
* introspect: Get format of source outputColin Guthrie2011-06-221-0/+1
| | | | | | This gets the negotiated format of source outputs in pa_context_get_source_output*(). Also prints the format and volume in 'pactl list'.
* capture: Implement per-stream volume control for capture streams.Colin Guthrie2011-06-229-83/+1654
| | | | | | | 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)
* introspect: Get formats for sourcesColin Guthrie2011-06-221-0/+13
| | | | | This gets the list of supported formats for a source in pa_context_get_source_info*(). Also prints these in 'pactl list'.
* capture: Add the passthrough format negotiation to capture streams.Colin Guthrie2011-06-228-70/+369
| | | | | This helps to keep the API more symmetrical and also potentially allows support for passthrough monitor sources at some point in the future.
* alsa-sink: Some trivial tidyupsColin Guthrie2011-06-223-14/+18
| | | | | Mostly typo fixes but also a change to make a function relating to sink inputs use more generic variable names.
* SSE/MMX: Fix problem with highpitched noise on i386David Henningsson2011-06-222-4/+20
| | | | | | | | 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>
* protocol-native: Don't leak formatsArun Raghavan2011-06-191-3/+16
| | | | | This clarifies some ownership issues with the formats idxset on the server side so we don't end up leaking formats on errors.
* protocol-native: Use original requested latency on stream movesArun Raghavan2011-06-141-4/+12
| | | | | | | | 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.
* win32: define WIN32_LEAN_AND_MEANMaarten Bosmans2011-06-121-0/+1
| | | | | This makes windows.h include less headers. Otherwise boolean is typedef'ed and that clashes with libjson.
* pulsecore: Add a couple pa_asserts() on pa_tagstruct* calls.Colin Guthrie2011-06-061-0/+2
|
* streams: Fix the actual resampler method shown in debug messages.Colin Guthrie2011-06-022-0/+2
|
* format: Fix channel map handlingArun Raghavan2011-05-201-1/+2
| | | | | Channel map handling in the extended API was broken. Thanks for Milos_SD for pointing this out on IRC.
* protocol-native: Fix memory leaks introduced in protocol 21 (passthrough ↵Colin Guthrie2011-05-161-26/+30
| | | | | | | | | | | 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.
* sink-input: Fix memory leak of proplist when sending format-changed eventsColin Guthrie2011-05-161-0/+1
|
* Merge branch 'passthrough'Colin Guthrie2011-05-1513-106/+464
|\
| * sink-input: Provide more information to client when format is lostArun Raghavan2011-05-151-1/+5
| | | | | | | | | | | | | | | | 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.
| * sink-input: Add a format-lost eventArun Raghavan2011-05-151-1/+2
| | | | | | | | | | | | | | 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.
| * sink-input: Don't restore volume for passthrough streamsArun Raghavan2011-05-151-0/+6
| |
| * sink-input: Don't print an error if a passthrough connection failsArun Raghavan2011-05-151-1/+2
| | | | | | | | | | | | 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).
| * core: Factor out passthrough checks into their own functionsArun Raghavan2011-05-023-15/+39
| | | | | | | | | | | | | | | | | | | | 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.
| * introspect: Get format of sink inputArun Raghavan2011-05-021-0/+2
| | | | | | | | | | This gets the negotiated format of sink inputs in pa_context_get_sink_input*(). Also prints the format in 'pactl list'.
| * introspect: Get formats for sinksArun Raghavan2011-05-021-0/+13
| | | | | | | | | | This gets the list of supported formats for a sink in pa_context_get_sink_info*(). Also prints these in 'pactl list'.
| * core: Suspend monitor when a sink enters passthrough modeArun Raghavan2011-05-023-1/+18
| | | | | | | | | | | | | | | | | | | | | | 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).
| * sink: Trivial typo fix in commentArun Raghavan2011-05-021-1/+1
| |
| * core: Fix some FIXMEs for the extended APIArun Raghavan2011-05-021-4/+9
| | | | | | | | | | | | This adds some checks that I'd postponed and adds a "should-be-good-enough" guess for tlength when using a compressed format.
| * sink-input: Kill passthrough streams if moving to an unsupported sinkArun Raghavan2011-05-023-0/+33
| | | | | | | | | | | | 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.
| * sink: Fix leak in pa_sink_check_formats()Arun Raghavan2011-05-021-1/+4
| | | | | | | | We weren't freeing the sink formats idxset.
| * format: Avoid some code duplicationArun Raghavan2011-05-022-14/+7
| | | | | | | | | | | | 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).
| * sink-input: Don't assert on bad formatsArun Raghavan2011-05-021-2/+2
| | | | | | | | Handles bad format input more gracefully and returns an error instead.
| * sink-input: Return NOTSUPPORTED if format negotiation failsArun Raghavan2011-05-021-1/+1
| | | | | | | | This is easier for clients to grok than INVALID.
| * sink-input: Minor cleanupsArun Raghavan2011-05-021-5/+5
| | | | | | | | | | Removes a couple of warnings and simplifies the assertion logic that verifies format negotiation was successful.
| * sink: Remove PASSTHROUGH flagArun Raghavan2011-05-023-44/+38
| | | | | | | | | | | | | | 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.
| * core: Add extended stream API to support compressed formatsArun Raghavan2011-05-027-37/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * sink: Extend API for compressed formats supportArun Raghavan2011-05-022-0/+58
| | | | | | | | | | | | 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.
| * core: Add a pa_format_info structureArun Raghavan2011-05-022-1/+47
| | | | | | | | | | 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.
| * sink: Trivial typo fixArun Raghavan2011-05-021-7/+7
| |
| * sink-input: Don't resample passthrough inputsPierre-Louis Bossart2011-05-021-12/+14
| |
* | rtkit: use private bus connection in order to avoid threading issues when ↵Lennart Poettering2011-05-061-1/+2
|/ | | | invoking pa_make_realtime()
* x11: More XCB fixes.Arnaud Fontaine2011-04-301-13/+25
| | | | | | | | | | 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.
* core: Drop empty gaps in the memblockq when playing data from it.Antti-Ville Jansson2011-04-281-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* x11: Fix build errors with newest xcb-util.Maciej Grela2011-04-281-9/+17
| | | | | | 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.
* protocol-dbus: Fix some memory management bugs.Tanu Kaskinen2011-04-231-6/+6
| | | | | | | | 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.