Revert "mm-video: vidc: vdec: advertise color formats based on usage hint"

 * We're not ready for this, and it's breaking CTS.

This reverts commit db7776ffce0150dc2930f24e06f11d82d5d9868f.

Change-Id: Id32c5ba73d3ac758744798fa2b1f805bf0fb61a3
media-caf-new: Avoid collision with FFMPEG plugin

Change-Id: Ica2cdf9f6572ec18f396d25758cbb2be1359ac0b
mm-video: vidc: Missing release of pending input buffers to client

For unsupported contents with codec config buffer flag set, input
buffers in the pending queue are not released back to client
after FLUSH causing native crash. This change ensures that buffers
are released properly during flush in arbitrary mode

CRs-Fixed: 640296
Change-Id: I14b33c4a81d02d3b579de651c737fb531cb62dcc
Revert "mm-video: vidc: Missing release of pending input buffers to client"

This reverts commit 44f73fc868ae875e88312f4ffee4c66a2441ce73.
mm-video: vidc: Missing release of meta buffer at encoder omx component

For 601-709 color conversion, Camera HAL extends one more entry
in native handle to put a flag and sends only when recording starts.
Because of this release of meta buffer fails in OMX video component
causing memory leak. This changes ensures release code for meta buffers.

CRs-Fixed: 627255
Change-Id: If45b2cb7bbfebc8cf791b28eb06c01e64b4991e6
mm-video: vidc: Avoid erroring out if too many corrupt frames

The OMX component indicates corrupt frames to the OMX client. Hence the
client is more than capable to making the decision to error out.

There's no point to make this decision in the component as some OMX
clients (namely WFD) are willing to wait out the corrupt frames in hope
that they will eventually get non-corrupt frames.

CRs-Fixed: 642758
Change-Id: I9475de4ccd18f026977ba7b403e8ccaa40699d04
mm-video: vidc: Missing release of pending input buffers to client

For unsupported contents with codec config buffer flag set, input
buffers in the pending queue are not released back to client
after FLUSH causing native crash. This change ensures that buffers
are released properly during flush in arbitrary mode

CRs-Fixed: 640296
Change-Id: I14b33c4a81d02d3b579de651c737fb531cb62dcc
mm-video: vidc: defer flush until headers are consumed

In case flush arrives while codec-config buffers are sent
to codec, defer sending flush till codec config buffers
are consumed. This fixes CTS tests which issue flush
right after configure (i.e after queueing headers)

Change-Id: I8cfcaecacc79da8d2c75a521b2a616a20aa69099
mm-video: vidc: hevc: Amend fill internal buffers flag correctly

The flag which indicates whether intermediate buffers are
sent to Q6 is not updated at the correct instant. Modify
the code to update it appropriately.

Change-Id: I2d963c54d86466669743e52a27aaf59f4a2864df
mm-video-v4l2: venc: Add setprop support for bframes and entropy

Add support to enable setting bframes and entropy on encoder component
via setprop, "vidc.debug.bframes" and "vidc.debug.entropy".

Change-Id: I8844b42f54bb420e541ab1c745c8f1c8ec983ac0
mm-video: vidc: Honor client's request to set CABAC

"vidc.debug.entropy" should be considered as a footswitch, and not the
determination of which entropy mode to use.  If client requests CABAC,
we should honor it unless "vidc.debug.entropy" is set to 0.

Change-Id: Ic8aad846a4c6cd87f13436eae8a63e938335205b
CRs-Fixed: 595920
mm-video-v4l2: venc: set intra period as per client setting

Intra period value set by the client is being ignored in the
component. Set intra period as per the client settings.

CRs-Fixed: 640410
Change-Id: I06229e3245b4f7987eaa6d9a3daf38b5de621c34
mm-core: Add new mime for QTI FLAC container

Add new mime type for FLAC container that is sniffed by extended
extractor. This is needed for media extractor to determine which
parser to create.

Change-Id: Iad68dbee25bc1d482a2d73447912494a000fa674
mm-video: vdec: fix multiple downscalar issues

-In set_parameter for output port with new resolution,
 ignore buffer size and count mismatch.
-In set_parameter for input port, do not call get_buffer_req
 for output port.
-In update_portdef, port definition values are fetched from
 driver using ioctl.
-Crop rectangle is updated during set param for output port
 instead of during update_res.

CRs-Fixed: 629474
Change-Id: I0d1ca6b8b170ded07bee6c48c5370d7386f0639b
Revert "mm-video: vdec: Set frame rate if computed fps is more than existing fps"

Reverting change-id Ic723d5a35a8709d57b5ff4877ebc9e6ae9aa626a.
The change introduced a bug in the component, whereby once fps is
set to a high value, it won't come down. This impacts power.

Change-Id: Ib50dcb34a5142d77a812714c30c8ea051f4942fe
dashplayer: handle text track error

Propagate text track error returned from
feedMoreTSData call
Change-Id: I726c83182fc87de3e2757ef8483bf74ad86e5304
CRs-Fixed: 639002
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