Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CameraClient: MTK Support & libstagefright: mtk: Use vendor extensions #1

Open
wants to merge 25 commits into
base: 8.0
Choose a base branch
from
Open

Conversation

kunalshah912
Copy link

No description provided.

gitbuildkicker and others added 25 commits August 17, 2017 12:04
…lease-4286358 snap-temp-L42700000096612204 (snap-temp-branch)

Change-Id: I8dcd12d5b98577a9dacc25b312068714c5c91cf9
…lease-4286358 snap-temp-L42700000096612204

Change-Id: I26819c8f342d5485a76452f694000476eae51bb1
make function virtual or protected so that
they can be extended in custom audio policy.

audio policy: move output handle to AudioOutputDescriptor base class
Change-Id: I96ef9fd1c5a94874acb897245501ba2f9c9ab0c0

Change-Id: Ida7992f6b327491fab1f4ea376e85e8eb34b89ca
* Some devices need additional code to load their cameras. Add a hook
  for extra classes and symbols to be included.

Change-Id: Ifbe79e25b7ab47c5d468f5179032a4283b3f0df5
(cherry picked from commit 38681625992c0029d32eec98fc7e89d71b855b0e)
…er return

Refer to commit 3e32878, buffer
handle stored in MediaBuffer had changed, but the buffer return
code did not change correspondingly, so returned buffer can't be
found in list and lead to crash.

This commit fix it and make wifidisplay working now.

Change-Id: Ic0d99f471f5f246087946367726d7e76a689fe1f
This isn't supported in legacy media HAL, and causes things like
screen recording and wifi display to fail when setting up the encoder.

Change-Id: Icb3f7b7dfefcfd72939037241568f28c01fc11ed
This adds the native color format 'OMX_SEC_COLOR_FormatNV21Linear' of
exynos5 which is NV21 and needed for the camera. You can turn it on
with:

BOARD_USE_SAMSUNG_COLORFORMAT_NV21 := true

It requires

const char CameraParameters::PIXEL_FORMAT_YUV420SP_NV21[] = "nv21";

to be specified in CameraExtraParameters.h.

Change-Id: I64ca86d074468b1e7a2958a73c3c0380e64a9fc0
Signed-off-by: Andreas Schneider <[email protected]>
*This fixes the torch light for cameras with hal 1

*This fix works on the htc m7ul

*Fixed line length
*Fixed unused parameter names

[AdrianDC]
 * Adapt for 8.0.0 by adding dataCallbackTimestampBatch with
    matching data_callback_timestamp_batch function signature

Change-Id: I89c6112546e36dbcca099f4d5cd70371b2c5340a
(cherry picked from commit 3f6bb688b22b184b0bfc2739cda3c3cf0dd06a14)
Signed-off-by: Adrian DC <[email protected]>
Pre 7.0 camera HALv1 can not share its video buffers
across different processes, which requires us to
disable this security feature.

This change allows devices to re-integrate cameraserver
and mediaserver which is the first step to support older
prebuilt camera HALs. A follow-up change will add back
support for legacy buffer handling.

To enable:
TARGET_HAS_LEGACY_CAMERA_HAL1 := true
media.stagefright.legacyencoder=true
media.stagefright.less-secure=true

Change-Id: I4fcc8907ea235b7e83af26122b4da97ca5117816

mediaserver: Update HALv1 dependencies for 8.0.0

 * Add libcameraservice shared library dependency
 * Add new [email protected] and
    [email protected] shared
    libraries and exported headers HAL dependencies

 * Add libarect static library dependency

 * When TARGET_HAS_LEGACY_CAMERA_HAL1 is set, the mediaserver
    includes CameraService.h but exported headers are missing

 * Error upon build due to missing libcameraservice linkage:
    fatal error: 'android/hardware/BnCameraService.h' file not found

Change-Id: Ib6bb8a4e9ef18606c64e2dff13504d2eeaac13b1
Signed-off-by: Adrian DC <[email protected]>
Since Android 7.0, the default way of passing buffers
between camera HAL, encoder and framework is via
Android Native Window (ANW) buffers.

Pre 7.0 devices did this using buffer_handle_t buffers
allocated by gralloc HAL.
Since many devices do not have the source code for their
camera HALs or the encoder libraries available, introduce
this hack.

[AdrianDC]
 * Forward-port to AOSP 8.0.0 stragefright changes

Change-Id: I202051ab5d7273a33be0aa32b0bfdbbb1f53693f
Signed-off-by: Adrian DC <[email protected]>
[AdrianDC]
 * Forward-port to AOSP 8.0.0 libstagefright changes

Change-Id: I53985a966b891b902437f71d4ebccbd68138329e
Signed-off-by: Adrian DC <[email protected]>
We seem to get an improper offset when getting the value from the DSP
(offset 100, data size 1), when this happens, return a new phrase event
with valid extras which are initialized to some default values.

Change-Id: Ie041f78fec6bdbcd82286b54a7b7fb0c98c740f5
Signed-off-by: Roman Birg <[email protected]>
Fixes hotword on angler.

Change-Id: Ic15a617c0f79f03785feaddd2dfa6deb90842a06
Add diag permissions to audioserver to
enable QACT connectivty.

Change-Id: I78a1a372769b90f0e59a4b0fcb78d197b3f040b4
Change-Id: Id9eb5c771080b9758ab4193948deea131c92afb3
Added QDataCallback definition to pass the extended QCameraFrameMetadata
fields from HIDL to framework.

Change-Id: Idece64f22dd6ee3713c7db658b8583854086a1d8
This reverts commit 052c4955b8d31f7dc3484d40ee14cf18caccdae1.

The original change is device specific removing from
common frameworks location

