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

Lines Matching refs:frame

70             data[cnt].def.frame = &my_obj->ch[MM_CAMERA_CH_RAW].raw.stream.frame.frame[idx].frame;
71 my_obj->ch[MM_CAMERA_CH_RAW].raw.stream.frame.ref_count[idx]++;
115 myq = &mystream->frame.readyq;
116 peerq = &peerstream->frame.readyq;
123 if(!peer_frame || (node->frame.frame_id > peer_frame->frame.frame_id &&
124 node->frame.frame_id >= expected_id)) {
125 /* new frame is newer than all stored peer frames. simply keep the node */
126 /* in case the frame_id wraps back, the peer frame's frame_id will be
127 larger than the new frame's frame id */
128 CDBG("%s New frame. Just enqueue it into the queue ", __func__);
132 CDBG("%s Need to find match for the frame id %d ,exped_id =%d, strm type =%d",
133 __func__, node->frame.frame_id, expected_id, mystream->stream_type);
140 peer_frame->frame.frame_id, node->frame.frame_id,
143 CDBG("%s Peer frame already matched, keep looking in the list ",
145 /* matched frame., skip */
150 if(peer_frame->frame.frame_id == node->frame.frame_id &&
151 node->frame.frame_id >= my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.expected_matching_id) {
152 /* find a match keep the frame */
155 CDBG("%s Found match, add to myq, frame_id=%d ", __func__, node->frame.frame_id);
161 node->frame.frame_id + interval;
165 if(node->frame.frame_id > peer_frame->frame.frame_id) {
166 /* the incoming frame is newer than the peer's unmatched frame.
167 drop the peer frame */
168 CDBG("%s node frame is newer, release old peer frame ",
173 notify_frame.frame = &peer_frame_tmp->frame;
188 notify_frame.frame = &peer_frame_tmp->frame;
197 /* Current frame is older than peer's unmatched frame, dont add
199 CDBG("%s node frame is older than peer's unmatched frame. "
200 "Drop the current frame.", __func__);
201 notify_frame.frame = &node->frame;
211 CDBG_ERROR("%s: stream type = %d and fd = %d, frame 0x%x is dirty"
213 mystream->fd, node->frame.frame_id);
214 notify_frame.frame = &node->frame;
224 notify_frame.frame = &peer_frame_tmp->frame;
227 "peer frame idx %d id = %d", __func__,
229 notify_frame.frame->frame_id);
233 notify_frame.frame = &peer_frame_tmp->frame;
242 /* drop the first unmatched frame */
249 /* first unmatched frame */
253 notify_frame.frame = &peer_frame_tmp->frame;
255 CDBG("%s Head Issuing buf_done on my frame idx %d id %d",
257 notify_frame.frame->frame_id);
268 notify_frame.frame = &peer_frame_tmp->frame;
270 CDBG("%s Issuing buf_done on my frame idx %d id = %d",
272 notify_frame.frame->frame_id);
287 /* drop the first unmatched frame */
291 CDBG("%s Traverse peerq list frame idx %d frame_id = %d match %d ",
292 __func__, peer_frame->idx, peer_frame->frame.frame_id,
295 /* first unmatched frame */
299 notify_frame.frame = &peer_frame_tmp->frame;
301 CDBG("%s Head Issuing buf_done on peer frame idx %d "
303 notify_frame.frame->frame_id);
314 notify_frame.frame = &peer_frame_tmp->frame;
316 CDBG("%s Issuing buf_done on peer frame idx %d id = %d",
318 notify_frame.frame->frame_id);
331 CDBG("%s Dispatching ZSL frame ", __func__);
339 my_frame = mm_camera_stream_frame_deq_no_lock(&my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.main.frame.readyq);
340 peer_frame = mm_camera_stream_frame_deq_no_lock(&my_obj->ch[MM_CAMERA_CH_PREVIEW].preview.stream.frame.readyq);
348 CDBG("%s: Dequeued frame: main frame idx: %d thumbnail "
349 "frame idx: %d", __func__, my_frame->idx, peer_frame->idx);
353 data.snapshot.main.frame = &my_frame->frame;
355 data.snapshot.thumbnail.frame = &peer_frame->frame;
407 CDBG("%s Read Preview frame %d ", __func__, idx);
414 data[cnt].def.frame = &my_obj->ch[MM_CAMERA_CH_PREVIEW].preview.stream.frame.frame[idx].frame;
415 /* Since the frame is originating here, reset the ref count to either
418 my_obj->ch[MM_CAMERA_CH_PREVIEW].preview.stream.frame.ref_count[idx] = 2;
420 my_obj->ch[MM_CAMERA_CH_PREVIEW].preview.stream.frame.ref_count[idx] = 1;
435 stream->frame.frame[idx].match = 0;
436 stream->frame.frame[idx].valid_entry = 0;
438 &my_obj->ch[MM_CAMERA_CH_PREVIEW].preview.stream.frame.frame[idx],
459 mm_camera_frame_t *frame;
460 s_q = &my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.main.frame.readyq;
466 frame = mm_camera_stream_frame_deq(s_q);
467 data[cnt].snapshot.main.frame = &frame->frame;
468 data[cnt].snapshot.main.idx = frame->idx;
469 data[cnt].snapshot.thumbnail.frame = NULL;
470 my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.main.frame.ref_count[data[cnt].snapshot.main.idx]++;
505 mm_camera_frame_t *frame;
512 s_q = &my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.main.frame.readyq;
513 t_q = &my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.thumbnail.frame.readyq;
524 frame = mm_camera_stream_frame_deq(s_q);
525 data[cnt].snapshot.main.frame = &frame->frame;
526 data[cnt].snapshot.main.idx = frame->idx;
527 frame = mm_camera_stream_frame_deq(t_q);
528 data[cnt].snapshot.thumbnail.frame = &frame->frame;
529 data[cnt].snapshot.thumbnail.idx = frame->idx;
530 my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.main.frame.ref_count[data[i].snapshot.main.idx]++;
531 my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.thumbnail.frame.ref_count[data[i].snapshot.thumbnail.idx]++;
578 q = &my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.main.frame.readyq;
584 CDBG("%s Read Snapshot frame %d ", __func__, idx);
586 my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.main.frame.ref_count[idx]++;
588 stream->frame.frame[idx].match = 0;
589 stream->frame.frame[idx].valid_entry = 0;
591 &my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.main.frame.frame[idx], stream);
594 mm_camera_stream_frame_enq(q, &stream->frame.frame[idx]);
611 q = &my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.thumbnail.frame.readyq;
617 mm_camera_stream_frame_enq(q, &stream->frame.frame[idx]);
651 data[cnt].video.main.frame = NULL;
654 data[cnt].video.video.frame = &my_obj->ch[MM_CAMERA_CH_VIDEO].video.video.
655 frame.frame[idx].frame;
656 my_obj->ch[MM_CAMERA_CH_VIDEO].video.video.frame.ref_count[idx]++;
699 mm_camera_frame_t *frame;
702 q = &my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.main.frame.readyq;
708 CDBG("%s: Enqueuing frame id: %d", __func__, idx);
709 mm_camera_stream_frame_enq(q, &stream->frame.frame[idx]);
713 CDBG("%s: Watermark: %d Queue in a frame: %d", __func__, watermark, cnt);
716 frame = mm_camera_stream_frame_deq(q);
717 if(frame) {
718 rc = mm_camera_stream_qbuf(my_obj, stream, frame->idx);
721 __func__, frame->idx, rc);
734 mm_camera_frame_t *frame;
736 q = &my_obj->ch[MM_CAMERA_CH_SNAPSHOT].snapshot.thumbnail.frame.readyq;
741 mm_camera_stream_frame_enq(q, &stream->frame.frame[idx]);
746 frame = mm_camera_stream_frame_deq(q);
747 if(frame) {
748 rc = mm_camera_stream_qbuf(my_obj, stream, frame->idx);
751 __func__, frame->idx, rc);