Merge remote-tracking branch 'private/mediaserver' into HEAD

This commit is contained in:
Andrew Mahone 2011-07-09 01:22:31 -04:00
commit 3b963493ab
3 changed files with 80 additions and 1 deletions

View File

@ -43,7 +43,8 @@ DEVICE_PACKAGE_OVERLAYS := device/samsung/c1-common/overlay
PRODUCT_PACKAGES := \
gps.smdkv310 \
sensors.smdkv310 \
lights.smdkv310
lights.smdkv310 \
mediaserver.smdkv310
# These are the hardware-specific configuration files
PRODUCT_COPY_FILES := \

26
mediaserver/Android.mk Normal file
View File

@ -0,0 +1,26 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
main_mediaserver.cpp
LOCAL_SHARED_LIBRARIES := \
libaudioflinger \
libcameraservice \
libmediaplayerservice \
libmediayamahaservice \
libutils \
libbinder
base := $(TOP)/frameworks/base
LOCAL_C_INCLUDES := \
$(base)/services/audioflinger \
$(base)/services/camera/libcameraservice \
$(base)/media/libmediaplayerservice
LOCAL_MODULE:= mediaserver.smdkv310
LOCAL_MODULE_STEM := mediaserver
LOCAL_MODULE_TAGS := optional
include $(BUILD_EXECUTABLE)

View File

@ -0,0 +1,52 @@
/*
**
** Copyright 2008, 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.
*/
// System headers required for setgroups, etc.
#include <sys/types.h>
#include <unistd.h>
#include <grp.h>
#include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
#include <utils/Log.h>
#include <AudioFlinger.h>
#include <CameraService.h>
#include <MediaPlayerService.h>
#include <AudioPolicyService.h>
#include <private/android_filesystem_config.h>
using namespace android;
namespace android { namespace yamaha { namespace media {
void InstantiateService(void);
} } }
int main(int argc, char** argv)
{
sp<ProcessState> proc(ProcessState::self());
sp<IServiceManager> sm = defaultServiceManager();
LOGI("ServiceManager: %p", sm.get());
yamaha::media::InstantiateService();
AudioFlinger::instantiate();
MediaPlayerService::instantiate();
CameraService::instantiate();
AudioPolicyService::instantiate();
ProcessState::self()->startThreadPool();
IPCThreadState::self()->joinThreadPool();
}