Lines Matching refs:cam_id
107 static int mm_app_set_thumbnail_fmt(int cam_id,mm_camera_image_fmt_t *fmt)
110 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
120 int mm_app_set_snapshot_fmt(int cam_id,mm_camera_image_fmt_t *fmt)
124 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
133 int mm_app_set_live_snapshot_fmt(int cam_id,mm_camera_image_fmt_t *fmt)
136 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
145 int mm_app_set_raw_snapshot_fmt(int cam_id)
150 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
170 int mm_app_prepare_raw_snapshot_buf(int cam_id)
175 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
250 static int mm_app_unprepare_raw_snapshot_buf(int cam_id)
255 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
491 static int mm_app_reg_snapshot_data_cb(int cam_id, int is_reg)
495 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
527 static int mm_app_reg_raw_snapshot_data_cb(int cam_id, int is_reg)
531 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
563 int mm_app_add_snapshot_stream(int cam_id)
566 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
592 void mm_app_set_snapshot_mode(int cam_id,int op_mode)
594 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
599 int mm_app_config_snapshot_format(int cam_id)
602 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
604 mm_app_set_snapshot_fmt(cam_id,&pme->stream[MM_CAMERA_SNAPSHOT_MAIN].str_config.fmt);
606 mm_app_set_thumbnail_fmt(cam_id,&pme->stream[MM_CAMERA_SNAPSHOT_THUMBNAIL].str_config.fmt);
631 int mm_app_streamon_snapshot(int cam_id)
637 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
670 int mm_app_streamoff_snapshot(int cam_id)
675 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
707 int mm_app_start_snapshot(int cam_id)
716 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
718 if (MM_CAMERA_OK != mm_app_stop_preview(cam_id)) {
719 CDBG_ERROR("%s: Stop preview Failed cam_id=%d\n",__func__,cam_id);
724 mm_app_set_snapshot_mode(cam_id,op_mode);
728 if (MM_CAMERA_OK != (rc = mm_app_add_snapshot_stream(cam_id))) {
732 if (MM_CAMERA_OK != (rc = mm_app_config_snapshot_format(cam_id))) {
736 if (MM_CAMERA_OK != (rc = mm_app_streamon_snapshot(cam_id))) {
754 int mm_app_stop_snapshot(int cam_id)
759 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
764 if (MM_CAMERA_OK != (rc = mm_app_streamoff_snapshot(cam_id))) {
779 int mm_app_start_raw_snapshot(int cam_id)
783 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
790 if (MM_CAMERA_OK != (rc = mm_app_set_op_mode(cam_id, MM_CAMERA_OP_MODE_CAPTURE))) {
795 if (MM_CAMERA_OK != (rc = mm_app_open_ch(cam_id, MM_CAMERA_CH_RAW))) {
799 if (MM_CAMERA_OK != (rc = mm_app_set_raw_snapshot_fmt(cam_id))) {
803 mm_app_get_dim(cam_id, NULL);
804 if (MM_CAMERA_OK != (rc = mm_app_prepare_raw_snapshot_buf(cam_id))) {
808 if (MM_CAMERA_OK != (rc = mm_app_reg_raw_snapshot_data_cb(cam_id, TRUE))) {
825 int mm_app_stop_raw_snapshot(int cam_id)
829 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
837 if (MM_CAMERA_OK != (rc = mm_app_unprepare_raw_snapshot_buf(cam_id))) {
841 if (MM_CAMERA_OK != (rc = mm_app_reg_raw_snapshot_data_cb(cam_id, FALSE))) {
845 mm_app_close_ch(cam_id, MM_CAMERA_CH_RAW);
852 static void mm_app_snapshot_wait(int cam_id)
1056 int mm_app_bundle_zsl_stream(int cam_id)
1062 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
1128 int mm_app_prepare_live_snapshot(int cam_id)
1135 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
1136 CDBG("%s:BEGIN, cam_id=%d\n",__func__,cam_id);
1169 CDBG("%s:END, cam_id=%d\n",__func__,cam_id);
1173 int mm_app_unprepare_live_snapshot(int cam_id)
1178 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
1179 CDBG("%s:BEGIN, cam_id=%d\n",__func__,cam_id);
1191 CDBG("%s:END, cam_id=%d\n",__func__,cam_id);
1195 int mm_app_take_live_snapshot(int cam_id)
1201 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
1203 CDBG("%s:BEGIN, cam_id=%d\n",__func__,cam_id);
1208 if (mm_app_prepare_live_snapshot(cam_id) != MM_CAMERA_OK) {
1217 mm_app_snapshot_wait(cam_id);
1219 if (MM_CAMERA_OK !=mm_app_unprepare_live_snapshot(cam_id)) {
1229 int mm_app_take_picture_zsl(int cam_id)
1235 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
1251 int mm_app_take_picture_yuv(int cam_id)
1254 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
1256 CDBG("%s:BEGIN, cam_id=%d\n",__func__,cam_id);
1258 if (MM_CAMERA_OK != mm_app_start_snapshot(cam_id)) {
1259 CDBG_ERROR("%s: cam_id=%d\n",__func__,cam_id);
1265 mm_app_snapshot_wait(cam_id);
1267 if (MM_CAMERA_OK !=mm_app_stop_snapshot(cam_id)) {
1272 if (MM_CAMERA_OK != (rc = mm_app_start_preview(cam_id))) {
1276 CDBG("%s:END, cam_id=%d\n",__func__,cam_id);
1280 int mm_app_take_zsl(int cam_id)
1284 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
1286 CDBG("%s:BEGIN, cam_id=%d\n",__func__,cam_id);
1291 if (MM_CAMERA_OK != mm_app_stop_video(cam_id)) {
1296 if (MM_CAMERA_OK != mm_app_open_zsl(cam_id)) {
1309 mm_app_open_zsl(cam_id);
1321 mm_app_take_picture_zsl(cam_id);
1326 int mm_app_take_picture(int cam_id)
1330 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
1332 CDBG("%s:BEGIN, cam_id=%d\n",__func__,cam_id);
1337 if (MM_CAMERA_OK != mm_app_stop_video(cam_id)) {
1342 if (MM_CAMERA_OK != mm_app_open_camera(cam_id)) {
1355 mm_app_open_camera(cam_id);
1368 mm_app_take_picture_yuv(cam_id);
1373 int mm_app_take_raw_picture(int cam_id)
1377 mm_camera_app_obj_t *pme = mm_app_get_cam_obj(cam_id);
1379 CDBG("%s:BEGIN, cam_id=%d\n",__func__,cam_id);
1385 if (MM_CAMERA_OK != (rc = mm_app_stop_preview(cam_id))) {
1389 if (MM_CAMERA_OK != mm_app_start_raw_snapshot(cam_id))
1392 mm_app_snapshot_wait(cam_id);
1394 mm_app_stop_raw_snapshot(cam_id);
1396 mm_app_start_preview(cam_id);
1398 CDBG("%s:END, cam_id=%d\n",__func__,cam_id);