platform/upstream/gstreamer.git
9 years agoxvimagsink: fix failure to allocate large shared memory blocks
Vincent Penquerc'h [Fri, 4 Apr 2014 11:32:14 +0000 (12:32 +0100)]
xvimagsink: fix failure to allocate large shared memory blocks

A previous patch increased allocations by 15 bytes in order to ensure
16 byte alignment for g_malloc blocks. However, shared memory is
already block aligned, and this extra 15 bytes caused allocation
to fail when we were already allocating to the shared memory limit,
which is a lot smaller than typical available RAM.

Fix this by removing the alignment slack when allocating shared
memory.

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

9 years agoximage: do not allocate extra alignment slack for shared memory
Vincent Penquerc'h [Fri, 4 Apr 2014 11:40:14 +0000 (12:40 +0100)]
ximage: do not allocate extra alignment slack for shared memory

A previous patch increased allocations by 15 bytes in order to ensure
16 byte alignment for g_malloc blocks. However, shared memory is
already block aligned, and this extra 15 bytes is not needed. Since
shared memory limits are low compared to RAM, we remove this waste.

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

9 years agotests: require Gtk+ 3.10 for examples
Chihyoung Kim [Fri, 3 Apr 2015 04:56:28 +0000 (13:56 +0900)]
tests: require Gtk+ 3.10 for examples

Fixes build of playback and seek tests when an
older Gtk+ version is present on the system.

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

9 years agovideorate: Detect framerate if not forced to variable downstream
Thibault Saunier [Tue, 9 Dec 2014 12:18:42 +0000 (13:18 +0100)]
videorate: Detect framerate if not forced to variable downstream

In case upstream does not provide videorate with framerate information,
it will detect the current framerate from the buffer it received,
but if downstream forces the use of variable framerate (most probably
through the use of a caps filter with framerate = 0 / 1), videorate will
respect that.

And add some unit tests

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

9 years agovideorate: Do not loop forever pushing first buffer when variable framerate
Thibault Saunier [Tue, 9 Dec 2014 10:31:30 +0000 (11:31 +0100)]
videorate: Do not loop forever pushing first buffer when variable framerate

In the case the framerate is variable (represented by framerate=0/1),
we currently end up loop pushing the first buffer and then recompute
diff1 and diff2 without updating the videorate->next_ts at all
leading to infinitely looping pushing that first buffer.

In the case of variable framerate, we should just compute the next_ts
as previous_pts + previous_duration.

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

9 years agoplayback-test: update deprecated API
Luis de Bethencourt [Thu, 2 Apr 2015 13:32:15 +0000 (14:32 +0100)]
playback-test: update deprecated API

9 years agotests: fix deprecated API in colorkey and videooverlay
Luis de Bethencourt [Thu, 2 Apr 2015 10:33:12 +0000 (11:33 +0100)]
tests: fix deprecated API in colorkey and videooverlay

9 years agoexamples: fix deprecated API in scrubby
Luis de Bethencourt [Thu, 2 Apr 2015 10:14:08 +0000 (11:14 +0100)]
examples: fix deprecated API in scrubby

9 years agooggdemux: don't use GST_ERROR() for debug messages
Guillaume Desmottes [Thu, 19 Mar 2015 13:34:07 +0000 (14:34 +0100)]
oggdemux: don't use GST_ERROR() for debug messages

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

9 years agotests: use elapsed label of volume example
Luis de Bethencourt [Wed, 1 Apr 2015 14:58:28 +0000 (15:58 +0100)]
tests: use elapsed label of volume example

9 years agoaudioconvert: avoid float calculations when mixing integer-formatted channels
Bernhard Miller [Mon, 30 Mar 2015 09:24:46 +0000 (11:24 +0200)]
audioconvert: avoid float calculations when mixing integer-formatted channels

The patch calculates a second channel mixing matrix from the current one. The
matrix contains the original values * (2^10) as integers. This matrix is used
when integer-formatted channels are mixed.

On a ARM Cortex-A8, single core, 800MHz this improves performance in a
testcase from 29s to 9s for downmixing 6 channels to stereo.

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

9 years agotests: fix deprecated API in audio volume example
Luis de Bethencourt [Wed, 1 Apr 2015 14:02:13 +0000 (15:02 +0100)]
tests: fix deprecated API in audio volume example

9 years agojsseek: update deprecated GTK API
Luis de Bethencourt [Wed, 1 Apr 2015 13:37:23 +0000 (14:37 +0100)]
jsseek: update deprecated GTK API

