Android Camera Learning: How much does the flower fall to know

Source: Internet
Author: User

My knowledge of Android camera will be written all over again, gradually perfecting the camera network in the brain.

2 separate processes for 1.Android camera

Android Camera is the C/s architecture has been said to be rotten, but I still want to write down this article, because I often have a short head, on the client side do some useless labor hope to solve the problem, then this hope is really wishful thinking.

Core nature Needless to say, is the service end. The service process is always responsible for receiving the data from the underlying camera drive and then passing it to surface for display.

The client side is not eating ganfan. The client process does not have any real camera data, but the service provides a rich interface for it to easily obtain the address of the camera data and then process the data.

Finally make up a nonsense, client and service is through binder communication.

2.Camera and Icamera

Just beginning to contact camera, suffering from camera work flow, when I looked at the camera, press CTRL + "jump to jump, jump to Icamera appear, immediately the heart only a feeling, this is not a pit dad!"

In fact, calm down, careful analysis, is not very pit dad >_< ...

Icamera,icameraclient,icameraservice all belong to the client side of the Android Camera, whose task is to communicate with the service end of the Android Camera.

Well... To make this figure, please note that we have been active on the client side of the Android Camera.

According to the process of the above diagram, all the way bang bang down, to the Camera.cpp, finally and Icamera on the relationship. For upper-level applications, Camera.cpp is the most direct function invocation and implementation. Inherits from the Icameraclient class, a typical client-side interface instance.

Do not be afraid dizzy, the fact is such: sp<camera> Camera = Camera::connect ();

The camera class invokes a function by sp<icamera> the Mcamera object.

The effect that is achieved is as if it were directly calling Cameraservice::client's mclient functions.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.