Commit graph

1705 commits

Author SHA1 Message Date
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
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
Mark Nauwelaerts
0c25863253 jpegdec: avoid crashing on invalid input without components 2011-07-04 14:32:27 +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
David Schleef
2f94df8032 jpegenc: Don't round up size of encoded buffers
For some reason, in code dating to 2001, encoded jpeg buffers were
rounded up to multiples of 4 bytes.  With the added bonus that the
extra bytes are unwritten, causing valgrind issues.  Oops.  I can't
think of any reason why JPEG buffers need to be multiples of 4 bytes,
so I removed the padding.  There might be some code somewhere that
depends on this behavior, so if this needs to be reverted, please fix
the valgrind issues.
2011-06-29 23:55:33 -07:00
Andoni Morales Alastruey
d9f4c59c49 dv1394src: make the internal clock thread safe
Fixes: #653091.
2011-06-24 12:01:39 -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
David Schleef
6d8d08eac7 souphttpsink: code cleanup 2011-06-04 13:43:28 -07:00
Sebastian Dröge
252c1afcc2 dvdemux: First query the peer duration in the requested format before converting to BYTES
Fixes usage of dvdemux after another demuxer, e.g. mxfdemux.
Fixes bug #650503.
2011-06-02 13:38:30 +02:00
Sebastian Dröge
e376913fc3 souphttpsink: Fix refcounting of the "session" property
Properties should never take ownership of the values
passed to them.
2011-06-02 10:41:52 +02:00
David Schleef
3937abf999 soup: Add souphttpsink 2011-06-01 17:19:02 -07:00
Vincent Penquerc'h
38b596337f cairotextoverlay: forward new segment events from the sink to the source
Not doing so will cause buffers to be received by downstream without
a time base set.
We use the same method avimux uses to get access to the event when
collectpads got the sink event function.

https://bugzilla.gnome.org/show_bug.cgi?id=640323
2011-05-26 11:35:01 +02:00
Vincent Penquerc'h
b99f4be3db textoverlay: forward source events to sinks
Events are passed to the video sink, and to the text sink if it is
linked.
This will allow seeking, for instance.

https://bugzilla.gnome.org/show_bug.cgi?id=586450
2011-05-26 11:33:10 +02:00
Tim-Philipp Müller
900b2fb63d flacdec: also try upstream first for duration query in DEFAULT format
https://bugzilla.gnome.org/show_bug.cgi?id=650785
2011-05-23 13:25:44 +01: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
Sebastian Dröge
d4b9cbc1ae flacdec: Send EOS when seeking after the end of file instead of failing
Fixes bug #649780.
2011-05-14 11:52:13 +02:00
Philip Jägenstedt
660987c6d7 jpegdec: documentation typo "jpegddec"
https://bugzilla.gnome.org/show_bug.cgi?id=648589
2011-04-25 21:36:28 +01:00
David Schleef
24d57ac961 pngdec: Remove temporary code
Now that we depend on (what will be) -base-0.10.33.
2011-04-24 18:53:50 -07: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
Tim-Philipp Müller
a068133ee7 jack: fix unused-but-set-variable warnings with gcc-4.6 2011-04-16 13:33:45 +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
18eee7719d flacenc: Properly interprete the result of strcmp() 2011-04-13 16:17:41 +02:00
Sebastian Dröge
16f82e46f5 flacenc: Don't store image tags inside the vorbiscomments and the flac metadata
Instead only store them inside the flac metadata. There's
no point in storing them twice and the flac metadata is
still the official way to store image tags inside flac.
2011-04-13 16:11:44 +02:00
Stefan Kost
21a688ce25 jack: also handle deprecations for jack 1.9.7
Jack 1.9.7 was released 20.Mar.2011, need to handle the deprecated api for this
version too.
2011-04-11 12:44:19 +03:00
Sebastian Dröge
b784173e4a jpegdec: Unref event if the parent element disappeared 2011-04-08 15:22:47 +02:00
Havard Graff
9386448649 jpegdec: Make upstream events MT-safe 2011-04-08 15:21:52 +02: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
Alexey Fisher
0016ceaa2b speexenc: Use speex intern silence detection
Speex has build in silence detection. If speex_encode_int returns 0,
than there is silence and sample do not need to be transmitted.
This work only if vbr=1 and dtx=1 optionas are enabled.
So if we get 0, we add GAP flag to the sample.
2011-04-08 13:54:49 +02:00
Jon Nordby
d68dd46084 jack: Fix build with jack 0.120.1
9544622674 checked
for 0.120.2 and later, but the deprecation was introduced in
0.120.1
2011-04-05 13:12:28 +03: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
Sebastian Dröge
6fd1546bce flacenc: Add support for writing METADATA_BLOCK_PICTURE blocks for GST_TAG_IMAGE and GST_TAG_PREVIEW_IMAGE 2011-04-01 13:18:55 +02:00
Mark Nauwelaerts
176b8ffbff pulsesink: also uncork during EOS waiting (and after EOS is rendered)
Pulsesink was recently changed to defer uncorking until there is data
to write. This condition will however never occur when EOS in being
rendered (since that marks the end of data). Changing to PAUSED state
while EOS is being waited on results in a hang: pausing corks the
stream, which will never be undone since there is no more data when
going back to PLAYING. If pulsesink is the clock provider, deadlock
ensues since time doesn't continue in corked state and the clock id
for EOS wait never fires.

