M之前版本在一个进程中创建media相关所有服务
av/media/mediaserver/main_mediaserver.cpp
sp<IServiceManager> sm = defaultServiceManager(); ALOGI("ServiceManager: %p", sm.get()); AudioFlinger::instantiate(); MediaPlayerService::instantiate(); ResourceManagerService::instantiate(); CameraService::instantiate(); AudioPolicyService::instantiate(); SoundTriggerHwService::instantiate(); RadioService::instantiate(); registerExtensions(); ProcessState::self()->startThreadPool(); IPCThreadState::self()->joinThreadPool();
N版本将各个服务转移到不同进程中进行创建
media/audioserver/main_audioserver.cpp: AudioPolicyService::instantiate(); camera/cameraserver/main_cameraserver.cpp: CameraService::instantiate(); media/mediaserver/main_mediaserver.cpp: MediaPlayerService::instantiate();
原文地址:http://lindt.blog.51cto.com/9699125/1865512