Skip to content

Commit

Permalink
Revert "compat: media: build and start camera_service on Halium 9"
Browse files Browse the repository at this point in the history
This reverts commit 50153a0.
  • Loading branch information
g7 committed Aug 30, 2020
1 parent 50153a0 commit 849ef72
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 48 deletions.
33 changes: 5 additions & 28 deletions compat/media/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,17 @@ LOCAL_SRC_FILES := \
camera_service.cpp

LOCAL_SHARED_LIBRARIES := \
libcameraservice \
libcamera_client \
libmedialogservice \
libcutils \
libmedia \
libmedia_compat_layer \
libaudioclient \
libmediaplayerservice \
libutils \
liblog \
libbinder

ifeq ($(IS_ANDROID_8),true)
LOCAL_SHARED_LIBRARIES += \
libaudioclient
else
LOCAL_SHARED_LIBRARIES += \
libcameraservice \
libcamera_client \
libmedialogservice \
libmedia \
libmediaplayerservice
endif

LOCAL_C_INCLUDES := \
frameworks/av/media/libmediaplayerservice \
frameworks/av/services/medialog \
Expand All @@ -58,10 +50,6 @@ endif

LOCAL_MODULE := camera_service

ifeq ($(IS_ANDROID_8),true)
LOCAL_INIT_RC := camera_service.rc
endif

ifdef TARGET_2ND_ARCH
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := $(if $(filter false,$(BOARD_UBUNTU_PREFER_32_BIT)),$(LOCAL_MODULE)$(TARGET_2ND_ARCH_MODULE_SUFFIX),$(LOCAL_MODULE))
Expand All @@ -77,17 +65,6 @@ include $(BUILD_EXECUTABLE)

# -------------------------------------------------

ifeq ($(IS_ANDROID_8),true)
include $(CLEAR_VARS)
LOCAL_MODULE := micshm.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_SRC_FILES := micshm.sh
include $(BUILD_PREBUILT)
endif

# -------------------------------------------------

include $(CLEAR_VARS)
include $(LOCAL_PATH)/../Android.common.mk

Expand Down
11 changes: 3 additions & 8 deletions compat/media/camera_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@
#include "media_recorder_factory.h"
#include "media_recorder.h"

#if (ANDROID_VERSION_MAJOR==5 && WANT_UBUNTU_CAMERA_HEADERS) || ANDROID_VERSION_MAJOR==9
#if ANDROID_VERSION_MAJOR==5 && WANT_UBUNTU_CAMERA_HEADERS
#include <media/camera_record_service.h>
#endif

#if ANDROID_VERSION_MAJOR<=5
#include <CameraService.h>
#endif
#include <binder/BinderService.h>

#include <signal.h>

Expand All @@ -41,7 +38,7 @@ using namespace android;
/*!
* \brief main() instantiates the MediaRecorderFactory Binder server and the CameraService
*/
int main()
int main(int argc, char** argv)
{
signal(SIGPIPE, SIG_IGN);

Expand All @@ -51,12 +48,10 @@ int main()
// for creating a new IMediaRecorder (MediaRecorder) instance over Binder
MediaRecorderFactory::instantiate();
// Enable audio recording for camera recording
#if (ANDROID_VERSION_MAJOR==5 && WANT_UBUNTU_CAMERA_HEADERS) || ANDROID_VERSION_MAJOR==9
#if ANDROID_VERSION_MAJOR==5 && WANT_UBUNTU_CAMERA_HEADERS
CameraRecordService::instantiate();
#endif
#if ANDROID_VERSION_MAJOR<=5
CameraService::instantiate();
#endif
ProcessState::self()->startThreadPool();
IPCThreadState::self()->joinThreadPool();
}
8 changes: 0 additions & 8 deletions compat/media/camera_service.rc

This file was deleted.

4 changes: 0 additions & 4 deletions compat/media/micshm.sh

This file was deleted.

0 comments on commit 849ef72

Please sign in to comment.