Lines Matching refs:mPreviewMemory
109 mHalCamCtrl->mPreviewMemory.buffer_count = kPreviewBufferCount + numMinUndequeuedBufs;;
110 err = mPreviewWindow->set_buffer_count(mPreviewWindow, mHalCamCtrl->mPreviewMemory.buffer_count );
134 for (int cnt = 0; cnt < mHalCamCtrl->mPreviewMemory.buffer_count; cnt++) {
137 &mHalCamCtrl->mPreviewMemory.buffer_handle[cnt],
138 &mHalCamCtrl->mPreviewMemory.stride[cnt]);
141 mHalCamCtrl->mPreviewMemory.buffer_handle[cnt]);
145 if (GENLOCK_NO_ERROR != genlock_lock_buffer((native_handle_t *)(*mHalCamCtrl->mPreviewMemory.buffer_handle[cnt]),
148 mHalCamCtrl->mPreviewMemory.local_flag[cnt] = BUFFER_UNLOCKED;
152 mHalCamCtrl->mPreviewMemory.local_flag[cnt] = BUFFER_LOCKED;
156 ALOGE("%s: dequeue buf: %u\n", __func__, (unsigned int)mHalCamCtrl->mPreviewMemory.buffer_handle[cnt]);
164 if (BUFFER_LOCKED == mHalCamCtrl->mPreviewMemory.local_flag[i]) {
166 (*(mHalCamCtrl->mPreviewMemory.buffer_handle[i])))) {
173 mHalCamCtrl->mPreviewMemory.buffer_handle[i]);
174 mHalCamCtrl->mPreviewMemory.buffer_handle[i] = NULL;
175 mHalCamCtrl->mPreviewMemory.local_flag[i] = BUFFER_UNLOCKED;
179 mHalCamCtrl->mPreviewMemory.private_buffer_handle[cnt] =
180 (struct private_handle_t *)(*mHalCamCtrl->mPreviewMemory.buffer_handle[cnt]);
181 mHalCamCtrl->mPreviewMemory.camera_memory[cnt] =
182 mHalCamCtrl->mGetMemory(mHalCamCtrl->mPreviewMemory.private_buffer_handle[cnt]->fd,
183 mHalCamCtrl->mPreviewMemory.private_buffer_handle[cnt]->size, 1, (void *)this);
185 cnt, mHalCamCtrl->mPreviewMemory.private_buffer_handle[cnt]->fd,
186 mHalCamCtrl->mPreviewMemory.private_buffer_handle[cnt]->size,
187 mHalCamCtrl->mPreviewMemory.private_buffer_handle[cnt]->offset);
210 for (int cnt = 0; cnt < mHalCamCtrl->mPreviewMemory.buffer_count; cnt++) {
211 mHalCamCtrl->mPreviewMemory.camera_memory[cnt]->release(mHalCamCtrl->mPreviewMemory.camera_memory[cnt]);
212 if (BUFFER_LOCKED == mHalCamCtrl->mPreviewMemory.local_flag[cnt]) {
215 (*(mHalCamCtrl->mPreviewMemory.buffer_handle[cnt])))) {
220 mHalCamCtrl->mPreviewMemory.local_flag[cnt] = BUFFER_UNLOCKED;
223 err = mPreviewWindow->cancel_buffer(mPreviewWindow, mHalCamCtrl->mPreviewMemory.buffer_handle[cnt]);
226 memset(&mHalCamCtrl->mPreviewMemory, 0, sizeof(mHalCamCtrl->mPreviewMemory));
363 memset(&mHalCamCtrl->mPreviewMemory, 0, sizeof(mHalCamCtrl->mPreviewMemory));
391 this->mDisplayStreamBuf.num = mHalCamCtrl->mPreviewMemory.buffer_count;
408 if (mHalCamCtrl->mPreviewMemory.private_buffer_handle[i] == NULL)
410 mDisplayStreamBuf.frame[i].fd = mHalCamCtrl->mPreviewMemory.private_buffer_handle[i]->fd;
414 mHalCamCtrl->mPreviewMemory.addr_offset[i] =
415 mHalCamCtrl->mPreviewMemory.private_buffer_handle[i]->offset;
417 (long unsigned int)mHalCamCtrl->mPreviewMemory.camera_memory[i]->data;
422 mHalCamCtrl->mPreviewMemory.private_buffer_handle[i]->size,
425 mHalCamCtrl->mPreviewMemory.addr_offset[i],
430 mDisplayBuf.preview.buf.mp[i].frame_offset = mHalCamCtrl->mPreviewMemory.addr_offset[i];
551 mHalCamCtrl->mPreviewMemory.buffer_handle[frame->def.idx]);
553 if (BUFFER_LOCKED == mHalCamCtrl->mPreviewMemory.local_flag[frame->def.idx]) {
555 (*mHalCamCtrl->mPreviewMemory.buffer_handle[frame->def.idx]))) {
560 mHalCamCtrl->mPreviewMemory.local_flag[frame->def.idx] = BUFFER_UNLOCKED;
568 (buffer_handle_t *)mHalCamCtrl->mPreviewMemory.buffer_handle[frame->def.idx]);
585 for(int i = 0; i < mHalCamCtrl->mPreviewMemory.buffer_count; i++) {
586 ALOGD("h1: %p h2: %p\n", mHalCamCtrl->mPreviewMemory.buffer_handle[i], buffer_handle);
587 if(mHalCamCtrl->mPreviewMemory.buffer_handle[i] == buffer_handle) {
589 mHalCamCtrl->mPreviewMemory.local_flag[i] = BUFFER_LOCKED;
614 data = mHalCamCtrl->mPreviewMemory.camera_memory[frame->def.idx];//mPreviewHeap->mBuffers[frame->def.idx];
640 mHalCamCtrl->mPreviewMemory.camera_memory[frame->def.idx],