platform/upstream/gstreamer.git
12 years agoUse gst_element_class_set_static_metadata()
Tim-Philipp Müller [Wed, 17 Oct 2012 16:34:26 +0000 (17:34 +0100)]
Use gst_element_class_set_static_metadata()

where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.

12 years agodirectsoundsrc: port to 1.0
Raimo Järvi [Tue, 3 Apr 2012 09:09:19 +0000 (12:09 +0300)]
directsoundsrc: port to 1.0

https://bugzilla.gnome.org/show_bug.cgi?id=673414

12 years agompegdemux: Fix unitialized variable compiler warning
Sebastian Dröge [Tue, 16 Oct 2012 09:38:08 +0000 (11:38 +0200)]
mpegdemux: Fix unitialized variable compiler warning

12 years agoRevert "configure: fix build"
Sebastian Dröge [Tue, 16 Oct 2012 09:34:04 +0000 (11:34 +0200)]
Revert "configure: fix build"

This reverts commit 5c1c35290d7f72a4bc016e8aef276d8c1bdcf37b.

12 years agoandroidmedia: Add missing file
Sebastian Dröge [Tue, 16 Oct 2012 09:31:41 +0000 (11:31 +0200)]
androidmedia: Add missing file

12 years agoconfigure: fix build
Wim Taymans [Tue, 16 Oct 2012 09:32:00 +0000 (11:32 +0200)]
configure: fix build

12 years agoandroidmedia: Rename plugin
Sebastian Dröge [Mon, 15 Oct 2012 14:35:57 +0000 (16:35 +0200)]
androidmedia: Rename plugin

12 years agoandroidmedia: Add to the not yet ported plugins
Sebastian Dröge [Mon, 15 Oct 2012 14:29:00 +0000 (16:29 +0200)]
androidmedia: Add to the not yet ported plugins

12 years agoandroidmedia: Make everything buildable
Sebastian Dröge [Mon, 15 Oct 2012 14:05:39 +0000 (16:05 +0200)]
androidmedia: Make everything buildable

12 years agoDon't try to use the NVidia DRM codecs
Sebastian Dröge [Mon, 15 Oct 2012 12:36:55 +0000 (14:36 +0200)]
Don't try to use the NVidia DRM codecs

12 years agoTry to handle format changes more gracefully
Sebastian Dröge [Tue, 9 Oct 2012 08:56:30 +0000 (10:56 +0200)]
Try to handle format changes more gracefully

And make stop() faster and more robust

12 years agoAdd workaround for Google MP3 decoder outputting garbage in first output buffer
Sebastian Dröge [Tue, 9 Oct 2012 08:27:36 +0000 (10:27 +0200)]
Add workaround for Google MP3 decoder outputting garbage in first output buffer

And assume one decoded input frame per output buffer to fix timestamp
handling by the base class.

12 years agoAlso add some more output format checks to the audio decoder
Sebastian Dröge [Tue, 9 Oct 2012 08:14:50 +0000 (10:14 +0200)]
Also add some more output format checks to the audio decoder

12 years agoCheck output format metadata some more
Sebastian Dröge [Tue, 9 Oct 2012 08:13:32 +0000 (10:13 +0200)]
Check output format metadata some more

And implement workaround for NVidia Tegra 3 not setting the slice_height.
Thanks to Josep Torra for debugging this issue.

12 years agoAdd some more default channel layouts, these should be good for AAC at least
Sebastian Dröge [Fri, 5 Oct 2012 13:09:17 +0000 (15:09 +0200)]
Add some more default channel layouts, these should be good for AAC at least

12 years agoDon't set timestamps, the baseclass handles this for us anyway
Sebastian Dröge [Fri, 5 Oct 2012 12:56:22 +0000 (14:56 +0200)]
Don't set timestamps, the baseclass handles this for us anyway

12 years agoList profiles in reverse to minimize caps
Sebastian Dröge [Wed, 3 Oct 2012 08:06:02 +0000 (10:06 +0200)]
List profiles in reverse to minimize caps

