summaryrefslogtreecommitdiffstats
path: root/ext/pulse
Commit message (Collapse)AuthorAgeFilesLines
* 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-102-12/+22
| | | | | | | | 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-092-770/+1269
| | | | | Derive from BaseAudioSink and implement our custom ringbuffer that maps to the internal pulseaudio ringbuffer.
* pulse: remove some stray debug linesWim Taymans2009-04-091-8/+0
|
* 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-202-1/+5
| | | | | 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
* pulse: Make sure the stream is uncorked in the write functionJan Schmidt2009-03-201-4/+23
| | | | | | | If the caps changes, the sink is reset without transitioning through a PAUSED->PLAYING state change, resulting in a corked stream. This avoids the problem by checking that the stream is uncorked when writing samples to it.
* pulsesink: Wait until there is enough room to write an entire segmentJan Schmidt2009-03-131-1/+1
| | | | | | | | When trying to write out a segment, wait until there is enough free space for the entire segment. This helps to reduce ripple in the clock reporting, where the app might query the playback position while only half a segment has been written (and is therefore reported by _delay(), even though the ring buffer has not yet been advanced)
* pulsemixer: Don't use g_atomic_int_(get|set) for accessing the mixer track flagsSebastian Dröge2009-02-221-9/+12
| | | | | | | | | | | | | | | | | | | | g_atomic_int_(get|set) only work on ints and the flags are an enum (which on most architectures is stored as an int). Also the way the flags were accessed atomically would still leave a possible race condition and we don't do it in any other mixer track implementation, let alone at any other place where an integer could be changed from different threads. Removing the g_atomic_int_(get|set) will only introduce a new race condition on architectures where integers could be half-written while reading them which shouldn't be the case for any modern architecture and if we really care about this we need to use g_atomic_int_(get|set) at many other places too. Apart from that g_atomic_int_(set|get) will result in aliasing warnings if their argument is explicitely casted to an int *. Fixes bug #571153.
* pulsemixer: Fix compiler warnings.Mark Nauwelaerts2009-02-131-6/+6
| | | | | Cast (enum *) to (int *), not necessarily technically right, but plugs #571153.
* pulsesink: Issue property change notification in streaming thread,Mark Nauwelaerts2009-02-132-6/+9
| | | | | | | | | rather than PA thread. pa_threaded_mainloop_lock() (a.o.) and by extension get_property should not be done from a PA thread, but the latter may occur as a result of a property change notification. Fixes #571204 (though current situation not ideal, e.g. post message rather than signal).
* Fix compile error in the last commitJan Schmidt2009-01-281-0/+2
|
* Rewrite the pulse plugin, conditionally enabling new behaviour withJan Schmidt2009-01-288-276/+855
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | newer pulseaudio. Fixes: #567794 * Hook pulsesink's volume property up with the stream volume -- not the sink volume in PA. * Read the device description directly from the sink instead of going via the mixer. * Properly implement _reset() methods for both sink and source to avoid deadlocks when shutting down a pipeline. * Replace all simple pa_threaded_mainloop_wait() by proper loops to guarantee that we wait for the right event in case multiple events are fired. While this is not strictly necessary in many cases it certainly is more correct and makes me sleep better at night. * Replace CHECK_DEAD_GOTO macros with proper functions * Extend the number of supported channels to 32 since that is the actual limit in PA. * Get rid of _dispose() methods since we don't need them. * Increase the volume property upper limit of the sink to 1000. * Reset function pointers after we disconnect a stream/context. Better fix for bug 556986. * Reset the state of the element properly if open/prepare fails * Cork the PA stream when the pipeline is paused. This allows the PA * daemon to close audio device on pause and thus save a bit of power. * Set PA stream properties based on GST tags such as GST_TAG_TITLE, GST_TAG_ARTIST, and so on. Signed-off-by: Lennart Poettering <lennart@poettering.net>
* Update and add documentation for plugins with deps (ext).Stefan Kost2009-01-283-28/+14
| | | | Link to properties. Correct titles for examples. Document a few trivial cases. Keep lists in section file and docs/plugins/Makefile.am alphabetically ordered. Fix warnings that gtk-doc points out.
* ext/pulse/pulseprobe.c: Fix refcount loop, resulting in a thread leak. Fixes ↵Lennart Poettering2009-01-141-3/+1
| | | | | | | | | | bug #567746. Original commit message from CVS: Patch by: Lennart Poettering <lennart at poettering dot net> * ext/pulse/pulseprobe.c: (gst_pulseprobe_new), (gst_pulseprobe_free): Fix refcount loop, resulting in a thread leak. Fixes bug #567746.
* ext/pulse/pulsesink.*: Use a mutex to protect the current stream pointer, ↵Jan Schmidt2009-01-072-5/+34
| | | | | | | | | | | | and ignore callbacks for stream objects tha... Original commit message from CVS: * ext/pulse/pulsesink.c: * ext/pulse/pulsesink.h: Use a mutex to protect the current stream pointer, and ignore callbacks for stream objects that have been destroyed already. Fixes problems with unprepare/prepare cycles caused by the input caps changing, without reintroducing bug #556986.
* ext/pulse/pulsesink.c: Don't wait for the pulse mainloop when destroying the ↵Sebastian Dröge2009-01-051-7/+4
| | | | | | | | | | stream. Original commit message from CVS: * ext/pulse/pulsesink.c: (gst_pulsesink_destroy_stream): Don't wait for the pulse mainloop when destroying the stream. Fixes a deadlock when the pulsedaemon goes away while pulsesink is PLAYING. Fixes bug #556986.
* ext/pulse/pulsemixerctrl.c: And remove temporary comment pointing to the bug ↵Stefan Kost2008-12-191-3/+0
| | | | | | | | | | ticket. Original commit message from CVS: * ext/pulse/pulsemixerctrl.c: And remove temporary comment pointing to the bug ticket. * gst/avi/gstavimux.c: Move reoccuring logging to LOG and log instance too.
* ext/pulse/pulsemixerctrl.c: Don't leak the pa_operation.Stefan Kost2008-12-171-0/+2
| | | | | | Original commit message from CVS: * ext/pulse/pulsemixerctrl.c: Don't leak the pa_operation.
* ext/pulse/pulsemixerctrl.c: Add note about memleak.Stefan Kost2008-12-151-0/+3
| | | | | | Original commit message from CVS: * ext/pulse/pulsemixerctrl.c: Add note about memleak.
* ext/pulse/pulsesink.c: Change #if 0 to something more expresive and add ↵Stefan Kost2008-11-231-6/+12
| | | | | | | | | pointer to related bug ticket. Original commit message from CVS: * ext/pulse/pulsesink.c: Change #if 0 to something more expresive and add pointer to related bug ticket.
* Don't install static libs for plugins. Fixes #550851 for -good.Stefan Kost2008-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * ext/aalib/Makefile.am: * ext/annodex/Makefile.am: * ext/cairo/Makefile.am: * ext/dv/Makefile.am: * ext/esd/Makefile.am: * ext/flac/Makefile.am: * ext/gconf/Makefile.am: * ext/gdk_pixbuf/Makefile.am: * ext/hal/Makefile.am: * ext/jpeg/Makefile.am: * ext/ladspa/Makefile.am: * ext/libcaca/Makefile.am: * ext/libmng/Makefile.am: * ext/libpng/Makefile.am: * ext/mikmod/Makefile.am: * ext/pulse/Makefile.am: * ext/raw1394/Makefile.am: * ext/shout2/Makefile.am: * ext/soup/Makefile.am: * ext/speex/Makefile.am: * ext/taglib/Makefile.am: * ext/wavpack/Makefile.am: * gst/alpha/Makefile.am: * gst/apetag/Makefile.am: * gst/audiofx/Makefile.am: * gst/auparse/Makefile.am: * gst/autodetect/Makefile.am: * gst/avi/Makefile.am: * gst/cutter/Makefile.am: * gst/debug/Makefile.am: * gst/effectv/Makefile.am: * gst/equalizer/Makefile.am: * gst/flx/Makefile.am: * gst/goom/Makefile.am: * gst/goom2k1/Makefile.am: * gst/icydemux/Makefile.am: * gst/id3demux/Makefile.am: * gst/interleave/Makefile.am: * gst/law/Makefile.am: * gst/level/Makefile.am: * gst/matroska/Makefile.am: * gst/median/Makefile.am: * gst/monoscope/Makefile.am: * gst/multifile/Makefile.am: * gst/multipart/Makefile.am: * gst/oldcore/Makefile.am: * gst/qtdemux/Makefile.am: * gst/replaygain/Makefile.am: * gst/rtp/Makefile.am: * gst/rtsp/Makefile.am: * gst/smpte/Makefile.am: * gst/spectrum/Makefile.am: * gst/udp/Makefile.am: * gst/videobox/Makefile.am: * gst/videocrop/Makefile.am: * gst/videofilter/Makefile.am: * gst/videomixer/Makefile.am: * gst/wavenc/Makefile.am: * gst/wavparse/Makefile.am: * sys/directdraw/Makefile.am: * sys/directsound/Makefile.am: * sys/oss/Makefile.am: * sys/osxaudio/Makefile.am: * sys/osxvideo/Makefile.am: * sys/sunaudio/Makefile.am: * sys/v4l2/Makefile.am: * sys/waveform/Makefile.am: * sys/ximage/Makefile.am: Don't install static libs for plugins. Fixes #550851 for -good.
* ext/pulse/: Return -1 instead of 0 in error cases. Fixes #554771.Wim Taymans2008-10-032-5/+10
| | | | | | | Original commit message from CVS: * ext/pulse/pulsesink.c: (gst_pulsesink_write): * ext/pulse/pulsesrc.c: (gst_pulsesrc_read): Return -1 instead of 0 in error cases. Fixes #554771.
* ext/pulse/pulsesink.c: Fix problems with pulsesink randomly erroring with ↵Jan Schmidt2008-09-271-2/+10
| | | | | | | | | code 'OK' after a format change on the stre... Original commit message from CVS: * ext/pulse/pulsesink.c: Fix problems with pulsesink randomly erroring with code 'OK' after a format change on the stream by waiting when disconnecting the stream.
* ext/pulse/: Use GST_BOILERPLATE everywhere and fix coding style at some places.Sebastian Dröge2008-08-207-111/+36
| | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * ext/pulse/pulsemixer.c: (gst_pulsemixer_class_init), (gst_pulsemixer_set_property), (gst_pulsemixer_get_property): * ext/pulse/pulsemixerctrl.c: (gst_pulsemixer_ctrl_subscribe_cb), (gst_pulsemixer_ctrl_open), (gst_pulsemixer_ctrl_timeout_event), (gst_pulsemixer_ctrl_set_volume): * ext/pulse/pulsemixertrack.c: (gst_pulsemixer_track_new): * ext/pulse/pulseprobe.c: (gst_pulseprobe_open): * ext/pulse/pulsesink.c: (gst_pulsesink_class_init), (gst_pulsesink_init), (gst_pulsesink_open), (gst_pulsesink_prepare), (gst_pulsesink_write), (gst_pulsesink_delay), (gst_pulsesink_reset): * ext/pulse/pulsesrc.c: (gst_pulsesrc_class_init), (gst_pulsesrc_init): Use GST_BOILERPLATE everywhere and fix coding style at some places. Fix a locking issue in pulsesink's prepare function. * ext/pulse/pulseutil.c: (gst_pulse_channel_map_to_gst): Check if the created channel layout is valid for GStreamer.
* ext/pulse/: If downstream provides no channel layout and >2 channels should ↵Sebastian Dröge2008-08-203-78/+259
| | | | | | | | | | | | | | | be used use the default layout that pulse... Original commit message from CVS: * ext/pulse/pulsesrc.c: (gst_pulsesrc_class_init), (gst_pulsesrc_create_stream), (gst_pulsesrc_negotiate), (gst_pulsesrc_prepare): * ext/pulse/pulseutil.c: (gst_pulse_gst_to_channel_map), (gst_pulse_channel_map_to_gst): * ext/pulse/pulseutil.h: If downstream provides no channel layout and >2 channels should be used use the default layout that pulseaudio chooses and also add this layout to the caps. Fixes bug #547258.
* ext/pulse/: The bytes_per_sample and silence_sample fields of the ↵Sebastian Dröge2008-08-182-14/+7
| | | | | | | | | | | | GstRingBufferSpec are already filled with the corre... Original commit message from CVS: * ext/pulse/pulsesink.c: (gst_pulsesink_prepare): * ext/pulse/pulsesrc.c: (gst_pulsesrc_prepare): The bytes_per_sample and silence_sample fields of the GstRingBufferSpec are already filled with the correct values by gst_ring_buffer_parse_caps() so there's no need to set them again with wrong values.
* ext/pulse/pulsesink.*: Add "device-name" property to pulsesink too and ↵Sebastian Dröge2008-08-132-2/+144
| | | | | | | | | | | | | | currently commented out and not working suppor... Original commit message from CVS: * ext/pulse/pulsesink.c: (gst_pulsesink_class_init), (gst_pulsesink_init), (gst_pulsesink_finalize), (gst_pulsesink_set_volume), (gst_pulsesink_get_volume), (gst_pulsesink_set_property), (gst_pulsesink_get_property), (gst_pulsesink_prepare), (gst_pulsesink_change_state): * ext/pulse/pulsesink.h: Add "device-name" property to pulsesink too and currently commented out and not working support for a "volume" property.