Commit graph

1764 commits

Author SHA1 Message Date
Sebastian Dröge
c842df1c3d opensles: Work around race condition in Android < 4.2 that leads to deadlocks on shutdown
We need to sleep a bit before destroying the player object
because of a bug in Android in versions < 4.2.

OpenSLES is using AudioTrack for rendering the sound. AudioTrack
has a thread that pulls raw audio from the buffer queue and then
passes it forward to AudioFlinger (AudioTrack::processAudioBuffer()).
This thread is calling various callbacks on events, e.g. when
an underrun happens or to request data. OpenSLES sets this callback
on AudioTrack (audioTrack_callBack_pullFromBuffQueue() from
android_AudioPlayer.cpp). Among other things this is taking a lock
on the player interface.

Now if we destroy the player interface object, it will first of all
take the player interface lock (IObject_Destroy()). Then it destroys
the audio player instance (android_audioPlayer_destroy()) which then
calls stop() on the AudioTrack and deletes it. Now the destructor of
AudioTrack will wait until the rendering thread (AudioTrack::processAudioBuffer())
has finished.

If all this happens with bad timing it can happen that the rendering
thread is currently e.g. handling underrun but did not lock the player
interface object yet. Then destroying happens and takes the lock and waits
for the thread to finish. Then the thread tries to take the lock and waits
forever.

We wait a bit before destroying the player object to make sure that
the rendering thread finished whatever it was doing, and then stops
(note: we called gst_opensles_ringbuffer_stop() before this already).
2014-05-16 09:10:48 +02:00
Wim Taymans
ccccad4d8d bluez: fix property names
These were forgotten when they got renamed.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=729731
2014-05-14 11:48:47 +02:00
Edward Hervey
b2e037b7de shm: Don't leak GstShmPipe
By reordering the leaking code path to before the allocation

CID #1212153
2014-05-13 11:41:42 +02:00
Sebastian Dröge
a76832451d dvbsrc: Don't free string we're still using
CID 1213780
2014-05-12 10:04:16 +02:00
Reynaldo H. Verdejo Pinochet
a39c3bd01b dvbsrc: drop C++ style comments
This patch builds on previous work done by
Fabrizio (Misto) Milo <mistobaan@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=641204
2014-05-10 18:30:30 -04:00
Reynaldo H. Verdejo Pinochet
d2138beb18 dvbsrc: fix up error reporting
This patch builds on previous work done by
Fabrizio (Misto) Milo <mistobaan@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=641204
2014-05-10 18:30:24 -04:00
Sebastian Dröge
90643c696f mfc: Remove mfc plugin, it is obsoleted by the v4l2videodec element from gst-plugins-good 2014-05-03 13:12:40 +02:00
Nicolas Dufresne
4e9036690c decklink: Don't fail if HW does not have all interfaces
This patch completes 1c1cc73a3b. These
changes where accidentally pushed as a separate patch with wrong commit
message.

https://bugzilla.gnome.org/show_bug.cgi?id=7273
2014-04-27 09:34:39 -04:00
Tim-Philipp Müller
d5a0ace347 Revert "y4mdec: check for VIDEO meta instead of CROP meta"
This reverts commit 68309bd215.

Commit message and files changed do not match.
2014-04-27 13:11:03 +01:00
Andoni Morales Alastruey
fc02ec2087 avfassetsrc: downgrade rank to SECONDARY in OS X 2014-04-24 12:28:17 +02:00
Andoni Morales Alastruey
d234bee52f avfassetsrc: rename references to iOS 2014-04-24 12:28:17 +02:00
Matthieu Bouron
2f0aad7158 iosavassetsrc: rename element to avfassetsrc
https://bugzilla.gnome.org/show_bug.cgi?id=728249
2014-04-24 12:28:17 +02:00
Matthieu Bouron
ecf765635b iosavassetsrc: Port to 1.0
Also enables this element on OSX >= 10.7.

https://bugzilla.gnome.org/show_bug.cgi?id=728249
2014-04-24 12:28:17 +02:00
Andoni Morales Alastruey
9fec222b5a applemedia: add new source/decoder element for iOS assets
https://bugzilla.gnome.org/show_bug.cgi?id=728249
2014-04-24 12:28:16 +02:00
Matthieu Bouron
e728ee8208 coremediabuffer: handle stride alignment
Handle stride alignment through the use of the video meta API. The
code is based on the corevideobuffer implementation.

If the video meta API is not supported and the underlying buffer
contains padding, the core media buffer is copied to a system memory
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=727885
2014-04-24 12:27:59 +02:00
Matthieu Bouron
c6572df9ff avfvideosrc: check if downstream supports the video meta API
Check if downstream supports the video meta API, so we can use it later
with the core media buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=727953
2014-04-24 10:46:51 +01:00
Nicolas Dufresne
1c1cc73a3b decklink: Fix support for HW without output
Devices suitable for decklinksrc may not have any output, hence querying
the input returns NULL. Add support for all cases where
input/output/config may be missing.

https://bugzilla.gnome.org/show_bug.cgi?id=727306
2014-04-23 12:42:44 -04:00
Nicolas Dufresne
68309bd215 y4mdec: check for VIDEO meta instead of CROP meta
This element only need stride support, but checks for CROP_META, which
is a bit too much, even though this works as CROP imply having VIDEO
meta.

https://bugzilla.gnome.org/show_bug.cgi?id=726255
2014-04-23 12:42:44 -04:00
Vincent Penquerc'h
8250a7d531 dvbbasebin: fix test for proper use count balancing
usecount is unsigned, so too many "unuse" will wrap the counter
around and the >= 0 check will always be fine.

