mirror of
https://github.com/ioacademy-jikim/multimedia
synced 2026-08-11 16:33:04 +00:00
멀티미디어 예제
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_SRC_FILES:= thread.cpp
|
||||
LOCAL_MODULE := my_thread
|
||||
LOCAL_SHARED_LIBRARIES:= libcutils libutils libbinder
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#include <binder/IServiceManager.h>
|
||||
#include <utils/StrongPointer.h>
|
||||
#include <utils/Thread.h>
|
||||
#include <binder/MemoryHeapBase.h>
|
||||
#include <binder/IPCThreadState.h>
|
||||
|
||||
using namespace android;
|
||||
|
||||
|
||||
class MyThread : public Thread
|
||||
{
|
||||
public :
|
||||
bool threadLoop()
|
||||
{
|
||||
printf("MyThread::threadLoop()\n");
|
||||
sleep(1);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
sp<Thread> thread = new MyThread;
|
||||
thread->run();
|
||||
getchar();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user