Commit graph

323 commits

Author SHA1 Message Date
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
Wim Taymans
0eeffef222 pulsesink: port after merge 2011-08-19 16:13:23 +02:00
Wim Taymans
e1b795ac13 Merge branch 'master' into 0.11 2011-08-19 16:12:01 +02:00
David Henningsson
e70020b456 pulsesink: Allow writes in bigger chunks
There's no use in splitting the incoming data down to the segsize
limit - by writing as much as possible in one chunk, we increase
performance and avoid PulseAudio unnecessary rewinds.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-08-19 09:48: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
ee2aa25e04 port to new API 2011-08-03 18:37:27 +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
Tim-Philipp Müller
25ace0e524 pulsesink: fix variable-set-but-not-used compiler warning with older pulse versions 2011-07-29 13:05:42 +01:00
Arun Raghavan
ac7cad431c pulsesink: Add support for compressed formats
This adds support for various compressed formats (AC3, E-AC3, DTS and
MP3) payloaded in IEC 61937 format (used for transmission over S/PDIF,
HDMI and Bluetooth).

The acceptcaps() function allows bins to probe for what formats the sink
being connected to support. This only works after the element is set to
at least READY.

If the underlying sink changes and the format we are streaming is not
available, we emit a message that will allow upstream elements/bins to
block and renegotiate a new format.
2011-07-29 01:25:15 +05:30
Arun Raghavan
a67b536741 pulsesink: Use the extended stream API if available
This uses the new extended API for creating streams. This will allow us
to support compressed formats natively in pulsesink as well.
2011-07-29 01:25:15 +05:30
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
3fd1106b7e Merge branch 'master' into 0.11 2011-07-06 12:05:12 +02:00
René Stadler
ae87731de5 pulsesink: prevent race condition causing ref leak
Since commit 8bfd80, gst_pulseringbuffer_stop doesn't wait for the
deferred call to be run before returning. This causes a race when
READY->NULL is executed shortly after, which stops the mainloop. This
leaks the element reference which is passed as userdata for the callback
(introduced in commit 7cf996, bug #614765).

The correct fix is to wait in READY->NULL for all outstanding calls to
be fired (since libpulse doesn't provide a DestroyNotify for the
userdata). We get rid of the reference passing from 7cf996 altogether,
since finalization from the callback would anyways lead to a deadlock.

Re-fixes bug #614765.
2011-07-05 16:36:17 +02:00
René Stadler
f8456e2a1a pulsesink: small cleanup of copy-paste code 2011-07-05 16:36:17 +02:00
René Stadler
3589cee762 pulsesink: remove unused member variable and misleading log message
Wim changed it in commit 8bfd80 so that pa_defer_ran is not read
anywhere.

The log message used to annotate a mainloop_wait call which is gone.
2011-07-05 16:36:17 +02: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
David Schleef
f69dcaab58 pulse: Increase ranks to PRIMARY + 10
So that pulsesrc/pulsesink get chosen over other possible PRIMARY
src/sinks by autoaudiosink.  Presumably, if pulse is available, it
is always preferred over another src/sink.

Fixes: #647540.
2011-07-03 19:53:42 -07: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
adee56222b pulsesink: fix for header cleanups 2011-06-21 18:19:02 +02:00
Wim Taymans
cf1248e566 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
2011-05-16 17:52:11 +02:00
Wim Taymans
a0e301ab1a -good: fix for new API 2011-05-16 17:50:15 +02:00
Pino Toscano
b52c7ebd19 pulse: Define PATH_MAX if it isn't defined
GNU Hurd for example doesn't define it.
2011-05-16 09:04:31 +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
Robert Swain
098cf89e34 jpegenc: pulsesink: raw1394: Address unused but set variables
GCC 4.6.x spits warnings about such usage of variables. The variables in
raw1394 were marked with G_GNUC_UNUSED as this seemed omre appropriate.
The others were removed.
2011-04-16 13:13:04 +01:00
Sebastian Dröge
11bcac7c90 Revert "Pulsesink: Allow chunks up to bufsize instead of segsize"
This reverts commit 1e2c1467ae.

The commit causes pulsesink to ignore the latency-time baseaudiosink property.
2011-04-08 14:35:04 +02:00
Arun Raghavan
dc48eaac13 pulsesink: Always call pa_stream_new_with_proplist()
pa_stream_new_with_proplist() can take a NULL proplist, so we don't need
to concern ourselves with whether it's NULL or not.
2011-04-04 17:23:21 +05:30