9 years agojsseek: switch deprecated GtkTable for GtkGrid
Luis de Bethencourt [Wed, 1 Apr 2015 12:50:51 +0000 (13:50 +0100)]
jsseek: switch deprecated GtkTable for GtkGrid

9 years agotests: update deprecated GTK API in audiomix
Luis de Bethencourt [Wed, 1 Apr 2015 10:01:57 +0000 (11:01 +0100)]
tests: update deprecated GTK API in audiomix

9 years agointrospection: Don't use g-ir-scanner cache at compile time
Edward Hervey [Tue, 31 Mar 2015 09:21:25 +0000 (11:21 +0200)]
introspection: Don't use g-ir-scanner cache at compile time

It pollutes user directories and we don't need to cache it

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

9 years agoid3v2: ignore RVA2 tags with more than 64 peak bits
Vincent Penquerc'h [Thu, 10 Apr 2014 11:03:05 +0000 (12:03 +0100)]
id3v2: ignore RVA2 tags with more than 64 peak bits

The spec for this does not say nor imply how this should be
interpreted.  The previous code would try to shift by 64 bits,
which is undefined.

Coverity 1195119

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

9 years agoplaybin: avoid possible deference of null pointer
Luis de Bethencourt [Mon, 30 Mar 2015 09:50:45 +0000 (10:50 +0100)]
playbin: avoid possible deference of null pointer

For safety, check the pointer playbin->curr_group is valid before
reading parameters of the structure.

CID #1291624

9 years agooggdemux: resurrect some flow return handling
Mark Nauwelaerts [Sat, 28 Mar 2015 15:59:23 +0000 (16:59 +0100)]
oggdemux: resurrect some flow return handling

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

9 years agoappsrc: handle a sample not having caps or a buffer more gracefully
Nicola Murino [Fri, 27 Mar 2015 19:16:28 +0000 (20:16 +0100)]
appsrc: handle a sample not having caps or a buffer more gracefully

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

9 years agobasedepay: Handle initial gaps and no clock-base
Nicolas Dufresne [Fri, 27 Mar 2015 20:22:36 +0000 (16:22 -0400)]
basedepay: Handle initial gaps and no clock-base

When generating segment, we can't assume the first buffer is actually
the first expected one. If it's not, we need to adjust the segment to
start a bit before.

Additionally, we if don't know when the stream is suppose to have
started (no clock-base in caps), it means we need to keep everything in
running time and only rely on jitterbuffer to synchronize.

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

9 years agodecodebin: improve debug message by printing the object
Thiago Santos [Fri, 27 Mar 2015 02:53:44 +0000 (23:53 -0300)]
decodebin: improve debug message by printing the object

Print the pad object that EOS'd too early

9 years agovideoencoder: Keep sticky events around when doing a soft reset
Song Bing [Fri, 27 Mar 2015 05:39:43 +0000 (13:39 +0800)]
videoencoder: Keep sticky events around when doing a soft reset

The current code will first discard all frames, and then tries to copy
all sticky events from the (now discarded) frames. Let's change the order.

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

9 years agoriff: Add FLLR tag
David Schleef [Fri, 27 Mar 2015 01:03:12 +0000 (18:03 -0700)]
riff: Add FLLR tag

9 years agobasedepayload: Fix generated segment
Nicolas Dufresne [Wed, 25 Mar 2015 22:40:25 +0000 (18:40 -0400)]
basedepayload: Fix generated segment

This fixes playback position in RTSP.

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

9 years agoplaybin: ignore new pads if it is shutting down
Thiago Santos [Wed, 25 Mar 2015 11:20:03 +0000 (08:20 -0300)]
playbin: ignore new pads if it is shutting down

If a new pad is added after playbin has been put to READY/NULL it
should ignore new pads as it is shutting down.

This can happen when the pipeline fails to preroll (is still in READY)
and the user gives up on waiting or an error that doesn't reach
the demuxer occurs (on some event handling) and it will continue to
work and exposing pads while playbin has been put to NULL.

Without this check an input-selector is created and set to PAUSED
state, preventing playbin from properly shutting down in case it
has data blocked inside it.

9 years agoRevert "theoradec: Disable usage of crop meta"
Nicolas Dufresne [Tue, 24 Mar 2015 19:47:20 +0000 (15:47 -0400)]
Revert "theoradec: Disable usage of crop meta"

This reverts commit da52868f468bd75ddb595a3eb52aaa38ecbbac41.

