Commit graph

356 commits

Author SHA1 Message Date
Sebastian Dröge
69246dfef7 pulsesink: Flush the ringbuffer on GAP events without duration
This is required to properly start the ringbuffer and clock.
2012-10-24 11:19:52 +02:00
Tim-Philipp Müller
5ab46eff83 pulsesink: fix caps leak in acceptcaps function 2012-10-20 11:32:27 +01:00
Tim-Philipp Müller
d2fdc26c38 pulsesink: in accept_caps() check if ring buffer is NULL before de-referencing
And sprinkle some thread-safety (take object lock for
accessing ring buffer, and pa main loop lock for the
context).

https://bugzilla.gnome.org/show_bug.cgi?id=683782
2012-10-19 15:11:07 +01:00
Arun Raghavan
027cc0e463 pulsesrc: Mute stream post-connection if required
A bug in PulseAudio causes PA_STREAM_START_MUTED to be rejected on
record streams. Until this is fixed upstream, we mute the stream
manually at startup. Based on a patch by Alban Browaeys
<prahal@yahoo.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=684469
2012-09-21 16:58:43 +08:00
Arun Raghavan
f46475ee37 pulsesink: Specify endianness in IEC 61937 payloading
Corresponds to an API change in gst-plugins-base.

https://bugzilla.gnome.org/show_bug.cgi?id=678021
2012-09-19 09:18:19 +05:30
Wim Taymans
e59498c33d pulsesrc: disable reconfigure
See https://bugzilla.gnome.org/show_bug.cgi?id=683902
2012-09-13 10:25:48 +02:00
Wim Taymans
c47c410e7b pulsesrc: consider stream alive when not connected yet
When we start and renegotiate, there is a moment where the stream is created but
not yet connected. Make sure all functions deal with this situation correctly
instead of erroring out.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681247
2012-09-10 13:35:15 +02:00
Wim Taymans
619b2bd1a9 pulsesrc: don't fail when not negotiated yet
When get_time is called but we are not yet negotiated, return 0 instead of
posting an error. It's possible that the base class is still negotiating when
our get_time is called.
2012-09-10 12:15:25 +02:00
Wim Taymans
497ff16355 update for audio base src api change 2012-09-10 11:32:25 +02:00
Wim Taymans
148ab7539b pulse: improve debug 2012-09-06 10:43:52 +02:00
Tim-Philipp Müller
4bb52bbadf docs: gst-launch -> gst-launch-1.0 and ffmpegcolorspace -> videoconvert 2012-08-27 21:20:30 +01:00
Sjoerd Simons
01665d9da3 pulsesrc: Only print caps if they're provided 2012-08-27 09:00:45 +02:00
Arun Raghavan
ef9c81d495 pulsesrc: Handle negotiation events
This makes sure that we:

a) Destroy an existing stream if a negotiate() request comes in: this is
required when receiving a downstream renegotiation request after a
stream has been created.

b) Create a new stream on prepare(): this is required since we do a
setcaps() in negotiate(), which causes the stream to be dropped by a
ringbuffer release() call (this does not happen during first negotiation
since the release is only done on a running ringbuffer). The subsequent
call to ringbuffer acquire() fails because the stream was lost on
release().

https://bugzilla.gnome.org/show_bug.cgi?id=681247
2012-08-22 11:38:42 +02:00
Arun Raghavan
1a8512986a pulse: Clear unpositioned flag when setting positions
If converting a PA channel map to gst channel positions results in a
valid set of channel positions, we clear the unpositioned flag from the
ringbuffer spec.
2012-08-22 11:38:42 +02:00
Arun Raghavan
e317d88eaa pulsesrc: Remove redundant channel-mask setting for stereo case
The gstaudio helper libraries already take care of this case for us.
2012-08-22 11:38:41 +02:00
Arun Raghavan
fe83843abe pulsesrc: Don't use memset to set invalid channel positions
This itereates over the GstAudioInfo to set invalid channel positions
rather than use memset() which works right now because it assumes that
GST_AUDIO_CHANNEL_POSITION_INVALID is -1.
2012-08-22 11:38:41 +02:00
Wim Taymans
456c8e8205 pulsesrc: improve clock handling
Post the notify outside of the pa_lock to avoid a deadlock caused by basesrc
calling get_time with the object lock.
Reset the clock on connect.
Post clock-lost and clock-provide messages.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=673977

