QCamera2: Flush pending preview callbacks

 During internal preview restarts the notifier
 thread could be blocked in CameraService and
 have pending preview callback notifications.
 Once the thread is unblocked the pending callbacks
 could be invalid and need to be flushed.
 A mechanism is added for flushing pending preview
 callback notifications. This will be done on
 every preview stop.

Change-Id: I2cddfed205d324ec4d386562eaf1f865fba86bd9
CRs-Fixed: 686850
QCamera2: Correct the datatype associated with CAM_INTF_PARM_HDR

Define the datatype corresponding to CAM_INTF_PARM_HDR as
cam_exp_bracketing_t instead of cam_hdr_param_t

Change-Id: I42d50a6d6f4ec2b85eb2413df6e8d96741351181
Camera3: Move Scene Mode from urgent to regular metadata.

Moving to normal metadata to avoid missing updates from ASD module.

Bug: 13100352
Change-Id: Ibe7670c0ea0691ee273675a556cb61f2ea2bc381
Camera-HAL: Don't try to deallocate unallocated stream buffers

In case of deferred allocation which we use
for snapshot, postview and metadata streams,
we allocate the buffers in deferred routine
and we deallocate in stream destructor.

In this case, stream info buf map_buf
failed for snapshot stream following
which we delete that stream. In this
destructor, we are trying to deallocate
stream buffers which are never allocated.

Change-Id: I3c424dd11d3e44b5a908da4188a5d06549f6ea92
Camera: Changes to adapt to new AVTimer Driver API

A new AVTimer driver API has been provided which directly provides
the timestamp value in ticks that can be converted to appropriate
timescale and tagged to the video frames.

Change-Id: Iccb1cc4d54bb127a7ff5c303b8540edd60b3eb38
CRs-fixed: 686642
Camera: Restart streams when long shot is turned off on UI

We need to restart streams, to get them
as per the requirements of single snapshot
usecase.

Change-Id: Ibe8af5359c44b6b2601902d186b78bfab96e2e4f
Camera3: Fix buffer registration check

- Fixed incorrect sequence of initialization and
  buffer count checking when registering buffers.
- Fixed improper implicit conversion from negative
  signed to unsigned type when checking buffer count.

CRs-Fixed: 696383
Change-Id: I2b43c4ed65aad3015a3a603fbda8dbff468baa67
Merge "QCamera2: Correct the datatype associated with CAM_INTF_PARM_HDR"
Merge "Camera3: Move Scene Mode from urgent to regular metadata."
Merge "Camera3: Fix buffer registration check"
Merge "Camera: Restart streams when long shot is turned off on UI"
QCamera2: Port HAL for 64 bit platforms

- Added -Wextra compiler warning level.
- Avoiding implicit datatype conversions
  and also pointer to integer conversions,
  including literals.
- Avoiding pointer conversions between different types
  other than (void*).
- Using 'size_t' to store memory size and indexes.
- Removed some unused variables.
- Changed datatype of some iterators to match their
  corresponding limiter types.
- Using double instead of float where possible.
- Changed bitmasks to unsigned types.
- Updated printf/scanf format string specifiers to match
  actual type of arguments.
- Using 'String8' instead of 'char[]' where possible
  at QCameraParameters.
- Checking result of QCameraMemory::getSize().
- Fixes build errors and warnings.

CRs-Fixed: 641033
Change-Id: Ief2157b32e447af422456165552ee170a82d2652
QCamera2: Add enumeration for mct session stream

Add new enum type for mct sesson stream.

Change-Id: I48de95a6029892eb9c30cb9291317ddd20ad657e
CRs-Fixed: 682182
QCamera2: Increase private meatadata size to 8 KB

- Gamma data size is increased so private metadata buffer
also need to be increased

Change-Id: Ic228123012c9f6f8500dd293de88fb2110bc0114
QCamera2: Flush old buffers for AOST

- Old buffers must be discarded for flash bracketing and
1x zoom capture request in order to avoid invoking callbacks
for old frames

Change-Id: I0a28b1e72c93f7bd37242bb62d35c392dd3379ed
Merge "QCamera2: Flush pending preview callbacks"
Merge "QCamera2: Add enumeration for mct session stream"
Merge "Camera-HAL: Don't try to deallocate unallocated stream buffers"
Merge "QCamera2: Increase private meatadata size to 8 KB"
Merge "QCamera2: Port HAL for 64 bit platforms"