9 years agovideorate: Don't leak the pools
Nicolas Dufresne [Tue, 24 Mar 2015 19:18:36 +0000 (15:18 -0400)]
videorate: Don't leak the pools

gst_query_set_nth_alloction_pool() is transfer none on the pool, so we must
unref the pool when done.

9 years agotheoradec: Disable usage of crop meta
Nicolas Dufresne [Sun, 1 Mar 2015 16:44:22 +0000 (11:44 -0500)]
theoradec: Disable usage of crop meta

This is a temporary workaround that simply disables usage of crop
meta for now.

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

9 years agoaudioconvert: Eliminate unsigned quantizers
Ilya Konstantinov [Tue, 24 Mar 2015 15:28:51 +0000 (17:28 +0200)]
audioconvert: Eliminate unsigned quantizers

audio_convert_convert unpacks to default format (signed) before calling
quantize, and the unsigned variants were equivalent to signed anyway,
so we just get rid of them.

9 years agoaudioconvert: Avoid int division in quantization
Ilya Konstantinov [Tue, 24 Mar 2015 01:01:22 +0000 (03:01 +0200)]
audioconvert: Avoid int division in quantization

Since range size is always 2^n, we can simply use modulo (implemented
with a bitmask).

The previous implementation used 64-bit integer division, which is
done in software on ARMv7. Although the divisor was constant, the
division could not be transformed into "multiplication by magic number"
since the dividend was 64-bit.

The now-unused and not-so-fast gst_fast_random_(u)int32_range functions
were removed.

Also, implementing bug fixes:

1) ADD_DITHER_TPDF_HF_I no longer discards bias.

2) We change TPDF's noise range to be the same as RPDF's. Previously,
RPDF's noise ranged:
  { bias - dither, bias + dither }
while TPDF's noise ranged:
  { bias/2 - dither/2, bias/2 + dither/2 - 1 } +
  { bias/2 - dither/2, bias/2 + dither/2 - 1 } =
  { bias - dither, bias + dither - 2 }
Now, both range:
  { bias - dither, bias + dither - 1 }

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

9 years agodecodebin2: Set multiqueue sizes before use-buffering.
Duncan Palmer [Sun, 15 Feb 2015 23:25:03 +0000 (09:25 +1000)]
decodebin2: Set multiqueue sizes before use-buffering.

This fixes a race where the use-buffering property on a multiqueue was
set before the queue depth was changed from it's high preroll limits to
lower playback limits. This resulted in buffering messages being emitted
by the multiqueue in the short window between use-buffering being
set and the queue depth being reset.

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

9 years agoRevert "fdmemory: freed pointer will always be 0"
Luis de Bethencourt [Tue, 24 Mar 2015 10:46:44 +0000 (10:46 +0000)]
Revert "fdmemory: freed pointer will always be 0"

This reverts commit 7fbcefb753f944a79eae6957ea2789c960eb9eea.

9 years agofdmemory: freed pointer will always be 0
Luis de Bethencourt [Tue, 24 Mar 2015 10:19:05 +0000 (10:19 +0000)]
fdmemory: freed pointer will always be 0

9 years agooggdemux: Fix compiler warning
Wonchul Lee [Fri, 20 Mar 2015 08:45:03 +0000 (17:45 +0900)]
oggdemux: Fix compiler warning

gstoggdemux.c:1233:11: error: format specifies type 'long' but the argument has type 'ogg_int64_t' (aka 'long long') [-Werror,-Wformat]
          granule);
          ^~~~~~~

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

9 years agodefs: update
Wim Taymans [Thu, 19 Mar 2015 12:31:07 +0000 (13:31 +0100)]
defs: update

9 years agovideo-convert: fix clamping for 16 bits alpha mult
Wim Taymans [Thu, 19 Mar 2015 11:42:23 +0000 (12:42 +0100)]
video-convert: fix clamping for 16 bits alpha mult

9 years agovideo-frame: fix height/width assertions
Tim-Philipp Müller [Wed, 18 Mar 2015 20:38:20 +0000 (20:38 +0000)]
video-frame: fix height/width assertions

As commit 274984e8 states:
When doing CROP META it is expected that the width and/or height
in the GstVideoMeta is bigger or equal to the caps negotiated size.

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

9 years agofdmemory: make a base class for allocating fd-backed memory
Wim Taymans [Wed, 18 Mar 2015 14:12:03 +0000 (15:12 +0100)]
fdmemory: make a base class for allocating fd-backed memory

