summaryrefslogtreecommitdiffstats
path: root/ext/pulse/pulsesink.c
Commit message (Collapse)AuthorAgeFilesLines
* pulse: make a few things smaller by making them bitfieldsLennart Poettering2009-10-171-5/+7
|
* pulsesink: set desired minreq value to segsize/latency-timeRené Stadler2009-10-141-1/+1
| | | | | | | | If we let the daemon decide freely by passing -1, we end up always getting 20ms. We want to set this value because in some cases we want to select a higher latency-time in order to save power. Fixes #597601
* pulse: rename pa_buffer_attr variablesRené Stadler2009-10-021-21/+21
| | | | Makes it much easier to see what is going on and is a lot less error prone.
* pulsesink: Don't dereference NULL pointersDavid Henningsson2009-09-151-0/+4
| | | | | | pa_stream_get_timing_info() can return NULL. Fixes bug #595220.
* pulsesink: handle stream eventsWim Taymans2009-09-141-0/+33
| | | | | Handle stream events and request a PAUSE/PLAY state change from the application when we receive a CORK/UNCORK event.
* pulsesink: Implement GstStreamVolume interfaceSebastian Dröge2009-09-111-0/+8
|
* pulsesink: Implement mute propertySebastian Dröge2009-09-111-2/+138
|
* pulsesink: remove ringbuffer reset compensationWim Taymans2009-09-091-29/+1
| | | | | | | Remove the code to deal with a ringbuffer reset as this code is now in the base class. Bump the -base requirement as we need the new baseaudiosink code to function properly.
* pulsesink: also guard reseting subscribe callback with ifdefsStefan Kost2009-09-021-0/+2
| | | | It is conditionaly set, so do the same when unsetting.
* pulsesink: don't use relative seeksWim Taymans2009-08-251-10/+3
| | | | | | | Don't use relative seeks, it's too hard to track where we are after a flush etc. fixes #593015
* pulsesink: don't do logic within g_assert() statementsTim-Philipp Müller2009-08-021-2/+6
| | | | | | Otherwise that code will just be expanded to nothing when compiled -DG_DISABLE_ASSERT (PS: why is mainloop_start() called in the init function and not when changing state to READY?)
* pulse: conditionally compile newer stuffWim Taymans2009-07-291-1/+8
| | | | | | | configured_sink/source_usec in the timing_info is only since 0.9.11 so conditionally compile this information. fixes #590038
* pulsesink: avoid using ivalid stream indexesWim Taymans2009-07-271-5/+27
| | | | | | | when we get an invalid stream index from pulse because we were just starting, avoid using it for getting and setting the volume. Fixes #589365
* pulsesink: Fix a couple error messages that mentioned incorrect function names.Colin Guthrie2009-07-231-2/+2
| | | | Fixes #589459.
* pulsesink: set some values to their defaultsWim Taymans2009-07-201-2/+2
| | | | | Set the minreq and maxlength buffer attributes to -1 to let puleseaudio select a sensible value.
* pulsesink: don't wait for posted messageWim Taymans2009-07-201-6/+1
| | | | | | | | We can't wait for the ENTER/LEAVE messages to be be posted because the base class sometimes calls the start method with the object lock, which would block the message posting. Instead, just assume that the message will be posted soon and continue. We'll have to fix this in the base class.
* pulsesink: use relative seeksWim Taymans2009-07-201-4/+14
| | | | Use relative seeks because I was told that absolute seeks don't work.
* pulsesink: Emit stream-status leave messageOlivier Crête2009-07-141-0/+30
| | | | Fixes #587695
* pulsesink: Emit stream-status enter messageOlivier Crête2009-07-141-0/+30
| | | | | | | Emit stream-status messages for the pulse thread. Don't use our own GCond for signaling but simply use the pulse mainloop mechanisms for synchronisation. See #587695
* pulsesink: debug the latency update valuesWim Taymans2009-07-141-0/+22
|
* pulsesink: add 24bit sample formatsWim Taymans2009-07-141-1/+14
| | | | Add check for pulseaudio 0.9.15 and enable 24bits samples in that case.
* pulsesink: include "1.0=100%" in volume and change upper limitStefan Kost2009-06-301-1/+7
| | | | | | Upper volume limmit was 1000. That appear unneceasrily high. It would also cause sever distortion if accidentialy used. Now its 10 (~ +15db) which is also in sync with volume and playbin2.
* pulsesink: clear ringbuffer when asked toWim Taymans2009-06-291-0/+23
| | | | | | Since we map the ringbuffer to the pulseaudio internal ringbuffer, flush the pulseaudio buffer when we are asked to clear the ringbuffer. This avoids some leftover audio after a seek.
* pulseink: don't leak device_descriptionWim Taymans2009-06-191-12/+20
| | | | | don't leak the device_description. some cleanups.
* pulsesink: ref custom ring buffer class and type in class_initTim-Philipp Müller2009-06-151-0/+4
| | | | | | | Hack around thread-safety issues in GObject and our racy _get_type() functions (we could easily fix the _get_type() functions, but we still need to hack around the GObject class races until we require a newer GLib version, I think).
* pulsesink: handle border cases in resamplerWim Taymans2009-06-111-2/+5
|
* pulsesink: only notify if all checks passedStefan Kost2009-06-041-4/+3
| | | | | Replace goto done: with return, as those are checks when we don't want to flag a pending notify.
* pulsesink: check pointer before accessingStefan Kost2009-06-031-3/+3
| | | | Move existing check a few lines up, so that we check before accessing fields.
* pulsesink: rename gst_pulse_sink_get_time to gst_pulsesink_get_timeStefan Kost2009-06-031-2/+2
| | | | Rename internal method for consistency.
* pulsesink: use values from pa_stream_get_buffer_attr()Stefan Kost2009-06-031-4/+6
| | | | | We were putting the requested values back into ringbuffer spec, instead of using the queried values.
* pulsesink: Convert an erroneous assertionJan Schmidt2009-05-211-3/+5
| | | | | Occasionally, we get a change callback for an old stream, triggering the assertion unnecessarily. Just ignore such callbacks.
* pulse: Print a warning on under/overflowsOlivier Crête2009-05-211-0/+31
|
* pulsesink: make sure we always signal waitersWim Taymans2009-04-301-9/+15
| | | | | Always signal the waiters in the async callbacks. Especially for the volume callbacks since this might cause deadlocks.
* Remove unused variables in _class_initEdward Hervey2009-04-181-2/+0
| | | | Detected by LLVM's CLang static analyzer
* pulsesink: fix sample offset calculation againWim Taymans2009-04-161-2/+3
|
* pulsesink: handle NULL timing infoWim Taymans2009-04-101-11/+15
| | | | Don't crash when the timing info is not yet available.
* pulse: make it work on 0.9.12Stefan Kost2009-04-101-12/+20
| | | | | | | | First we ignore request to fill the ringbuffer which are less then a segment. The small request where causing stutter. Then we disable flushing the stream when running against pa 0.9.12 as this triggers an assertiong in the sound server and terminates it. It does not happen with 0.9.10 and 0.9.14.
* pulsesink: handle server disconnect in get_timeWim Taymans2009-04-101-0/+11
| | | | | When the server is disconnected or when we are shut down, make our clock return an invalid time instead of erroring out.
* pulsesink: bps is signed int to avoid overflowWim Taymans2009-04-101-2/+1
| | | | | Keep bps as gint instead of guint because we will be doing signed math with it later on and we don't want weird results.
* pulsesink: check for a streamWim Taymans2009-04-091-19/+8
| | | | | Don't try to change the stream volume (and other things) when we don't have a stream yet. Just store the values for later.
* pulsesink: fix compilation for newer pulseaudioWim Taymans2009-04-091-2/+2
|
* pulsesink: uncork fixes and use prebuf = 0Wim Taymans2009-04-091-77/+69
| | | | | | | We can use prebuf = 0 to instruct pulse to not pause the stream on underflows. This way we can remove the underflow callback. We however have to manually uncork the stream now when we have no available space in the buffer or when we are writing too far away from the current read_index.
* pulsesink: handle write errorsWim Taymans2009-04-091-3/+14
|
* pulsesink: write silence on underflowWim Taymans2009-04-091-0/+38
| | | | | Start filling up the buffer with empty samples when an underflow happens. We need to do this to keep pulseaudio reporting the right time for us.
* pulsesink: handle pull-based schedulingWim Taymans2009-04-091-118/+11
| | | | | Use the default basesink methods for implementing pull based scheduling, it works fine for us.
* pulsesink: add beginnings of pull-based schedulingWim Taymans2009-04-091-19/+116
|
* pulsesink: keep track of clock resetWim Taymans2009-04-091-41/+63
| | | | | | | when we switch streams, the clock will reset to 0. Make sure that the provided clock doesn't get stuck when this happens by keeping an initial offset. We also need to make sure that we subtract this offset in samples when writing to the ringbuffer.
* pulsesink: rewrite pulsesinkWim Taymans2009-04-091-757/+1264
| | | | | Derive from BaseAudioSink and implement our custom ringbuffer that maps to the internal pulseaudio ringbuffer.
* pulsesink: clean up the state change functionWim Taymans2009-03-231-10/+12
| | | | | Make the state change function a bit more readable and only pause after the parent had a change to pause first.
* pulsesink: Track the corked/uncorked state ourselvesJan Schmidt2009-03-201-1/+4
| | | | | Use an instance variable to track whether the stream is corked or not, instead of using PA API that was only introduced in 0.9.11