int mm_app_stop_and_del_channel(mm_camera_test_obj_t *test_obj, mm_camera_channel_t *channel) { int rc = MM_CAMERA_OK; mm_camera_stream_t *stream = NULL; uint8_t i; rc = mm_app_stop_channel(test_obj, channel); if (MM_CAMERA_OK != rc) { CDBG_ERROR("%s:Stop Preview failed rc=%d\n", __func__, rc); } if (channel->num_streams <= MAX_STREAM_NUM_IN_BUNDLE) { for (i = 0; i < channel->num_streams; i++) { stream = &channel->streams[i]; rc = mm_app_del_stream(test_obj, channel, stream); if (MM_CAMERA_OK != rc) { CDBG_ERROR("%s:del stream(%d) failed rc=%d\n", __func__, i, rc); } } } else { CDBG_ERROR("%s: num_streams = %d. Should not be more than %d\n", __func__, channel->num_streams, MAX_STREAM_NUM_IN_BUNDLE); } rc = mm_app_del_channel(test_obj, channel); if (MM_CAMERA_OK != rc) { CDBG_ERROR("%s:delete channel failed rc=%d\n", __func__, rc); } return rc; }
int mm_app_stop_capture_raw(mm_camera_test_obj_t *test_obj) { int rc = MM_CAMERA_OK; mm_camera_channel_t *ch = NULL; int i; cam_stream_size_info_t abc ; memset (&abc , 0, sizeof (cam_stream_size_info_t)); ch = mm_app_get_channel_by_type(test_obj, MM_CHANNEL_TYPE_CAPTURE); rc = mm_app_stop_channel(test_obj, ch); if (MM_CAMERA_OK != rc) { LOGE("stop recording failed rc=%d\n", rc); } for ( i = 0 ; i < ch->num_streams ; i++ ) { mm_app_del_stream(test_obj, ch, &ch->streams[i]); } rc = setmetainfoCommand(test_obj, &abc); if (rc != MM_CAMERA_OK) { LOGE(" meta info command failed\n"); } mm_app_del_channel(test_obj, ch); return rc; }
int mm_app_stop_and_del_rdi_channel(mm_camera_test_obj_t *test_obj, mm_camera_channel_t *channel) { int rc = MM_CAMERA_OK; mm_camera_stream_t *stream = NULL; uint8_t i; rc = mm_app_stop_channel(test_obj, channel); if (MM_CAMERA_OK != rc) { CDBG_ERROR("%s:Stop RDI failed rc=%d\n", __func__, rc); } for (i = 0; i < channel->num_streams; i++) { stream = &channel->streams[i]; rc = mm_app_del_stream(test_obj, channel, stream); if (MM_CAMERA_OK != rc) { CDBG_ERROR("%s:del stream(%d) failed rc=%d\n", __func__, i, rc); } } rc = mm_app_del_channel(test_obj, channel); if (MM_CAMERA_OK != rc) { CDBG_ERROR("%s:delete channel failed rc=%d\n", __func__, rc); } return rc; }
int mm_app_stop_capture_raw(mm_camera_test_obj_t *test_obj) { int rc = MM_CAMERA_OK; mm_camera_channel_t *ch = NULL; int i; ch = mm_app_get_channel_by_type(test_obj, MM_CHANNEL_TYPE_CAPTURE); rc = mm_app_stop_channel(test_obj, ch); if (MM_CAMERA_OK != rc) { CDBG_ERROR("%s:stop recording failed rc=%d\n", __func__, rc); } for ( i = 0 ; i < ch->num_streams ; i++ ) { mm_app_del_stream(test_obj, ch, &ch->streams[i]); } mm_app_del_channel(test_obj, ch); return rc; }