platform/upstream/gstreamer.git
11 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

11 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.

11 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.

11 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

11 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

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

11 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

11 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

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

11 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.

11 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

11 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().

11 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

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

11 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()

11 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

11 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

11 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

11 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

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

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

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

11 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

11 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

11 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.

11 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

11 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

11 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

11 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

11 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.

11 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

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

11 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

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

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

11 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

11 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

11 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

11 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

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

11 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

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

11 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

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

11 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.

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

11 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).

11 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.

11 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.

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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.

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

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

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

11 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

11 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

11 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.

11 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.

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

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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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.

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

11 years agoaudioparse: Set framesize and properties correctly when taking format
Michael Smith [Fri, 12 Oct 2012 19:28:44 +0000 (12:28 -0700)]
audioparse: Set framesize and properties correctly when taking format
from caps.

11 years agompegdemux: tweak flow return aggregation
Mark Nauwelaerts [Fri, 12 Oct 2012 15:51:51 +0000 (17:51 +0200)]
mpegdemux: tweak flow return aggregation

11 years agompegdemux: handle upstream TIME segments
Mark Nauwelaerts [Fri, 12 Oct 2012 13:44:03 +0000 (15:44 +0200)]
mpegdemux: handle upstream TIME segments

11 years agompegdemux: handle and combine downstream flow return
Mark Nauwelaerts [Fri, 12 Oct 2012 13:07:21 +0000 (15:07 +0200)]
mpegdemux: handle and combine downstream flow return

11 years agompegdemux: handle new style dvd event
Mark Nauwelaerts [Fri, 12 Oct 2012 12:50:34 +0000 (14:50 +0200)]
mpegdemux: handle new style dvd event

11 years agompegdemux: do not add pad after no-more-pads
Mark Nauwelaerts [Thu, 11 Oct 2012 13:29:36 +0000 (15:29 +0200)]
mpegdemux: do not add pad after no-more-pads

11 years agompegdemux: clean up segment sending
Mark Nauwelaerts [Thu, 11 Oct 2012 13:27:12 +0000 (15:27 +0200)]
mpegdemux: clean up segment sending

... to use the src_segment as a basis for the sent segment,
thereby properly conveying accumulated base_time etc.

Also ensure src_segment is only adjusted once, so that
all downstream segments are identical to avoid stream
misalignment.

11 years agompegdemux: send GAP event rather than segment updates
Mark Nauwelaerts [Thu, 11 Oct 2012 10:07:46 +0000 (12:07 +0200)]
mpegdemux: send GAP event rather than segment updates

11 years agompegdemux: refactor segment sending
Mark Nauwelaerts [Thu, 11 Oct 2012 09:51:50 +0000 (11:51 +0200)]
mpegdemux: refactor segment sending

11 years agompegdemux: refactor init and reset
Mark Nauwelaerts [Thu, 11 Oct 2012 09:30:44 +0000 (11:30 +0200)]
mpegdemux: refactor init and reset

11 years agompegdemux: no more segment closing in 1.0
Mark Nauwelaerts [Thu, 11 Oct 2012 09:04:33 +0000 (11:04 +0200)]
mpegdemux: no more segment closing in 1.0

11 years agompegdemux: clean up some debug statements
Mark Nauwelaerts [Thu, 11 Oct 2012 09:03:21 +0000 (11:03 +0200)]
mpegdemux: clean up some debug statements

11 years agodtsdec: fix buffer parsing
Mark Nauwelaerts [Thu, 11 Oct 2012 13:31:04 +0000 (15:31 +0200)]
dtsdec: fix buffer parsing

... to avoid feeding empty buffers to decoder.

11 years agompegtsdemux: First push EOS, then destroy all programs
Sebastian Dröge [Fri, 12 Oct 2012 13:26:20 +0000 (15:26 +0200)]
mpegtsdemux: First push EOS, then destroy all programs

And also properly remove the program from the subclass

11 years agohlsdemux: Fix invalid read
Sebastian Dröge [Fri, 12 Oct 2012 13:09:07 +0000 (15:09 +0200)]
hlsdemux: Fix invalid read

11 years agompegvideoparse: signal interlacing properly in video caps
Sreerenj Balachandran [Wed, 10 Oct 2012 15:18:03 +0000 (18:18 +0300)]
mpegvideoparse: signal interlacing properly in video caps

The field is called "interlace-mode" mode now and is a string.

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

11 years agoreplace some playbin2 -> playbin
Wim Taymans [Wed, 10 Oct 2012 12:11:43 +0000 (14:11 +0200)]
replace some playbin2 -> playbin

11 years agompeg4videoparse: reset frame parser after parsing caps codec data
Mark Nauwelaerts [Wed, 10 Oct 2012 07:58:39 +0000 (09:58 +0200)]
mpeg4videoparse: reset frame parser after parsing caps codec data

... so as to arrange for a proper fresh state upon first frame.

11 years agocommon: Update to the right commit again
Sebastian Dröge [Wed, 10 Oct 2012 07:48:58 +0000 (09:48 +0200)]
common: Update to the right commit again

Was accidentially reverted to an older version in the last commit.

11 years agoaudioparse: add a mode where the caps are taken from the sink pad, and thus audioparse
Michael Smith [Wed, 10 Oct 2012 06:00:14 +0000 (23:00 -0700)]
audioparse: add a mode where the caps are taken from the sink pad, and thus audioparse
is only performing timestamping.

11 years agompegvideoparse: reset frame parser after parsing codec_data buffer in caps, to
Michael Smith [Wed, 10 Oct 2012 04:19:15 +0000 (21:19 -0700)]
mpegvideoparse: reset frame parser after parsing codec_data buffer in caps, to
avoid not correctly parsing the full first frame.