Make a base class that can help with allocating fd-backed memory.
Make dmabuf extend from the base class.
We can now make methods to check if memory has an fd and get the fd for
all the different types of fd-backed memory.

9 years agomultisocketsink: Allocate enough memory on the stack in the test
Sebastian Dröge [Mon, 16 Mar 2015 19:41:19 +0000 (20:41 +0100)]
multisocketsink: Allocate enough memory on the stack in the test

Otherwise we just overwrite other things on the stack and cause crashes.

9 years agooggdemux: fix playback regression on streams with clipped data at start
Vincent Penquerc'h [Mon, 16 Mar 2015 11:53:24 +0000 (11:53 +0000)]
oggdemux: fix playback regression on streams with clipped data at start

The code that was calculating the start granule from packet durations
was interpreting a negative value as an error, but this is actually a
valid case, to indicate clipping of data at start.

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

9 years agofdmemory: add flags to control behaviour
Wim Taymans [Sun, 15 Mar 2015 16:27:33 +0000 (17:27 +0100)]
fdmemory: add flags to control behaviour

Add some flags to the GstFdMemory to control how memory is mapped and
unmapped.

9 years agoallocators: add allocators test
Wim Taymans [Sun, 15 Mar 2015 15:41:21 +0000 (16:41 +0100)]
allocators: add allocators test

9 years agofdmemory: add fd backed GstMemory to separate file
Wim Taymans [Sun, 15 Mar 2015 14:16:23 +0000 (15:16 +0100)]
fdmemory: add fd backed GstMemory to separate file

Make a separate file for the code to handle the fd backed memory.
This would make it possible later to add other allocators also using
fd backed memory.

9 years agostreamsynchronizer: fix deadlock condition
Thiago Santos [Sat, 14 Mar 2015 18:08:15 +0000 (18:08 +0000)]
streamsynchronizer: fix deadlock condition

The variables could have changed when the lock was released
to push a gap event. Streamsynchronizer needs to check them
again before going to sleep.

Bonus: fix a comment typo

9 years agoplaysink: remove redundant else statements
Ramiro Polla [Fri, 13 Mar 2015 18:07:12 +0000 (18:07 +0000)]
playsink: remove redundant else statements

9 years agoplaybin: don't escape percent sign in documentation code sample
Ramiro Polla [Fri, 13 Mar 2015 18:23:46 +0000 (18:23 +0000)]
playbin: don't escape percent sign in documentation code sample

9 years agoAdd test_that_multisocketsink_and_socketsrc_preserve_meta
William Manley [Mon, 3 Nov 2014 12:47:18 +0000 (12:47 +0000)]
Add test_that_multisocketsink_and_socketsrc_preserve_meta

This test is in a seperate commit to the previous two because it depends
on and tests the functionality in both.

9 years agosocketsrc: Add support for GstNetControlMessageMeta
William Manley [Fri, 13 Mar 2015 16:19:28 +0000 (16:19 +0000)]
socketsrc: Add support for GstNetControlMessageMeta

multisocketsink now understands the new GstNetControlMessageMeta to allow
sending control messages (ancillary data) with data when writing to Unix
domain sockets.

Thanks to glib's `GSocketControlMessage` abstraction the code introduced
in this commit is entirely portable and doesn't introduce and additional
dependencies or conditionally compiled code, even if it is unlikely to be
of much use on non-UNIX systems.

9 years agomultisocketsink: Add support for GstNetControlMessageMeta
William Manley [Thu, 30 Oct 2014 17:53:15 +0000 (17:53 +0000)]
multisocketsink: Add support for GstNetControlMessageMeta

multisocketsink now understands the new GstNetControlMessageMeta to allow
sending control messages (ancillary data) with data when writing to Unix
domain sockets.

A later commit will introduce a new socketsrc element which will similarly
understand `GstNetControlMessageMeta`.  This, when used with a
`GSocketControlMessage` of type `GUnixFDMessage` will allow GStreamer to
send and receive file-descriptions in ancillary data, the first step to
using memfds to implement zero-copy video IPC.

Thanks to glib's `GSocketControlMessage` abstraction the code introduced
in this commit is entirely portable and doesn't introduce and additional
dependencies or conditionally compiled code, even if it is unlikely to be
of much use on non-UNIX systems.

9 years agosocketsrc: Add `connection-closed-by-peer` signal
William Manley [Fri, 13 Mar 2015 13:56:13 +0000 (13:56 +0000)]
socketsrc: Add `connection-closed-by-peer` signal

