qtdemux: Add HydrogenAudio ReplayGain tags

Identical to the itunes (tm) version, but labelled with
org.hydrogenaudio.replaygain as the producer.
rtpsession: don't unref buffer twice

Cleaning the packet info will already unref the buffer.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=715078
videoflip: don't crash on tag events without orientation tag

Would crash in g_free() trying to free an uninitialised pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=719497
videoflip: Add unit test for the 'automatic' method

These new tests send a tag event before seding the buffer. Tested case are an
empty tag list, a tag list with orientation-180 set and an invalid orientation value.

https://bugzilla.gnome.org/show_bug.cgi?id=719497
rtph264pay: Map inbuffer once only

Do not call gst_buffer_extract() twice since each call will map and
unmap the biffer.

https://bugzilla.gnome.org/show_bug.cgi?id=719434
qtdemux: fix compilation with gst debuging disabled

qtdemux.c:9452:1: error: label at end of compound statement
videomixer: Fix segfault when filling the background of a UYVY frame

https://bugzilla.gnome.org/show_bug.cgi?id=712401
videomixer: Simplify NV12/21 blending code macros
qtdemux: do not free streams if they were not created locally

When parsing a trak only free streams on failures if those streams
were created locally. They could have been created from a previous
fragment, in this case we they have valid info from the other fragment.
Including pads.

https://bugzilla.gnome.org/show_bug.cgi?id=691570
qtdemux: avoid re-reading the same moov and entering into loop

In the scenario of "mdat | moov (with fragmented artifacts)" qtdemux
could read the moov again after the mdat because it was considering the
media as a fragmented one.

To avoid this loop this patch makes it store
the last processed moov_offset to avoid parsing it again.
And it also checks if there are any samples to play before
resturning to the mdat, so that it knows there is new data to be played.

https://bugzilla.gnome.org/show_bug.cgi?id=691570
qtdemux: Use the timestamp of the moof as the base fragment start

In SmoothStreaming fragmented scenario, the timestamps are calculated
starting from the fragment buffer timestamp. When there is a not-linked
return from downstream, qtdemux will return upstream and will keep the
non-pushed data into its adapter.

On a new fragment buffer pushed to qtdemux, the new buffer timestamp
would overwrite the previous one that should be used on the still
to be pushed buffers. Because of this, this patch will also
update the fragment_start timestamp from the adapter last pts
to make sure the moof and timestamps are in sync and will result
in correct timestamps for all fragments.
deinterlace: fix off-by-one crash when downstream caps contain a list of framerates

https://bugzilla.gnome.org/show_bug.cgi?id=719544
deinterlace: microoptimisation: avoid some unnecessary GValue copies
audioparsers: refactor code to remove caps fields
audioparsers: remove fields from filter

We need to remove the fields from the filter when we can convert
between them.
audioparsers: use ACCEPT_INTERSECT flag

The parser can accept input that is not completely specified. Use the
ACCEPT_INTERSECT flag on the sinkpad to tweak the acceptcaps function to
check for intersection only. This allows us to proxy downstream
constraints while still allowing non-subset caps as input.
We can then also remove the appended template caps workaround.
Make a unit-test to check the new feature.

This reverts commit 26040ee38cb9e7c42f3d9a0282b3e5cace7ca42d

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=705024
audioparsers: don't leak template caps
v4l2: add support for multi-planar V4L2 API

This api is in linux kernel since version 2.6.39,
and present in all version 3.

The commit that adds the API in master branch of the
linux kernel source is:
https://github.com/torvalds/linux/commit/f8f3914cf922f5f9e1d60e9e10f6fb92742907ad

v4l2 doc: "Some devices require data for each input
or output video frame to be placed in discontiguous
memory buffers"

There are newer structures 'struct v4l2_pix_format_mplane'
and 'struct v4l2_plane'.
So the pixel format is not setup with the same API when using
multi-planar.

Also for gst-v4l2, one of the difference is that in GstV4l2Meta
there are now one mem pointer for each maped plane.

When not using multi-planar, this commit takes care of keeping
the same code path than previously. So that the 2 cases are
in two different blocks triggered from V4L2_TYPE_IS_MULTIPLANAR.

Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=712754
v4l2: refactor by emulating one v4l2_plane in non-MPLANE mode

so that the buffer informations can be retrieved the same way
in both MPLANE and non-MPLANE mode.

Here "emulating" means "manually fill in the plane".

Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=712754
v4l2bufferpool: add support for multi-planar V4l2 API in DMABUF mode

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