Conflicts:

	ext/pulse/pulsesrc.c
2012-06-07 15:15:03 +02:00
Mohammed Sameer
3bcae19398 Better GstClock for pulsesrc
This clock uses the actual stream time (pa_stream_get_time) to get a more accurate timestamp.

Conflicts:

	ext/pulse/pulsesrc.c
2012-06-07 15:11:09 +02:00
Sjoerd Simons
c5196f6b1b pulsesrc: Listen to source output events, not sink input 2012-05-21 11:57:17 +02:00
Wim Taymans
373333c2b3 pulsesink: improve debug 2012-04-25 10:29:45 +02:00
Wim Taymans
c0140982ee pulsesink: start unmuted when requested
When we explicitely set the mute property to FALSE, connect to pulseaudio with
the PA_STREAM_START_UNMUTED flag set, otherwise pulseaudio will use its
previously used value (which might start the stream muted).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=672401
2012-04-25 10:29:45 +02:00
Sebastian Dröge
d99eb6d2cb Update everything for the removal of the interface library and mixer/tuner interfaces 2012-04-13 13:15:11 +02:00
Tim-Philipp Müller
e09ae5736d Use new gst_element_class_set_static_metadata() 2012-04-10 00:51:41 +01:00
Sebastian Dröge
aa2cd462da gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 17:36:38 +02:00
Sebastian Dröge
5cdd49bf25 gst: Update versioning 2012-04-04 14:37:47 +02:00
Wim Taymans
ed59c841a4 pulse: fix formats, we can not handle S8 but only U8 2012-03-13 13:25:09 +01:00
Wim Taymans
a32d944a38 fix for caps api changes 2012-03-11 19:06:37 +01:00
Sebastian Dröge
3299f39179 mixer/colorbalance: Update for API changes 2012-03-02 10:13:08 +01:00
Mark Nauwelaerts
f189f62b13 Merge branch 'master' into 0.11
Conflicts:
	ext/wavpack/gstwavpackenc.c
	tests/check/elements/audioiirfilter.c
	tests/examples/v4l2/probe.c
2012-03-01 11:29:50 +01:00
Edward Hervey
9beda57c3a Suppress deprecation warnings in selected files, for g_value_array_* mostly 2012-02-27 14:47:25 +01:00
Vincent Untz
a32e030faa pulse: Fix a build warning when compiling with asserts disabled
Return a value even if the code will never be reached, to make compilers
happy.

https://bugzilla.gnome.org/show_bug.cgi?id=670561
2012-02-21 20:12:06 +00:00
Arun Raghavan
4e2cf393c0 pulseaudiosink: Lower rank to prevent autoplugging
pulseaudiosink breaks visualisations in its current form, so let's
prevent it from being autoplugged for the time being.

The best we can hope to do in the 0.10 series is query the list of
available sinks and their formats, and expose these as the bin's sinkpad
caps. While this is not a comprehensive solution, it will make sure that
we're only trying to support compressed formats if we're certain that
one exists.

The long-term fix for this will be in the form of proper upstream
renegotiation support in the 0.11/1.0 series.

https://bugzilla.gnome.org/show_bug.cgi?id=666361
2012-02-03 22:12:06 +05:30
Tim-Philipp Müller
284ee0b84a pulse: disable some unused property probe code
which was using GValueArray
2012-02-01 16:36:53 +00:00
Sebastian Dröge
0b517ce9fb Merge branch '0.11' of ssh://git.freedesktop.org/git/gstreamer/gst-plugins-good into 0.11 2012-01-25 12:49:34 +01:00
Sebastian Dröge
10554b271f Merge branch 'master' into 0.11
Conflicts:
	ext/flac/gstflacdec.c
	ext/jpeg/gstjpegenc.c
	ext/pulse/pulsesink.c
	sys/v4l2/gstv4l2src.c