This provides notification that the socket in use was closed by the peer
and gives an opportunity to replace it with a new one which is not
closed, allowing reading from many sockets in order.

I use this in pulsevideo to implement reconnection logic to handle the
pulsevideo service dieing, such that is can be restarted without
disrupting downstream.

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

9 years agosocketsrc: Tidy up usage of `g_object_unref`/`g_clear_object` and locking
William Manley [Fri, 13 Mar 2015 13:43:59 +0000 (13:43 +0000)]
socketsrc: Tidy up usage of `g_object_unref`/`g_clear_object` and locking

This is clearer, and should make future changes safer.  No functional
change intended.

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

9 years agosocketsrc: Refactor to simplify
William Manley [Fri, 13 Mar 2015 13:30:48 +0000 (13:30 +0000)]
socketsrc: Refactor to simplify

* Don't bother polling, just do a blocking read, the `GCancellable` will
  take care of unlocking.  This should also be faster on MS Windows where
  the GIO documentation for `g_socket_get_available_bytes` states: "Note
  that on Windows, this function is rather inefficient in the UDP case".

* Implement `GstPushSrc.fill` rather than `GstPushSrc.create`.  This means
  that we will be using the downstream allocator which may be more
  efficient.  It also means that socketsrc is likely to respect its
  "blocksize" property (assuming that there is enough data available).

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

9 years agotcp: Add element socketsrc
William Manley [Mon, 3 Nov 2014 02:47:14 +0000 (02:47 +0000)]
tcp: Add element socketsrc

`socketsrc` can be considered a source counterpart to `multisocketsink`.
It can be considered a generalization of `tcpclientsrc` and
`tcpserversrc`:  it contains all the logic required to communicate over
the socket but none of the logic for creating the sockets/establishing
the connection in the first place, allowing the user to accomplish this
externally in whatever manner they wish making it applicable to other
types of sockets besides TCP.

This commit essentially copies the implementation directly from
tcpserversrc.  Later patches will tidy the implementation up and
re-implement `tcpclientsrc` and `tcpserversrc` in terms of `socketsrc`.

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

9 years agoaudioringbuffer: Log with the ringbuffer object where possible
Arun Raghavan [Fri, 13 Mar 2015 17:54:23 +0000 (23:24 +0530)]
audioringbuffer: Log with the ringbuffer object where possible

9 years agomultisocketsink: Map `GstMemory`s individually when sending
William Manley [Fri, 13 Mar 2015 12:49:31 +0000 (12:49 +0000)]
multisocketsink: Map `GstMemory`s individually when sending

If a buffer is made up of non-contiguous `GstMemory`s `gst_buffer_map`
has to copy all the data into a new `GstMemory` which is contiguous.  By
mapping all the `GstMemory`s individually and then using scatter-gather
IO we avoid this situation.

This is a preparatory step for adding support to multisocketsink for
sending file descriptors, where a GstBuffer may be made up of several
`GstMemory`s, some of which are backed by a memfd or file, but I think this
patch is valid and useful on its own.

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

9 years agovideo-frame: Relax width/height assertion
Nicolas Dufresne [Fri, 13 Mar 2015 10:30:43 +0000 (10:30 +0000)]
video-frame: Relax width/height assertion

When doing CROP META it is exepcted that the width and/or height in the
GstVideoMeta is bigger or equal to the caps negotiated size.

9 years agovideopool: Choose the biggest buffer size
Nicolas Dufresne [Thu, 12 Mar 2015 16:32:31 +0000 (16:32 +0000)]
videopool: Choose the biggest buffer size

We should respect what has been negotiated.

9 years agooggdemux: recover from EOS when searching for chain in push mode
Vincent Penquerc'h [Thu, 12 Mar 2015 10:06:15 +0000 (10:06 +0000)]
oggdemux: recover from EOS when searching for chain in push mode

If we get EOS when we're trying to build a chain, we disable seeking
and continue instead of posting an error. This can happen for corner
cases such as a stream with a video that stops before the end, for
instance.

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

9 years agooggdemux: fix seeking in files with a "missing" stream
Vincent Penquerc'h [Wed, 11 Mar 2015 16:46:38 +0000 (16:46 +0000)]
oggdemux: fix seeking in files with a "missing" stream

When looking for pages when seeking, we stop looking for non sparse
streams if we don't find one within a given threshold. This fixes
seeking filling up queues and blocking in corner cases such as an
audio file with a pathological 1 frame video stream (yes, I saw one).

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