12 years agoIterate levels in reverse order to minimize caps
Sebastian Dröge [Wed, 3 Oct 2012 07:56:50 +0000 (09:56 +0200)]
Iterate levels in reverse order to minimize caps

12 years agoMerge structures into caps instead of appending them
Sebastian Dröge [Wed, 3 Oct 2012 07:51:04 +0000 (09:51 +0200)]
Merge structures into caps instead of appending them

12 years agoUse orc_memcpy() instead of memcpy() as it should be faster for larger memory areas
Sebastian Dröge [Tue, 25 Sep 2012 08:32:26 +0000 (10:32 +0200)]
Use orc_memcpy() instead of memcpy() as it should be faster for larger memory areas

12 years agoAdd support for audio/mpeg-L2 for the Nexus 7
Sebastian Dröge [Mon, 24 Sep 2012 13:32:44 +0000 (15:32 +0200)]
Add support for audio/mpeg-L2 for the Nexus 7

12 years agoAdd support for MPEG1/2 video
Sebastian Dröge [Mon, 24 Sep 2012 13:14:09 +0000 (15:14 +0200)]
Add support for MPEG1/2 video

12 years agoIgnore the *law and Vorbis decoders
Sebastian Dröge [Wed, 19 Sep 2012 12:52:27 +0000 (14:52 +0200)]
Ignore the *law and Vorbis decoders

They are broken unfortunately.

12 years agoAdd FIXME comment for not handling odd widths/height with the TI hardware decoders
Sebastian Dröge [Wed, 19 Sep 2012 09:20:20 +0000 (11:20 +0200)]
Add FIXME comment for not handling odd widths/height with the TI hardware decoders

Must likely an issue with the codec itself though.

12 years agoFix handling of I420 buffers with odd width
Sebastian Dröge [Wed, 19 Sep 2012 07:47:47 +0000 (09:47 +0200)]
Fix handling of I420 buffers with odd width

12 years agoOnly mpegversion=4 is supported for AAC
Sebastian Dröge [Tue, 18 Sep 2012 13:38:25 +0000 (15:38 +0200)]
Only mpegversion=4 is supported for AAC

12 years agoRemove some obsolete FIXMEs
Sebastian Dröge [Tue, 18 Sep 2012 13:28:31 +0000 (15:28 +0200)]
Remove some obsolete FIXMEs

12 years agoFix flushing logic to unbreak handling of flushing seeks
Sebastian Dröge [Mon, 17 Sep 2012 11:46:15 +0000 (13:46 +0200)]
Fix flushing logic to unbreak handling of flushing seeks

12 years agoFix chroma stride for I420 stride/crop conversion
Sebastian Dröge [Mon, 17 Sep 2012 10:24:30 +0000 (12:24 +0200)]
Fix chroma stride for I420 stride/crop conversion

12 years agoFix Vorbis decoding
Sebastian Dröge [Mon, 17 Sep 2012 09:28:58 +0000 (11:28 +0200)]
Fix Vorbis decoding

12 years agoWait at most 100ms for dequeueing a buffer, and retry after that
Sebastian Dröge [Fri, 14 Sep 2012 14:17:51 +0000 (16:17 +0200)]
Wait at most 100ms for dequeueing a buffer, and retry after that

Some codecs don't fail the dequeueing if the codec is flushed,
causing deadlocks when shutting down the element.

12 years agoRelease output buffers a bit earlier
Sebastian Dröge [Fri, 14 Sep 2012 14:11:33 +0000 (16:11 +0200)]
Release output buffers a bit earlier

12 years agoKeep another reference of the input buffer in handle_frame()
Sebastian Dröge [Fri, 14 Sep 2012 14:11:04 +0000 (16:11 +0200)]
Keep another reference of the input buffer in handle_frame()

It might be unreffed in the meantime by the other thread due
to finish_frame().

12 years agoPass -1 as number of frames to the base class
Sebastian Dröge [Fri, 14 Sep 2012 14:10:29 +0000 (16:10 +0200)]
Pass -1 as number of frames to the base class