It would be much simpler to just make the counter signed, but
moving the checks where the decrements happen allow a mistake
to be detected earlier, and thus easier to debug.

Coverity 1139791
2014-04-21 09:34:46 +01:00
Andoni Morales Alastruey
110c21a136 vtenc: fix complier error using fixed lenght arrays 2014-04-18 20:17:00 +02:00
Edward Hervey
c45b44e309 dvb: Fix if() check
introduced by my previous commit :(
2014-04-16 16:07:17 +02:00
Edward Hervey
d16cc860a3 dvb/camsession: Don't do operations on unexisting sessions
CID #206114
2014-04-16 15:37:57 +02:00
Edward Hervey
1a42aaad47 dvb: Handle socket() failure
CID #206178
2014-04-16 15:32:32 +02:00
Edward Hervey
012b5b8d4a dvbsrc: Handle failure to get statistics from the device
Check the ioctl return value and don't output bogus values.

CID #206016
2014-04-16 15:23:57 +02:00
Edward Hervey
c947e820cf dvbsrc: Don't close a fd that wasn't open
We are handling the failure cases in this block where the open failed

CID #206179
2014-04-16 15:18:44 +02:00
Edward Hervey
bf043208cd dvbsrc: Don't try to access NULL string
And refactor the pid setting code to be in its own function for clarity

CID #206374
2014-04-16 15:17:03 +02:00
Edward Hervey
c400eef377 dvbsrc: Handle symbols added in minor version 7 and 8
Some symbols were re-defined in minor v8 (GO TEAM BACKWARDS COMPATIBLE!)

Some symbols were added in minor v7

https://bugzilla.gnome.org/show_bug.cgi?id=727977
2014-04-11 10:18:32 +02:00
Edward Hervey
0cf6b2be3e dvbsrc: Add comment with all DVB API v5 minor changes
There wasn't a definite list anyway, so I just dove in the kernel
and extract all that information.
2014-04-11 08:18:59 +02:00
Vincent Penquerc'h
c78edf5afc decklink: initialize priv to NULL
While the code that creates the object sets priv to some existing
pointer after new, this ensures any future new not doing this will
hit the various priv!=NULL asserts in the code.

Coverity 1139935
2014-04-09 11:43:23 +01:00
Vincent Penquerc'h
b4d62ce210 mfc: fix left crop change test
It was testing a noop

Coverity 1139643
2014-04-09 11:04:32 +01:00
Vincent Penquerc'h
5feeee62c8 shm: remove dead code
Coverity 1139683
2014-04-09 11:00:22 +01:00
Vincent Penquerc'h
517252e110 mfc: reset "in use" flag on failure to initialize 2014-04-09 10:57:04 +01:00
Vincent Penquerc'h
3aba455c5e mfc: test for allocation failure before dereferencing
Coverity 1139849
2014-04-09 10:56:59 +01:00
Tim-Philipp Müller
3f1eb8ee71 d3dvideosink: post proper error message when window disappears 2014-04-08 17:52:12 +01:00
Tim-Philipp Müller
d576a7b5eb dvb: fix compilation 2014-04-08 16:09:16 +01:00
Vincent Penquerc'h
dd77b7ad79 dvb: reject too long socket paths
Coverity 206004
2014-04-08 15:27:40 +01:00
Xavi Artigas
e12646f30a directsoundsrc: Fix critical due to missing debug category initialization
https://bugzilla.gnome.org/show_bug.cgi?id=727812
2014-04-08 13:39:22 +02:00
Sebastian Dröge
c84278ae04 d3dvideosink: Only pass a dest rectangle if set, otherwise pass NULL
Call with an uninitialized rectangle will cause errors.

https://bugzilla.gnome.org/show_bug.cgi?id=714998
2014-04-02 23:10:01 +02:00
Andoni Morales Alastruey
86e96cfdc6 winks: port to 1.0
https://bugzilla.gnome.org/show_bug.cgi?id=702041
2014-03-15 15:34:29 +01:00
Stefan Ringel
fd8bda1c03 dvbsrc: mpegts: change bandwidth to DVBv5 values
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>

https://bugzilla.gnome.org/show_bug.cgi?id=725463
2014-03-15 18:33:18 +01:00
Sebastian Dröge
cba13ef301 atdec: Add some more debug output 2014-03-11 15:33:26 +01:00
Sebastian Dröge
fa8a7d7659 atdec: Implement draining properly 2014-03-11 15:33:26 +01:00
Sebastian Dröge
53ab9c6613 atdec: First dequeue a buffer before enqueueing anything from the queue
Required for offline rendering according to the docs. wtf.
2014-03-11 15:33:26 +01:00
Sebastian Dröge
f331d3159f atdec: Keep track of the current position
It's required to set a valid sample time for decoding on iOS.
2014-03-11 15:33:26 +01:00
Sebastian Dröge
8d8b3c0401 atdec: Always try to pull one decoded frame out of the queue
... instead of doing magic calculations with the buffer duration.
2014-03-11 15:33:25 +01:00
Sebastian Dröge
41b2cca8fc atdec: Handle errors in handle_frame() properly 2014-03-11 15:33:25 +01:00
Sebastian Dröge
dfe476c444 atdec: Call AudioQueueReset() for flushing
AudioQueueFlush() is for draining all remaining data.
2014-03-11 15:33:25 +01:00
Sebastian Dröge
1c13e513c9 atdec: Set correct number of frames for MP3 2014-03-11 15:33:25 +01:00
Sebastian Dröge
2d8b195911 atdec: Initialize the audio description with zeroes 2014-03-11 15:33:25 +01:00
Sebastian Dröge
a43db678c1 atdec: Set the correct layer depending on the MP3 caps 2014-03-11 15:33:25 +01:00