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.
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.
androidmedia: Place some const keywords in a few places
gl/context_egl: pass the vars in the right order to DestroySurface

https://bugzilla.gnome.org/show_bug.cgi?id=728514
tsdemux: use GstFlowCombiner

Removes flow return combination code to use the newly added GstFlowCombiner
mpegdemux: use GstFlowCombiner

Removes flow return combination code to use the newly added GstFlowCombiner

https://bugzilla.gnome.org/show_bug.cgi?id=709224
mxfdemux: use GstFlowCombiner

Removes flow return combination code to use the newly added GstFlowCombiner

https://bugzilla.gnome.org/show_bug.cgi?id=709224
gl/window_x11: avoid BadDrawable error on shutdown
gl/mixer: don't segfault when we don't have a buffer

https://bugzilla.gnome.org/show_bug.cgi?id=729257
Revert "androidmedia: Place some const keywords in a few places"

This reverts commit 3078b3a34c1f75b86bd629df1cd7c089a0f69999.

gst_video_frame_map() doesn't take a const GstVideoInfo*, so
all this is rather useless.
gl: rename platform cocoa to cgl

Before:
GST_GL_PLATFORM=cocoa GST_GL_WINDOW=cocoa
gst-launch-1.0 videotestsrc ! glimagesink

After:
GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa
gst-launch-1.0 videotestsrc ! glimagesink

but still pass --enable-cocoa to configure script
because currently it can only be used with cocoa API.

We could later have cgl/gstglcontext_cgl.h that manages
a CGLContextObj directly and cocoa/gstglcontext_cocoa.h
would just wrap it.
So that it could be used with other Apple's window APIs.

https://bugzilla.gnome.org/show_bug.cgi?id=729245
gl: add missing cgl and eagl context type

https://bugzilla.gnome.org/show_bug.cgi?id=729245
mxfdemux: Compare positions to find the earliest pad, not flow returns
glimagesink: make it actually honor show-preroll-frame property

https://bugzilla.gnome.org/show_bug.cgi?id=730802
mxfdemux: remove unread last_flow variable

it isn't necessary anymore and is already unused
gl/colorconvert: operate on buffers instead of memories
glcolorconvert: fix compiler warning

gstglcolorconvert.c:1133:11: error: 'j' may be used uninitialized in this function

Was used uninitialized when jumping to out label
in error case.
tsdemux: add/remove pads to flowcombiner differently due to streaming nature

Due to mpegts streaming nature some pads are created but are only added
later to the element. This can cause a scenario where the first stream
doesn't have an available decoder (while the next ones still pending
would have) and tsdemux will fail with not-linked as the first stream
added wouldn't be linked.

To avoid this tsdemux needs to add pads to the flowcombiner
when they are created instead of only when adding them to the
element.
mpegts: add multilingual network name descriptor

https://bugzilla.gnome.org/show_bug.cgi?id=728429
mpegts: add multilingual bouquet name descriptor

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