1 android_atomic_write(level, &gLogLevel);
原子写操作。
2 构造函数和onFirstRef
onFirstRef 会在构造函数运行后执行,这个是在mediaserver 这个进程启动时运行的,具体为何可查看代码。
3 ICameraServiceListener
class ICameraServiceListener : public IInterface
定义了接口,一定会有构建bp和bn,形成进程间通讯。
bn 是具体的实现, bp 则是通过binder 调用bn实现功能。
这个实现就是
onStatusChanged(Status status, int32_t cameraId)=0
BpCameraServiceListener 实现了onStatusChanged,而BnCameraServiceListener 没有实现,所以,所有从BnCameraServiceListener继承的累都必须
实现这个函数。
camera frame work v3 note,布布扣,bubuko.com
原文:http://www.cnblogs.com/soc-linux-driver/p/3683792.html