Lines Matching defs:handler
110 CommandHandler* handler = NULL;
112 handler = reinterpret_cast<CommandHandler*>(mDownloadHandler.get());
114 handler = reinterpret_cast<CommandHandler*>(mPlaybackHandler.get());
116 handler = reinterpret_cast<CommandHandler*>(mRecordingHandler.get());
118 handler = reinterpret_cast<CommandHandler*>(mDeviceInfoHandler.get());
121 if (handler != NULL) {
122 param = &(handler->getParam());
125 if (handler != NULL) {
126 LOGD("handler present. Notify client");
127 android::Mutex::Autolock lock(handler->mStateLock);
128 if (handler->mNotifyOnReply) {
129 handler->mNotifyOnReply = false;
130 handler->mResult = result;
131 handler->mClientWait.post();
133 handler->mActive = false;
165 CommandHandler* handler = reinterpret_cast<CommandHandler*>(commandHandler.get());
166 handler->mStateLock.lock();
167 if(!handler->mActive) {
168 handler->mStateLock.unlock();
171 int runTime = handler->getParam().mBuffer->getSize() /
172 (handler->getParam().mStereo ? 4 : 2) * 1000 / handler->getParam().mSamplingF;
173 handler->mNotifyOnReply = true;
174 handler->mStateLock.unlock();
181 CommandHandler* handler = reinterpret_cast<CommandHandler*>(commandHandler.get());
182 handler->mStateLock.lock();
183 if (!handler->mActive) {
184 handler->mStateLock.unlock();
187 handler->mActive = false;
188 handler->mNotifyOnReply = false;
189 handler->mStateLock.unlock();
198 CommandHandler* handler = reinterpret_cast<CommandHandler*>(mDownloadHandler.get());
201 handler->mStateLock.lock();
202 handler->getParam().mId = id;
203 handler->getParam().mBuffer = buffer;
204 handler->mNotifyOnReply = true;
205 handler->mStateLock.unlock();
217 return handler->mResult;
234 CommandHandler* handler = reinterpret_cast<CommandHandler*>(mPlaybackHandler.get());
235 handler->mStateLock.lock();
236 if (handler->mActive) {
238 handler->mStateLock.unlock();
248 handler->mActive = true;
249 handler->getParam().mStereo = stereo;
250 handler->getParam().mSamplingF = samplingF;
251 handler->getParam().mMode = mode;
252 handler->getParam().mVolume = volume;
253 handler->getParam().mId = id;
255 handler->getParam().mBuffer = it->second;
256 handler->getParam().mNumberRepetition = numberRepetition;
257 handler->mStateLock.unlock();
263 return handler->mResult;
279 CommandHandler* handler = reinterpret_cast<CommandHandler*>(mRecordingHandler.get());
280 handler->mStateLock.lock();
281 if (handler->mActive) {
283 handler->mStateLock.unlock();
286 handler->mActive = true;
287 handler->getParam().mStereo = stereo;
288 handler->getParam().mSamplingF = samplingF;
289 handler->getParam().mMode = mode;
290 handler->getParam().mVolume = volume;
291 handler->getParam().mBuffer = buffer;
292 handler->mStateLock.unlock();
298 return handler->mResult;
313 CommandHandler* handler = reinterpret_cast<CommandHandler*>(mDeviceInfoHandler.get());
314 handler->mStateLock.lock();
315 handler->mNotifyOnReply = true;
316 handler->getParam().mExtra = &data;
317 handler->mStateLock.unlock();
325 return handler->mResult;