This will automatically do the right thing if timestamps are good enough

12 years agoUse correct buffer variable
Sebastian Dröge [Fri, 14 Sep 2012 14:09:48 +0000 (16:09 +0200)]
Use correct buffer variable

12 years agoAlways pass 1 as number of frames to finish_frame()
Sebastian Dröge [Fri, 14 Sep 2012 12:43:31 +0000 (14:43 +0200)]
Always pass 1 as number of frames to finish_frame()

12 years agoCorrectly remember number of channels and samplerate
Sebastian Dröge [Fri, 14 Sep 2012 12:42:55 +0000 (14:42 +0200)]
Correctly remember number of channels and samplerate

12 years agoDon't unref input buffer from handle_frame(), it's owned by the baseclass
Sebastian Dröge [Fri, 14 Sep 2012 12:42:36 +0000 (14:42 +0200)]
Don't unref input buffer from handle_frame(), it's owned by the baseclass

12 years agoRemove invalid GST_ERROR() call
Sebastian Dröge [Fri, 14 Sep 2012 11:31:21 +0000 (13:31 +0200)]
Remove invalid GST_ERROR() call

12 years agoOnly try to get the channel-mask if it is set
Sebastian Dröge [Fri, 14 Sep 2012 11:27:33 +0000 (13:27 +0200)]
Only try to get the channel-mask if it is set

12 years agoAdd support for FLAC
Sebastian Dröge [Fri, 14 Sep 2012 11:25:36 +0000 (13:25 +0200)]
Add support for FLAC

12 years agoFix src template caps
Sebastian Dröge [Fri, 14 Sep 2012 11:24:14 +0000 (13:24 +0200)]
Fix src template caps

12 years agoFix plugin initialization
Sebastian Dröge [Fri, 14 Sep 2012 11:16:41 +0000 (13:16 +0200)]
Fix plugin initialization

12 years agoAdd support for audio decoders, completely untested so far
Sebastian Dröge [Fri, 14 Sep 2012 11:05:15 +0000 (13:05 +0200)]
Add support for audio decoders, completely untested so far

12 years agoOnly set the SYNC_FRAME flag on the first buffer if we need to split the input
Sebastian Dröge [Fri, 14 Sep 2012 10:07:18 +0000 (12:07 +0200)]
Only set the SYNC_FRAME flag on the first buffer if we need to split the input

12 years agoIgnore codecs with unknown color formats for stability purposes
Sebastian Dröge [Wed, 12 Sep 2012 12:30:40 +0000 (14:30 +0200)]
Ignore codecs with unknown color formats for stability purposes

They can be registered nonetheless if an environment variable
or compile-time #define is set.

12 years agoImplement cropping and correctly handle the different color formats
Sebastian Dröge [Wed, 12 Sep 2012 11:48:01 +0000 (13:48 +0200)]
Implement cropping and correctly handle the different color formats

12 years agoReally implement stride conversion for NV12 too
Sebastian Dröge [Tue, 11 Sep 2012 14:30:00 +0000 (16:30 +0200)]
Really implement stride conversion for NV12 too

12 years agoImplement stride-conversion for I420 and NV12
Sebastian Dröge [Tue, 11 Sep 2012 14:24:49 +0000 (16:24 +0200)]
Implement stride-conversion for I420 and NV12

12 years agoFix typo in previous commit
Sebastian Dröge [Tue, 11 Sep 2012 13:56:00 +0000 (15:56 +0200)]
Fix typo in previous commit

12 years agoDon't allow using non-Google codecs if we started the Java VM ourselves
Sebastian Dröge [Tue, 11 Sep 2012 13:49:13 +0000 (15:49 +0200)]
Don't allow using non-Google codecs if we started the Java VM ourselves

Hardware codecs, e.g. the TI ones, only work in processes that had their
Java VM started via the non-public AndroidRuntime class.

12 years agoRename to amc from androidmediacodec everywhere
Sebastian Dröge [Tue, 11 Sep 2012 12:30:15 +0000 (14:30 +0200)]
Rename to amc from androidmediacodec everywhere

