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

merge #1

Merged
merged 3 commits into from Aug 7, 2018
Merged

merge #1

merged 3 commits into from Aug 7, 2018

Conversation

Eliminater
Copy link

No description provided.

Eliminater and others added 3 commits July 27, 2018 18:45
Camera:CameraService: Added lock on mHIDLMemPoolId in QDataCallback..

securing mHIDLMemPoolId (unordered_map variable) from multithreading.

Change-Id: I3fbe4ad836c2abbd512e3728cf49f9424b726ba0
…aCallback

Issue: Camera is getting stuck due to mHIDLMemoryMapLock when called for
       QDataCallback then  unregister  memory from HAL.
Solution: Releasing mHIDLMemoryMapLock after reading mHIDLMemoryMap variable

Change-Id: I7239f6eb6a9dec67393e11b83d0ef6c986215940
Add new AMediaCodec_getBufferFormat api to get
format of the buffer of specified index.

Change-Id: Ib5d6537b601dc8ce9c5c0096485637e0cf44a16a
@Eliminater Eliminater merged commit 34c015b into Havoc-OS:oreo Aug 7, 2018
SKULSHADY pushed a commit that referenced this pull request Dec 3, 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 #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
SKULSHADY pushed a commit that referenced this pull request Mar 21, 2023
Do not hold lock when IPC call is expected from HAL.

C2SurfaceSyncObj is shared lock between framework and HAL. HAL process
can have only one thread to handle IPC from HAL to framework.
Therefore Holding C2SurfaceSyncObj from HAL during IPC call could
trigger deadlock. The exact scenario is as follows.

Thread #1:(HAL -> framework IPC) HIDL call onInputBuffersReleased()
            calls to feedInputBufferIfAvailable(). Since this is using
            HAL IPC thread, this will block Thread #3. This is waiting
            for mOuput mutex which is held by Thread #2.
Thread #2:(framework) discardBuffer() holds mOutput mutex which blocks
            Thread #1. But this is waiting for C2SurfaceSyncObj which is
            held by Thread #3.
Thread #3:(HAL) Dtor of C2BufferQueueBlockPoolData is holding
            C2SurfaceSyncObj, therefore this will block #2. This thread
            is waiting for HIDL IPC thread to be free in order for
            'igbp->cancel()', but HIDL IPC thread is already occupied by
            Thread #1.

Bug: 246707566
Test: atest android.media.decoder.cts.AdaptivePlaybackTest
Test: atest android.media.decoder.cts.DecoderTest
Change-Id: I6a9540d3b4d03806cd40bb4f89a234a6b77758a9
Merged-In: I6a9540d3b4d03806cd40bb4f89a234a6b77758a9
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.

1 participant