ResourceManagerService

ResourceManagerService (4.3) markClientForPendingRemoval reclaimResourcesFromClientsPendingRemoval

ResourceManagerService (4.3) markClientForPendingRemoval 和 reclaimResourcesFromClientsPendingRemoval markClientForPendingRemoval 标记客户端可被移除 在下一个 reclaimResourcesFromClientsPendingRemoval 被调用时,被释放。 接口: // frameworks/av/media/libmedia/aidl/android/media/IResourceManagerService.aidl /** * Mark a client for pending removal * * @param pid pid from which the client's resources will be removed. * @param clientId cl ...

ResourceManagerService(4.1) addResource

应用向 ResourceManagerService 注册资源的接口 接口 ResourceManagerService 中对 addResource 信息的保存封装类 addResource 流程 接口: // frameworks/av/media/libmedia/aidl/android/media/IResourceManagerService.aidl /** * Add a client to a process with a list of resources. * * @param pid pid of the client. * @param uid uid of the client. * @param clientId an identifier that uniquely identifies the client within the pid. * @p ...

ResourceManagerService (2)MediaResourceParcel – MediaResource 的描述信息

aidl 接口 // frameworks/av/media/libmedia/aidl/android/media/MediaResourceParcel.aidl parcelable MediaResourceParcel { // TODO: default enum value is not supported yet. // Set default enum value when b/142739329 is fixed. /** * Type of the media resource. */ MediaResourceType type;// = MediaResourceTypeEnum::kUnspecified; /** * Sub-type of the media resource. */ MediaResourceSubType subType;// = Media ...

ResourceManagerService(1) 启动时机与提供的接口

作用 管理资源(Resource), 应用添加和移除资源时通知到 Service. 资源紧张时, 将根据优先级释放资源. 释放资源通过 IResourceManagerClient.reclaimResource 通知应用进行释放 启动时机 在 mediaserver 初始化时启动,并且被添加到 Service Manager 中 1.0 在 meida server 的 main 函数中实例化对象 // frameworks/av/media/mediaserver/main_mediaserver.cpp int main(int argc __unused, char **argv __unused) { ... ResourceManagerService::instantiate();// 见 2.0 ... } ...