12 years agoImprove debug output
Sebastian Dröge [Tue, 11 Sep 2012 11:08:48 +0000 (13:08 +0200)]
Improve debug output

12 years agoPrint the MediaFormats we get in the debug logs
Sebastian Dröge [Tue, 11 Sep 2012 10:39:11 +0000 (12:39 +0200)]
Print the MediaFormats we get in the debug logs

12 years agoImprove debug output
Sebastian Dröge [Mon, 10 Sep 2012 13:31:04 +0000 (15:31 +0200)]
Improve debug output

12 years agoImprove level/profile handling
Sebastian Dröge [Mon, 10 Sep 2012 13:30:55 +0000 (15:30 +0200)]
Improve level/profile handling

12 years agoAllow registering as static plugin with the GStreamer SDK API
Sebastian Dröge [Mon, 10 Sep 2012 11:39:17 +0000 (13:39 +0200)]
Allow registering as static plugin with the GStreamer SDK API

12 years agoIf the buffer sizes are the same, just memcpy() to the output buffers
Sebastian Dröge [Mon, 10 Sep 2012 11:30:01 +0000 (13:30 +0200)]
If the buffer sizes are the same, just memcpy() to the output buffers

12 years agoCorrectly convert timestamps between us and ns
Sebastian Dröge [Mon, 10 Sep 2012 10:56:04 +0000 (12:56 +0200)]
Correctly convert timestamps between us and ns

12 years agoSet SYNC_FRAME flag on buffers if required
Sebastian Dröge [Fri, 7 Sep 2012 14:11:26 +0000 (16:11 +0200)]
Set SYNC_FRAME flag on buffers if required

12 years agoImprove flushing
Sebastian Dröge [Fri, 7 Sep 2012 12:22:54 +0000 (14:22 +0200)]
Improve flushing

12 years agoWait at most 0.5 seconds for getting an input buffer for EOS
Sebastian Dröge [Fri, 7 Sep 2012 11:44:19 +0000 (13:44 +0200)]
Wait at most 0.5 seconds for getting an input buffer for EOS

12 years agoCorrectly check for flushing
Sebastian Dröge [Fri, 7 Sep 2012 11:42:45 +0000 (13:42 +0200)]
Correctly check for flushing

12 years agoRetry for negative return values when dequeueing buffers
Sebastian Dröge [Thu, 6 Sep 2012 15:24:04 +0000 (17:24 +0200)]
Retry for negative return values when dequeueing buffers

12 years agoFix refcount bug
Sebastian Dröge [Thu, 6 Sep 2012 15:07:49 +0000 (17:07 +0200)]
Fix refcount bug

12 years agoThe MediaCodec API is apparently not threadsafe between stop() and release()
Sebastian Dröge [Thu, 6 Sep 2012 15:07:12 +0000 (17:07 +0200)]
The MediaCodec API is apparently not threadsafe between stop() and release()

So we don't call release() and just hope for the GC to release the
codec in time.

12 years agoFix plugin cache creation
Sebastian Dröge [Thu, 6 Sep 2012 13:44:06 +0000 (15:44 +0200)]
Fix plugin cache creation

12 years agoCache the codec informations inside the registry
Sebastian Dröge [Fri, 24 Aug 2012 11:35:44 +0000 (04:35 -0700)]
Cache the codec informations inside the registry

Otherwise we would always load all codecs during plugin initialization
which can take quite some time (because of hardware) and also loads
lots of shared libraries (which number is limited by 64 in Android).

12 years agoProperly attach and detach the current threads to the Java VM
Sebastian Dröge [Fri, 24 Aug 2012 07:20:26 +0000 (09:20 +0200)]
Properly attach and detach the current threads to the Java VM

Attaching a thread after it was detached will cause segfaults,
as such we use a pthread_key_t to keep track of the JNIEnv* of
the attached threads and in the destructor (i.e. when the
thread exits) we detach the thread.

