libstagefright: optimize thumbnail generation path.

- Checking for YUV420SP format support is not intended for software
  decoders and can be skipped. This avoids unnecessary creation of
  hardware decoders for checking supported output formats.
- Change the flag from kPreferSoftwareCodecs to kSoftwareCodecsOnly.
  This will force software codecs to be tried first and not just "prefer"
  which helps when a software codec for a particular type of codec (like
  divx) doesn't exist and avods creation of hardware codecs twice in case
  of hardware failure.

Change-Id: I682bca5b6bac5a56f46fe3655cd722fe5f08e1e6
drm: include symbols from libdrmframeworkcommon in libdrmframework

to let modules dependant (statically) on libdrmframeworkcommon to
be able to link to libdrmframework dynamically

CRs-Fixed: 655018
Change-Id: I745c604398d191d0d8c96a68d33f8494add303a1
MediaProfiles: Enhance profiles for extended usecases

Add more supported video resolutions for camcorder
and timelapse recording.

Add custom keys to MediaProfiles for:
  - EVRC, QCELP, and WMA formats
  - 4K resolution support for camcorder

Augment encoder profiles with HFR parameters.

Change-Id: I887d6259db0a97b3a705813dc754b4b0faff47fc
Conflicts:
include/media/MediaProfiles.h
include/media/mediarecorder.h
media/libmedia/MediaProfiles.cpp
Camera: Enable Histogram feature.

Link the histogram enable/disable commands from
application to the HAL layer.

Change-Id: I510c4e1798285ed1315bfb0d234fa76090659ba2
libstagefright: Add enhancements for extended format support

Extended Extractor to facilitate plugging-in of additional,
vendor-supplied parsers.

Extended-codec to configure omx component with extensions
to augment container/codec format-support.

Extended-utility to add utility methods, shell properties
and delegates for features viz: B-frame encoding,
secure-pool prefetching.

Additional fixes:
libstagefright: enable extended codec/format support
libstagefright: Add hooks for extended media utils
libstagefright: Change CHECK in ExtendedCodec to conditional.
libstagefright: fix thumbnail issue
frameworks/av: Update NOTICE files
libstagefright: Add HEVC as a recognized MIME in ExtendedExtractor
stagefright: ExtendedCodec: enable arbitrary/frame-by-frame mode
ExtendedCodec: Enable timestamp reordering for MPEG4.
libstagefright: set frame packing while codec configuration
[frameworks/av] : added .mov extension
libstagefright: fix mute issue for h.264 and MPEG4
ExtendedCodec: update amrwb+ format parameters
ExtendedCodec: update amrwb+ component input/output ports
audio: Fixed condition to load AAC HW Encoder
libstagefright: Disable smoothstreaming for secure playback

Change-Id: I1bee5c0e7f2b9d439abecbf245caa76116f2a089
Camera: Fix deadlock due to mLock in pcb and takepicture.

In non-zsl case of takepicture, we do streamoff for preview
stream which is waiting on preview callback thread to exit.
By that time the lock has already been acquired by takePicture.
So preivew callback will not exit until it acquires lock and
takePicture cannot continue until PCB call back is returned.
Fix: Avoid the mLock at services when both Preview cb &
Compressed cb are enabled.
(cherrypicked from commit bd423581f4b7eb8481f5525fc51174ce4c7261bc

Change-Id: If8b2d7465b279386f06eeeb4fee51cf73ca5ee41
Camera: Disable TakePicture related messages in stopPreview, stopRecording

This change fixes the race condition and avoid the deadlock in
abnormal snapshot stop I.e, Observed DeadLock when Data or Notify
Callbacks is sent to App after StopPreview is triggered and so
disabling the corresponding take picture messages.
(Changes cherrypicked from commit 962b0856465e7abbd5900fffa68112363b8e5360

Change-Id: I19a71b520393e17a396dffb0c3c128274145defc
Camera: Add support for ZSL burst mode.

Added ability to set number of snapshots in burst mode.

Change-Id: Ie0e7c8c0117b7adc985cfc92df79747ee6a5ea51
libstagefright: Add WFD specific flags to consumer usage flags

We add the GRALLOC_USAGE_PRIVATE_WFD flag to the consumer usage
flags to allow the display framework to distinguish WFD from
other virtual display connections.

Change-Id: I7cdbac3716fb5c18d1691701accb8e66f388de86
camera: Fix vendor tag descriptor corruption during binder transaction

For 64 bit platforms, size_t is 64 bit. Section count was not initialized
correctly. Hence the upper 32 bit of sectionCount will be corrupted and
lower 32 bit will be updated by the binder transaction leading to crash.

Change-Id: I35a4a750a5dbd8e696d14851130f2daf73014c3e
libmediaplayerservice: Add support for DashPlayer

Add support for DashPlayer in MedaPlayerFactor

Change-Id: I3e1fd871340117cb11975f6819d4bf0e6630607a
frameworks/av: Add support for Quality Of Experience (QOE) events in MediaPlayer

- Add MEDIA_QOE event type
- Allow MEDIA_QOE event to be passed to Application after reset
  is completed, similar to MEDIA_ERROR

Change-Id: I71e3d9e1f5f934c5844d80c65c653b2702a22ca1
libstagefright: Fallback to default parser for HEVC codec

Remove the check for extended extractor when HEVC MIME type is
found.

Change-Id: Ibfa24cc3de39d450581f62527614f80ec09f6567
libstagefright: update sample rate for EVRC/QCELP formats

- Update getSupportedAudioFormatInfo to report sample rate
  information for EVRC/QCELP formats.
- Fixed sample rate(8k) is used for EVRC/QCELP capture

Change-Id: I1c3fed1bb16e3e19d5f3501f2e2da6f2d6798d39
MediaProfiles: remove LF markings

since the code contributions are minor

Change-Id: I0c73b567ccb2935d6e7d86a3a19bd5b6b051243d
libstagefright: Use common method for setting video formats

Merge setVideoInputFormat and setVideoOutputFormat for different
ports into one common setVideoFormat function as it only enumerates
over supported mime types regardless of port.

Change-Id: I1ae379c852c6e9a8075cbcc50ee0536bf2f4a7f7
audio: audio enhancement for playback and capture

- Add support for EVRC, QCELP, AMRWB+, and WMA formats.
- Add support for 5.1 channel recording.
- Add support for FM over A2DP

Change-Id: I3987e6bb9e0c47c1055a9cb8e956d147295c04ec
(Cherry picked from commit Iaf80f982fc8b08617132dbd7d524a1748866745c)
audio: Compile AudioParameter as shared library

- AudioParameter as shared lib is needed by BT
  support in WFD source, SRS TruMedia

Change-Id: I464b428ace0cbb57ce6bf7bf3b57d51a7d56f032
audio: fix meta MIME type failure in MPEG4Writer

- MIME type info included in source->getFormat()
  is not updated properly because only temp
  variable is updated in AudioSource::getFormat().
  MIME type string contains garbage value and it
  results in invalid audio formats.
  MPEG4Writer returns ERROR_UNSUPPORTED and tunnel
  mode recording with 3gpp format fails
- Fix this issue by assigning return value of
  getFormat() to a local variable, and check the
  return value of findCString.

Change-Id: I242fa25a5d4f7b7e2c88fdd855208dcd42883b6c
libstagefright: Added mime-types for enca/encv atoms

- enca/encv are encrypted audio and video atoms for
  mp4a and mp4v. Hence returning aac and mpeg4 mime-types
  for enca and encv.

CRs-Fixed: 578506

Change-Id: Ie568ea7eec73e110eef07e2b1b921afefc8c54a7