/* * Copyright (c) 2026 Amlogic, Inc. All rights reserved. * * This source code is subject to the terms and conditions defined in the * file 'LICENSE' which is part of this source code package. * * Description: Aml MP Service Main Entry */ #include #include #include #include "AmlMpPlayerService.h" using namespace com::amlogic::aml_mp::player; std::shared_ptr gSelfService; int main() { ALOGI("Starting Aml MP Service..."); const std::string serviceName = std::string(IAmlMpPlayer::descriptor) + "/default"; auto playerService = ndk::SharedRefBase::make(); gSelfService = playerService; ndk::SpAIBinder binder = playerService->asBinder(); binder_status_t status = AServiceManager_addService(binder.get(), serviceName.c_str()); if (status != STATUS_OK) { return -1; } ABinderProcess_setThreadPoolMaxThreadCount(32); ALOGI("Binder thread pool set max thread "); ABinderProcess_joinThreadPool(); ALOGI("Aml MP Service started successfully"); return 0; }