Comments (8)
Camera recording never work on O with prebuilt HAL. The reason was we need to switch to native handle implementation rather than getting buffers from gralloc HAL
from android_hardware_sprd.
How about playing a video, it seems that it also uses gralloc to fetch buffers, doesn't it?
from android_hardware_sprd.
Playing videos is ok. 1080p30 is fine
from android_hardware_sprd.
Other resolutions too
from android_hardware_sprd.
TL;DR; It's okay now. I can now play videos up to 1080p30. So, I'll be closing this. :)
It seems that a patch libstagefright: Make it possible to skip OMX buffer reallocation
didn't make it to LineageOS 15. Though this made me ask:
What does BOARD_CANT_REALLOCATE_OMX_BUFFERS := true
in scx35-common/BoardConfigCommon.mk
even do?
Unfortunately, it doesn't fix the camera recording. It hangs after the 00:01 time. AFAIK, LineageOS devs are working on the "legacy" HAL1 camera recording issue.
Anyways, here's the patch I used on frameworks/av
that just tests this idea.
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index def8ada3c..47d622bfa 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -1182,6 +1182,12 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
// 2. try to allocate two (2) additional buffers to reduce starvation from
// the consumer
// plus an extra buffer to account for incorrect minUndequeuedBufs
+#if 1
+ // Some devices don't like to set OMX_IndexParamPortDefinition at this
+ // point (even with an unmodified def), so skip it if possible.
+ // This check was present in KitKat.
+ if (def.nBufferCountActual < def.nBufferCountMin + *minUndequeuedBuffers) {
+#endif
for (OMX_U32 extraBuffers = 2 + 1; /* condition inside loop */; extraBuffers--) {
OMX_U32 newBufferCount =
def.nBufferCountMin + *minUndequeuedBuffers + extraBuffers;
@@ -1201,7 +1207,9 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
return err;
}
}
-
+#if 1
+ }
+#endif
from android_hardware_sprd.
The flag is removed in LOS 15.1
However, you can bring it back via patching method
from android_hardware_sprd.
Oh, that's why. Does the camera recording work by now for HAL1? I don't think I have done much researches.
from android_hardware_sprd.
It will never work with prebuilt camera blobs, because O won't use gralloc source for camera, instead using native handle struct for it
from android_hardware_sprd.
Related Issues (5)
- Error when compiling HOT 5
- hwcomposer HOT 15
- Doze support for cm 13.0 HOT 2
- scx30g_v2: Codecs don't work HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android_hardware_sprd.