Commit graph

81 commits

Author SHA1 Message Date
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
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
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
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
Wim Taymans
a32d944a38 fix for caps api changes 2012-03-11 19:06:37 +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
Mark Nauwelaerts
e44d930289 pulsesrc: additional error condition checking 2012-01-20 17:10:17 +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
dc049d1f1f pulse: Port to the new multichannel caps 2012-01-05 10:30:30 +01:00
Wim Taymans
4b8975f867 update for removed property probe 2011-12-21 11:59:46 +01: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
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
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
86e33bc46b audio: update for base class rename 2011-11-11 11:53:45 +01:00
Wim Taymans
1ad11e307a update for ringbuffer change 2011-11-11 11:24:00 +01:00
Wim Taymans
88e398b0ea update for removed fixate function 2011-11-10 11:03:18 +01:00
Wim Taymans
e204c5934c -good: port to new audio caps 2011-09-06 13:16:27 +02:00
Wim Taymans
09b15d7dfe port to new audio caps. 2011-08-18 19:21:07 +02:00
Wim Taymans
71346020d5 pulsesrc: avoid race in starting
Sine the base class now does the negotiation from the streaming thread we have
to be careful and check if the stream is ready before changing its corked state.
2011-08-07 11:17:41 +02:00
Wim Taymans
d9750387c1 pulse: more cleanups 2011-08-04 18:41:29 +02:00
Wim Taymans
9ae85cb662 pulsesrc: small cleanups 2011-08-04 18:15:55 +02:00
Wim Taymans
fcbe26cd6f pulsesrc: small cleanups 2011-08-04 16:32:39 +02:00
Wim Taymans
4121021bb2 Merge branch 'master' into 0.11
Conflicts:
	ext/pulse/pulsesink.c
	ext/pulse/pulsesrc.c
	gst/audioparsers/gstac3parse.c
	gst/rtp/gstrtph264depay.c
	gst/rtp/gstrtph264pay.c
	gst/rtpmanager/gstrtpssrcdemux.c
2011-08-03 18:25:30 +02:00
Arun Raghavan
379049809c pulsesrc: Add a source-output-index property
This exposes the source output index of the record stream that we open
so that clients can use this with the introspection if they want (to
move the stream, for example).
2011-07-29 00:07:52 +05:30
Thiago Santos
14b9fb7be6 pulsesrc: Fix default value leaking
Remember to free the default value of client name, avoiding a
leak
2011-07-18 15:16:01 -03:00
Wim Taymans
8b040cfae2 pulse: remove implementsinterface 2011-07-04 18:12:56 +02:00
Mark Nauwelaerts
d59a00aa1c Merge branch 'master' into 0.11
Conflicts:
	ext/pulse/pulsesink.c
2011-07-04 11:48:13 +02:00
Arun Raghavan
04786a6d31 pulse: Drop support for PA versions before 0.9.16
This drops support fof PulseAudio versions prior to 0.9.16, which was
released about 1.5 years ago. Testing with very old versions is not
feasible and we don't want to maintain 2 independent code-paths.
2011-06-21 16:47:11 -07:00
Wim Taymans
a0e301ab1a -good: fix for new API 2011-05-16 17:50:15 +02:00
Wim Taymans
dea50d0b98 use G_DEFINE_TYPE 2011-04-19 17:07:18 +02:00
Wim Taymans
7555d0949f Merge branch 'master' into 0.11
Conflicts:
	android/apetag.mk
	android/avi.mk
	android/flv.mk
	android/icydemux.mk
	android/id3demux.mk
	android/qtdemux.mk
	android/rtp.mk
	android/rtpmanager.mk
	android/rtsp.mk
	android/soup.mk
	android/udp.mk
	android/wavenc.mk
	android/wavparse.mk
	configure.ac
2011-04-18 10:23:45 +02:00
Tim-Philipp Müller
f325935314 pulse, speexenc, rtpgsmpay: don't use g_assert() for error handling
Don't use g_assert() for error handling, even if they're highly unlikely.
Either we *know* that something can't happen, in which case we
should just not handle it, or we think something can happen, but it is
very very unlikely that it will ever happen, in which case we should
handle it like any other error instead of asserting.

g_assert() is best left for conditions we have control of, like checking
internal consistency of our code, not checking return values of external
code.

Fixes a bunch of warnings when compiling with -DG_DISABLE_ASSERT:
gstrtpgsmpay.c: In function 'gst_rtp_gsm_pay_handle_buffer':
gstrtpgsmpay.c:130:17: warning: variable 'rtpgsmpay' set but not used
gstspeexenc.c: In function 'gst_speex_enc_encode':
gstspeexenc.c:904:19: warning: variable 'written' set but not used
pulsesink.c: In function 'gst_pulsesink_change_state':
pulsesink.c:2725:9: warning: variable 'res' set but not used
pulsesrc.c: In function 'gst_pulsesrc_change_state':
pulsesrc.c:1253:7: warning: variable 'e' set but not used
2011-04-16 18:15:43 +01:00
Andy Wingo
82ee35372b add "client" property
* ext/pulse/pulsesrc.c (gst_pulsesrc_class_init, gst_pulsesrc_init)
  (gst_pulsesrc_set_property, gst_pulsesrc_get_property)
  (gst_pulsesrc_open): Add a "client" property, as in pulsesink.

Fixes #634914
2010-12-29 17:02:40 +01:00
Wim Taymans
7f48fb37e9 pulse: fix device_description in READY
Make the is_dead check more clear and add an option to check for the status of
the stream in addition to the context.
We don't need a stream to get the device_description string.

Fixes #630317
2010-09-22 19:02:35 +02:00
Stefan Kost
f604e20499 pulse: allow setting stream properties
Add a "properties" property to the elements to allow setting extra stream
properties.

Fixes #537544
2010-09-07 14:20:21 +03:00
Wim Taymans
95270dc2fb pulsesrc: use _get_caps_reffed() when we can
Use _get_caps_reffed()
Add some more debug when opening the server connection.
2010-09-06 10:23:07 +02:00