Conversation
We call startRecording unconditionally in startInput, so we must update the client state to be unsilenced (since we are treating as such). We subsequently re-update the silence state (with the client marked as active to dispatch ops) in updateUidStates_l. This fixes an issue where we call startRecording for a silenced client, then call it again when it moves to unsilenced when the client is active. Since startRecording is ref-counted, this leaves the client in the recording state leading to incorrect appop attributions. Bug: 279905816 Bug: 281485019 Test: Manual verification of repro cases + verbose log analysis (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e7720b379bfaba648ab6d85c4c2df6f03ec854d3) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2951ad10a6641f9b3554d674877ad314e8cc011f) Merged-In: I31d50457ca8adae577407a28d4d4c0e8582bac5d Change-Id: I31d50457ca8adae577407a28d4d4c0e8582bac5d
…45979'] into tm-qpr3-release. Change-Id: Iaaa9e293de48fba89fb8d2fb2579685349a6e575
* Give freedom to screen recorder apps Change-Id: I726bde4f44bba6fc8cd771ae90c8864b26cdd919 Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
* Aligned with CAF as of QSSI12, and removed unnecessary devices.isEmpty() check. Original patch: https://source.codeaurora.org/quic/la/platform/frameworks/av/commit/services/audiopolicy?h=LA.BR64.1.1.1-01010-8x16.0&id=9cc970fc512bedfa6a2cf03457d93609adc6eb85 Change-Id: I9bad6a294ddd7aee72f6f6a314666b892b730c8e Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
This reverts commit d0a98fa. Change-Id: I0554b92c290c1ebbd1a40fc2edb43573a97d4f6a Signed-off-by: DennySPb <dennyspb@gmail.com> Signed-off-by: Kujou Yuko <i@779.moe> Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
This adds back the SurfaceMediaSource class, needed for WFD. This reverts commit e885915. Change-Id: I3f67d01f18441e49205e2e263d20f0fb6fc91fe6 Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: DennySPb <dennyspb@gmail.com> Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
Change-Id: Ifb564aafcf6f9bd45010500a589050b6577c0f7a Signed-off-by: DennySPb <dennyspb@gmail.com> Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
* Among others, adapt to the ABuffer API changes in "f03606d9 Move MediaBufferXXX from foundation to libmediaextractor" Change-Id: Ie92fc035c6430f1458d45995a5b2627d0bc75122 Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: DennySPb <dennyspb@gmail.com> libstagefright_wfd: Adapt to A11 changes Change-Id: I69f13c93a68b1ad60e085000361331a3fdc98049 Signed-off-by: DennySPb <dennyspb@gmail.com> libstagefright: Remove libmediaextractor dependency Change-Id: Ifb564aafcf6f9bd45010500a589050b6577c0f7a Signed-off-by: DennySPb <dennyspb@gmail.com> Remove libmediaextractor dependency from libstagefright_wfd Change-Id: I3d417d2f2ce468eb9d45f55f7818bb9a46348667 Signed-off-by: DennySPb <dennyspb@gmail.com> libstagefright_wfd: Log MediaExtractor entry point to MediaMetrics Change-Id: Ic8fac2cd5ee4d3bb59804e69efc1d5c482aa2417 Change-Id: Ie92fc035c6430f1458d45995a5b2627d0bc75122 Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
…n issue In function passMetadataBuffer_l, the bufferHandle(ANativeWindowBuffer) is saved to data (VideoNativeMetadata) but in function getMediaBufferHandle it gets the bufferHandle from (MediaBuffer*)buffer->data() + 4, which is a wrong position. To solve this problem, we should get handle from ANativeWindowBuffer, not from buffer->data() + 4. (If get bufferHandle from buffer->data() + 4, the function signalBufferReturned will print "returned buffer was not found in the current list" error. Test: Running wifi display, we can see the handle could be found in buffer list. Change-Id: I71ecf9e2bca1db67d8d6e862ac16b07e939bf521 Signed-off-by: zhangbo_a <zhangbo_a@pinecone.net> Signed-off-by: DennySPb <dennyspb@gmail.com> Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
In commit 3e32878 the stagefright code was restructured to fix the logic for native handle source, but the change in the function SurfaceMediaSource::signalBufferReturned was probably missed. Try to compare the media buffer handle also to the current native buffer handle in this function when searching for correspondance. Change-Id: I352293e525f75dde500ac8e71ee49209710030c3 Signed-off-by: DennySPb <dennyspb@gmail.com> Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
…erBase when done
* This fixes buffer flow SurfaceMediaSource -> MediaPuller -> Converted
freezing at mMediaBuffersAvailableCondition.wait(), due to this
condition never being broadcast. This was supposed to happen from within
SurfaceMediaSource::signalBufferReturned(), but this was never called.
The Converter class does feedEncoderInputBuffers(), and after the
encoder does its job, it should return the video buffer to the
SurfaceMediaSource in ACodec::BaseState::onOMXEmptyBufferDone().
* There (in ACodec class), the code for doing that used to be:
// We're in "store-metadata-in-buffers" mode, the underlying
// OMX component had access to data that's implicitly refcounted
// by this "MediaBuffer" object. Now that the OMX component has
// told us that it's done with the input buffer, we can decrement
// the mediaBuffer's reference count.
info->mData->setMediaBufferBase(NULL);
This means that if there was already a MediaBufferBase assigned to
this mediaBuffer, then it got released when explicitly setting it to NULL:
void MediaCodecBuffer::setMediaBufferBase(MediaBufferBase *mediaBuffer) {
if (mMediaBufferBase != NULL) {
mMediaBufferBase->release();
}
mMediaBufferBase = mediaBuffer;
}
Then in MediaBuffer::release(), which is a subclass of
MediaBufferBase, there is code that does
mObserver->signalBufferReturned(this);
This should have went on to call SurfaceMediaSource::signalBufferReturned(),
as it was setting itself as observer on the buffers sent to the video
encoder. Stay tuned to find out why the call path was broken.
* Now, after Mr. Dongwon Kang's commit
"f03606d9 Move MediaBufferXXX from foundation to libmediaextractor",
the setMediaBufferBase and getMediaBufferBase functions no longer
exist, and reference counting on MediaBuffer's is different.
The direct replacement of setMediaBufferBase(mbuf) is now
meta()->setObject("mediaBufferHolder", new MediaBufferHolder(mbuf)).
The reference counting seems to now be managed through the constructor
and destructor of this new MediaBufferHolder class (the code for
release() is now in the holder's destructor). Now the issue seems to
be that the lifetime of these new MediaBufferHolder's is not quite
what it should be, because their destructor never gets called, hence
the buffers never get returned.
* This might be an API problem that Mr. Dongwon Kang himself acknowledged,
since in the aforementioned patch, he forcefully called mbuf->release()
right below a comment where it clearly said that "video encoder will
release MediaBuffer when done with underlying data":
https://android.googlesource.com/platform/frameworks/av/+/f03606d9034730bea1a394e6803f9ebc36f3d2eb%5E%21/#F13
* Without addressing the root cause of the issue, in this commit we are
simply mirroring a workaround for what appears to be broken media
buffer reference counting.
Change-Id: Ie540e6dcf5536f93091ced2af2e121b71f70bb83
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: DennySPb <dennyspb@gmail.com>
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
AudioFlinger is not able to determine the correct pid/tid for WifiDisplay and thus we do not pass checks for CAPTURE_AUDIO_OUTPUT and RECORD_AUDIO permissions. To fix audio for WifiDisplay, it should be safe to always allow a trusted calling uid (AID_MEDIA which has the same perms as AID_AUDIOSERVER). Change-Id: Ifa46d8e77a43027645cad02a04263b58e134c3ad Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
This imports the old foundation code in the standard platform stagefright. The foundation variant is used in VNDK, we can't change the ABI there. This reverts commit 5ec3d6a. Change-Id: Iebcf5d89a768fdb830bea90fbf2c2427a4c3d139 Signed-off-by: DennySPb <dennyspb@gmail.com> Signed-off-by: Luca Stefani <luca.stefani.ge1@gmail.com> Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
Resolves Qualcomm libs trying to access e.g. /dev/msm_alac and failing. Referred from: https://source.codeaurora.org/quic/la/platform/frameworks/av/commit?id=150662d Test: run vts -m VtsHalMediaOmxV1_0TargetAudioDecTest Change-Id: I28dcc07c00f41ab542b24725d767227854f1b7c9 Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
pipeline watcher's queued work counter included smoothfactor, if we
don't add it in elapsed(), it is easy to cause CCodec queue call timeout
CRs-Fixed: 2984012
Test: Verified on OnePlus 9 that YouTube video does
not unpause itself.
Change-Id: Ia2dbf3a7cf0da4805398cf44780ad3dacbaf1a1b
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
Older device vendor blobs still depend on this. This reverts commit a036035. Change-Id: I15a5d75a8731586e59a6600eb782332ab6844ad5 Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com> Change-Id: I5ab5e594c030be032353344600c67f6d0d36e7f2 Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
This is a squash of the following CLO commits:
commit 84b2ea267f2b5a5b8925758ab8f9e9f0db4f6d53
Author: Pavan Kumar Mc <quic_pmc@quicinc.com>
Date: Fri Nov 12 21:21:46 2021 +0530
Camera: Avoid roundBufferDimensionsNearest for AIDE2 YUV streams
- AIDE2 is vendor enhanced feature which needs special resolutions
for full and downscaled YUV streams.Those resolutions are not
populated in static capabilities. So avoid roundBufferDimensionsNearest
for YUV streams in privileged client case.
CRs-Fixed: 3012886
Change-Id: Ia1d134edd1fac2ffd454137aa2a4aa5b9d40c7a7
commit 35df5effc321d630e711161fba02614f0c61abdd
Author: Pavan Kumar Mc <pmc@codeaurora.org>
Date: Tue Aug 17 10:28:21 2021 +0530
Camera: Support raw stream creation for priviledged APPs
- Raw stream creation failing as priviledged APP check set to FALSE
for new set of call flow to roundBufferDimensionNearest. Setting
the condition to TRUE.
CRs-Fixed: 3011444
Change-Id: Ia3d5e4744a78b06c00e99fb5be856b24acbff599
commit 573cb73a1c6c4a8bf13791b98c5d539ebffa2d0f
Author: Pavan Kumar Mc <pmc@codeaurora.org>
Date: Thu Jun 24 11:19:35 2021 +0530
Camera: Master callback mode support for MCX raw
- Raw stream creation failing for size greater than logical
camera resolution as size cannot exceed max raw stream size
in available stream configuration.
- Allow creating raw streams of greater size for logical camera
CRs-Fixed: 2968932
Change-Id: Ibacc3c72e34b2f137546288f67bcdb4e0a38aa23
commit 15de50a2fe471e7d3cc498286f0de31282303fb0
Author: Pavan Kumar Mc <pmc@codeaurora.org>
Date: Wed Apr 21 17:59:46 2021 +0530
Camera: Master callback mode support for MCX raw
- Raw stream creation failing for size greater than logical
camera resolution as size cannot exceed max raw stream size
in available stream configuration.
- Allow creating raw streams of greater size for logical camera
CRs-Fixed: 2860300
Change-Id: Ic0f99e55b1519596e49ff2af14895cea1a19c752
commit cee145eaaf32faf0b99f46f957a9fb6ad66abccf
Author: Gaoxiang Chen <gaochen@codeaurora.org>
Date: Wed Jun 21 12:57:08 2017 +0530
Camera: Skip stream size check for whitelisted apps.
Issue:
For quadracfa capture, Blob/YUV output streams need to be
configured with custom dimensions which will not be available
in advertised stream configurations map.
Fix:
Skip the stream size check for whitelisted apps to allow
configuration of streams with custom dimensions.
Setprop to be used:
adb shell setprop persist.vendor.camera.privapp.list <pack1,pack2>
Change-Id: Id94b40c94f42bf4579dc6d8bb6273003312ea669
Change-Id: If12f9696fbc78edbd5fb4345a48818fa5d74752f
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
…BLOB This fixes the Ultra-Res feature with Motorolas MotCamera3 It uses multiple camera streams, with only the blob format using the full sensor size (e.g. on berlin: 12000 x 9000 for 108 MP) [ghostrider-reborn] - Xiaomi devices also seem to use this, with MiuiCamera (tested with 64 MP mode on lisa, 48 MP on ginkgo etc.) Change-Id: I025e068b2d3ff1123599ae5655655876ee28f39b Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com> Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
This reverts commit b02a11a. Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.