summaryrefslogtreecommitdiffstats
path: root/ext/pulse/pulsesrc.c
Commit message (Collapse)AuthorAgeFilesLines
* pulsesrc: guard fragment size with a lower limit based on latency-timeRené Stadler2009-10-061-2/+5
| | | | | | | | | In case that the pulse daemon runs the source device at a relatively low fixed fragment size compared to the requested latency-time, configure the ring buffer segsize to the largest integer multiple of the fragment size that is still smaller than or equal to the requested latency-time. Fixes bug #597463.
* pulse: rename pa_buffer_attr variablesRené Stadler2009-10-021-22/+22
| | | | Makes it much easier to see what is going on and is a lot less error prone.
* pulsesrc: Don't dereference NULL pointersSebastian Dröge2009-09-151-0/+5
| | | | | | pa_stream_get_timing_info() can return NULL. Fixes bug #595220.
* pulsesrc: don't discard the result of _set_caps()Wim Taymans2009-08-241-2/+1
| | | | | | Use the result of gst_pad_set_caps() instead of assuming success. See #590678
* pulsesrc: set the default slave method to skewWim Taymans2009-08-061-0/+4
| | | | | | Set the default slave method to the much better skew algorithm. This is the default in the new base class but we override this here as well for the upcomming release.
* pulsesrc: fix compilation with --disable-gst-debugTim-Philipp Müller2009-08-061-8/+3
|
* pulsesrc: initialize the probe with the serverJonathan Tellier2009-08-031-1/+1
| | | | | | When creating a new probe, pass the server instead of the device string. fixes #590401
* 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
* pulsesrc: cleanupsWim Taymans2009-07-281-102/+172
| | | | | | | | | Keep track of the paused state of the source and leave the read function when paused. don't wait for a latency update when the delay is not yet known but simply return 0 instead of blocking. Keep track of the corked state of the stream. Fix the state changes.
* pulsesrc: set maxlength always to -1Wim Taymans2009-07-281-1/+1
|
* pulsesrc; cleanups, report real latencyWim Taymans2009-07-281-27/+90
| | | | | | Add some more debug info Avoid some type casts Report the real latency to the application.
* pulse: some more trivial cleanupsWim Taymans2009-06-291-20/+19
|
* Rewrite the pulse plugin, conditionally enabling new behaviour withJan Schmidt2009-01-281-72/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-281-9/+5
| | | | 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/: Return -1 instead of 0 in error cases. Fixes #554771.Wim Taymans2008-10-031-2/+5
| | | | | | | 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/: Use GST_BOILERPLATE everywhere and fix coding style at some places.Sebastian Dröge2008-08-201-45/+14
| | | | | | | | | | | | | | | | | | | | | 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-201-77/+194
| | | | | | | | | | | | | | | 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-181-5/+3
| | | | | | | | | | | | 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/pulsesrc.c: Add "device-name" property, which provides a human ↵Laszlo Pandy2008-08-131-4/+19
| | | | | | | | | | | | readable string for the audio device, to mak... Original commit message from CVS: Patch by: Laszlo Pandy <laszlok2 at gmail dot com> * ext/pulse/pulsesrc.c: (gst_pulsesrc_class_init), (gst_pulsesrc_get_property): Add "device-name" property, which provides a human readable string for the audio device, to make it more consisten with other audio sources. Fixes bug #547519.
* ext/pulse/: Improve debugging a bit by including the parent object in ↵Sebastian Dröge2008-08-131-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | pulsemixerctrl and pulseprobe objects and using... Original commit message from CVS: * ext/pulse/pulsemixer.c: (gst_pulsemixer_change_state): * ext/pulse/pulsemixerctrl.c: (gst_pulsemixer_ctrl_subscribe_cb), (gst_pulsemixer_ctrl_open), (gst_pulsemixer_ctrl_new), (gst_pulsemixer_ctrl_free), (gst_pulsemixer_ctrl_timeout_event): * ext/pulse/pulsemixerctrl.h: * ext/pulse/pulseprobe.c: (gst_pulseprobe_open), (gst_pulseprobe_enumerate), (gst_pulseprobe_new), (gst_pulseprobe_free), (gst_pulseprobe_needs_probe), (gst_pulseprobe_probe_property), (gst_pulseprobe_get_values): * ext/pulse/pulseprobe.h: * ext/pulse/pulsesink.c: (gst_pulsesink_init): * ext/pulse/pulsesrc.c: (gst_pulsesrc_init), (gst_pulsesrc_delay), (gst_pulsesrc_change_state): Improve debugging a bit by including the parent object in pulsemixerctrl and pulseprobe objects and using GST_WARNING_OBJECT instead of GST_WARNING. Use the parent GObject subclass instead of a random struct as GObject parameter for G_OBJECT_WARN_INVALID_PROPERTY_ID. This fixes a crash when probing for another property than "device".
* ext/pulse/: Implement GstPropertyProbe interface on pulsesink for detecting ↵Laszlo Pandy2008-08-131-3/+25
| | | | | | | | | | | | | | | | | | | | sink devices and on pulsesrc for detectin... Original commit message from CVS: Patch by: Laszlo Pandy <laszlok2 at gmail dot com> * ext/pulse/pulsesink.c: (gst_pulsesink_interface_supported), (gst_pulsesink_implements_interface_init), (gst_pulsesink_init_interfaces), (gst_pulsesink_init), (gst_pulsesink_finalize), (gst_pulsesink_set_property), (gst_pulsesink_get_type): * ext/pulse/pulsesink.h: * ext/pulse/pulsesrc.c: (gst_pulsesrc_interface_supported), (gst_pulsesrc_init_interfaces), (gst_pulsesrc_init), (gst_pulsesrc_finalize), (gst_pulsesrc_set_property): * ext/pulse/pulsesrc.h: Implement GstPropertyProbe interface on pulsesink for detecting sink devices and on pulsesrc for detecting source devices. Fixes bugs #547227 and #547217.
* ext/pulse/: Some smaller cleanup. Use G_PARAM_STATIC_STRINGS, ↵Sebastian Dröge2008-06-101-24/+23
| | | | | | | | | | | | | | | | gst_element_class_set_details_simple() and fix coding s... Original commit message from CVS: * ext/pulse/pulsemixer.c: (gst_pulsemixer_base_init), (gst_pulsemixer_class_init): * ext/pulse/pulsesink.c: (gst_pulsesink_base_init), (gst_pulsesink_class_init), (gst_pulsesink_prepare): * ext/pulse/pulsesrc.c: (gst_pulsesrc_interface_supported), (gst_pulsesrc_base_init), (gst_pulsesrc_class_init), (gst_pulsesrc_prepare): Some smaller cleanup. Use G_PARAM_STATIC_STRINGS, gst_element_class_set_details_simple() and fix coding style a bit more.
* Add documentation to the pulseaudio plugin and run make update in docs/plugins.Sebastian Dröge2008-06-101-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original commit message from CVS: * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-good-plugins-docs.sgml: * docs/plugins/gst-plugins-good-plugins-sections.txt: * docs/plugins/gst-plugins-good-plugins.args: * docs/plugins/gst-plugins-good-plugins.hierarchy: * docs/plugins/gst-plugins-good-plugins.interfaces: * docs/plugins/gst-plugins-good-plugins.prerequisites: * docs/plugins/inspect/plugin-aasink.xml: * docs/plugins/inspect/plugin-alaw.xml: * docs/plugins/inspect/plugin-alpha.xml: * docs/plugins/inspect/plugin-alphacolor.xml: * docs/plugins/inspect/plugin-annodex.xml: * docs/plugins/inspect/plugin-apetag.xml: * docs/plugins/inspect/plugin-audiofx.xml: * docs/plugins/inspect/plugin-auparse.xml: * docs/plugins/inspect/plugin-autodetect.xml: * docs/plugins/inspect/plugin-avi.xml: * docs/plugins/inspect/plugin-cacasink.xml: * docs/plugins/inspect/plugin-cairo.xml: * docs/plugins/inspect/plugin-cdio.xml: * docs/plugins/inspect/plugin-cutter.xml: * docs/plugins/inspect/plugin-debug.xml: * docs/plugins/inspect/plugin-dv.xml: * docs/plugins/inspect/plugin-efence.xml: * docs/plugins/inspect/plugin-effectv.xml: * docs/plugins/inspect/plugin-equalizer.xml: * docs/plugins/inspect/plugin-esdsink.xml: * docs/plugins/inspect/plugin-flac.xml: * docs/plugins/inspect/plugin-flxdec.xml: * docs/plugins/inspect/plugin-gamma.xml: * docs/plugins/inspect/plugin-gconfelements.xml: * docs/plugins/inspect/plugin-gdkpixbuf.xml: * docs/plugins/inspect/plugin-goom.xml: * docs/plugins/inspect/plugin-goom2k1.xml: * docs/plugins/inspect/plugin-halelements.xml: * docs/plugins/inspect/plugin-icydemux.xml: * docs/plugins/inspect/plugin-id3demux.xml: * docs/plugins/inspect/plugin-jpeg.xml: * docs/plugins/inspect/plugin-level.xml: * docs/plugins/inspect/plugin-matroska.xml: * docs/plugins/inspect/plugin-monoscope.xml: * docs/plugins/inspect/plugin-mulaw.xml: * docs/plugins/inspect/plugin-multifile.xml: * docs/plugins/inspect/plugin-multipart.xml: * docs/plugins/inspect/plugin-navigationtest.xml: * docs/plugins/inspect/plugin-ossaudio.xml: * docs/plugins/inspect/plugin-png.xml: * docs/plugins/inspect/plugin-pulseaudio.xml: * docs/plugins/inspect/plugin-quicktime.xml: * docs/plugins/inspect/plugin-rtp.xml: * docs/plugins/inspect/plugin-rtsp.xml: * docs/plugins/inspect/plugin-smpte.xml: * docs/plugins/inspect/plugin-soup.xml: * docs/plugins/inspect/plugin-spectrum.xml: * docs/plugins/inspect/plugin-speex.xml: * docs/plugins/inspect/plugin-taglib.xml: * docs/plugins/inspect/plugin-udp.xml: * docs/plugins/inspect/plugin-video4linux2.xml: * docs/plugins/inspect/plugin-videobalance.xml: * docs/plugins/inspect/plugin-videobox.xml: * docs/plugins/inspect/plugin-videocrop.xml: * docs/plugins/inspect/plugin-videoflip.xml: * docs/plugins/inspect/plugin-videomixer.xml: * docs/plugins/inspect/plugin-wavenc.xml: * docs/plugins/inspect/plugin-wavpack.xml: * docs/plugins/inspect/plugin-wavparse.xml: * docs/plugins/inspect/plugin-ximagesrc.xml: * ext/pulse/plugin.c: * ext/pulse/pulsemixer.c: * ext/pulse/pulsesink.c: * ext/pulse/pulsesrc.c: Add documentation to the pulseaudio plugin and run make update in docs/plugins.
* Add pulseaudio GStreamer element from gst-pulse. Development will continue ↵Sebastian Dröge2008-06-101-0/+703
here instead of pulseaudio SVN. Fixes bug ... Original commit message from CVS: * configure.ac: * ext/pulse/Makefile.am: * ext/pulse/plugin.c: (plugin_init): * ext/pulse/pulsemixer.c: (gst_pulsemixer_interface_supported), (gst_pulsemixer_implements_interface_init), (gst_pulsemixer_init_interfaces), (gst_pulsemixer_base_init), (gst_pulsemixer_class_init), (gst_pulsemixer_init), (gst_pulsemixer_finalize), (gst_pulsemixer_set_property), (gst_pulsemixer_get_property), (gst_pulsemixer_change_state): * ext/pulse/pulsemixer.h: * ext/pulse/pulsemixerctrl.c: (gst_pulsemixer_ctrl_context_state_cb), (gst_pulsemixer_ctrl_sink_info_cb), (gst_pulsemixer_ctrl_source_info_cb), (gst_pulsemixer_ctrl_subscribe_cb), (gst_pulsemixer_ctrl_success_cb), (gst_pulsemixer_ctrl_open), (gst_pulsemixer_ctrl_close), (gst_pulsemixer_ctrl_new), (gst_pulsemixer_ctrl_free), (gst_pulsemixer_ctrl_list_tracks), (gst_pulsemixer_ctrl_timeout_event), (restart_time_event), (gst_pulsemixer_ctrl_set_volume), (gst_pulsemixer_ctrl_get_volume), (gst_pulsemixer_ctrl_set_record), (gst_pulsemixer_ctrl_set_mute): * ext/pulse/pulsemixerctrl.h: * ext/pulse/pulsemixertrack.c: (gst_pulsemixer_track_class_init), (gst_pulsemixer_track_init), (gst_pulsemixer_track_new): * ext/pulse/pulsemixertrack.h: * ext/pulse/pulseprobe.c: (gst_pulseprobe_context_state_cb), (gst_pulseprobe_sink_info_cb), (gst_pulseprobe_source_info_cb), (gst_pulseprobe_invalidate), (gst_pulseprobe_open), (gst_pulseprobe_enumerate), (gst_pulseprobe_close), (gst_pulseprobe_new), (gst_pulseprobe_free), (gst_pulseprobe_get_properties), (gst_pulseprobe_needs_probe), (gst_pulseprobe_probe_property), (gst_pulseprobe_get_values), (gst_pulseprobe_set_server): * ext/pulse/pulseprobe.h: * ext/pulse/pulsesink.c: (gst_pulsesink_base_init), (gst_pulsesink_class_init), (gst_pulsesink_init), (gst_pulsesink_destroy_stream), (gst_pulsesink_destroy_context), (gst_pulsesink_finalize), (gst_pulsesink_dispose), (gst_pulsesink_set_property), (gst_pulsesink_get_property), (gst_pulsesink_context_state_cb), (gst_pulsesink_stream_state_cb), (gst_pulsesink_stream_request_cb), (gst_pulsesink_stream_latency_update_cb), (gst_pulsesink_open), (gst_pulsesink_close), (gst_pulsesink_prepare), (gst_pulsesink_unprepare), (gst_pulsesink_write), (gst_pulsesink_delay), (gst_pulsesink_success_cb), (gst_pulsesink_reset), (gst_pulsesink_change_title), (gst_pulsesink_event), (gst_pulsesink_get_type): * ext/pulse/pulsesink.h: * ext/pulse/pulsesrc.c: (gst_pulsesrc_interface_supported), (gst_pulsesrc_implements_interface_init), (gst_pulsesrc_init_interfaces), (gst_pulsesrc_base_init), (gst_pulsesrc_class_init), (gst_pulsesrc_init), (gst_pulsesrc_destroy_stream), (gst_pulsesrc_destroy_context), (gst_pulsesrc_finalize), (gst_pulsesrc_dispose), (gst_pulsesrc_set_property), (gst_pulsesrc_get_property), (gst_pulsesrc_context_state_cb), (gst_pulsesrc_stream_state_cb), (gst_pulsesrc_stream_request_cb), (gst_pulsesrc_open), (gst_pulsesrc_close), (gst_pulsesrc_prepare), (gst_pulsesrc_unprepare), (gst_pulsesrc_read), (gst_pulsesrc_delay), (gst_pulsesrc_change_state), (gst_pulsesrc_get_type): * ext/pulse/pulsesrc.h: * ext/pulse/pulseutil.c: (gst_pulse_fill_sample_spec), (gst_pulse_client_name), (gst_pulse_gst_to_channel_map): * ext/pulse/pulseutil.h: Add pulseaudio GStreamer element from gst-pulse. Development will continue here instead of pulseaudio SVN. Fixes bug #400679. Only changes over gst-pulse SVN are added copyright to the top of files and coding style changes.