Home | History | Annotate | Download | only in mm-camera-interface

Lines Matching refs:frame

155 void mm_camera_stream_deinit_frame(mm_camera_stream_frame_t *frame)
157 pthread_mutex_destroy(&frame->mutex);
158 mm_camera_stream_deinit_q(&frame->readyq);
159 memset(frame, 0, sizeof(mm_camera_stream_frame_t));
162 void mm_camera_stream_init_frame(mm_camera_stream_frame_t *frame)
164 memset(frame, 0, sizeof(mm_camera_stream_frame_t));
165 pthread_mutex_init(&frame->mutex, NULL);
166 mm_camera_stream_init_q(&frame->readyq);
171 mm_camera_stream_deinit_frame(&stream->frame);
214 stream->frame.frame[idx].planes[i].reserved[0] =
216 stream->frame.frame[idx].planes[i].data_offset =
220 stream->frame.frame[idx].frame.frame_id = vb.sequence;
221 stream->frame.frame[idx].frame.ts.tv_sec = vb.timestamp.tv_sec;
222 stream->frame.frame[idx].frame.ts.tv_nsec = vb.timestamp.tv_usec * 1000;
224 CDBG("%s:type=%d,frame idx=%d, frame_id %d\n", __func__,
396 buffer.m.planes = &(stream->frame.frame[idx].planes[0]);
397 buffer.length = stream->frame.frame[idx].num_planes;
402 CDBG("%s:fd=%d,type=%d,frame idx=%d,num planes %d\n", __func__,
479 stream->frame.frame_len = mm_camera_get_msm_frame_len(stream->cam_fmt,
484 if(stream->frame.frame_len == 0) {
485 CDBG_ERROR("%s:incorrect frame size = %d\n", __func__, stream->frame.frame_len);
489 stream->frame.num_frame = vbuf->num;
490 bufreq.count = stream->frame.num_frame;
506 vbuf->buf.mp[i].idx = i; /* remember the index to stream frame if first time qbuf */
507 memcpy(&stream->frame.frame[i].frame, &(vbuf->buf.mp[i].frame),
508 sizeof(vbuf->buf.mp[i].frame));
509 stream->frame.frame[i].idx = i;
510 stream->frame.frame[i].num_planes = vbuf->buf.mp[i].num_planes;
512 stream->frame.frame[i].planes[j] = vbuf->buf.mp[i].planes[j];
516 stream->frame.frame_offset[i] = vbuf->buf.mp[i].frame_offset;
518 stream->frame.frame_offset[i] = 0;
522 rc = mm_camera_stream_qbuf(my_obj, stream, stream->frameframe[i].idx);
527 stream->frame.ref_count[i] = 0;
529 stream->frame.ref_count[i] = 1;
531 stream->frame.reg_flag[i] = vbuf->no_enqueue_flag[i];
532 CDBG("%s: stream_fd = %d, frame_fd = %d, frame ID = %d, offset = %d, reg_flag = %d, ref_cnt = %d\n",
533 __func__, stream->fd, stream->frame.frame[i].frame.fd,
534 i, stream->frame.frame_offset[i], stream->frame.reg_flag[i], stream->frame.ref_count[i]);
536 stream->frame.qbuf = 1;
555 mm_stream_frame_flash_q(&stream->frame.readyq);
556 memset(stream->frame.ref_count,0,(stream->frame.num_frame * sizeof(int8_t)));
557 stream->frame.qbuf = 0;
585 mm_camera_stream_init_frame(&stream->frame);
695 mm_camera_notify_frame_t *frame)
698 pthread_mutex_lock(&stream->frame.mutex);
700 if(stream->frame.ref_count[frame->idx] == 0) {
701 rc = mm_camera_stream_qbuf(my_obj, stream, frame->idx);
703 __func__, frame->idx, stream->frame.ref_count[frame->idx], stream->stream_type);
706 stream->frame.ref_count[frame->idx]--;
707 if(0 == stream->frame.ref_count[frame->idx]) {
708 CDBG("<DEBUG> : Buf done for buffer:%p:%d",stream,frame->idx);
709 rc = mm_camera_stream_qbuf(my_obj, stream, frame->idx);
712 __func__, frame->idx, rc);
714 CDBG("<DEBUG> : Still ref count pending count :%d",stream->frame.ref_count[frame->idx]);
715 CDBG("<DEBUG> : for buffer:%p:%d, stream type=%d",stream,frame->idx, stream->stream_type);
720 stream->frame.ref_count[frame->idx]--;
721 if(stream->frame.ref_count[frame->idx] == 0) {
722 CDBG("%s: Queue the buffer (idx=%d) count=%d frame id = %d\n",
723 __func__, frame->idx, stream->frame.ref_count[frame->idx],
724 frame->frame->frame_id);
725 rc = mm_camera_stream_qbuf(my_obj, stream, frame->idx);
728 frame->idx, rc);
729 } else if(stream->frame.ref_count[frame->idx] == 1) {
730 ALOGE("<DEBUG> : Buf done for buffer:%p:%d",stream,frame->idx);
731 rc = mm_camera_stream_qbuf(my_obj, stream, frame->idx);
734 __func__, frame->idx, rc);
737 __func__, frame->idx, stream->frame.ref_count[frame->idx]);
741 pthread_mutex_unlock(&stream->frame.mutex);
768 mm_camera_frame_t *frame;
769 if(stream->frame.qbuf == 0) {
771 for(i = 0; i < stream->frame.num_frame; i++) {
772 if (!stream->frame.reg_flag[i]) {
774 stream->frame.frame[i].idx);
781 stream->frame.ref_count[i] = 0;
783 stream->frame.qbuf = 1;
831 stream->frame.qbuf = 0;