9 years agodocs: Add new video functions and objects. Cleanup a little.
Jan Schmidt [Thu, 12 Mar 2015 14:06:57 +0000 (01:06 +1100)]
docs: Add new video functions and objects. Cleanup a little.

Add GstVideoChroma, GstVideoDither, GstVideoScaler and friends to the docs.

Remove and clean up a few obsolete/deleted refs and typos

9 years agoplaybin: Disconnect signals and invalidate group if it fails to activate
Sebastian Dröge [Thu, 12 Mar 2015 12:17:11 +0000 (12:17 +0000)]
playbin: Disconnect signals and invalidate group if it fails to activate

Otherwise playbin might move to the group directly after EOS of the next
group, and then error out again.

9 years agotheoradec: Fix decoding in the presence of GstVideoCropMeta
Jan Schmidt [Sat, 31 Jan 2015 16:39:07 +0000 (03:39 +1100)]
theoradec: Fix decoding in the presence of GstVideoCropMeta

Store the video info of the internal frame decode width/height
separate to the exposed (cropped) frame info, so that it can be
used for mapping the downstream allocated video frame buffer correctly
when using GstVideoCropMeta.

Fixes playback of files with sizes that aren't a multiple of 16-pixels
width or height.

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

9 years agostreamsynchronizer: Should wait state change complete before start another state...
Song Bing [Tue, 3 Mar 2015 07:18:04 +0000 (15:18 +0800)]
streamsynchronizer: Should wait state change complete before start another state change

Should wait state change complete before start another state change.
Can't ensure can received async-done message when state change from PLAYING to PAUSED.

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

9 years agostreamsynchronizer: Remove unnecessary ERROR message.
Song Bing [Fri, 27 Feb 2015 08:40:23 +0000 (16:40 +0800)]
streamsynchronizer: Remove unnecessary ERROR message.

Remove unnecessary ERROR message.
Push GAP will fail as flushing. Needn't ERROR message.

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

9 years agooggdemux: do not send seek events from the streaming thread
Vincent Penquerc'h [Thu, 5 Mar 2015 17:42:53 +0000 (17:42 +0000)]
oggdemux: do not send seek events from the streaming thread

This will usually deadlock, despite this patch being in master for
quite some time and working fine. Nevertheless, we deem it to be
not working, disregarding facts.

As such, we fix it by keeping track of seek events, and sending
them upstream from a separate thread. Buffers are then discarded
till we get a new segment with the expected seqnum.

9 years agooggdemux: set correct seqnum on segment events after a seek in push mode
Vincent Penquerc'h [Mon, 23 Feb 2015 13:07:41 +0000 (13:07 +0000)]
oggdemux: set correct seqnum on segment events after a seek in push mode

There is already a seqnum field for this, which was used to overwrite
the seqnum that was set by the push specific code.

9 years agooggdemux: try harder to query duration from upstream
Vincent Penquerc'h [Mon, 23 Feb 2015 11:30:36 +0000 (11:30 +0000)]
oggdemux: try harder to query duration from upstream

READY->PAUSED can be too early as souphttpsrc can get the HTTP
headers after this. Try again in the chain function.

Also use seeking query to disable seeking if upstream reports
being unseekable.

9 years agooggdemux: add non flushing time seeking in push mode
Vincent Penquerc'h [Fri, 31 Oct 2014 10:55:14 +0000 (10:55 +0000)]
oggdemux: add non flushing time seeking in push mode

Some resetting code has to be done in the NEW_SEGMENT
event handler, instead of the missing FLUSH_STOP one.

Segment base was also wrongly accounted for. This was hidden
by the fact that flushing resets the base.

A discontinuity is now also signalled on seeking. We have to
also ensure that the discontinuity "sticks" till a buffer
with a valid timestamp goes out, or the audio decoder base
class will ignore the discontinuity for purposes of keeping
track of the current time.

This allows using non flushing segment seeks for looping
HTML audio in particular, and more generally non flushing seeks.

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

9 years agooggdemux: fix wrong first granule
Vincent Penquerc'h [Wed, 4 Feb 2015 17:13:44 +0000 (17:13 +0000)]
oggdemux: fix wrong first granule

The code was using the first nonnegative granulepos to seed the
granule tracking, which appeared to work since headers have zero
granulepos. However, this does not work for files with a hole at
start, which are common in live streaming.

The correct behavior is to look for the first granule, and subtract
the duration of all the packets finishing on this page.

