Commit graph

1799 commits

Author SHA1 Message Date
Sebastian Dröge
337bc06de1 androidmedia: Clear exceptions also when we did not provide a GError 2014-06-20 14:59:12 +02:00
Sebastian Dröge
aee9d12b86 androidmedia: Also don't report warnings for queue/dequeue errors during flushing in error cases
... and fix a case where we released an invalid buffer index.
2014-06-19 18:34:05 +02:00
Sebastian Dröge
880f3d8a18 androidmedia: Don't consider input buffer queueing failures as an error during flushing 2014-06-19 18:34:05 +02:00
Sebastian Dröge
71c0e0e19f androidmedia: Clean up flushing code and don't consider output buffer releasing failures during flushing as an error 2014-06-19 18:34:05 +02:00
Vincent Penquerc'h
402086a82d dvbsrc: do not try to close negative file descriptors
Interestingly, Coverity implies that close takes an unsigned
argument, while my close(2) man page shows it taking a signed
argument. I guess it may be platforms specific.

Coverity 1214602
2014-06-12 10:18:16 +01:00
Reynaldo H. Verdejo Pinochet
7c1f7fd787 dvbsrc: drop redundant assignment 2014-06-05 12:56:46 -04:00
Reynaldo H. Verdejo Pinochet
56933d97ec dvbsrc: improve timeout handing at locking loop
New approach attempts to be more accurate by measuring
the elapsed time by iteration. Also:

* Use a 10 seconds default timeout and a half a second
  polling step. New values should better match the tuning
  process on real-life scenarios.
* Correct elapsed_time computation.
* Add _retry_ioctl() to avoid bailing out on temporary
  ioctl EINTR failures (no need to check for EAGAIN cause
  we are opening the frontend on blocking mode)
* Small corrections to fail condition handling
2014-06-05 12:56:46 -04:00
Olivier Crête
db09922842 shmsink: Allocate enough memory to do alignment
https://bugzilla.gnome.org/show_bug.cgi?id=731093
2014-06-02 21:43:34 -04:00
Sebastian Dröge
b44724f662 androidmedia: Actually print the stacktrace into the error string 2014-06-02 12:39:49 +02:00
Sebastian Dröge
40fb09544f androidmedia: Clear the exception before trying to call Java methods to convert it to a string 2014-06-02 11:28:43 +02:00
Sebastian Dröge
0c93a82861 androidmedia: Fix crashes when loading the plugin in a standalone application on Android >= 4.4
Check if libnativehelper is loaded in the process and if
it has these awful wrappers for JNI_CreateJavaVM and
JNI_GetCreatedJavaVMs that crash the app if you don't
create a JniInvocation instance first. If it isn't we
just fail here and don't initialize anything.

See this code for reference:
https://android.googlesource.com/platform/libnativehelper/+/master/JniInvocation.cpp
2014-06-02 11:18:38 +02:00
Tim-Philipp Müller
ef143252d0 dvbbasebin: better error handling in case tsparse is missing
https://bugzilla.gnome.org/show_bug.cgi?id=730641
2014-06-01 10:47:12 +01:00
Reynaldo H. Verdejo Pinochet
d564b62ee8 dvbbasebin: add prop setup code for guint64
Needed since we are now proxying tuning-timeout
from dvbsrc.
2014-05-30 17:58:50 -04:00
Reynaldo H. Verdejo Pinochet
81d01f5db0 dvb/cam*: use g_strerror and other few nits 2014-05-30 13:12:32 -04:00
Reynaldo H. Verdejo Pinochet
e4dac3dbb2 dvbbasebin: fix dvbsrc signal proxying
https://bugzilla.gnome.org/show_bug.cgi?id=641204
2014-05-30 13:09:01 -04:00
Reynaldo H. Verdejo Pinochet
4880a8ad14 dvbbasebin: proxy new props/signals from dvbsrc
Proxy tuning start/done/fail signals and tuning-timeout
property.

https://bugzilla.gnome.org/show_bug.cgi?id=641204
2014-05-30 16:41:27 +02:00
Reynaldo H. Verdejo Pinochet
e68a6d48cb dvbsrc: smarten up tuning logic
* Drop remaining sleep() logic in favor of polling
* Use best guess delivery system if none is set
* Make tuning/locking timeout configurable
* Add signals for tuning start, done and fail
* Drop gst_dvbsrc_frontend_status(). It was used only
  for signal LOCK checking. This is now part of the
  tuning/locking loop
* Break up frontend configuration and tuning
  on separate functions

Plus:

