Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f36e3b2 authored by Chien-Yu Chen's avatar Chien-Yu Chen
Browse files

Add cameraserver process

Move camera service from mediaserver to cameraserver.

Bug: 24511454
Change-Id: I9a818c2786ade304777c44b3536f18ee9cd2a6f7
parent e564c201
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
# Copyright 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
	main_cameraserver.cpp

LOCAL_SHARED_LIBRARIES := \
	libcameraservice \
	libcutils \
	libutils \
	libbinder

LOCAL_C_INCLUDES := \
    frameworks/av/services/camera/libcameraservice \
    system/media/camera/include

LOCAL_MODULE:= cameraserver
LOCAL_32_BIT_ONLY := true

LOCAL_INIT_RC := cameraserver.rc

include $(BUILD_EXECUTABLE)
+5 −0
Original line number Diff line number Diff line
service cameraserver /system/bin/cameraserver
    class main
    user cameraserver
    group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct
    ioprio rt 4
+35 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#define LOG_TAG "cameraserver"
//#define LOG_NDEBUG 0

// from LOCAL_C_INCLUDES
#include "CameraService.h"

using namespace android;

int main(int argc __unused, char** argv __unused)
{
    signal(SIGPIPE, SIG_IGN);

    sp<ProcessState> proc(ProcessState::self());
    sp<IServiceManager> sm = defaultServiceManager();
    ALOGI("ServiceManager: %p", sm.get());
    CameraService::instantiate();
    ProcessState::self()->startThreadPool();
    IPCThreadState::self()->joinThreadPool();
}
+0 −1
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ int main(int argc __unused, char **argv __unused)
    ALOGI("ServiceManager: %p", sm.get());
    MediaPlayerService::instantiate();
    ResourceManagerService::instantiate();
    CameraService::instantiate();
    registerExtensions();
    ProcessState::self()->startThreadPool();
    IPCThreadState::self()->joinThreadPool();