diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /media/libstagefright/stubs/include | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/libstagefright/stubs/include')
5 files changed, 102 insertions, 0 deletions
diff --git a/media/libstagefright/stubs/include/cutils/atomic.h b/media/libstagefright/stubs/include/cutils/atomic.h new file mode 100644 index 000000000..e22550177 --- /dev/null +++ b/media/libstagefright/stubs/include/cutils/atomic.h @@ -0,0 +1,53 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +#ifndef ATOMIC_H_ +#define ATOMIC_H_ + +#include <stdint.h> + +// This implements the atomic primatives without any atomicity guarantees. This +// makes the totally unsafe. However we're only using the demuxer in a single +// thread. + +namespace stagefright { +static inline int32_t +android_atomic_dec(volatile int32_t* aValue) +{ + return (*aValue)--; +} + +static inline int32_t +android_atomic_inc(volatile int32_t* aValue) +{ + return (*aValue)++; +} + +static inline int32_t +android_atomic_or(int32_t aModifier, volatile int32_t* aValue) +{ + int32_t ret = *aValue; + *aValue |= aModifier; + return ret; +} + +static inline int32_t +android_atomic_add(int32_t aModifier, volatile int32_t* aValue) +{ + int32_t ret = *aValue; + *aValue += aModifier; + return ret; +} + +static inline int32_t +android_atomic_cmpxchg(int32_t aOld, int32_t aNew, volatile int32_t* aValue) +{ + if (*aValue == aOld) + { + return *aValue = aNew; + } + return aOld; +} +} + +#endif diff --git a/media/libstagefright/stubs/include/media/stagefright/foundation/AMessage.h b/media/libstagefright/stubs/include/media/stagefright/foundation/AMessage.h new file mode 100644 index 000000000..f22439dd9 --- /dev/null +++ b/media/libstagefright/stubs/include/media/stagefright/foundation/AMessage.h @@ -0,0 +1,18 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +#ifndef A_MESSAGE_H_ +#define A_MESSAGE_H_ + +#include <utils/RefBase.h> + +namespace stagefright { + +struct AMessage : public RefBase { +public: + void post() {} +}; + +} + +#endif diff --git a/media/libstagefright/stubs/include/sys/atomics.h b/media/libstagefright/stubs/include/sys/atomics.h new file mode 100644 index 000000000..975f4f7d9 --- /dev/null +++ b/media/libstagefright/stubs/include/sys/atomics.h @@ -0,0 +1,10 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +#ifndef ATOMICS_H_ +#define ATOMICS_H_ + +#define __atomic_dec android_atomic_dec +#define __atomic_inc android_atomic_inc + +#endif diff --git a/media/libstagefright/stubs/include/ui/GraphicBuffer.h b/media/libstagefright/stubs/include/ui/GraphicBuffer.h new file mode 100644 index 000000000..47fa5dbad --- /dev/null +++ b/media/libstagefright/stubs/include/ui/GraphicBuffer.h @@ -0,0 +1,16 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +#ifndef GRAPHIC_BUFFER_H_ +#define GRAPHIC_BUFFER_H_ + +#include <utils/RefBase.h> + +namespace stagefright { + +class GraphicBuffer : public RefBase { +}; + +} + +#endif diff --git a/media/libstagefright/stubs/include/utils/threads.h b/media/libstagefright/stubs/include/utils/threads.h new file mode 100644 index 000000000..09b9bcb2e --- /dev/null +++ b/media/libstagefright/stubs/include/utils/threads.h @@ -0,0 +1,5 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +#include <utils/Condition.h> +#include <utils/Mutex.h> |