12 years agoDon't get the output format from the codec before it is ready
Sebastian Dröge [Thu, 23 Aug 2012 15:31:40 +0000 (17:31 +0200)]
Don't get the output format from the codec before it is ready

Apparently things are crashing otherwise.

12 years agoGet the input buffers from the codec
Sebastian Dröge [Thu, 23 Aug 2012 15:31:14 +0000 (17:31 +0200)]
Get the input buffers from the codec

12 years agoFix JNI method call signatures
Sebastian Dröge [Thu, 23 Aug 2012 15:30:45 +0000 (17:30 +0200)]
Fix JNI method call signatures

12 years agoInitialize the VM will full debugging for now
Sebastian Dröge [Thu, 23 Aug 2012 15:30:12 +0000 (17:30 +0200)]
Initialize the VM will full debugging for now

12 years agoUse NewStringUTF() instead of our own method for that
Sebastian Dröge [Thu, 23 Aug 2012 11:53:37 +0000 (13:53 +0200)]
Use NewStringUTF() instead of our own method for that

12 years agoAdd the TI format to the mapping table too
Sebastian Dröge [Thu, 23 Aug 2012 10:30:23 +0000 (12:30 +0200)]
Add the TI format to the mapping table too

12 years agoAdd another TI specific OpenMAX color format
Sebastian Dröge [Thu, 23 Aug 2012 10:29:40 +0000 (12:29 +0200)]
Add another TI specific OpenMAX color format

12 years agoFixes to element/elementfactory creation
Sebastian Dröge [Wed, 22 Aug 2012 17:30:59 +0000 (19:30 +0200)]
Fixes to element/elementfactory creation

12 years agoSome bugfixes to the codec scanning code
Sebastian Dröge [Wed, 22 Aug 2012 17:12:23 +0000 (19:12 +0200)]
Some bugfixes to the codec scanning code

Also it's not possible to attach a thread after it was
detached once. As such we simply never detach any thread
at all now.

12 years agoFix some compilation errors
Sebastian Dröge [Wed, 22 Aug 2012 16:35:36 +0000 (18:35 +0200)]
Fix some compilation errors

12 years agoAdd important FIXME
Sebastian Dröge [Mon, 20 Aug 2012 12:13:30 +0000 (14:13 +0200)]
Add important FIXME

12 years agoAdd video decoder element
Sebastian Dröge [Mon, 20 Aug 2012 11:45:53 +0000 (13:45 +0200)]
Add video decoder element

12 years agoAdd some more JNI wrapping
Sebastian Dröge [Mon, 20 Aug 2012 11:45:20 +0000 (13:45 +0200)]
Add some more JNI wrapping

12 years agoAdd some missing color format constants
Sebastian Dröge [Mon, 20 Aug 2012 11:42:24 +0000 (13:42 +0200)]
Add some missing color format constants

12 years agoImplement basic wrapper around MediaCodec API
Sebastian Dröge [Thu, 16 Aug 2012 13:18:19 +0000 (15:18 +0200)]
Implement basic wrapper around MediaCodec API

Ideally nothing else will be needed from the elements later.

12 years agoSome more WIP
Sebastian Dröge [Wed, 15 Aug 2012 16:23:34 +0000 (18:23 +0200)]
Some more WIP

Scanning all codecs now and have data structures for holding codec
information and codec contexts. Also function declarations for
working with them.

12 years agoInitial commit
Sebastian Dröge [Tue, 14 Aug 2012 11:20:14 +0000 (13:20 +0200)]
Initial commit

12 years agoandroidmedia: Add androidmedia plugin
Sebastian Dröge [Mon, 15 Oct 2012 13:53:12 +0000 (15:53 +0200)]
androidmedia: Add androidmedia plugin

12 years agohlsdemux: And fix another deadlock caused by the update thread not correctly shutting...
Sebastian Dröge [Mon, 15 Oct 2012 09:45:04 +0000 (11:45 +0200)]
hlsdemux: And fix another deadlock caused by the update thread not correctly shutting down

Conflicts:
gst/hls/gsthlsdemux.c

