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

Disable cameraserver and mediaserver #5

Open
wants to merge 1 commit into
base: halium-7.1
Choose a base branch
from

Conversation

Tofee
Copy link

@Tofee Tofee commented Jun 19, 2020

CameraService, MediaPlayerService and ResourceManagerService are already
instantiated by droidmedia.

Signed-off-by: Christophe Chapuis [email protected]
Change-Id: I53d35ee2f38d1db9c85cec2809ca5515ab0e4b9d

CameraService, MediaPlayerService and ResourceManagerService are already
instantiated by droidmedia.

Signed-off-by: Christophe Chapuis <[email protected]>
Change-Id: I53d35ee2f38d1db9c85cec2809ca5515ab0e4b9d
@Herrie82
Copy link

@ Tofee: LGTM. @peat-psuwit @fredldotme Any thoughts on this from your end?

@Tofee
Copy link
Author

Tofee commented Jun 22, 2020

I might have forgotten libcompat along the way: does it also instantiate the service separately ?

@peat-psuwit
Copy link

(lib)droidmedia does not instantiate these services. They're instantiated by minimediaservice which (confusingly) is in the same repository with droidmedia. If you disable these 2 servers, you'll need this service instead.

To use this service, you'll have to 1.) add minimediaservice to the PRODUCT_PACKAGES and 2.) add a service definition for init, both of which I don't see in the Halium 7.1 tree. Some devices may have these in the device tree, but I would prefer them to be done once in the core repositories.

And, if we're not going to run these servers anyway, consider removing them from PRODUCT_PACKAGES. The file involved is probably in build/target/product.

lib{camera,media}_compat_layer are at the same layer as libdroidmedia. That is, they do not instantiate those services and require either these servers or minimediaservice.

@Tofee
Copy link
Author

Tofee commented Jun 22, 2020

Yes, you're right, I made a shortcut here...
But is there any use-case, any distribution with Halium today, that wants to use these servers ? I've very often seen patches to add minimediaserver, miniafserver, and so on.

For libcompat I mainly saw https://github.com/libhybris/libhybris/blob/master/compat/media/camera_service.cpp#L54 but I do not know the context of usage.

It seemed like everyone would benefit from that change, but it could very well be that I forgot some use-case. It's fine if I have to patch Halium instead of integrating the change, of course.

@peat-psuwit
Copy link

peat-psuwit commented Jun 22, 2020

AFAIK, minimediaservice runs all services that mediaserver and cameraserver run (s/Resource/Fake\1/), plus a number of fake services. Thus, I guess there's no difference running either.

Edit: Actually, minimediaservice does a bit more than running services to allows unmodified CameraService to work in a strip down Android, but I've patched them out in Halium 7 tree. This means it doesn't matter for Halium 7, but as we want to stay as close to Mer as possible for Halium 9, minimediaservice is a requirement there.

@peat-psuwit peat-psuwit reopened this Jun 22, 2020
@peat-psuwit
Copy link

Oh, sorry, bad trackpad. 🤦

Following from where it cuts off, the camera_service that you linked runs services essential for camera usage in picture & video mode. Among those, it runs a service called CameraRecordService, which plugs (pretty intensively) into the audio code to provides camera recording audio. This requires a big patch to the frameworks/av which Halium doesn't carry, so you can ignore this version of camera_service.

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.

3 participants