Fixes #645961.
2011-03-31 13:25:19 +02:00
Tim-Philipp Müller
c365fbddba flacdec: fix issues with large metadata blocks when streaming unframed flac
Parse metadata blocks when handling unparsed flac in push mode. This
works around a bunch of issues with the flac decoder when handling
metadata blocks that are larger than the max. flac framesize, which
coverart blocks often are. We need to have all the data for these
blocks available when we pass data to libflac.

http://gstreamer-devel.966125.n4.nabble.com/Flac-files-that-will-playback-but-not-stream-td3338198.html#a3395276

https://bugzilla.gnome.org/show_bug.cgi?id=566769
2011-03-28 23:46:47 +01:00
Stefan Kost
ed77b14aa0 cairo: fix the name of the *-marshall.list file to unbreak make distcheck 2011-03-25 12:53:43 +02:00
Sebastian Dröge
85ace6d413 speexdec: Get and use streamheader from the caps if possible
This allows playback of streams where the streamheader buffers
were dropped from the stream for some reason.
2011-03-24 09:00:32 +01:00
Robert Swain
a430042f41 jackaudiosink: Fix typo from 9544622674 2011-03-16 10:43:47 +01:00
Vincent Penquerc'h
56edbd0fa3 speexdec: silence warning message when appropriate
If we did not know how many frames to expect, then we get an unexpected
end of stream when trying to decode more frames that are there, if there
are leftover bits to pad to the next byte
2011-03-15 19:44:03 +01:00
Sebastian Dröge
4d7b4ca2ae speexdec: Always process the number of frames per packet as specified in the header
Looking at the remaining bits in the bitstream after decoding a
single frame can't be used as loop condition. The remaining
bits might not give a complete frame and the speex decoder will
then output nothing but access uninitialized memory, which leads
to valgrind warnings.

Fixes bug #644669.
2011-03-14 19:31:33 +01:00
Philip Jägenstedt
84decd731f pulsesink: Better fix for deadlock on failed connect
This reverts the previous fix that would cause a double-unlock when the
stream connect failed.

https://bugzilla.gnome.org/show_bug.cgi?id=644510
2011-03-12 00:48:03 +05:30
Arun Raghavan
387f533a07 pulsesink: Fix deadlock if connecting to PA fails
Commit dd4ec22e introduced a deadlock in the failure path while trying
to connect to PulseAudio. This makes sure we drop the lock on the
resource mutex to avoid this.

https://bugzilla.gnome.org/show_bug.cgi?id=644510
2011-03-11 23:19:34 +05:30
Sebastian Dröge
9e44fff3db dvdemux: Chain up to the parent class' ::send_event for non-seek events 2011-03-11 13:48:33 +01:00
Sebastian Dröge
bc6c1bbbab dvdemux: Fix refcount issues with the seek event
Fixes bug #642963.
2011-03-11 13:48:32 +01:00
Tim-Philipp Müller
14e1d9de3d docs: fix pulsesink gtk-doc markup 2011-03-11 09:54:36 +00:00
Philippe Normand
9544622674 jack: fix build against jack 0.120.2
jack_port_get_total_latency() has been deprecated in favor of
jack_port_get_latency_range().

https://bugzilla.gnome.org/show_bug.cgi?id=644477
2011-03-11 09:48:36 +00:00