The function which does this relies on the fact that the ogg_stream
structure can be duplicated by shallow copy, in order to pull the
packets from the first page(s) on the copy without affecting the
original stream state.

9 years agovideo-converter: fix border handling of YUY2 and friends
Wim Taymans [Wed, 11 Mar 2015 08:48:20 +0000 (09:48 +0100)]
video-converter: fix border handling of YUY2 and friends

Don't draw the border in groups of 4 pixels for YUY2 but instead in
groups of 2 with alternating U and V. This avoids a crash on odd width
borders.

9 years agovideo-converter: force yuv conversion for border
Wim Taymans [Wed, 11 Mar 2015 08:47:23 +0000 (09:47 +0100)]
video-converter: force yuv conversion for border

Make sure we always do yuv conversion for the border.

9 years agovideo-format: fix A422 subsampling description
Wim Taymans [Tue, 10 Mar 2015 16:29:51 +0000 (17:29 +0100)]
video-format: fix A422 subsampling description

9 years agovideo-converter: add table based matrix8 implementation
Wim Taymans [Tue, 10 Mar 2015 14:12:30 +0000 (15:12 +0100)]
video-converter: add table based matrix8 implementation

Based on patch from Mozzhuhin Andrey <nopscmn at gmail.com>

Add a table based matrix8 multiplication implementation. The algorithm
does not do any clipping so we need to make sure we never call this on
input that might need to be clipped. In general, this algorithm is
2 times faster than the orc optimized one and would be chosen for all
RGB -> YUV conversions and some YUV->YUV and RGB->RGB conversions.

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

9 years agovideotestsrc: add all colors mode
Wim Taymans [Tue, 10 Mar 2015 10:55:11 +0000 (11:55 +0100)]
videotestsrc: add all colors mode

9 years agovideo: Add support for 10 bit planar AYUV formats
Sebastian Dröge [Tue, 10 Mar 2015 09:19:22 +0000 (10:19 +0100)]
video: Add support for 10 bit planar AYUV formats

9 years agoFix double semicolons
Tim-Philipp Müller [Tue, 10 Mar 2015 09:27:08 +0000 (09:27 +0000)]
Fix double semicolons

9 years agovideorate: Accept any capsfeatures
Olivier Crete [Tue, 10 Mar 2015 01:35:59 +0000 (21:35 -0400)]
videorate: Accept any capsfeatures

9 years agovideo-info: validate parsed colorimetry
Wim Taymans [Mon, 9 Mar 2015 15:28:02 +0000 (16:28 +0100)]
video-info: validate parsed colorimetry

Validate the parsed colorimetry and reset to defaults when we get RGB
with a matrix or YUV without a matrix.

9 years agovideo-converter: detect identity matrix
Wim Taymans [Mon, 9 Mar 2015 15:01:19 +0000 (16:01 +0100)]
video-converter: detect identity matrix

Do nothing if we have an identity matrix conversion.

9 years agovideo-info: use default colorimetry on error
Wim Taymans [Mon, 9 Mar 2015 14:58:50 +0000 (15:58 +0100)]
video-info: use default colorimetry on error

When we fail to parse the colorimetry property, fall back to the default
colorimetry for the format and dimension instead of leaving things
undefined.

9 years agovideoencoder: unused value
Luis de Bethencourt [Mon, 9 Mar 2015 11:25:41 +0000 (11:25 +0000)]
videoencoder: unused value

Value set in ret is immediately overwritten in the next line outside of the if
block. Run reset but don't store return.

CID #1226470

9 years agovideo-converter: only convert to/from rgb when needed
Wim Taymans [Mon, 9 Mar 2015 11:13:44 +0000 (12:13 +0100)]
video-converter: only convert to/from rgb when needed

Only use the YUV->RGB matrix when we have YUV as input and only use the
matrix when we need to make YUV output.

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

9 years agortpbuffer: Link to an explanation why the seqnum comparison function does the right...
Sebastian Dröge [Mon, 9 Mar 2015 10:12:46 +0000 (11:12 +0100)]
rtpbuffer: Link to an explanation why the seqnum comparison function does the right thing even for wraparounds

9 years agovideodecoder: only return EOS upon clipping if applicable
Mark Nauwelaerts [Sun, 22 Feb 2015 20:13:35 +0000 (21:13 +0100)]
videodecoder: only return EOS upon clipping if applicable

See also https://bugzilla.gnome.org/show_bug.cgi?id=709224

