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