2012-01-25 12:49:11 +01:00
Wim Taymans
b4630dd3e0 more memory API porting 2012-01-25 12:30:29 +01:00
Mark Nauwelaerts
e44d930289 pulsesrc: additional error condition checking 2012-01-20 17:10:17 +01:00
Mark Nauwelaerts
3168b77e04 pulsesink: additional error condition checking 2012-01-20 17:10:14 +01:00
Wim Taymans
1584806634 port to new gthread API 2012-01-19 11:33:53 +01:00
Vincent Penquerc'h
f0ac29113c pulsesrc: fix wrong error check
pa_stream_* functions return negative on error, despite the defines
for error codes being positive.

I only got to repro the error twice, so I'm not sure 100% sure this
fixes the issue (the negative var being uninitialized after returning
from pa_stream_get_latency).
2012-01-13 18:11:36 +00:00
Sebastian Dröge
93e3ed5a86 Merge branch 'master' into 0.11
Conflicts:
	ext/cairo/gsttextoverlay.c
	ext/pulse/pulseaudiosink.c
	gst/audioparsers/gstaacparse.c
	gst/avi/gstavimux.c
	gst/flv/gstflvmux.c
	gst/interleave/interleave.c
	gst/isomp4/gstqtmux.c
	gst/matroska/matroska-demux.c
	gst/matroska/matroska-mux.c
	gst/matroska/matroska-mux.h
	gst/matroska/matroska-read-common.c
	gst/multifile/gstmultifilesink.c
	gst/multipart/multipartmux.c
	gst/shapewipe/gstshapewipe.c
	gst/smpte/gstsmpte.c
	gst/udp/gstmultiudpsink.c
	gst/videobox/gstvideobox.c
	gst/videocrop/gstaspectratiocrop.c
	gst/videomixer/videomixer.c
	gst/videomixer/videomixer2.c
	gst/wavparse/gstwavparse.c
	po/ja.po
	po/lv.po
	po/sr.po
	tests/check/Makefile.am
	tests/check/elements/qtmux.c
	tests/check/elements/rgvolume.c
2012-01-10 14:32:32 +01:00
Sebastian Dröge
dc049d1f1f pulse: Port to the new multichannel caps 2012-01-05 10:30:30 +01:00
Tim-Philipp Müller
ff74718616 pulse: remove pulseaudiosink helper bin
This is causing us lots of headaches in 0.10 and needs to be done
differently and properly in 0.11. playbin or decodebin should
reconfigure themselves based on reconfigure events, for example.
2011-12-25 22:21:36 +00:00
Tim-Philipp Müller
2799bcd32e pulse: update for ring buffer audio format type enum rename 2011-12-25 21:45:45 +00:00
Wim Taymans
4b8975f867 update for removed property probe 2011-12-21 11:59:46 +01:00
Tim-Philipp Müller
66f6e12888 Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We'll change these
over to the new API once we depend on glib >= 2.32.
2011-12-12 09:46:27 +00:00
Tim-Philipp Müller
9c1095f474 pulseaudiosink: don't leak pad template 2011-12-11 17:55:14 +00:00
Tim-Philipp Müller
adb15bf34a pulse: rename "client" properties to "client-name"
Better name, but also matches the property on the jack
elements (where "client" is used for something else).
2011-12-09 16:04:56 +00:00
Wim Taymans
5bfc7b4bfe update for moved audio interfaces 2011-11-30 07:57:40 +01:00
Thiago Santos
1e6bd5ad57 Revert "pulseaudiosink: fix caps leak"
This reverts commit d6a9de9e2a.

setcaps functions aren't supposed to take ownership of the caps passed
2011-11-29 17:34:49 -03:00
Vincent Penquerc'h
c0e101e93f various: fix pad template leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:30:27 +00:00
Tim-Philipp Müller
eeaa9e0bbc pulseaudio: require pulseaudio >= 1.0 2011-11-26 13:54:22 +00:00
Tim-Philipp Müller
be0d6baac5 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	ext/pulse/pulseaudiosink.c
	ext/pulse/pulsesrc.c
	gst/audioparsers/gstaacparse.c
	gst/audioparsers/gstamrparse.c
	gst/audioparsers/gstdcaparse.c
	gst/audioparsers/gstflacparse.c
	gst/effectv/gstradioac.c
	gst/effectv/gstradioac.h
	gst/effectv/gstripple.c