9 years agoaudiodecoder: only return EOS upon clipping if applicable
Mark Nauwelaerts [Sun, 22 Feb 2015 20:11:50 +0000 (21:11 +0100)]
audiodecoder: only return EOS upon clipping if applicable

See also https://bugzilla.gnome.org/show_bug.cgi?id=709224

9 years agovideo: Update orc generated C files
Sebastian Dröge [Sat, 7 Mar 2015 15:49:07 +0000 (16:49 +0100)]
video: Update orc generated C files

9 years agovideo-converter: add transfer full annotation for config
Wim Taymans [Fri, 6 Mar 2015 11:54:56 +0000 (12:54 +0100)]
video-converter: add transfer full annotation for config

9 years agovideo-converter: correct right-border location for YUY2, YVYU, UYVY
Ravi Kiran K N [Fri, 6 Mar 2015 04:00:51 +0000 (09:30 +0530)]
video-converter: correct right-border location for YUY2, YVYU, UYVY

Remove 'r_border /= 2' in convert_fill_border(). It doesn't
take the right border to correct location.

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

9 years agovolume: Explicitly cast integers to doubles and then back to integers after multiplic...
Sebastian Dröge [Thu, 5 Mar 2015 11:31:06 +0000 (12:31 +0100)]
volume: Explicitly cast integers to doubles and then back to integers after multiplication

gcc 4.9.1 on ARM seems to have a bug that causes it to cast the float to an
integer first, resulting in a 0 scale factor for volume < 1.0.

As a side effect this change here will also improve accuracy of the result a
bit because we go via doubles instead of floats.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325
https://bugzilla.gnome.org/show_bug.cgi?id=745667

9 years agovideo-converter: avoid scaler when size is unchanged
Wim Taymans [Thu, 5 Mar 2015 08:52:18 +0000 (09:52 +0100)]
video-converter: avoid scaler when size is unchanged

9 years agovideo-scaler: add horizontal 2tap u16 orc function
Wim Taymans [Wed, 4 Mar 2015 15:45:35 +0000 (16:45 +0100)]
video-scaler: add horizontal 2tap u16 orc function

Add slightly faster u16 horizontal resampler orc function.

9 years agocheck: add another generic converter test
Wim Taymans [Wed, 4 Mar 2015 11:28:47 +0000 (12:28 +0100)]
check: add another generic converter test

Run conversion and scaling with borders.

9 years agovideo-converter: don't reuse the input line when adding borders
Wim Taymans [Wed, 4 Mar 2015 11:21:33 +0000 (12:21 +0100)]
video-converter: don't reuse the input line when adding borders

When we need to add borders, we need a writable input line, so
don't reuse the source memory directly.

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

9 years agotextoverlay: Re-render if video size changed
Nicolas Dufresne [Tue, 3 Mar 2015 21:36:20 +0000 (16:36 -0500)]
textoverlay: Re-render if video size changed

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

9 years agoaudiobasesink: Reset audio clock if necessary
Arun Raghavan [Tue, 3 Mar 2015 17:26:37 +0000 (22:56 +0530)]
audiobasesink: Reset audio clock if necessary

When the ringbuffer is deactivated and then acquired, if the audio clock
provided by the sink gets reset to zero, we need to add an offset to the
clock to make sure that subsequent samples are written out at the right
times. While we need to leave this to derived classes to take care of
when they provide their own clock (since that clock may or may not be
reset to zero), we can do this ourselves if we know the provided clock
is our own (which does reset to zero on a re-acquire).

9 years agovideo-converter: avoid making scalers for outsize == 0
Wim Taymans [Mon, 2 Mar 2015 15:42:23 +0000 (16:42 +0100)]
video-converter: avoid making scalers for outsize == 0

9 years agovideo-converter: v-resample enough pixels
Wim Taymans [Mon, 2 Mar 2015 15:33:09 +0000 (16:33 +0100)]
video-converter: v-resample enough pixels

When we are using the fast linear resampler, use the ->inc to calculate
the first and last pixel we need so that we can do vertical resampling
on the right amount of pixels.

9 years agovideo-orc: fix unpack functions for RGB/RGB15 on BE
Wim Taymans [Mon, 2 Mar 2015 14:07:34 +0000 (15:07 +0100)]
video-orc: fix unpack functions for RGB/RGB15 on BE

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

9 years agovideo-format: more fixes for big endian
Wim Taymans [Mon, 2 Mar 2015 12:27:23 +0000 (13:27 +0100)]
video-format: more fixes for big endian