Lines Matching refs:pme
56 mm_camera_app_obj_t *pme = NULL;
61 pme = (mm_camera_app_obj_t *)user_data;
66 dumpFrameToFile(frame, pme->dim.display_width, pme->dim.display_height,"preview", 1);
68 buf_info = (repro_src_buf_info *)mm_qcamera_queue_peek(&pme->repro_q);
72 mm_qcamera_queue_deq(&pme->repro_q);
73 pme->cam->ops->qbuf(pme->cam->camera_handle, pme->ch_id, buf_info->frame);
74 mm_stream_invalid_cache(pme, buf_info->frame);
79 if (MM_CAMERA_OK != pme->cam->ops->qbuf(pme->cam->camera_handle, pme->ch_id, frame)) {
83 mm_stream_invalid_cache(pme,frame);
92 mm_camera_app_obj_t *pme = NULL;
97 pme = (mm_camera_app_obj_t *)user_data;
102 dumpFrameToFile(frame,pme->dim.orig_video_width,pme->dim.orig_video_height,"video", 1);
104 buf_info = (repro_src_buf_info *)mm_qcamera_queue_peek(&pme->repro_q);
108 mm_qcamera_queue_deq(&pme->repro_q);
109 pme->cam->ops->qbuf(pme->cam->camera_handle, pme->ch_id, buf_info->frame);
110 mm_stream_invalid_cache(pme, buf_info->frame);
115 if(MM_CAMERA_OK != pme->cam->ops->qbuf(pme->cam->camera_handle, pme->ch_id, frame))
120 mm_stream_invalid_cache(pme,frame);
129 mm_camera_app_obj_t *pme = NULL;
134 pme = (mm_camera_app_obj_t *)user_data;
139 pme->repro_buf_info[frame->buf_idx].frame = frame;
140 pme->repro_buf_info[frame->buf_idx].ref_cnt = pme->repro_dest_num;
141 mm_qcamera_queue_enq(&pme->repro_q,
142 (void *)&pme->repro_buf_info[frame->buf_idx]);
147 rc = pme->cam->ops->reprocess(
148 pme->cam->camera_handle,
149 pme->ch_id,
150 pme->isp_repro_handle,
164 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
167 pme->mem_cam->get_buf = mm_stream_initbuf;
168 pme->mem_cam->put_buf = mm_stream_deinitbuf;
169 pme->mem_cam->user_data = pme;
173 if (MM_CAMERA_OK != (rc = pme->cam->ops->set_parm(
174 pme->cam->camera_handle,
182 mm_qcamera_queue_init(&pme->repro_q);
183 memset(pme->repro_buf_info, 0, sizeof(pme->repro_buf_info));
186 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id = pme->cam->ops->add_stream(
187 pme->cam->camera_handle,
188 pme->ch_id,
190 pme,
194 if (!pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id) {
201 pme->stream[MM_CAMERA_PREVIEW].id = pme->cam->ops->add_stream(
202 pme->cam->camera_handle,
203 pme->ch_id,
205 pme,
209 if (!pme->stream[MM_CAMERA_PREVIEW].id) {
212 pme->cam->ops->del_stream(pme->cam->camera_handle,
213 pme->ch_id,
214 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id);
215 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id = 0;
220 pme->stream[MM_CAMERA_VIDEO].id = pme->cam->ops->add_stream(
221 pme->cam->camera_handle,
222 pme->ch_id,
224 pme,
228 if (!pme->stream[MM_CAMERA_VIDEO].id) {
231 pme->cam->ops->del_stream(pme->cam->camera_handle,
232 pme->ch_id,
233 pme->stream[MM_CAMERA_PREVIEW].id);
234 pme->stream[MM_CAMERA_PREVIEW].id = 0;
235 pme->cam->ops->del_stream(pme->cam->camera_handle,
236 pme->ch_id,
237 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id);
238 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id = 0;
243 pme->isp_repro_handle = pme->cam->ops->open_repro_isp(
244 pme->cam->camera_handle,
245 pme->ch_id,
248 if (!pme->isp_repro_handle) {
251 pme->cam->ops->del_stream(pme->cam->camera_handle,
252 pme->ch_id,
253 pme->stream[MM_CAMERA_VIDEO].id);
254 pme->stream[MM_CAMERA_VIDEO].id = 0;
255 pme->cam->ops->del_stream(pme->cam->camera_handle,
256 pme->ch_id,
257 pme->stream[MM_CAMERA_PREVIEW].id);
258 pme->stream[MM_CAMERA_PREVIEW].id = 0;
259 pme->cam->ops->del_stream(pme->cam->camera_handle,
260 pme->ch_id,
261 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id);
262 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id = 0;
267 memset(&pme->repro_config, 0, sizeof(mm_camera_repro_config_data_t));
268 pme->repro_config.image_mode = MM_CAMERA_ISP_PIX_OUTPUT1;
269 if (pme->dim.display_width * pme->dim.display_height >
270 pme->dim.video_width * pme->dim.video_height) {
272 pme->repro_config.format = pme->dim.prev_format;
273 pme->repro_config.width = pme->dim.display_width;
274 pme->repro_config.height = pme->dim.display_height;
276 pme->repro_config.format = pme->dim.enc_format;
277 pme->repro_config.width = pme->dim.video_width;
278 pme->repro_config.height = pme->dim.video_height;
283 config.src.format = pme->repro_config.format;
284 config.src.image_mode = pme->repro_config.image_mode;
285 config.src.width = pme->repro_config.width;
286 config.src.height = pme->repro_config.height;
287 config.src.inst_handle = pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id;
289 pme->repro_dest_num = 0;
292 config.dest[0].format = pme->dim.prev_format;
293 config.dest[0].width = pme->dim.display_width;
294 config.dest[0].height = pme->dim.display_height;
295 config.dest[0].inst_handle = pme->stream[MM_CAMERA_PREVIEW].id;
297 config.dest[1].format = pme->dim.enc_format;
298 config.dest[1].width = pme->dim.video_width;
299 config.dest[1].height = pme->dim.video_height;
300 config.dest[1].inst_handle = pme->stream[MM_CAMERA_VIDEO].id;
302 rc = pme->cam->ops->config_repro_isp(
303 pme->cam->camera_handle,
304 pme->ch_id,
305 pme->isp_repro_handle,
310 pme->cam->ops->close_repro_isp(pme->cam->camera_handle,
311 pme->ch_id,
312 pme->isp_repro_handle);
313 pme->isp_repro_handle = 0;
314 pme->cam->ops->del_stream(pme->cam->camera_handle,
315 pme->ch_id,
316 pme->stream[MM_CAMERA_VIDEO].id);
317 pme->stream[MM_CAMERA_VIDEO].id = 0;
318 pme->cam->ops->del_stream(pme->cam->camera_handle,
319 pme->ch_id,
320 pme->stream[MM_CAMERA_PREVIEW].id);
321 pme->stream[MM_CAMERA_PREVIEW].id = 0;
322 pme->cam->ops->del_stream(pme->cam->camera_handle,
323 pme->ch_id,
324 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id);
325 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id = 0;
337 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
340 rc = pme->cam->ops->close_repro_isp(pme->cam->camera_handle,
341 pme->ch_id,
342 pme->isp_repro_handle);
343 pme->isp_repro_handle = 0;
344 mm_qcamera_queue_deinit(&pme->repro_q);
354 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
359 if (MM_CAMERA_OK != (rc = pme->cam->ops->attach_stream_to_repro_isp(
360 pme->cam->camera_handle,
361 pme->ch_id,
362 pme->isp_repro_handle,
363 pme->stream[MM_CAMERA_PREVIEW].id))) {
369 if (MM_CAMERA_OK != (rc = pme->cam->ops->start_repro_isp(pme->cam->camera_handle,
370 pme->ch_id,
371 pme->isp_repro_handle,
372 pme->stream[MM_CAMERA_PREVIEW].id))) {
374 pme->cam->ops->detach_stream_from_repro_isp(
375 pme->cam->camera_handle,
376 pme->ch_id,
377 pme->isp_repro_handle,
378 pme->stream[MM_CAMERA_PREVIEW].id);
383 pme->repro_dest_num++;
386 pme->stream[MM_CAMERA_PREVIEW].str_config.fmt.meta_header = MM_CAMEAR_META_DATA_TYPE_DEF;
387 pme->stream[MM_CAMERA_PREVIEW].str_config.fmt.fmt = pme->dim.prev_format;
388 pme->stream[MM_CAMERA_PREVIEW].str_config.fmt.width = pme->dim.display_width;
389 pme->stream[MM_CAMERA_PREVIEW].str_config.fmt.height = pme->dim.display_height;
390 pme->stream[MM_CAMERA_PREVIEW].str_config.need_stream_on = 1;
391 pme->stream[MM_CAMERA_PREVIEW].str_config.num_of_bufs = PREVIEW_BUF_NUM;
392 if (MM_CAMERA_OK != (rc = pme->cam->ops->config_stream(pme->cam->camera_handle,
393 pme->ch_id,
394 pme->stream[MM_CAMERA_PREVIEW].id,
395 &pme->stream[MM_CAMERA_PREVIEW].str_config))) {
397 pme->cam->ops->stop_repro_isp(
398 pme->cam->camera_handle,
399 pme->ch_id,
400 pme->isp_repro_handle,
401 pme->stream[MM_CAMERA_PREVIEW].id);
402 pme->cam->ops->detach_stream_from_repro_isp(
403 pme->cam->camera_handle,
404 pme->ch_id,
405 pme->isp_repro_handle,
406 pme->stream[MM_CAMERA_PREVIEW].id);
407 pme->repro_dest_num--;
410 stream[0] = pme->stream[MM_CAMERA_PREVIEW].id;
411 if (MM_CAMERA_OK != (rc = pme->cam->ops->start_streams(pme->cam->camera_handle,
412 pme->ch_id,
416 pme->cam->ops->stop_repro_isp(
417 pme->cam->camera_handle,
418 pme->ch_id,
419 pme->isp_repro_handle,
420 pme->stream[MM_CAMERA_PREVIEW].id);
421 pme->cam->ops->detach_stream_from_repro_isp(
422 pme->cam->camera_handle,
423 pme->ch_id,
424 pme->isp_repro_handle,
425 pme->stream[MM_CAMERA_PREVIEW].id);
426 pme->repro_dest_num--;
431 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].str_config.fmt.meta_header = MM_CAMEAR_META_DATA_TYPE_DEF;
432 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].str_config.fmt.fmt = pme->repro_config.format;
433 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].str_config.fmt.width = pme->repro_config.width;
434 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].str_config.fmt.height = pme->repro_config.height;
435 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].str_config.need_stream_on = 1;
436 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].str_config.num_of_bufs = ISP_PIX_BUF_NUM;
437 if (MM_CAMERA_OK != (rc = pme->cam->ops->config_stream(pme->cam->camera_handle,
438 pme->ch_id,
439 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id,
440 &pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].str_config))) {
442 pme->cam->ops->stop_repro_isp(
443 pme->cam->camera_handle,
444 pme->ch_id,
445 pme->isp_repro_handle,
446 pme->stream[MM_CAMERA_PREVIEW].id);
447 pme->cam->ops->detach_stream_from_repro_isp(
448 pme->cam->camera_handle,
449 pme->ch_id,
450 pme->isp_repro_handle,
451 pme->stream[MM_CAMERA_PREVIEW].id);
452 pme->repro_dest_num--;
454 stream[0] = pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id;
455 if (MM_CAMERA_OK != (rc = pme->cam->ops->start_streams(pme->cam->camera_handle,
456 pme->ch_id,
460 pme->cam->ops->stop_repro_isp(
461 pme->cam->camera_handle,
462 pme->ch_id,
463 pme->isp_repro_handle,
464 pme->stream[MM_CAMERA_PREVIEW].id);
465 pme->cam->ops->detach_stream_from_repro_isp(
466 pme->cam->camera_handle,
467 pme->ch_id,
468 pme->isp_repro_handle,
469 pme->stream[MM_CAMERA_PREVIEW].id);
470 pme->repro_dest_num--;
483 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
488 stream[0] = pme->stream[MM_CAMERA_PREVIEW].id;
489 if (MM_CAMERA_OK != (rc = pme->cam->ops->stop_streams(pme->cam->camera_handle,
490 pme->ch_id,
496 if (MM_CAMERA_OK != (rc = pme->cam->ops->del_stream(pme->cam->camera_handle,
497 pme->ch_id,
498 pme->stream[MM_CAMERA_PREVIEW].id))) {
503 if (MM_CAMERA_OK != (rc = pme->cam->ops->stop_repro_isp(pme->cam->camera_handle,
504 pme->ch_id,
505 pme->isp_repro_handle,
506 pme->stream[MM_CAMERA_PREVIEW].id))) {
511 pme->repro_dest_num--;
514 if (MM_CAMERA_OK != (rc = pme->cam->ops->detach_stream_from_repro_isp(
515 pme->cam->camera_handle,
516 pme->ch_id,
517 pme->isp_repro_handle,
518 pme->stream[MM_CAMERA_PREVIEW].id))) {
523 stream[0] = pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id;
524 if (MM_CAMERA_OK != (rc = pme->cam->ops->stop_streams(pme->cam->camera_handle,
525 pme->ch_id,
531 if (MM_CAMERA_OK != (rc = pme->cam->ops->del_stream(pme->cam->camera_handle,
532 pme->ch_id,
533 pme->stream[MM_CAMERA_ISP_PIX_OUTPUT1].id))) {
546 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
551 if (MM_CAMERA_OK != (rc = pme->cam->ops->attach_stream_to_repro_isp(
552 pme->cam->camera_handle,
553 pme->ch_id,
554 pme->isp_repro_handle,
555 pme->stream[MM_CAMERA_VIDEO].id))) {
561 if (MM_CAMERA_OK != (rc = pme->cam->ops->start_repro_isp(pme->cam->camera_handle,
562 pme->ch_id,
563 pme->isp_repro_handle,
564 pme->stream[MM_CAMERA_VIDEO].id))) {
566 pme->cam->ops->detach_stream_from_repro_isp(
567 pme->cam->camera_handle,
568 pme->ch_id,
569 pme->isp_repro_handle,
570 pme->stream[MM_CAMERA_VIDEO].id);
575 pme->repro_dest_num++;
578 pme->stream[MM_CAMERA_VIDEO].str_config.fmt.meta_header = MM_CAMEAR_META_DATA_TYPE_DEF;
579 pme->stream[MM_CAMERA_VIDEO].str_config.fmt.fmt = pme->dim.enc_format;
580 pme->stream[MM_CAMERA_VIDEO].str_config.fmt.width = pme->dim.video_width;
581 pme->stream[MM_CAMERA_VIDEO].str_config.fmt.height = pme->dim.video_height;
582 pme->stream[MM_CAMERA_VIDEO].str_config.need_stream_on = 1;
583 pme->stream[MM_CAMERA_VIDEO].str_config.num_of_bufs = VIDEO_BUF_NUM;
584 if (MM_CAMERA_OK != (rc = pme->cam->ops->config_stream(pme->cam->camera_handle,
585 pme->ch_id,
586 pme->stream[MM_CAMERA_VIDEO].id,
587 &pme->stream[MM_CAMERA_VIDEO].str_config))) {
589 pme->cam->ops->stop_repro_isp(
590 pme->cam->camera_handle,
591 pme->ch_id,
592 pme->isp_repro_handle,
593 pme->stream[MM_CAMERA_VIDEO].id);
594 pme->cam->ops->detach_stream_from_repro_isp(
595 pme->cam->camera_handle,
596 pme->ch_id,
597 pme->isp_repro_handle,
598 pme->stream[MM_CAMERA_VIDEO].id);
599 pme->repro_dest_num--;
602 stream[0] = pme->stream[MM_CAMERA_VIDEO].id;
603 if (MM_CAMERA_OK != (rc = pme->cam->ops->start_streams(pme->cam->camera_handle,
604 pme->ch_id,
608 pme->cam->ops->stop_repro_isp(
609 pme->cam->camera_handle,
610 pme->ch_id,
611 pme->isp_repro_handle,
612 pme->stream[MM_CAMERA_VIDEO].id);
613 pme->cam->ops->detach_stream_from_repro_isp(
614 pme->cam->camera_handle,
615 pme->ch_id,
616 pme->isp_repro_handle,
617 pme->stream[MM_CAMERA_VIDEO].id);
618 pme->repro_dest_num--;
631 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
636 stream[0] = pme->stream[MM_CAMERA_VIDEO].id;
637 if (MM_CAMERA_OK != (rc = pme->cam->ops->stop_streams(pme->cam->camera_handle,
638 pme->ch_id,
644 if (MM_CAMERA_OK != (rc = pme->cam->ops->del_stream(pme->cam->camera_handle,
645 pme->ch_id,
646 pme->stream[MM_CAMERA_VIDEO].id))) {
651 if (MM_CAMERA_OK != (rc = pme->cam->ops->stop_repro_isp(pme->cam->camera_handle,
652 pme->ch_id,
653 pme->isp_repro_handle,
654 pme->stream[MM_CAMERA_VIDEO].id))) {
659 pme->repro_dest_num--;
662 if (MM_CAMERA_OK != (rc = pme->cam->ops->detach_stream_from_repro_isp(
663 pme->cam->camera_handle,
664 pme->ch_id,
665 pme->isp_repro_handle,
666 pme->stream[MM_CAMERA_VIDEO].id))) {