Some possible FIXMEs remaining in the audio parser getcaps functions.
2011-11-26 13:34:10 +00:00
Arun Raghavan
1f4bb68794 pulsesrc: Implement GstStreamVolume interface
PulseAudio 1.0 supports per-source-output volumes, and this exposes the
functionality via the GstStreamVolume interface.

When compiled against pre-1.0 PulseAudio, the interface is not
implemented, and the "volume" or "mute" properties are not available.
This bit of ugliness will go away when we can depend on PulseAudio 1.0
or greater.

https://bugzilla.gnome.org/show_bug.cgi?id=595055
2011-11-25 22:30:41 +05:30
Arun Raghavan
8c6a548698 pulsesrc: Trivial comment copy-paste-o fix 2011-11-25 22:30:41 +05:30
Arun Raghavan
bdf95eb39b pulseaudiosink: Remove redundant code 2011-11-25 22:30:41 +05:30
Arun Raghavan
f6f1605468 pulseaudiosink: Clean up refcounting in event probe
Makes sure we don't leak a refcount if the object is disposed before a
NEWSEGMENT turns up.
2011-11-25 22:30:41 +05:30
Wim Taymans
bb3fbfc18e pulseaudiosink: avoid endless caps loop
Check if the caps are the same before adding a new probe. Because of reconfigure
events, upstreams sends multiple caps events.
2011-11-23 09:26:17 +01:00
Wim Taymans
b7aa7bca52 add parent to activate functions 2011-11-18 13:57:20 +01:00
Wim Taymans
105650127e add parent to pad functions 2011-11-17 15:02:55 +01:00
Wim Taymans
6190312214 add parent to query function 2011-11-16 17:27:13 +01:00
Wim Taymans
04579335c4 _accept_caps() -> _query_accept_caps() 2011-11-15 18:04:44 +01:00
Wim Taymans
797523efbd _peer_get_caps() -> _peer_query_caps() 2011-11-15 18:04:44 +01:00
Wim Taymans
b2d508ac40 update for _get_caps() -> _query_caps() 2011-11-15 18:04:44 +01:00
Wim Taymans
b0ccc61ed3 Merge branch 'master' into 0.11
Conflicts:
	ext/pulse/pulseaudiosink.c
2011-11-11 19:24:27 +01:00
Thiago Santos
d6a9de9e2a pulseaudiosink: fix caps leak 2011-11-11 11:02:22 -03:00
Mark Nauwelaerts
37c8abcdbd pulsesink: do not leak clientname when setting up property 2011-11-11 14:59:04 +01:00
Arun Raghavan
6a8af50111 pulse: Chain up dispose() in pulseaudiosink 2011-11-11 18:05:35 +05:30
Wim Taymans
3d9d2c6c05 update for audiobase* rename 2011-11-11 12:01:17 +01:00
Wim Taymans
86e33bc46b audio: update for base class rename 2011-11-11 11:53:45 +01:00
Wim Taymans
9daea802fa fix for ringbuffer rename 2011-11-11 11:33:44 +01:00
Wim Taymans
1ad11e307a update for ringbuffer change 2011-11-11 11:24:00 +01:00
René Stadler
3293b88ea1 pulsesink: fix compilation with pulseaudio 0.9 2011-11-10 21:37:38 +01:00
Wim Taymans
00d3f3a454 fix for audio clock change 2011-11-10 13:50:34 +01:00
Wim Taymans
88e398b0ea update for removed fixate function 2011-11-10 11:03:18 +01:00
Wim Taymans
aa0b2b7ea7 updates for new acceptcaps query 2011-11-09 17:38:03 +01:00
Wim Taymans
c48df77320 update for probe api changes 2011-11-08 11:18:06 +01:00
Wim Taymans
de020130e6 fix for probe updates 2011-11-07 17:14:17 +01:00
Wim Taymans
7753feb4fd pulseaudiosink: more 0.11 fixing
Make sure the caps event gets to the sink.
2011-11-04 16:21:13 +01:00
Wim Taymans
f6f8d9bb17 pulseaudiosink: port some more
Rename decodebin2 -> decodebin some more
Cleanup up sinkpad event handling
2011-11-04 15:35:42 +01:00
Wim Taymans
1352a08a71 pulseaudiosink: port some more to 0.11
We must not forward the caps event. instead we will decide what to do when the
pad block is taken.
Use decodebin instead of decodebin2
2011-11-04 13:56:06 +01:00
Wim Taymans
9a8a8e72c8 structure: fix for api update 2011-11-02 09:06:37 +01:00
Tim-Philipp Müller
9f77b02b15 Update for pad API changes
GstProbeType, GstProbeReturn and GstActivateMode -> GstPad*
2011-11-01 00:52:28 +00:00
Wim Taymans
3389e79f38 pulseaudiosink: fix porting errors
The probes were ported wrongly and caused deadlocks.
2011-10-28 15:11:10 +02:00
Wim Taymans
65c71b0717 pulse: fix check for empty caps 2011-10-28 12:51:31 +02:00
Wim Taymans
4b6a226263 Merge branch 'master' into 0.11
Conflicts:
	ext/pulse/pulseaudiosink.c
	ext/pulse/pulsesink.c
