Home | History | Annotate | Download | only in cpp

Lines Matching defs:RS

22 #include "rs.h"
27 bool RS::gInitialized = false;
28 pthread_mutex_t RS::gInitMutex = PTHREAD_MUTEX_INITIALIZER;
30 RS::RS() {
40 RS::~RS() {
54 bool RS::init(bool forceCpu, bool synchronous) {
55 return RS::init(RS_VERSION, forceCpu, synchronous);
58 bool RS::init(int targetApi, bool forceCpu, bool synchronous) {
75 ALOGE("Failed to start RS message thread.");
86 void RS::throwError(const char *err) const {
87 ALOGE("RS CPP error: %s", err);
93 void * RS::threadProc(void *vrsc) {
94 RS *rs = static_cast<RS *>(vrsc);
98 rsContextInitToClient(rs->mContext);
99 rs->mMessageRun = true;
101 while (rs->mMessageRun) {
105 RsMessageToClientType r = rsContextPeekMessage(rs->mContext,
114 ALOGE("RS::message handler realloc error %zu", rbuf_size);
117 rsContextGetMessage(rs->mContext, rbuf, rbuf_size, &receiveLen, sizeof(receiveLen),
122 ALOGE("RS Error %s", (const char *)rbuf);
124 if(rs->mMessageFunc != NULL) {
125 rs->mErrorFunc(usrID, (const char *)rbuf);
138 if(rs->mMessageFunc != NULL) {
139 rs->mMessageFunc(usrID, rbuf, receiveLen);
146 ALOGE("RS unknown message type %i", r);
153 ALOGE("RS Message thread exiting.");
157 void RS::setErrorHandler(ErrorHandlerFunc_t func) {
161 void RS::setMessageHandler(MessageHandlerFunc_t func) {
165 void RS::finish() {