libstagefright_foundation.h
Go to the documentation of this file.
00001 #if !defined(libstagefright_foundation) && ANDROID_VER>=400
00002 #define libstagefright_foundation
00003 
00004 #include "libutils.h"
00005 
00006 namespace android {
00007 
00008 struct ALooper : public RefBase {
00009     typedef int32_t handler_id;
00010     ALooper();
00011     status_t start(bool runOnCallingThread = false, bool canCallJava = false, int32_t priority = 0/*PRIORITY_DEFAULT*/);
00012     void setName(const char *name);
00013     static int64_t GetNowUs();
00014 protected:
00015     virtual ~ALooper();
00016 private:
00017     char __data[sizeof(void*)*64];
00018     /*
00019     Mutex mLock;
00020     Condition mQueueChangedCondition;
00021     AString mName;
00022     List<Event> mEventQueue;
00023     sp<LooperThread> mThread;
00024     bool mRunningLocally;
00025     */
00026 };
00027 
00028 struct AMessage : public RefBase {
00029     AMessage(uint32_t what = 0, ALooper::handler_id target = 0);
00030     void setInt32(const char *name, int32_t value);
00031     void setFloat(const char *name, float value);
00032 #if (ANDROID_VER>=440)
00033     void setString(const char *name, const char *s, int len = -1);
00034 #else
00035     void setString(const char *name, const char *s, long len = -1);
00036 #endif
00037 protected:
00038     virtual ~AMessage();
00039 private:
00040         char __data[sizeof(void*)*512];
00041     /*
00042     uint32_t mWhat;
00043     ALooper::handler_id mTarget;
00044     Max16Bytes mItems[64];
00045     size_t mNumItems;
00046     */
00047 };
00048 
00049 struct AHandler : public RefBase {
00050     AHandler() : mID(0) {}
00051     sp<ALooper> looper();
00052 protected:
00053     virtual void onMessageReceived(const sp<AMessage> &msg) = 0;
00054 private:
00055     ALooper::handler_id mID;
00056 };
00057 
00058 struct ABuffer : public RefBase {
00059     ABuffer(size_t capacity);
00060     ABuffer(void *data, size_t capacity);
00061 protected:
00062     virtual ~ABuffer();
00063 private:
00064     char __data[sizeof(void*)*64];
00065     /*
00066     sp<AMessage> mFarewell;
00067     sp<AMessage> mMeta;
00068     void *mData;
00069     size_t mCapacity;
00070     size_t mRangeOffset;
00071     size_t mRangeLength;
00072     int32_t mInt32Data;
00073     bool mOwnsData;
00074     */
00075 };
00076 
00077 } //end of namespace android
00078 
00079 #endif //end of lib


dji_ronin
Author(s):
autogenerated on Sat Jun 8 2019 20:15:31