2011-10-27 16:08:22 +02:00
Wim Taymans
fc4684f4c6 fix compilation 2011-10-27 16:03:17 +02:00
Stefan Sauer
2468492f02 interfaces: clean up the use of iface and class/klass 2011-10-21 14:58:41 +02:00
Arun Raghavan
a7790efd04 pulse: Get caps correctly on pad block
Instead of always going upstream, we should first see if already got
caps from a setcaps() call.

https://bugzilla.gnome.org/show_bug.cgi?id=661262
2011-10-18 20:02:55 +05:30
Wim Taymans
6de67bb014 pulsesink: only use is_pcm for 1.0 of pulseaudio 2011-10-18 12:05:01 +02:00
Wim Taymans
0ade1a5822 pulsesink: only disable trickmodes for !pcm
Only disable trickmodes when we are not dealing with raw PCM samples.
2011-10-18 11:58:57 +02:00
Thiago Santos
0e167e59d4 pulseaudiosink: Use new GstIterator API correctly
GstIterator now uses GValue, use it correctly.
2011-10-12 07:36:09 -03:00
Thiago Santos
b09704020c pulse: port pulseutil to 0.11 2011-10-10 00:18:56 -03:00
Thiago Santos
4517eb28c0 pulseaudiosink: port to 0.11 2011-10-09 21:19:30 -03:00
Thiago Santos
358767e217 pulsesink: Fixing getcaps function
Update getcaps function to 0.11 API
2011-10-09 21:19:27 -03:00
Wim Taymans
87fbd1e784 Merge branch 'master' into 0.11
Conflicts:
	common
	ext/pulse/pulsesink.c
	ext/soup/gstsouphttpclientsink.c
	gst/audioparsers/gstaacparse.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtpmanager/gstrtpjitterbuffer.c
	gst/rtpmanager/rtpjitterbuffer.c
	gst/rtsp/gstrtspsrc.c
	sys/ximage/gstximagesrc.c
2011-09-28 12:44:59 +02:00
Arun Raghavan
8ca420f547 pulse: New pulseaudiosink element to handle format changes
This introduces a new bin which wraps around pulsesink and depending on
the formats supported by the sink, plugs in/out a decodebin2 as
required. This allows users to switch sinks on the stream and adapts
accordingly (for example, you could watch a movie in passthrough mode on
your receiver which supports AC3 decode, then plug out and switch to a
non-digital profile to continue uninterrupted on analog output).

The bin is required because doing the same with playbin2/playsink will
require API changes that cannot be made in 0.10. With 0.11/1.0, we
should be able to ask for upstream caps renegotiation to deal with all
this.

https://bugzilla.gnome.org/show_bug.cgi?id=657179
2011-09-19 07:43:04 +05:30
Wim Taymans
e204c5934c -good: port to new audio caps 2011-09-06 13:16:27 +02:00
Wim Taymans
34ea60526d pulse: add some more channels 2011-08-24 18:44:01 +02:00
Arun Raghavan
bd604175c5 pulsesink: Trivial indentation fix 2011-08-23 22:48:34 +05:30