12 years agohlsdemux: Also hold the mutex before signalling the condition variable
Sebastian Dröge [Mon, 15 Oct 2012 09:02:02 +0000 (11:02 +0200)]
hlsdemux: Also hold the mutex before signalling the condition variable

Conflicts:
gst/hls/gsturidownloader.c

12 years agohlsdemux: Also cancel the downloader before stopping the playlist update task
Sebastian Dröge [Mon, 15 Oct 2012 08:53:58 +0000 (10:53 +0200)]
hlsdemux: Also cancel the downloader before stopping the playlist update task

12 years agohlsdemux: Only lock the mutex when it's not locked already
Sebastian Dröge [Mon, 15 Oct 2012 08:38:16 +0000 (10:38 +0200)]
hlsdemux: Only lock the mutex when it's not locked already

Conflicts:
gst/hls/gsthlsdemux.c

12 years agohlsdemux: Fix another race condition by holding the mutex that the condition variable...
Sebastian Dröge [Mon, 15 Oct 2012 08:32:47 +0000 (10:32 +0200)]
hlsdemux: Fix another race condition by holding the mutex that the condition variable uses

Conflicts:
gst/hls/gsthlsdemux.c

12 years agohlsdemux: Port some things from the last commits
Sebastian Dröge [Mon, 15 Oct 2012 07:47:35 +0000 (09:47 +0200)]
hlsdemux: Port some things from the last commits

12 years agohlsdemux: Never ever stop a task from the task function
Sebastian Dröge [Mon, 15 Oct 2012 07:35:16 +0000 (09:35 +0200)]
hlsdemux: Never ever stop a task from the task function

This will deadlock. Also make sure to always post an error message
if required before pausing tasks from the task function.

Should fix another bunch of deadlocks.

Conflicts:
gst/hls/gsthlsdemux.c

12 years agohlsdemux: Fix lots of deadlocks caused by race conditions in the task state handling
Sebastian Dröge [Mon, 15 Oct 2012 07:24:01 +0000 (09:24 +0200)]
hlsdemux: Fix lots of deadlocks caused by race conditions in the task state handling

12 years agortmpsink: handle RTMP_Write() return value correctly
Sergey N. Gorshkov [Fri, 12 Oct 2012 06:57:44 +0000 (10:57 +0400)]
rtmpsink: handle RTMP_Write() return value correctly

Error might also be negative (-1). Unclear if 0 should
be fatal as well though.

https://bugzilla.gnome.org/show_bug.cgi?id=681111
https://bugzilla.gnome.org/show_bug.cgi?id=686009

12 years agortmpsink: fix memory leak from URI verification via RTMP_ParseURL()
David Régade [Fri, 12 Oct 2012 22:09:06 +0000 (23:09 +0100)]
rtmpsink: fix memory leak from URI verification via RTMP_ParseURL()

In gst_rtmp_sink_uri_set_uri(), a test is performed in order
to be sure uri is correct for librtmp. This test calls
RTMP_ParseURL with 3 AVal pointers as parameters: host,
playpath and app.

AVal is a struct with a char* + int. After RTMP_ParseURL call,
host.av_val and app.av_val both refer a substring of "uri". But
playpath.av_val may be the result of a malloc so it needs to
be freed.

https://bugzilla.gnome.org/show_bug.cgi?id=681459

12 years agompegdemux: advance stream time when sending GAP event
Mark Nauwelaerts [Fri, 12 Oct 2012 20:33:45 +0000 (22:33 +0200)]
mpegdemux: advance stream time when sending GAP event

12 years agompegdemux: send language info downstream if available
Mark Nauwelaerts [Fri, 12 Oct 2012 20:33:27 +0000 (22:33 +0200)]
mpegdemux: send language info downstream if available

... as extracted from dvd event.

12 years agompegdemux: remove obsolete struct field
Mark Nauwelaerts [Fri, 12 Oct 2012 20:31:53 +0000 (22:31 +0200)]
mpegdemux: remove obsolete struct field