* Add some more useful DEBUG/TRACE messages
* Move over misplaced DVB API message
* Fix wrong comment for default DVB buffer size (http://linuxtv.org/downloads/v4l-dvb-apis/dmx_fcalls.html#DMX_SET_BUFFER_SIZE)

This patch builds up on previous work done by
Fabrizio (Misto) Milo <mistobaan@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=641204
2014-05-30 16:41:27 +02:00
Sebastian Dröge
f844af2320 androidmedia: Add exceptions from the Java API to error messages, and post more error/warning messages overall 2014-05-30 16:36:11 +02:00
Sebastian Dröge
440574d963 androidmedia: Add a GError argument to all amc methods and catch exceptions there 2014-05-30 15:25:25 +02:00
Sebastian Dröge
22b5abf86c androidmedia: Describe exceptions happening when scanning all codecs 2014-05-30 15:25:21 +02:00
Sebastian Dröge
3cf4c8cad1 androidmedia: Add API to convert an exception into a string 2014-05-30 15:25:21 +02:00
Jorge Zapata
ad82575693 Release the codec before freeing it
On Samsung Galaxy S4 it is impossible to have more than one
hardware decoder at the same time. If we do not release it
explicitly the GC only releases it whenever the whole application
is finished not whenever the activity is finished and thus a player
will not be able to work correctly
2014-05-30 12:40:59 +02:00
Sebastian Dröge
81716909fe Revert "androidmedia: Place some const keywords in a few places"
This reverts commit 3078b3a34c.

gst_video_frame_map() doesn't take a const GstVideoInfo*, so
all this is rather useless.
2014-05-27 08:51:39 +02:00
Sebastian Dröge
3078b3a34c androidmedia: Place some const keywords in a few places 2014-05-26 16:31:11 +02:00
Chen Jie
8e0bbc9e32 androidmedia: add gst_amc_color_format_copy
gst_amc_color_format_copy will copy in/out a frame resides at a
GstAmcBuffer. Lots of codes in gst_amc_video_*_fill_buffer are moved to
this new function.
2014-05-26 16:29:01 +02:00
Chen Jie
557d6b974f androidmedia: move create_src|sink_caps to gstamc.c
Some hack logic needs also to be present in create_src|sink_caps, for
working around some broken codecs. These hacks are hidden
in color_format/video_format conversion -- the prototypes of these
functions are also changed to include more args for hack judgement.

Also in case of multi-color_formats mapped to one video_format, then
map that video_format back will not give the original color_format, which
causes gst_amc_codec_configure failed with something like
'does not support color format N'.

The new prototype involves with GstAmcCodecInfo and mime, which
ensures the converted color_format is supported by the codec.

A COLOR_FormatYCbYCr to GST_VIDEO_FORMAT_YUY2 mapping is also added, in
order to work around bugs in OMX.k3.video.decoder.avc(which incorrectly
reports supporting COLOR_FormatYCbYCr, which is actually
COLOR_FormatYUV420SemiPlanar). There are already hacks for this in
gst_amc_video_format_to_color_format, gst_amc_color_format_to_video_format
and gst_amc_color_format_info_set, but the codec will still not work(be
ignored because of "has unknown color formats") without adding this mapping.
2014-05-26 16:29:01 +02:00
Stefan Ringel
f348944246 dvb: parsechannels: add delsys property
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>

https://bugzilla.gnome.org/show_bug.cgi?id=709414
2014-05-26 13:32:21 +02:00
Vincent Penquerc'h
b67f64cf5d dvbsrc: map SYS_DVBC_ANNEX_A SYS_DVBC_ANNEX_AC for DVB API < 5.6
https://bugzilla.gnome.org/show_bug.cgi?id=721869
2014-05-26 13:28:24 +02:00
Vincent Penquerc'h
038d9794a1 dvbsrc: fix typo in testing flag
% instead of &

https://bugzilla.gnome.org/show_bug.cgi?id=721869
2014-05-26 13:28:24 +02:00
Chen Jie
27f4d8237f amcvideoenc: Unit of bitrate property is now bit/sec
https://bugzilla.gnome.org/show_bug.cgi?id=705129
2014-05-26 12:10:44 +02:00
Stefan Ringel
ab7f9654f4 dvbsrc: Add missing tone ioctl
https://bugzilla.gnome.org/show_bug.cgi?id=730692
2014-05-26 09:19:03 +02:00
Jorge Zapata
738da7835f androidmedia: Add a new QCOM color format
It is a NV12 based, aligned to 32 bytes

https://bugzilla.gnome.org/show_bug.cgi?id=730635
2014-05-23 15:19:36 +02:00
Sebastian Dröge
158caf952d androidmedia: First try to get symbols from the current program, then load libdvm
If the application is using the new ART runtime it will otherwise
load dalvik and start a dalvik VM next to the ART VM.
Does not work very well obviously.
2014-05-23 15:13:28 +02:00
Chen Jie
22c0464aa6 androidmedia: add support for video encoding
https://bugzilla.gnome.org/show_bug.cgi?id=705129
2014-05-23 09:37:54 +02:00
Michael Olbrich
c1db46ffc6 dvbsrc: fix building with newer kernel headers
c400eef377 introduced some defines to handle
older kernel headers. However, the check is done before the corresponding
kernel header (dvb/frontend.h) is included. As a result the macros are
always defined with results in 'redefined' errors with newer kernel
headers.
Move the check after the include to fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=730570
2014-05-22 13:02:13 +02:00
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