Commit graph

1809 commits

Author SHA1 Message Date
Matthieu Bouron
e1601406a5 vtenc: fix memory leak
The pixel buffer release callback is called if the void *
dataPtr given to the CVPixelBufferCreateWithPlanarBytes
is not NULL.

According to the documentation dataPtr is supposed to be a
"plane description block" but no specific type is given.

https://bugzilla.gnome.org/show_bug.cgi?id=711847
2014-06-30 13:09:28 +02:00
Sebastian Dröge
01fd3a1396 uvch264src: Free property strings when disposing the instance 2014-06-29 21:01:39 +02:00
Sebastian Dröge
b02cbcfa42 uvch264src: Fix compiler warning when compiling with G_DISABLE_ASSERT 2014-06-29 20:13:10 +02:00
Edward Hervey
22dfd9aef3 mpegts: Unify API : GstMpegts / gst_mpegts_ / GST_*_MPEGTS_
It was previously a mix and match of both variants, introducing just too much
confusion.

The prefix are from now on:
* GstMpegts for structures and type names (and not GstMpegTs)
* gst_mpegts_ for functions (and not gst_mpeg_ts_)
* GST_MPEGTS_ for enums/flags (and not GST_MPEG_TS_)
* GST_TYPE_MPEGTS_ for types (and not GST_TYPE_MPEG_TS_)

The rationale for chosing that is:
* the namespace is shorter/direct (it's mpegts, not mpeg_ts nor mpeg-ts)
* the namespace is one word under Gst
* it's shorter (yah)
2014-06-25 14:50:05 +02:00
Reynaldo H. Verdejo Pinochet
3d22f686b6 dvbsrc: add copyright/license stub to header 2014-06-25 01:05:45 -04:00
Reynaldo H. Verdejo Pinochet
643a19b0dc dvbsrc: documentation fixes 2014-06-25 01:05:40 -04:00
Eric Trousset
f54efc206f d3dvideosink: Release D3D surfaces when shutting down the sink
https://bugzilla.gnome.org/show_bug.cgi?id=726026
2014-06-23 20:44:23 +02:00
Sebastian Dröge
aa5f55cebe openslessrc: Classification of the element factory should be Source/ not Src/
https://bugzilla.gnome.org/show_bug.cgi?id=727811
2014-06-23 20:34:24 +02:00
Reynaldo H. Verdejo Pinochet
622953cb9b dvbsrc: fix diseqc-source prop name in example 2014-06-22 23:42:36 -04:00
Reynaldo H. Verdejo Pinochet
9fd3014a40 dvbsrc: fix nit on warning message 2014-06-22 23:42:36 -04:00
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