opencv/android/service/engine/jni/NativeService/ServiceMain.cpp
Alexander Smorkalov 5ffbcf1e16 MIPS arch support added to OpenCV manager;
Internal OpenCV library in OpenCV Manager support added;
Unit tests improved, platform specific tests added, MIPS related tests added;
Code refactoring done.
2012-10-02 16:21:53 +04:00

32 lines
891 B
C++

#include "EngineCommon.h"
#include "IOpenCVEngine.h"
#include "OpenCVEngine.h"
#include "IPackageManager.h"
#include "NativePackageManager.h"
#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>
using namespace android;
int main(int argc, char *argv[])
{
LOGI("OpenCVEngine native service starting");
IPackageManager* PackageManager = new NativePackageManager();
sp<IBinder> Engine = new OpenCVEngine(PackageManager);
defaultServiceManager()->addService(IOpenCVEngine::descriptor, Engine);
LOGI("OpenCVEngine native service started successfully");
ProcessState::self()->startThreadPool();
IPCThreadState::self()->joinThreadPool();
LOGI("OpenCVEngine native service finished");
delete PackageManager;
return 0;
}