Change-Id: Ie80e8aae4afb9f3f2655680600553cf26d6f63f3
 * If targets define a specific header path, then let it be the case
   and don't override it to avoid mismatched headers in the modules.

 * This only became an issue since O due to moved camera headers (commit e2b4384).

Change-Id: I6bf7d1da7448d71f7821d40501db971f837781db
Return on MTK hardware, the HAL does this internally and duplicating it
here causes an infinite loop.

Change-Id: I5bdb925ddb49980747b58dfae4543f812cef4c7d
Signed-off-by: Simao Gomes Viana <[email protected]>
…p cropping

For mediatek video codecs, validate that the current cropped rectangle
is valid and use the full frame size otherwise. This fixes a bug where
format changes in the same native window would preserve the previous
cropping and cause most of the image to be off-screen.

Change-Id: If56ca11453f5d2e04a4138b2efe28203f30ba569
Ticket: PORRIDGE-440
Signed-off-by: Simao Gomes Viana <[email protected]>
@Martinusbe
Copy link
Member

be aware that this branch will probably be replaced with the staging/8.0 one

@kunalshah912
Copy link
Author

ok

GzospBot pushed a commit that referenced this pull request Dec 16, 2017
camera: bring back CAMERA_PARAMETERS_EXTRA
sdv22 pushed a commit to BaikalOS-Archive/frameworks_av that referenced this pull request Nov 12, 2019
Change-Id: I5f0045faf50a7ebdb40b5c53319b8d29a0c29fce
fraz14 pushed a commit to GZOSP-Staging/frameworks_av that referenced this pull request Dec 18, 2019
Reporting video on upon first queue/dequeue buffer activity,
off after a period of inactivity (3 sec currently).

bug: 138381810
test:

Manual testing for now; unit tests will come after.
With BatteryStatService instrumented to print out noteVideo*:

Test case GZOSP#1: Camera recording (using GCA):

Camera creates encoder immediately when Video tab is entered, but
recording won't start until button is pressed. After recording is
stopped, a new encoder is again created to prepare for next session.
So under old scheme, video is on as soon as we're in Video tab, and
off/on even pairs are seen when video is stopped. Video stats is
basically always On when we're in video tab.

With this CL one should see:

- There shouldn't be videoOn when Video tab is first entered
- Start recording and there should be a videoOn.
- Stop recording and there should be a videoOff, AND videoOn shouldn't
  immediately follow.
- Kill camera app during active recording, video should be restored
  to Off.

Test case #2: Playback of video clips in Photos with pause

With old scheme pausing state will be videoOn because codec instance
is still there. With new scheme, videoOff should come after video
is paused for 3 sec, and  video On should come again when video is
resumed.

Change-Id: Ifa8aa5d8c2c95fa25393fcb936e6e54578716783
sdv22 pushed a commit to BaikalOS-Archive/frameworks_av that referenced this pull request Jan 9, 2020
Change-Id: I5f0045faf50a7ebdb40b5c53319b8d29a0c29fce
sdv22 pushed a commit to BaikalOS-Archive/frameworks_av that referenced this pull request Aug 29, 2021
Fix crashes like this:
05-03 20:55:09.029  6254  6254 F DEBUG   :       #00 pc 00000000  <unknown>
05-03 20:55:09.029  6254  6254 F DEBUG   :       GZOSP#1 pc 000ec8ab  /system/lib/libcameraservice.so (android::CameraHardwareInterface::notifyCallback(android::hardware::camera::device::V1_0::NotifyCallbackMsg, int, int)+18) (BuildId: 078b8118f1d0503988dc8f86045848d8)
05-03 20:55:09.030  6254  6254 F DEBUG   :       #02 pc 0002e6cd  /system/lib/[email protected] (android::hardware::camera::device::V1_0::BsCameraDeviceCallback::notifyCallback(android::hardware::camera::device::V1_0::NotifyCallbackMsg, int, int)+96) (BuildId: a964b5ab287096bfb4e9fb1357483757)
05-03 20:55:09.030  6254  6254 F DEBUG   :       #03 pc 00013783  /system/vendor/lib/[email protected]_msm8960.so (android::hardware::camera::device::V1_0::implementation::CameraDevice::sNotifyCb(int, int, int, void*)+46) (BuildId: 183c013753a49cdceaf880f00b6083b7)
05-03 20:55:09.030  6254  6254 F DEBUG   :       #04 pc 00038b99  /system/vendor/lib/hw/camera.vendor.msm8960.so (android::QCameraStream_preview::processPreviewFrameWithDisplay(mm_camera_ch_data_buf_t*)+128)
05-03 20:55:09.030  6254  6254 F DEBUG   :       #05 pc 000086ff  /system/lib/libmmcamera_interface2.so
05-03 20:55:09.030  6254  6254 F DEBUG   :       #06 pc 00008855  /system/lib/libmmcamera_interface2.so (mm_camera_msm_data_notify+248)
05-03 20:55:09.030  6254  6254 F DEBUG   :       #07 pc 0000736f  /system/lib/libmmcamera_interface2.so
05-03 20:55:09.030  6254  6254 F DEBUG   :       #08 pc 000a6b67  /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: 1c34385a63ae9f807822c87c6b4126d2)
05-03 20:55:09.030  6254  6254 F DEBUG   :       #09 pc 00060101  /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 1c34385a63ae9f807822c87c6b4126d2)

In case of HTC One M7, the nullptr appears because of this call:
https://github.com/AICP/frameworks_av/blob/q10.0/services/camera/libcameraservice/CameraFlashlight.cpp#L528

And while we're on it, lets fix some more possible nullptr's too.

Change-Id: I2f67756d576d62560a2e65af55ab868bfc3e36ba
Signed-off-by: Julian Veit <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.