Lines Matching refs:client

118     sp<Client> client;
127 client = mClient[cameraId].promote();
128 if (client != 0) {
129 if (cameraClient->asBinder() == client->getCameraClient()->asBinder()) {
130 LOG1("CameraService::connect X (pid %d) (the same client)",
132 return client;
134 LOGW("CameraService::connect X (pid %d) rejected (existing client).",
155 client = new Client(this, cameraClient, hardware, cameraId, info.facing,
157 mClient[cameraId] = client;
159 return client;
169 sp<Client> client;
179 client = mClient[i].promote();
181 if (client == 0) {
186 if (cameraClient->asBinder() == client->getCameraClient()->asBinder()) {
339 // tear down the client
389 // lock camera to this client if the the camera is unlocked
395 // returns NO_ERROR if the client already owns the camera, EBUSY otherwise
416 // connect a new client to the camera
417 status_t CameraService::Client::connect(const sp<ICameraClient>& client) {
428 if (mCameraClient != 0 && (client->asBinder() == mCameraClient->asBinder())) {
429 LOG1("Connect to the same client");
435 mCameraClient = client;
447 LOGW("different client - don't disconnect");
878 // Converts from a raw pointer to the client to a strong pointer during a
879 // hardware callback. This requires the callbacks only happen when the client
882 sp<Client> client = gCameraService->getClientById((int) user);
887 if (client == 0) return NULL;
890 if (client->mCameraService.get() != gCameraService) {
895 if (client->mHardware == 0) {
900 return client;
904 // client's callback functions, depending on the message type.
918 // NOTE: the *Callback functions grab mLock of the client before passing
930 sp<Client> client = getClientFromCookie(user);
931 if (client == 0) return;
932 if (!client->lockIfMessageWanted(msgType)) return;
937 client->handleShutter((image_rect_type *)ext1);
940 client->handleGenericNotify(msgType, ext1, ext2);
949 sp<Client> client = getClientFromCookie(user);
950 if (client == 0) return;
951 if (!client->lockIfMessageWanted(msgType)) return;
955 client->handleGenericNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);
961 client->handlePreviewData(dataPtr);
964 client->handlePostview(dataPtr);
967 client->handleRawPicture(dataPtr);
970 client->handleCompressedPicture(dataPtr);
973 client->handleGenericData(msgType, dataPtr);
982 sp<Client> client = getClientFromCookie(user);
983 if (client == 0) return;
984 if (!client->lockIfMessageWanted(msgType)) return;
988 client->handleGenericNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0);
992 client->handleGenericDataTimestamp(timestamp, msgType, dataPtr);
1063 // hold a strong pointer to the client
1066 // clear callback flags if no client or one-shot mode
1163 const sp<ICameraClient>& client, const sp<IMemoryHeap>& heap,
1196 client->dataCallback(CAMERA_MSG_PREVIEW_FRAME, frame);
1262 sp<Client> client = mClient[i].promote();
1263 if (client == 0) continue;
1267 client->getCameraClient()->asBinder().get(),
1268 client->mClientPid);
1271 client->mHardware->dump(fd, args);
1274 result.append("No camera client yet.\n");