Lines Matching refs:index

92  *   @index   : index of the buffer
100 int QCameraMemory::cacheOpsInternal(int index, unsigned int cmd, void *vaddr)
112 if (index >= mBufferCount) {
113 ALOGE("%s: index %d out of bound [0, %d)", __func__, index, mBufferCount);
120 cache_inv_data.fd = mMemInfo[index].fd;
121 cache_inv_data.handle = mMemInfo[index].handle;
122 cache_inv_data.length = mMemInfo[index].size;
129 mMemInfo[index].main_ion_fd);
130 ret = ioctl(mMemInfo[index].main_ion_fd, ION_IOC_CUSTOM, &custom_data);
143 * @index : index of the buffer
147 int QCameraMemory::getFd(int index) const
149 if (index >= mBufferCount)
152 return mMemInfo[index].fd;
161 * @index : index of the buffer
165 int QCameraMemory::getSize(int index) const
167 if (index >= mBufferCount)
170 return (int)mMemInfo[index].size;
195 * @index : [input] index of the buffer
200 mm_camera_buf_def_t &bufDef, int index) const
206 bufDef.fd = mMemInfo[index].fd;
210 bufDef.buffer = getPtr(index);
211 bufDef.buf_idx = index;
215 bufDef.planes[0].m.userptr = mMemInfo[index].fd;
414 * @index : index of the buffer
418 void *QCameraHeapMemory::getPtr(int index) const
420 if (index >= mBufferCount) {
421 ALOGE("index out of bound");
424 return mPtr[index];
492 * @index : index of the buffer
499 int QCameraHeapMemory::cacheOps(int index, unsigned int cmd)
501 if (index >= mBufferCount)
503 return cacheOpsInternal(index, cmd, mPtr[index]);
529 * @index : buffer index
536 int /*index*/, bool /*metadata*/) const
544 * DESCRIPTION: query buffer index by opaque ptr
550 * RETURN : buffer index if match found,
556 int index = -1;
562 index = i;
566 return index;
655 * @index : index of the buffer
662 int QCameraStreamMemory::cacheOps(int index, unsigned int cmd)
664 if (index >= mBufferCount)
666 return cacheOpsInternal(index, cmd, mCameraMemory[index]->data);
694 * @index : buffer index
700 camera_memory_t *QCameraStreamMemory::getMemory(int index, bool metadata) const
702 if (index >= mBufferCount || metadata)
704 return mCameraMemory[index];
710 * DESCRIPTION: query buffer index by opaque ptr
716 * RETURN : buffer index if match found,
722 int index = -1;
728 index = i;
732 return index;
741 * @index : index of the buffer
745 void *QCameraStreamMemory::getPtr(int index) const
747 if (index >= mBufferCount) {
748 ALOGE("index out of bound");
751 return mCameraMemory[index]->data;
853 * @index : buffer index
859 camera_memory_t *QCameraVideoMemory::getMemory(int index, bool metadata) const
861 if (index >= mBufferCount)
864 return mMetadata[index];
866 return mCameraMemory[index];
872 * DESCRIPTION: query buffer index by opaque ptr
878 * RETURN : buffer index if match found,
884 int index = -1;
888 index = i;
893 index = i;
898 return index;
968 * @index : index of preview frame
974 int QCameraGrallocMemory::displayBuffer(int index)
979 if (BUFFER_NOT_OWNED == mLocalFlag[index]) {
984 err = mWindow->enqueue_buffer(mWindow, (buffer_handle_t *)mBufferHandle[index]);
988 ALOGV("%s: enqueue_buffer hdl=%p", __func__, *mBufferHandle[index]);
989 mLocalFlag[index] = BUFFER_NOT_OWNED;
1229 * @index : index of the buffer
1236 int QCameraGrallocMemory::cacheOps(int index, unsigned int cmd)
1238 if (index >= mBufferCount)
1240 return cacheOpsInternal(index, cmd, mCameraMemory[index]->data);
1271 * @index : buffer index
1277 camera_memory_t *QCameraGrallocMemory::getMemory(int index, bool metadata) const
1279 if (index >= mBufferCount || metadata)
1281 return mCameraMemory[index];
1287 * DESCRIPTION: query buffer index by opaque ptr
1293 * RETURN : buffer index if match found,
1299 int index = -1;
1305 index = i;
1309 return index;
1318 * @index : index of the buffer
1322 void *QCameraGrallocMemory::getPtr(int index) const
1324 if (index >= mBufferCount) {
1325 ALOGE("index out of bound");
1328 return mCameraMemory[index]->data;