QCMetadata: add keys for FLAC meta data

Add FLAC meta data specific keys.

Change-Id: I85f34d01ad4b403e236a5fc2ebf054eb383abbde
mm-video-v4l2: Update video resolution when updating crop

During adaptive playback, crop is changed during resolution
change, and stride and slice height should also be updated

Added change to update output port resolution on updating
crop due to resolution change

CRs-Fixed: 676004
Change-Id: I6c9c68852c57500ec8ceb021fa2f7570149f2d1b
mm-video: vidc: Restore sanity representing buffer sizes in dyn buf mode

nFilledLen and nAllocLen are buffer handle sizes in dynamic buffer mode.
This led to obnoxious checks in multiple places to account for dynamic
buffer mode.  Furthermore it led to basic sanity checks such as
`nFilledLen + nOffset < nAllocLen` failing.

To get around this, overwrite the OMX_BUFFERHEADER's nFilledLen /
nAllocLen parameters on FTB and restore them on FBD.  This localises the
need for the aforementioned irritating check.

CRs-Fixed: 647383
Change-Id: I38d5a1ef88d90f3f12164c48b60ac3bc45d50b0a
mm-video: vidc: Set the output buffer size properly

The output buffer size was considered to be what the driver advertised
to the component.  However, in use buffer mode, the client might have
allocated a bigger size.  To take advantage of the larger buffer, use
the client's advertised buffer size.

CRs-Fixed: 647383
Change-Id: I1778f1767280ecbc6e128eea895e34564ef3a015
mm-video-v4l2: vidc: vdec: implement buffer req for Adaptive SS

As per the new design for smooth streaming implementation,
OMX Component will do the following when adaptive smooth
streaming is enabled -
a. Enable continue data transfer in firmware.
b. Get upper limit buffer count for the smallest resolution
   supported by firmware.
c. Get upper limit for buffer size for supporting the
   max smooth streaming resolution set by client in OMX Component.
d. Set the combination of upper limit buffer count and upper limit
   buffer size in firmware.

Change-Id: Ib777b5ff32e3af0c42e0831bd7c9ba5a43396a77
mm-video: vidc: disable dynamic buffer mode and adaptive playback

Added setprop to disable dynamic buffer mode and adaptive playback
mode and kept is disabled bu default

Change-Id: I05b984199cf5fc932f25dde55317eac7798d46cb
CRs-Fixed: 661260
mm-video-v4l2: vidc: fix bugs reported by code review

Fix bugs reported by peer code review.

Change-Id: I064cbb3a9821c6ad2e282ff05ef6b6a25cc439a0
mm-video: vidc: Stop dropping timestamps on spurious FBDs

The driver might generate spurious FBDs in executing state for no good
reason.  Hence, stop dropping timestamps that we might need in the
future.

CRs-Fixed: 661440
Change-Id: I4220c385f2961c9009e1e03012be1020d1ba14c4
mm-video: vidc: add setprop to disable dynamic buf mode

Support to disable dynamic buf mode at run time.
"setprop vidc.dec.debug.dyn.disabled 1"

Change-Id: I8a64bb6e6f6993e470c99a43f25d1e0b7a32b560
mm-video: vidc: Correct the Intraperiod for non B-frame codec

For a codec profile that doesn't support B-frame, Intraperiod should
be set based on number of Pframes. This change ensures that Intraperiod
is obeyed for codec that doesn't support B-frame encoding.

CRs-Fixed: 622373
Change-Id: Ia1412909e4118b1e1c40f30cea4c7d7b57f97310
mm-video: vdec: Align width for 420 planar and semiplanar formats

GPU composition needs the width in client buffers to be aligned by
16 bytes for faster color conversion operations and hence aligning
the width in video component. Without the change color converted
output has green lines at the corners for resolutions which has
width not aligned to 16 bytes.

Change-Id: Id3b053f70faeb231d021bae8213715ece83affaf
mm-video: vidc: vdec: advertise color formats based on usage hint

Clients on Android hint usage of output buffers for:
[a] local playback or [b] access decoded YUVs for software filtering,
by setting an extension OMX.google.android.index.useAndroidNativeBuffer2.

For playback, it is preferable to publish native/accelerated formats,
while apps prefer known YUV formats

Change-Id: I37a5fbc38568dd783f42b67d6cf20d9e6f3d0eba
CRs-Fixed: 620886
libc2dcolorconvert: Use pre-multiplied flag for RGBA8888 format

RGBA frames coming to encoder have premultipled alpha. Without
this flag C2D would interpret alpha channel, and if not set (like
mdp comp), video encode during wifi display session results in
black frames on secondary display.

Change-Id: Ib47d2b9021e2606bc467784db2367589feb2f97e
mm-video: vidc: Extradata related changes

Add final extradata buffer size to actual buffer size
while providing buffer size requirement except for
secure use case, as there is a seperate extra buffer
allocated in case of secure mode.

Change-Id: I3b06c14f5bb4efea6404931048fec8859c18cb6f
dashplayer:Support getTrackInfo() and push blank frames

- If setVideoSurfaceTexture(null) called
on existing nativewindow and no video decoder, push
blank buffers to native window (embms channel switch
to audio only servie use case)
- Fix for pushBlankBuffersToNativeWindow() in
DashCodec. Missing native_window_set_scaling_mode()
- Configurable flag
kFlagPushBlankBuffersToNativeWindowOnShutdown
- Query dash source and return parcel
with list of trackInfo (track type and lang)
for all available tracks

Change-Id: I1fe9b2e704103b4351c95f46631d0e4816fe7583
dashplayer : use hybdrid HEVC decoder solution for HEVC

- use OMX.qcom.video.decoder.hevchybrid decoder component
  for HEVC

Change-Id: Id37caba580c90edcd58bab1beab518ea93f6e9aa
dashplayer: Fix crash in dashplayer print trace

Fix crash in dashplayer print trace

Change-Id: Idab7e83c6b580e99c4fc4d4e804c11c00af68dca
dashplayer: Wait to free all buffers during portsettingchange.

Wait for  all OWNED_BY_DOWNSTREAM buffers to
be freed before sending re-enable outport
during portsetting change.
OUT Buffers OWNED_BY_DOWNSTREAM, gets  freed
only when renderer sends buffer for rendering.
Due to timing issue, buffers OWNED_BY_DOWNSTREAM
dosent get freed before exectution reaches to
reenable outport.

Change-Id: I18729ac49138a599f06470e915aa86d65331d04d
CRs-Fixed: 652978
dashplayer: Fix KW warning in DashPlayer

Fix KW warning in DashPlayer

Change-Id: I37a84bc33121e3dd7e2050cf5c73aa349be78481
CRs-Fixed: 664708
dashplayer: Fix for flushing state assert fail

Shutdown complete from dashcodec can come
in more than one sequence. As part of flush-shutdown
sequence from dashplayer or allocateBuffersOnPort
failure in EnableOutputPort call. Hence remove
CHECK for mFlushing state.

Change-Id: I2f78a8fc5ebb6d110141e55d5eba8b6c24a5491b