extern void utc_media_recorder_callback_startup(void);
extern void utc_media_recorder_callback_cleanup(void);
extern void utc_media_recorder_lifecycle_startup(void);
+extern void utc_media_recorder_lifecycle_cleanup(void);
extern int utc_media_recorder_attr_get_audio_channel_p(void);
extern int utc_media_recorder_attr_get_audio_channel_n1(void);
{"utc_media_recorder_set_video_encode_decision_cb_n",utc_media_recorder_set_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_unset_video_encode_decision_cb_p",utc_media_recorder_unset_video_encode_decision_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_unset_video_encode_decision_cb_n",utc_media_recorder_unset_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
- {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,NULL},
+ {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
{"utc_media_recorder_set_interrupt_started_cb_p",utc_media_recorder_set_interrupt_started_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_set_interrupt_started_cb_n1",utc_media_recorder_set_interrupt_started_cb_n1,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_set_interrupt_started_cb_n2",utc_media_recorder_set_interrupt_started_cb_n2,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
extern void utc_media_recorder_callback_startup(void);
extern void utc_media_recorder_callback_cleanup(void);
extern void utc_media_recorder_lifecycle_startup(void);
+extern void utc_media_recorder_lifecycle_cleanup(void);
extern int utc_media_recorder_attr_get_audio_channel_p(void);
extern int utc_media_recorder_attr_get_audio_channel_n1(void);
{"utc_media_recorder_set_video_encode_decision_cb_n",utc_media_recorder_set_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_unset_video_encode_decision_cb_p",utc_media_recorder_unset_video_encode_decision_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_unset_video_encode_decision_cb_n",utc_media_recorder_unset_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
- {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,NULL},
+ {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
{"utc_media_recorder_set_interrupt_started_cb_p",utc_media_recorder_set_interrupt_started_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_set_interrupt_started_cb_n1",utc_media_recorder_set_interrupt_started_cb_n1,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_set_interrupt_started_cb_n2",utc_media_recorder_set_interrupt_started_cb_n2,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
extern void utc_media_recorder_callback_startup(void);
extern void utc_media_recorder_callback_cleanup(void);
extern void utc_media_recorder_lifecycle_startup(void);
+extern void utc_media_recorder_lifecycle_cleanup(void);
extern int utc_media_recorder_attr_get_audio_channel_p(void);
extern int utc_media_recorder_attr_get_audio_channel_n1(void);
{"utc_media_recorder_set_video_encode_decision_cb_n",utc_media_recorder_set_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_unset_video_encode_decision_cb_p",utc_media_recorder_unset_video_encode_decision_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_unset_video_encode_decision_cb_n",utc_media_recorder_unset_video_encode_decision_cb_n,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
- {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,NULL},
- {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,NULL},
+ {"utc_media_recorder_create_audiorecorder_n",utc_media_recorder_create_audiorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_create_audiorecorder_p",utc_media_recorder_create_audiorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_cancel_p",utc_media_recorder_cancel_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_cancel_n",utc_media_recorder_cancel_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_commit_p",utc_media_recorder_commit_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_commit_n",utc_media_recorder_commit_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_create_videorecorder_p",utc_media_recorder_create_videorecorder_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_create_videorecorder_n",utc_media_recorder_create_videorecorder_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_destroy_p",utc_media_recorder_destroy_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_destroy_n",utc_media_recorder_destroy_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_pause_p",utc_media_recorder_pause_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_pause_n",utc_media_recorder_pause_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_prepare_p",utc_media_recorder_prepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_prepare_n1",utc_media_recorder_prepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_prepare_n2",utc_media_recorder_prepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_start_p",utc_media_recorder_start_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_start_n",utc_media_recorder_start_n,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_unprepare_p",utc_media_recorder_unprepare_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_unprepare_n1",utc_media_recorder_unprepare_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_unprepare_n2",utc_media_recorder_unprepare_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_state_p",utc_media_recorder_get_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_state_n1",utc_media_recorder_get_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_state_n2",utc_media_recorder_get_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_device_state_p",utc_media_recorder_get_device_state_p,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_device_state_n1",utc_media_recorder_get_device_state_n1,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
+ {"utc_media_recorder_get_device_state_n2",utc_media_recorder_get_device_state_n2,utc_media_recorder_lifecycle_startup,utc_media_recorder_lifecycle_cleanup},
{"utc_media_recorder_set_interrupt_started_cb_p",utc_media_recorder_set_interrupt_started_cb_p,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_set_interrupt_started_cb_n1",utc_media_recorder_set_interrupt_started_cb_n1,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
{"utc_media_recorder_set_interrupt_started_cb_n2",utc_media_recorder_set_interrupt_started_cb_n2,utc_media_recorder_callback_startup,utc_media_recorder_callback_cleanup},
#include "utc_media_recorder_util.h"
static bool audio_recording_supported = false;
-static recorder_h recorder = NULL;
-static int startup_ret = RECORDER_ERROR_NONE;
static bool video_recording_supported = false;
+static bool camera_supported = false;
+
+static recorder_h recorder = NULL;
+static recorder_h video_recorder = NULL;
static camera_h camera = NULL;
+
+static int startup_ret = RECORDER_ERROR_NONE;
+static int startup_ret_video_recorder = RECORDER_ERROR_NONE;
static int startup_ret_camera = CAMERA_ERROR_NONE;
+#define CHECK_FEATURE_AUDIO_RECORDING \
+ do {\
+ if (!audio_recording_supported) {\
+ assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);\
+ return 0;\
+ }\
+ } while (0)
+
+#define CHECK_FEATURE_VIDEO_RECORDING \
+ do {\
+ if (!video_recording_supported) {\
+ if (camera_supported)\
+ assert_eq(startup_ret_video_recorder, RECORDER_ERROR_NOT_SUPPORTED);\
+ else\
+ assert_eq(startup_ret_video_recorder, RECORDER_ERROR_INVALID_PARAMETER);\
+ return 0;\
+ }\
+ } while (0)
+
+
static void _sound_stream_focus_state_changed_cb(sound_stream_info_h stream_info, sound_stream_focus_mask_e focus_mask, sound_stream_focus_state_e focus_state,
sound_stream_focus_change_reason_e reason_for_change, int sound_behavior, const char *additional_info, void *user_data)
{
return;
}
+
/**
* @function utc_media_recorder_startup
* @description Called before each test. \n
- This is the precondition for checking apis. \n
- Tiis precondition is create_audiorecorder api for checking device and privilege error.
- * @scenario 1. Check device storage supported. \n
- 2. Get platform feature for audio recording and video recording. \n
- 3. Create audio recorder. \n
- 4. Create camera.
+ The handles are created and supported features are checked.
+ * @scenario 1. Get platform feature for recordings and camera. \n
+ 2. Create handles(audio recorder, camera, video recorder).
* @parameter N/A
* @return N/A
*/
void utc_media_recorder_startup(void)
{
- utc_media_recorder_util_get_recording_supported(&audio_recording_supported, &video_recording_supported);
+ audio_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_AUDIO_RECORDING);
+ video_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_VIDEO_RECORDING);
+ camera_supported = utc_media_recorder_util_get_feature_supported(FEATURE_CAMERA);
startup_ret = recorder_create_audiorecorder(&recorder);
startup_ret_camera = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
-
- return;
+ startup_ret_video_recorder = recorder_create_videorecorder(camera, &video_recorder);
}
/**
* @function utc_media_recorder_cleanup
* @description Called after each test. \n
- This is the postcondition for checking apis. \n
- This postcondition is recorder_destroy for cleaning up all recorder resources for next test.
- * @scenario 1. Destroy recorder. \n
- 2. Destroy camera.
+ The handles are destroyed for next test. \n
+ * @scenario 1. Destroy handles(audio recorder, camera, video recorder).
* @parameter N/A
* @return N/A
*/
recorder = NULL;
}
+ if (video_recorder) {
+ recorder_destroy(video_recorder);
+ video_recorder = NULL;
+ }
+
if (camera) {
camera_destroy(camera);
camera = NULL;
}
-
- return;
}
/**
* @since_tizen 2.3
* @description To check audio channel count with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio channel.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
int channel = 0;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_channel(recorder, &channel);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check audio channel count with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio channel.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_channel(recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio channel count with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio channel.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_channel(NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio device with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio device.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
recorder_audio_device_e device = RECORDER_AUDIO_DEVICE_MIC;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_device(recorder, &device);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check audio device with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio device.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_device(recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio device with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio device.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_device(NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio encoder bitrate with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio encodeer bitrate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
int bitrate = 0;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_encoder_bitrate(recorder, &bitrate);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check audio encoder bitrate with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio encoder bitrate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_encoder_bitrate(recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio encoder bitrate with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio encoder bitrate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_encoder_bitrate(NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio sample-rate with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio sample-rate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
int samplerate = 0;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_samplerate(recorder, &samplerate);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check audio sample-rate with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio sample-rate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_samplerate(recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio sample-rate with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio sample-rate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_audio_samplerate(NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check orientation tag with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get orientation tag.
+ 1. Check video recording and camera feature. \n
+ 2. Get orientation tag.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int ret = RECORDER_ERROR_NONE;
recorder_rotation_e rotation_tag = RECORDER_ROTATION_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_attr_get_orientation_tag(recorder, &rotation_tag);
+ ret = recorder_attr_get_orientation_tag(video_recorder, &rotation_tag);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check orientation tag with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get orientation tag.
+ 1. Check video recording and camera feature. \n
+ 2. Get orientation tag.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- ret = recorder_attr_get_orientation_tag(recorder, NULL);
+ ret = recorder_attr_get_orientation_tag(video_recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check orientation tag with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get orientation tag.
+ 1. Check video recording and camera feature. \n
+ 2. Get orientation tag.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_attr_get_orientation_tag(NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check recording motion rate with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get recording motion rate.
+ 1. Check video recording and camera feature. \n
+ 2. Get recording motion rate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int ret = RECORDER_ERROR_NONE;
double rate = 0.0;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_attr_get_recording_motion_rate(recorder, &rate);
+ ret = recorder_attr_get_recording_motion_rate(video_recorder, &rate);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check recording motion rate count with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get recording motion rate.
+ 1. Check video recording and camera feature. \n
+ 2. Get recording motion rate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_attr_get_recording_motion_rate(recorder, NULL);
+ ret = recorder_attr_get_recording_motion_rate(video_recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check recording motion rate count with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get recording motion rate.
+ 1. Check video recording and camera feature. \n
+ 2. Get recording motion rate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_attr_get_recording_motion_rate(NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check recording file size limitation with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get recording file size limitation.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
int size = 0;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_size_limit(recorder, &size);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check recording file size limitation with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get recording file size limitation.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_size_limit(recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check recording file size limitation with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get recording file size limitation.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_size_limit(NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check recording time limitation with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get recording time limitation.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
int value = 0;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_time_limit(recorder, &value);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check recording time limitation with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get recording time limitation.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_time_limit(recorder, NULL);
assert_neq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check recording time limitation with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get recording time limitation.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_get_time_limit(NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check video encoder bitrate with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get video encoder bitrate.
+ 1. Check video recording and camera feature. \n
+ 2. Get video encoder bitrate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int ret = RECORDER_ERROR_NONE;
int value = 0;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- ret = recorder_attr_get_video_encoder_bitrate(recorder, &value);
+ ret = recorder_attr_get_video_encoder_bitrate(video_recorder, &value);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check video encoder bitrate with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get video encoder bitrate.
+ 1. Check video recording and camera feature. \n
+ 2. Get video encoder bitrate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- ret = recorder_attr_get_video_encoder_bitrate(recorder, NULL);
+ ret = recorder_attr_get_video_encoder_bitrate(video_recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check video encoder bitrate with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get video encoder bitrate.
+ 1. Check video recording and camera feature. \n
+ 2. Get video encoder bitrate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_attr_get_video_encoder_bitrate(NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check sound mute or not with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Check supported audio encoder and file format. \n
3. Set supported audio encoder. \n
4. Set supported file format. \n
{
int ret=RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
if (ret != RECORDER_ERROR_NONE)
* @since_tizen 2.3
* @description To check sound muted or not with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get sound which is muted or not.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_is_muted(NULL);
assert_eq(ret, false);
* @since_tizen 2.3
* @description To set audio channel count with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio channel count.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_audio_channel(recorder, 1);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check with invalid parameter.
* @scenario This test is for checking invalid value. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio channel count.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_audio_channel(recorder, 10);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio channel count with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio channel.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_audio_channel(NULL, 10);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio device with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio device.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
recorder_audio_device_e device = RECORDER_AUDIO_DEVICE_MIC;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_audio_device(recorder, device);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check audio device with invalid value.
* @scenario This test is for checking invalid value which is out of range. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio device.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
recorder_audio_device_e device = 10;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_audio_device(recorder, device);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio encoder bitrate with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio encoder bitrate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_audio_encoder_bitrate(recorder, 11111);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check audio encoder bitrate with invalid paramter.
* @scenario This test is for checking invalid value which is out of range. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio encoder bitrate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_audio_encoder_bitrate(recorder, -1);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio sample-rate with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio sample-rate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_audio_samplerate(recorder, 11111);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check audio sample-rate with invalid value.
* @scenario This test is for checking invalid value which is out of range. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio sample-rate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_audio_samplerate(recorder, -1);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check file size limitation with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get filesize limitation.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_size_limit(recorder, 0);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check file size limitation with invalid parameter.
* @scenario This test is for checking invalid value which is out of range. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get file size limitation.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_size_limit(recorder, -1);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check file size limitation with invalid handle.
* @scenario This test is for checking invalid parameter such as reorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio channel.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_size_limit(NULL, 0);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check time limitation with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set time limitation.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_time_limit(recorder, 11111);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check time limitation with invalid parameter.
* @scenario This test is for checking invalid value which is out of range. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set time limitation.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_time_limit(recorder, -1);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check time limitation with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set time limitation.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_time_limit(NULL, 10);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check video encoder bitrate with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get video encoder bitrate.
+ 1. Check video recording and camera feature. \n
+ 2. Get video encoder bitrate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_attr_set_video_encoder_bitrate(recorder, 1000000);
+ ret = recorder_attr_set_video_encoder_bitrate(video_recorder, 1000000);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check video encoder bitrate with invalid parameter.
* @scenario This test is for checking invalid pointer which is out of range. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set video encoder bitrate.
+ 1. Check video recording and camera feature. \n
+ 2. Set video encoder bitrate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- ret = recorder_attr_set_video_encoder_bitrate(recorder, -1);
+ ret = recorder_attr_set_video_encoder_bitrate(video_recorder, -1);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check video encoder bitrate with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set video encoder bitrate.
+ 1. Check video recording and camera feature. \n
+ 2. Set video encoder bitrate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_attr_set_video_encoder_bitrate(NULL, -1);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check mute with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set sound mute.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_mute(recorder, false);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check mute count with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set mute.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_attr_set_mute(NULL, false);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check orientation tag with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
+ 1. Check video recording and camera feature. \n
2. Set orientation tag.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
recorder_rotation_e rotation = RECORDER_ROTATION_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- ret = recorder_attr_set_orientation_tag(recorder, rotation);
+ ret = recorder_attr_set_orientation_tag(video_recorder, rotation);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check orientation tag with invalid parameter.
* @scenario This test is for checking invalid value which is out of range. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set orientation tag.
+ 1. Check video recording and camera feature. \n
+ 2. Set orientation tag.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int ret = RECORDER_ERROR_NONE;
recorder_rotation_e rotation = -1;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_attr_set_orientation_tag(recorder, rotation);
+ ret = recorder_attr_set_orientation_tag(video_recorder, rotation);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check orientation tag with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set orientation tag.
+ 1. Check video recording and camera feature. \n
+ 2. Set orientation tag.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int ret = RECORDER_ERROR_NONE;
recorder_rotation_e rotation = -1;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_attr_set_orientation_tag(NULL, rotation);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check recording motion rate with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set recording motion rate.
+ 1. Check video recording and camera feature. \n
+ 2. Set recording motion rate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_attr_set_recording_motion_rate(recorder, 1.0);
+ ret = recorder_attr_set_recording_motion_rate(video_recorder, 1.0);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check recording motion rate with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set recording motion rate.
+ 1. Check video recording and camera feature. \n
+ 2. Set recording motion rate.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_attr_set_recording_motion_rate(NULL, -1.0);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio encoder with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
recorder_audio_codec_e value;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_get_audio_encoder(recorder, &value);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check audio encoder with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_get_audio_encoder(recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio encoder with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_get_audio_encoder(NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio encoder with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio encoder AMR. \n
3. Get audio encoder. \n
4. Set audio encoder AAC. \n
recorder_audio_codec_e codec = RECORDER_AUDIO_CODEC_AMR;
recorder_audio_codec_e ret_codec = RECORDER_AUDIO_CODEC_AMR;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
codec = RECORDER_AUDIO_CODEC_AMR;
ret = recorder_set_audio_encoder(recorder, codec);
* @since_tizen 2.3
* @description To check file format with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get file format.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
recorder_file_format_e value = RECORDER_FILE_FORMAT_3GP;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_get_file_format(recorder, &value);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check file format with invalid handle.
* @scenario This test is for checking invalid pointer. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get file format.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_get_file_format(recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check video encoder with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get video encoder.
+ 1. Check video recording and camera feature. \n
+ 2. Get video encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int ret = RECORDER_ERROR_NONE;
recorder_video_codec_e value = RECORDER_VIDEO_CODEC_MPEG4;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_get_video_encoder(recorder, &value);
+ ret = recorder_get_video_encoder(video_recorder, &value);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check video encoder with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get video encoder.
+ 1. Check video recording and camera feature. \n
+ 2. Get video encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- ret = recorder_get_video_encoder(recorder, NULL);
+ ret = recorder_get_video_encoder(video_recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check video encoder count with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get video encoder.
+ 1. Check video recording and camera feature. \n
+ 2. Get video encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_get_video_encoder(NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check video encoder with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set video encoder H263. \n
- 4. Get video encoder. \n
- 5. Set video encoder H264. \n
- 6. Get video encoder. \n
- 7. Set video encoder MPEG4. \n
- 8. Get video encoder. \n
- 9. Set video encoder THEORA. \n
- 10. Get video encoder.
+ 1. Check video recording and camera feature. \n
+ 2. Set video encoder H263. \n
+ 3. Get video encoder. \n
+ 4. Set video encoder H264. \n
+ 5. Get video encoder. \n
+ 6. Set video encoder MPEG4. \n
+ 7. Get video encoder. \n
+ 8. Set video encoder THEORA. \n
+ 9. Get video encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
recorder_video_codec_e codec = RECORDER_VIDEO_CODEC_H263;
recorder_video_codec_e ret_codec = RECORDER_VIDEO_CODEC_H263;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
codec = RECORDER_VIDEO_CODEC_H263;
- ret = recorder_set_video_encoder(recorder, codec);
+ ret = recorder_set_video_encoder(video_recorder, codec);
if (ret != RECORDER_ERROR_NOT_SUPPORTED) {
assert_eq(ret, RECORDER_ERROR_NONE);
}
- ret = recorder_get_video_encoder(recorder, &ret_codec);
+ ret = recorder_get_video_encoder(video_recorder, &ret_codec);
assert_eq(ret, RECORDER_ERROR_NONE);
codec = RECORDER_VIDEO_CODEC_H264;
- ret = recorder_set_video_encoder(recorder, codec);
+ ret = recorder_set_video_encoder(video_recorder, codec);
if (ret != RECORDER_ERROR_NOT_SUPPORTED) {
assert_eq(ret, RECORDER_ERROR_NONE);
}
- ret = recorder_get_video_encoder(recorder, &ret_codec);
+ ret = recorder_get_video_encoder(video_recorder, &ret_codec);
assert_eq(ret, RECORDER_ERROR_NONE);
codec = RECORDER_VIDEO_CODEC_MPEG4;
- ret = recorder_set_video_encoder(recorder, codec);
+ ret = recorder_set_video_encoder(video_recorder, codec);
if (ret != RECORDER_ERROR_NOT_SUPPORTED) {
assert_eq(ret, RECORDER_ERROR_NONE);
}
- ret = recorder_get_video_encoder(recorder, &ret_codec);
+ ret = recorder_get_video_encoder(video_recorder, &ret_codec);
assert_eq(ret, RECORDER_ERROR_NONE);
codec = RECORDER_VIDEO_CODEC_THEORA;
- ret = recorder_set_video_encoder(recorder, codec);
+ ret = recorder_set_video_encoder(video_recorder, codec);
if (ret != RECORDER_ERROR_NOT_SUPPORTED) {
assert_eq(ret, RECORDER_ERROR_NONE);
}
- ret = recorder_get_video_encoder(recorder, &ret_codec);
+ ret = recorder_get_video_encoder(video_recorder, &ret_codec);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check audio level with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Check supported audio encoder and file format. \n
3. Set supported audio encoder. \n
4. Set supported file format. \n
double value = 0.0;
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check audio level with invalid parameter.
* @scenario This test is for checking invalid pointer. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get audio level.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_get_audio_level(recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check video resolution with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get video resolution.
+ 1. Check video recording and camera feature. \n
+ 2. Get video resolution.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int mHeight = 0;
int mWidth = 0;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_get_video_resolution(recorder, &mWidth, &mHeight);
+ ret = recorder_get_video_resolution(video_recorder, &mWidth, &mHeight);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check video resolution with invalid parameter.
* @scenario This test is for checking invalid pointer such as null. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get video resolution.
+ 1. Check video recording and camera feature. \n
+ 2. Get video resolution.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_get_video_resolution(recorder, NULL, NULL);
+ ret = recorder_get_video_resolution(video_recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check video resolution with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Get video resolution.
+ 1. Check video recording and camera feature. \n
+ 2. Get video resolution.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_get_video_resolution(NULL, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio encoder with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
recorder_audio_codec_e codec = RECORDER_AUDIO_CODEC_DISABLE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_foreach_supported_audio_encoder(recorder, _audio_encoder_cb, &codec);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check audio encoder with invalid parameter.
* @scenario This test is for checking invalid value which is out of range. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
recorder_audio_codec_e codec = -2;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_audio_encoder(recorder, codec);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio encoder with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
recorder_audio_codec_e codec = -2;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_audio_encoder(NULL, codec);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio encoder with invalid parameter with precodition.
* @scenario This test is for checking invalid parameter disable audio with creating audio recorder. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_DISABLE);
assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
* @since_tizen 2.3
* @description To check file format with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set file format.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
recorder_file_format_e format = RECORDER_FILE_FORMAT_3GP;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_file_format(recorder, format);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check set file format with invalid parameter.
* @scenario This test is for checking invalid value which is out of range \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set file format.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
recorder_file_format_e format = -1;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_file_format(recorder, format);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check file name with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set file name.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
char *media_path = NULL;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
utc_media_recorder_util_get_media_path(&media_path);
assert(media_path);
* @since_tizen 2.3
* @description To check file name with invalid handle.
* @scenario This test is for checking invalid pointer. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set file name.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_filename(recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check video encoder with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set video encoder.
+ 1. Check video recording and camera feature. \n
+ 2. Set video encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int ret = RECORDER_ERROR_NONE;
recorder_video_codec_e codec = RECORDER_VIDEO_CODEC_MPEG4;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_set_video_encoder(recorder, codec);
+ ret = recorder_set_video_encoder(video_recorder, codec);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check video encoder with invalid parameter.
* @scenario This test is for checking invalid pointer which is out of range. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set video encodeer.
+ 1. Check video recording and camera feature. \n
+ 2. Set video encodeer.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int ret = RECORDER_ERROR_NONE;
recorder_video_codec_e codec = -1;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_set_video_encoder(recorder, codec);
+ ret = recorder_set_video_encoder(video_recorder, codec);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check video encoder with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set video encoder.
+ 1. Check video recording and camera feature. \n
+ 2. Set video encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int ret = RECORDER_ERROR_NONE;
recorder_video_codec_e codec = -1;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_set_video_encoder(NULL, codec);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check video resolution with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Create video recorder. \n
- 4. Get video resolution. \n
- 5. Set video resolution. \n
- 6. Destroy recorder.
+ 1. Check video recording and camera feature. \n
+ 2. Get video resolution. \n
+ 3. Set video resolution. \n
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int ret = RECORDER_ERROR_NONE;
int width = 0;
int height = 0;
- recorder_h video_recorder = NULL;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- ret = recorder_create_videorecorder(camera, &video_recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_get_video_resolution(video_recorder, &width, &height);
assert_eq(ret, RECORDER_ERROR_NONE);
ret = recorder_set_video_resolution(video_recorder, width, height);
- recorder_destroy(video_recorder);
-
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check file fomrat with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set file format 3GP. \n
3. Get file format. \n
4. Set file format MP4. \n
recorder_file_format_e format = RECORDER_FILE_FORMAT_3GP;
recorder_file_format_e ret_format = RECORDER_FILE_FORMAT_3GP;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
format = RECORDER_FILE_FORMAT_3GP;
ret = recorder_set_file_format(recorder, format);
* @since_tizen 2.3
* @description To check video resolution with invalid parameter.
* @scenario This test is for checking invalid value which is out of range. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set video resolution.
+ 1. Check video recording and camera feature. \n
+ 2. Set video resolution.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_set_video_resolution(recorder, 0, 0);
+ ret = recorder_set_video_resolution(video_recorder, 0, 0);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check video resolution with invalid handle.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Set video resolution.
+ 1. Check video recording and camera feature. \n
+ 2. Set video resolution.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_set_video_resolution(NULL, 0, 0);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check file name with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set file name. \n
3. Get file name. \n
4. Free file name.
char *set_name = NULL;
char *get_name = NULL;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
utc_media_recorder_util_get_media_path(&set_name);
assert(set_name);
* @since_tizen 2.3
* @description To check file name with invalid handle.
* @scenario This test is for checking invalid pointer which is null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Get filename.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_get_filename(recorder, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 3.0
* @description To check sound stream information setting with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Create sound stream information. \n
3. Check sound stream information. \n
4. Set sound stream information.
int ret2 = SOUND_MANAGER_ERROR_NONE;
sound_stream_info_h stream_info = NULL;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret2 = sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA,
_sound_stream_focus_state_changed_cb, NULL, &stream_info);
assert_eq(ret2, SOUND_MANAGER_ERROR_NONE);
- assert_neq(stream_info, NULL);
+ assert(stream_info);
ret = recorder_set_sound_stream_info(recorder, stream_info);
* @since_tizen 3.0
* @description To check sound stream information setting with invalid stream information pointer.
* @scenario This test is for checking invalid pointer which is null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set NULL for stream_info parameter.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_sound_stream_info(recorder, NULL);
#define CALLBACK_CHECK_COUNT 10
+
+static bool audio_recording_supported = false;
+static bool video_recording_supported = false;
+static bool camera_supported = false;
+
static recorder_h recorder = NULL;
+static recorder_h video_recorder = NULL;
static camera_h camera = NULL;
-static bool video_recording_supported = false;
-static bool audio_recording_supported = false;
+
static int startup_ret = RECORDER_ERROR_NONE;
+static int startup_ret_video_recorder = RECORDER_ERROR_NONE;
static int startup_ret_camera = CAMERA_ERROR_NONE;
+#define CHECK_FEATURE_AUDIO_RECORDING \
+ do {\
+ if (!audio_recording_supported) {\
+ assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);\
+ return 0;\
+ }\
+ } while (0)
+
+#define CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret_recorder) \
+ do {\
+ if (!audio_recording_supported) {\
+ assert_eq(ret_recorder, RECORDER_ERROR_NOT_SUPPORTED);\
+ return 0;\
+ }\
+ } while (0)
+
+#define CHECK_FEATURE_VIDEO_RECORDING \
+ do {\
+ if (!video_recording_supported) {\
+ if (camera_supported)\
+ assert_eq(startup_ret_video_recorder, RECORDER_ERROR_NOT_SUPPORTED);\
+ else\
+ assert_eq(startup_ret_video_recorder, RECORDER_ERROR_INVALID_PARAMETER);\
+ return 0;\
+ }\
+ } while (0)
+
+
/**
* @function utc_media_recorder_callback_startup
* @description Called before each test. \n
- This is the precondition for checking apis. \n
- Tiis precondition is create_audiorecorder api for checking device and privilege error.
- * @scenario 1. Check device storage supported. \n
- 2. Create audio recorder.
+ The handles are created and supported features are checked.
+ * @scenario 1. Get platform feature for recordings and camera. \n
+ 2. Create handles(audio recorder, camera, video recorder).
* @parameter N/A
* @return N/A
*/
void utc_media_recorder_callback_startup(void)
{
- utc_media_recorder_util_get_recording_supported(&audio_recording_supported, &video_recording_supported);
+ audio_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_AUDIO_RECORDING);
+ video_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_VIDEO_RECORDING);
+ camera_supported = utc_media_recorder_util_get_feature_supported(FEATURE_CAMERA);
startup_ret = recorder_create_audiorecorder(&recorder);
startup_ret_camera = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
-
- return;
+ startup_ret_video_recorder = recorder_create_videorecorder(camera, &video_recorder);
}
/**
* @function utc_media_recorder_callback_cleanup
* @description Called after each test. \n
- This is the postcondition for checking apis. \n
- This postcondition is recorder_destroy for cleaning up all recorder resources for next test.
- * @scenario 1. Destroy recorder.
+ The handles are destroyed for next test. \n
+ * @scenario 1. Destroy handles(audio recorder, camera, video recorder).
* @parameter N/A
* @return N/A
*/
recorder = NULL;
}
+ if (video_recorder) {
+ recorder_destroy(video_recorder);
+ video_recorder = NULL;
+ }
+
if (camera) {
camera_destroy(camera);
camera = NULL;
}
-
- return;
}
static bool _video_encoder_cb(recorder_video_codec_e codec, void *user_data)
* @since_tizen 2.3
* @description To check supported audio encoder with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Check supported audio encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_foreach_supported_audio_encoder(recorder, _audio_encoder_cb, NULL);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check supported audio encoder with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Check supported audio encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_foreach_supported_audio_encoder(recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check supported file format with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Check supported file format.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_foreach_supported_file_format(recorder, _file_format_cb, NULL);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check supported file format with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Check supported file format.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_foreach_supported_file_format(recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check supported video encoder with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Check supported video encoder.
+ 1. Check video recording and camera feature. \n
+ 2. Check supported video encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_foreach_supported_video_encoder(recorder, _video_encoder_cb, NULL);
+ ret = recorder_foreach_supported_video_encoder(video_recorder, _video_encoder_cb, NULL);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 2.3
* @description To check supported video encoder with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Check supported video encoder.
+ 1. Check video recording and camera feature. \n
+ 2. Check supported video encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_foreach_supported_video_encoder(recorder, NULL, NULL);
+ ret = recorder_foreach_supported_video_encoder(video_recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check supported video resolution with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Check supported video resolution.
+ 1. Check video recording and camera feature. \n
+ 2. Check supported video resolution.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_foreach_supported_video_resolution_p(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h video_recorder = NULL;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- ret = recorder_create_videorecorder(camera, &video_recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_foreach_supported_video_resolution(video_recorder, _video_resolution_cb, NULL);
assert_eq(ret, RECORDER_ERROR_NONE);
- recorder_destroy(video_recorder);
-
return 0;
}
* @since_tizen 2.3
* @description To check supported video resolution with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check camera supported or not. \n
- 2. Check microphone supported or not. \n
- 3. Check supported video resolution.
+ 1. Check video recording and camera feature. \n
+ 2. Check supported video resolution.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- ret = recorder_foreach_supported_video_resolution(recorder, NULL, NULL);
+ ret = recorder_foreach_supported_video_resolution(video_recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check file size, time limited callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set limited callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_recording_limit_reached_cb(recorder, _limit_reached_cb, NULL);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check file size, time limited callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set limited callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_recording_limit_reached_cb(recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check recording status with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set recording status callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
int status_count = 0;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_recording_status_cb(recorder, _recording_status_cb, (void *)&status_count);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check recording status with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set recording status callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_recording_status_cb(recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check state changed callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set changed callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_state_changed_cb(recorder, _state_changed_cb, NULL);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check state changed callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set state changed callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_state_changed_cb(recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check interrupted callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set interrupted callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_interrupted_cb(recorder, _interrupted_cb, NULL);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check interrupted callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set interrupted callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_interrupted_cb(recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check audio stream callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio stream callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
int buffer_count = 0;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_audio_stream_cb(recorder, _audio_stream_cb, (void *)&buffer_count);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check audio stream callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set audio stream callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_audio_stream_cb(recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check error callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set error callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_error_cb(recorder, _error_cb, NULL);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check error callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set error callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_error_cb(recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check to unset recording limit callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset recording limit callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_recording_limit_reached_cb(recorder);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check to unset recording limit callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as recorder handle null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset recording limit callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_recording_limit_reached_cb(NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check to unset recording status callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset recording status callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_recording_status_cb(recorder);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check to unset recording status callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as recorder handle null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset recording status callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_recording_status_cb(NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check to unset state changed callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset state changed callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_state_changed_cb(recorder);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check to unset state changed callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as recorder handle null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Check supported audio encoder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_state_changed_cb(NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check to unset interrupted callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset interrupted callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_interrupted_cb(recorder);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check to unset interrupted callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as recorder handle null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset interrupted callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_interrupted_cb(NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check to unset audio stream callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset audio stream callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_audio_stream_cb(recorder);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check to unset audio stream callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as recorder handle null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset audio stream callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_audio_stream_cb(NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 2.3
* @description To check to unset error callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset error callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_error_cb(recorder);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 2.3
* @description To check to unset error callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as recorder handle null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset error callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_error_cb(NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @description To check adding device state changed callback with valid parameters.
* @scenario This test is for checking device state changed callback adding with valid parameters.
1. Add device state changed callback with valid parameters. \n
- 2. Check microphone device which is supported or not. \n
+ 2. Check audio recording feature. \n
3-1. If supported, compare "ret" value with RECORDER_ERROR_NONE. \n
3-1. If not supported, compare "ret" value with RECORDER_ERROR_NOT_SUPPORTED. \n
4. Remove added callback if cb_id is valid.
ret = recorder_add_device_state_changed_cb(_device_state_changed_cb, NULL, &cb_id);
- if (audio_recording_supported) {
- assert_eq(ret, RECORDER_ERROR_NONE);
+ CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
- ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- ret = recorder_start(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- utc_media_recorder_util_mainloop_run();
+ ret = recorder_start(recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- recorder_remove_device_state_changed_cb(cb_id);
+ utc_media_recorder_util_mainloop_run();
- recorder_cancel(recorder);
- recorder_unprepare(recorder);
- } else {
- assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
- }
+ recorder_remove_device_state_changed_cb(cb_id);
+
+ recorder_cancel(recorder);
+ recorder_unprepare(recorder);
return 0;
}
* @description To check removing device state changed callback with valid parameter.
* @scenario This test is for checking device state changed callback removing with valid parameter.
1. Add device state changed callback with valid parameters. \n
- 2. Check microphone device which is supported or not. \n
+ 2. Check audio recording feature. \n
3-1. If supported, remove device state changed callback with cb_id from recorder_add_device_state_changed_cb(). \n
3-1. If not supported, compare "ret" value with RECORDER_ERROR_NOT_SUPPORTED.
* @parameter N/A
ret = recorder_add_device_state_changed_cb(_device_state_changed_cb, NULL, &cb_id);
- if (audio_recording_supported) {
- assert_eq(ret, RECORDER_ERROR_NONE);
- assert_neq(cb_id, 0);
+ CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
+
+ assert_eq(ret, RECORDER_ERROR_NONE);
+ assert_neq(cb_id, 0);
- ret = recorder_remove_device_state_changed_cb(cb_id);
+ ret = recorder_remove_device_state_changed_cb(cb_id);
- assert_eq(ret, RECORDER_ERROR_NONE);
- } else {
- assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
- }
+ assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
}
* @description To check removing device state changed callback with invalid condition.
* @scenario This test is for checking device state changed callback removing with invalid condition.
1. Remove device state changed callback without adding device state changed callback. \n
- 2. Check microphone device which is supported or not. \n
+ 2. Check audio recording feature. \n
3-1. If supported, compare "ret" value with RECORDER_ERROR_INVALID_OPERATION. \n
3-2. If not supported, compare "ret" value with RECORDER_ERROR_NOT_SUPPORTED.
* @parameter N/A
int utc_media_recorder_remove_device_state_changed_cb_n1(void)
{
int ret = RECORDER_ERROR_NONE;
- int check_ret = RECORDER_ERROR_NONE;
ret = recorder_remove_device_state_changed_cb(0);
- if (audio_recording_supported)
- check_ret = RECORDER_ERROR_INVALID_OPERATION;
- else
- check_ret = RECORDER_ERROR_NOT_SUPPORTED;
+ CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
- assert_eq(ret, check_ret);
+ assert_eq(ret, RECORDER_ERROR_INVALID_OPERATION);
return 0;
}
* @description To check removing device state changed callback with valid parameter.
* @scenario This test is for checking device state changed callback removing with invalid parameter.
1. Remove device state changed callback with invalid parameter. \n
- 2. Check microphone device which is supported or not. \n
+ 2. Check audio recording feature. \n
3-1. If supported, remove device state changed callback with invalid cb_id. \n
3-2. If not supported, compare "ret" value with RECORDER_ERROR_NOT_SUPPORTED.
* @parameter N/A
ret = recorder_add_device_state_changed_cb(_device_state_changed_cb, NULL, &cb_id);
- if (audio_recording_supported) {
- assert_eq(ret, RECORDER_ERROR_NONE);
- assert_neq(cb_id, 0);
+ CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
- ret = recorder_remove_device_state_changed_cb(cb_id + 100);
+ assert_eq(ret, RECORDER_ERROR_NONE);
+ assert_neq(cb_id, 0);
- recorder_remove_device_state_changed_cb(cb_id);
+ ret = recorder_remove_device_state_changed_cb(cb_id + 100);
- assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
- } else {
- assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
- }
+ recorder_remove_device_state_changed_cb(cb_id);
+
+ assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
}
* @since_tizen 4.0
* @description To check muxed stream callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set muxed stream callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
int buffer_count = 0;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_muxed_stream_cb(recorder, _muxed_stream_cb, (void *)&buffer_count);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 4.0
* @description To check muxed stream callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set muxed stream callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_muxed_stream_cb(recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 4.0
* @description To check to unset muxed stream callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset muxed stream callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_muxed_stream_cb(recorder);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 4.0
* @description To check to unset muxed stream callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as recorder handle null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset muxed stream callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_muxed_stream_cb(NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 6.0
* @description To check video encode decision callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check video recording and camera feature. \n
2. Set video encode decision callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
int ret = RECORDER_ERROR_NONE;
int buffer_count = 0;
char *media_path = NULL;
- recorder_h video_recorder = NULL;
-
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
- ret = recorder_create_videorecorder(camera, &video_recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_set_video_encode_decision_cb(video_recorder, _video_encode_decision_cb, (void *)&buffer_count);
assert_eq(ret, RECORDER_ERROR_NONE);
recorder_cancel(video_recorder);
recorder_unprepare(video_recorder);
- recorder_destroy(video_recorder);
return 0;
}
* @since_tizen 6.0
* @description To check video encode decision callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check microphone supported or not. \n
+ 1. Check video recording and camera feature. \n
2. Set video encode decision callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_set_video_encode_decision_cb(recorder, NULL, NULL);
+ ret = recorder_set_video_encode_decision_cb(video_recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 6.0
* @description To check to unset video encode decision callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check video recording and camera feature. \n
2. Unset video encode decision callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
- ret = recorder_unset_video_encode_decision_cb(recorder);
+ ret = recorder_unset_video_encode_decision_cb(video_recorder);
assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
* @since_tizen 6.0
* @description To check to unset video encode decision callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as recorder handle null. \n
- 1. Check microphone supported or not. \n
+ 1. Check video recording and camera feature. \n
2. Unset video encode decision callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!video_recording_supported) {
- assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
- }
-
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_VIDEO_RECORDING;
ret = recorder_unset_video_encode_decision_cb(NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 4.0
* @description To check interrupt started callback with valid pointer and parameters.
* @scenario This test is for checking parameters valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set interrupt started callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_interrupt_started_cb(recorder, _interrupt_started_cb, NULL);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 4.0
* @description To check interrupt started callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as null callback. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set invalid pointer in second parameter which is null pointer.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_interrupt_started_cb(recorder, NULL, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 4.0
* @description To check interrupt started callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as recorder handle "null". \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set invalid pointer which is recorder handle null.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_set_interrupt_started_cb(NULL, _interrupt_started_cb, NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
* @since_tizen 4.0
* @description To check to unset interrupt started callback with valid parameter.
* @scenario This test is for checking parameter valid or not. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Unset interrupt started callback.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_interrupt_started_cb(recorder);
assert_eq(ret, RECORDER_ERROR_NONE);
* @since_tizen 4.0
* @description To check to unset interrupt started callback with invalid parameter.
* @scenario This test is for checking invalid pointer such as recorder handle null. \n
- 1. Check microphone supported or not. \n
+ 1. Check audio recording feature. \n
2. Set invalid pointer which is recorder handle null.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
{
int ret = RECORDER_ERROR_NONE;
- if (!audio_recording_supported) {
- assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
- return 0;
- }
+ CHECK_FEATURE_AUDIO_RECORDING;
ret = recorder_unset_interrupt_started_cb(NULL);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
static bool video_recording_supported = false;
static bool audio_recording_supported = false;
+static bool camera_supported = false;
+
+static recorder_h recorder = NULL;
+
+static int startup_ret = RECORDER_ERROR_NONE;
+
+
+#define CHECK_FEATURE_AUDIO_RECORDING \
+ do {\
+ if (!audio_recording_supported) {\
+ assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);\
+ return 0;\
+ }\
+ } while (0)
+
+#define CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(check_ret) \
+ do {\
+ if (!audio_recording_supported) {\
+ assert_eq(check_ret, RECORDER_ERROR_NOT_SUPPORTED);\
+ return 0;\
+ }\
+ } while (0)
/**
* @function utc_media_recorder_lifecycle_startup
* @description Called before each test. \n
- This is the precondition for checking apis. \n
- Tiis precondition is create_audiorecorder api for checking device and privilege error.
- * @scenario 1. Check device storage supported. \n
+ The handles are created and supported features are checked.
+ * @scenario 1. Get platform feature for recordings and camera. \n
+ 2. Create audio recorder.
* @parameter N/A
* @return N/A
*/
void utc_media_recorder_lifecycle_startup(void)
{
- utc_media_recorder_util_get_recording_supported(&audio_recording_supported, &video_recording_supported);
+ audio_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_AUDIO_RECORDING);
+ video_recording_supported = utc_media_recorder_util_get_feature_supported(FEATURE_VIDEO_RECORDING);
+ camera_supported = utc_media_recorder_util_get_feature_supported(FEATURE_CAMERA);
- return;
+ startup_ret = recorder_create_audiorecorder(&recorder);
+}
+
+/**
+ * @function utc_media_recorder_lifecycle_cleanup
+ * @description Called after each test. \n
+ The handles are destroyed for next test. \n
+ * @scenario 1. Destroy audio recorder.
+ * @parameter N/A
+ * @return N/A
+ */
+void utc_media_recorder_lifecycle_cleanup(void)
+{
+ /* end of TC */
+ if (recorder) {
+ recorder_destroy(recorder);
+ recorder = NULL;
+ }
}
* @description To check audio recorder creation with valid parameter.
* @scenario This test is for checking valid pointer and parameters.
1. Create audio recorder. \n
- 2. Check microphone supported or not.
+ 2. Check audio recording feature. \n
+ 3. Destroy recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_create_audiorecorder_p(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
+ recorder_h audio_recorder = NULL;
- ret = recorder_create_audiorecorder(&recorder);
+ ret = recorder_create_audiorecorder(&audio_recorder);
- if (!audio_recording_supported) {
- assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
- } else {
- recorder_destroy(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
- }
+ CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
+
+ recorder_destroy(audio_recorder);
+
+ assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
}
* @since_tizen 2.3
* @description To check recorder cancel with valid parameter.
* @scenario This test is for checking valid pointer and parameters.
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Check supported audio encoder and file format. \n
- 4. Set supported audio encoder. \n
- 5. Set supported file format. \n
- 6. Set file name. \n
- 7. Prepare recorder. \n
- 8. Start recorder. \n
- 9. Record for some time while sleep. \n
- 10. Cancel recorder. \n
- 11. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Check supported audio encoder and file format. \n
+ 3. Set supported audio encoder. \n
+ 4. Set supported file format. \n
+ 5. Set file name. \n
+ 6. Prepare recorder. \n
+ 7. Start recorder. \n
+ 8. Record for some time while sleep. \n
+ 9. Cancel recorder. \n
+ 10. Unprepare recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_cancel_p(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
- ret = recorder_create_audiorecorder(&recorder);
+ CHECK_FEATURE_AUDIO_RECORDING;
- if (audio_recording_supported) {
- ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- ret = recorder_start(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ ret = recorder_start(recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- sleep(1);
+ sleep(1);
- ret = recorder_cancel(recorder);
+ ret = recorder_cancel(recorder);
- recorder_unprepare(recorder);
- recorder_destroy(recorder);
+ recorder_unprepare(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
- } else {
- assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
- }
+ assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
}
* @since_tizen 2.3
* @description To check recorder cancel with invalid precondition.
* @scenario This test is for checking with invalid precondition without calling recorder_start.
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Check supported audio encoder and file format. \n
- 4. Set supported audio encoder. \n
- 5. Set supported file format. \n
- 6. Prepare recorder. \n
- 7. Cancel recorder. \n
- 8. Unprepare recorder. \n
- 9. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Check supported audio encoder and file format. \n
+ 3. Set supported audio encoder. \n
+ 4. Set supported file format. \n
+ 5. Prepare recorder. \n
+ 6. Cancel recorder. \n
+ 7. Unprepare recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_cancel_n(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
- ret = recorder_create_audiorecorder(&recorder);
+ CHECK_FEATURE_AUDIO_RECORDING;
- if (audio_recording_supported) {
- ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- ret = recorder_cancel(recorder);
+ ret = recorder_cancel(recorder);
- recorder_unprepare(recorder);
- recorder_destroy(recorder);
+ recorder_unprepare(recorder);
- assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
- } else {
- assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
- }
+ assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
return 0;
}
* @since_tizen 2.3
* @description To check recorder commit with valid precondition.
* @scenario This test is for checking with valid parameters and preconditions.
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Check supported audio encoder and file format. \n
- 4. Set supported audio encoder. \n
- 5. Set supported file format. \n
- 6. Set file name. \n
- 7. Prepare recorder. \n
- 8. Start recorder. \n
- 9. Sleep for a while. \n
- 10. Commit recorder. \n
- 11. Unprepare recorder. \n
- 12. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Check supported audio encoder and file format. \n
+ 3. Set supported audio encoder. \n
+ 4. Set supported file format. \n
+ 5. Set file name. \n
+ 6. Prepare recorder. \n
+ 7. Start recorder. \n
+ 8. Sleep for a while. \n
+ 9. Commit recorder. \n
+ 10. Unprepare recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_commit_p(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
- ret = recorder_create_audiorecorder(&recorder);
+ CHECK_FEATURE_AUDIO_RECORDING;
- if (audio_recording_supported) {
- ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
- ret |= recorder_start(recorder);
+ ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+ ret |= recorder_start(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- sleep(2);
+ sleep(2);
- ret = recorder_commit(recorder);
+ ret = recorder_commit(recorder);
- recorder_unprepare(recorder);
- recorder_destroy(recorder);
+ recorder_unprepare(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
- } else {
- assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
- }
+ assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
}
* @since_tizen 2.3
* @description To check recorder commit with invalid precondition.
* @scenario This test is for checking without precondition such as recorder_start. \n
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Check supported audio encoder and file format. \n
- 4. Set supported audio encoder. \n
- 5. Set supported file format. \n
- 6. Prepare recorder. \n
- 7. Commit recorder. \n
- 8. Unprepare recorder. \n
- 9. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Check supported audio encoder and file format. \n
+ 3. Set supported audio encoder. \n
+ 4. Set supported file format. \n
+ 5. Prepare recorder. \n
+ 6. Commit recorder. \n
+ 7. Unprepare recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_commit_n(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
- ret = recorder_create_audiorecorder(&recorder);
+ CHECK_FEATURE_AUDIO_RECORDING;
- if (audio_recording_supported) {
- ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- ret = recorder_commit(recorder);
+ ret = recorder_commit(recorder);
- recorder_unprepare(recorder);
- recorder_destroy(recorder);
+ recorder_unprepare(recorder);
- assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
- } else {
- assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
- }
+ assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
return 0;
}
* @since_tizen 2.3
* @description To check video recorder creation with valid precondition.
* @scenario This test is for checking with proper precondition. \n
- 1. Create camera. \n
- 2. Check camera supported or not. \n
- 3. Create video recorder. \n
- 4. Destroy recorder. \n
- 5. Destroy camera.
+ 1. Check video recording feature. \n
+ 2. Create video recorder. \n
+ 3. Destroy recorder.
* @paramter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
*/
int utc_media_recorder_create_videorecorder_p(void)
{
- recorder_h recorder = NULL;
camera_h camera = NULL;
- int ret = CAMERA_ERROR_NONE;
- int ret2 = RECORDER_ERROR_NONE;
+ recorder_h video_recorder = NULL;
+ int ret_recorder = RECORDER_ERROR_NONE;
+ int ret_camera = CAMERA_ERROR_NONE;
+
+ ret_camera = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
+ ret_recorder = recorder_create_videorecorder(camera, &video_recorder);
- ret = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
- if (!video_recording_supported) {
- assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
- return 0;
+ if (video_recording_supported) {
+ assert_eq(ret_camera, CAMERA_ERROR_NONE);
+ assert_eq(ret_recorder, RECORDER_ERROR_NONE);
} else {
- assert_eq(ret, CAMERA_ERROR_NONE);
+ if (camera_supported) {
+ assert_eq(ret_camera, CAMERA_ERROR_NONE);
+ assert_eq(ret_recorder, RECORDER_ERROR_NOT_SUPPORTED);
+ } else {
+ assert_eq(ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
+ assert_eq(ret_recorder, RECORDER_ERROR_INVALID_PARAMETER);
+ }
}
- ret2 = recorder_create_videorecorder(camera, &recorder);
-
- if (recorder)
- recorder_destroy(recorder);
+ if (video_recorder)
+ recorder_destroy(video_recorder);
if (camera)
camera_destroy(camera);
- assert_eq(ret2, RECORDER_ERROR_NONE);
-
return 0;
}
*/
int utc_media_recorder_create_videorecorder_n(void)
{
- recorder_h recorder = NULL;
+ recorder_h _video_recorder = NULL;
int ret = RECORDER_ERROR_NONE;
- ret = recorder_create_videorecorder(NULL, &recorder);
+ ret = recorder_create_videorecorder(NULL, &_video_recorder);
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
* @since_tizen 2.3
* @description To check to destroy recorder with valid precondition.
* @scenario This test is for checking with valid precondition.
- 1. create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Create audio recorder. \n
+ 3. Destroy recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
*/
int utc_media_recorder_destroy_p(void)
{
- recorder_h recorder = NULL;
+ recorder_h audio_recorder = NULL;
int ret = RECORDER_ERROR_NONE;
- ret = recorder_create_audiorecorder(&recorder);
+ CHECK_FEATURE_AUDIO_RECORDING;
- if (audio_recording_supported) {
- assert_eq(ret, RECORDER_ERROR_NONE);
+ ret = recorder_create_audiorecorder(&audio_recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- ret = recorder_destroy(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
- } else {
- assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
- }
+ ret = recorder_destroy(audio_recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
}
* @since_tizen 2.3
* @description To check to pause recorder with valid precondition.
* @scenario This test is for checking with valid precondition.
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Check supported audio encoder and file format. \n
- 4. Set supported audio encoder. \n
- 5. Set supported file format. \n
- 6. Set file name. \n
- 7. Prepare recorder. \n
- 8. Start recorder. \n
- 9. Sleep for a while. \n
- 10. Pause recorder. \n
- 11. Cancel recorder. \n
- 12. Unprepare recorder. \n
- 13. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Check supported audio encoder and file format. \n
+ 3. Set supported audio encoder. \n
+ 4. Set supported file format. \n
+ 5. Set file name. \n
+ 6. Prepare recorder. \n
+ 7. Start recorder. \n
+ 8. Sleep for a while. \n
+ 9. Pause recorder. \n
+ 10. Cancel recorder. \n
+ 11. Unprepare recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_pause_p(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
- ret = recorder_create_audiorecorder(&recorder);
+ CHECK_FEATURE_AUDIO_RECORDING;
- if (audio_recording_supported) {
- ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
- ret |= recorder_start(recorder);
+ ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+ ret |= recorder_start(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- sleep(2);
+ sleep(2);
- ret = recorder_pause(recorder);
+ ret = recorder_pause(recorder);
- recorder_cancel(recorder);
- recorder_unprepare(recorder);
- recorder_destroy(recorder);
+ recorder_cancel(recorder);
+ recorder_unprepare(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
- } else {
- assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
- }
+ assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
}
* @since_tizen 2.3
* @description To check to pause recorder with invalid precondition.
* @scenario This test is for checking with invalid preconditon such as recorder_start. \n
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Check supported audio encoder and file format. \n
- 4. Set supported audio encoder. \n
- 5. Set supported file format. \n
- 6. Prepare recorder. \n
- 7. Pause recorder. \n
- 8. Unprepare recorder. \n
- 9. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Check supported audio encoder and file format. \n
+ 3. Set supported audio encoder. \n
+ 4. Set supported file format. \n
+ 5. Prepare recorder. \n
+ 6. Pause recorder. \n
+ 7. Unprepare recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_pause_n(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
- ret = recorder_create_audiorecorder(&recorder);
+ CHECK_FEATURE_AUDIO_RECORDING;
- if (audio_recording_supported) {
- ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- ret = recorder_pause(recorder);
+ ret = recorder_pause(recorder);
- recorder_unprepare(recorder);
- recorder_destroy(recorder);
+ recorder_unprepare(recorder);
- assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
- } else {
- assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
- }
+ assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
return 0;
}
* @since_tizen 2.3
* @description To check to prepare recorder with valid precondition.
* @scenario This test is for checking with valid precondition. \n
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Check supported audio encoder and file format. \n
- 4. Set supported audio encoder. \n
- 5. Set supported file format. \n
- 6. Prepare recorder. \n
- 7. Unprepare recorder. \n
- 8. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Check supported audio encoder and file format. \n
+ 3. Set supported audio encoder. \n
+ 4. Set supported file format. \n
+ 5. Prepare recorder. \n
+ 6. Unprepare recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_prepare_p(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
- ret = recorder_create_audiorecorder(&recorder);
+ CHECK_FEATURE_AUDIO_RECORDING;
- if (audio_recording_supported) {
- ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- recorder_unprepare(recorder);
- recorder_destroy(recorder);
+ recorder_unprepare(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
- } else {
- assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
- }
+ assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
}
* @since_tizen 2.3
* @description To check prepare recorder with invalid precondition.
* @scenario This test is for checking with invalid precondition with default setting. \n
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Prepare recorder. \n
- 4. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Prepare recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_prepare_n1(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
-
- ret = recorder_create_audiorecorder(&recorder);
- if (audio_recording_supported) {
- assert_eq(ret, RECORDER_ERROR_NONE);
+ CHECK_FEATURE_AUDIO_RECORDING;
- ret = recorder_prepare(recorder);
-
- recorder_destroy(recorder);
-
- assert_eq(ret, RECORDER_ERROR_INVALID_OPERATION);
- } else {
- assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
- }
+ ret = recorder_prepare(recorder);
+ assert_eq(ret, RECORDER_ERROR_INVALID_OPERATION);
return 0;
}
* @since_tizen 2.3
* @description To check to start recorder with valid precondition.
* @scenario This test is for checking with valid precondition. \n
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Check supported audio encoder and file format. \n
- 4. Set supported audio encoder. \n
- 5. Set supported file format. \n
- 6. Set file name. \n
- 7. Prepare recorder. \n
- 8. Start recorder. \n
- 9. Cancel recorder. \n
- 10. Unprepare recorder. \n
- 11. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Check supported audio encoder and file format. \n
+ 3. Set supported audio encoder. \n
+ 4. Set supported file format. \n
+ 5. Set file name. \n
+ 6. Prepare recorder. \n
+ 7. Start recorder. \n
+ 8. Cancel recorder. \n
+ 9. Unprepare recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_start_p(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
- ret = recorder_create_audiorecorder(&recorder);
+ CHECK_FEATURE_AUDIO_RECORDING;
- if (audio_recording_supported) {
- ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- ret = recorder_start(recorder);
+ ret = recorder_start(recorder);
- recorder_cancel(recorder);
- recorder_unprepare(recorder);
- recorder_destroy(recorder);
+ recorder_cancel(recorder);
+ recorder_unprepare(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
- } else {
- assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
- }
+ assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
}
* @since_tizen 2.3
* @description To check to start recorder with invalid precondition.
* @scenario This test is for checking with invalid precondition such as recorder_prepare. \n
- 1. Create audiorecorder. \n
- 2. Check microphone supported or not. \n
- 3. Start recorder. \n
- 4. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Start recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_start_n(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
-
- ret = recorder_create_audiorecorder(&recorder);
-
- if (audio_recording_supported) {
- assert_eq(ret, RECORDER_ERROR_NONE);
-
- ret = recorder_start(recorder);
- recorder_destroy(recorder);
+ CHECK_FEATURE_AUDIO_RECORDING;
- assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
- } else {
- assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
- }
+ ret = recorder_start(recorder);
+ assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
return 0;
}
* @since_tizen 2.3
* @description To check to unprepare recorder with valid precondition.
* @scenario This test is for checking with valid precondition. \n
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Check supported audio encoder and file format. \n
- 4. Set supported audio encoder. \n
- 5. Set supported file format. \n
- 6. Prepare recorder. \n
- 7. Unprepare recorder. \n
- 8. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Check supported audio encoder and file format. \n
+ 3. Set supported audio encoder. \n
+ 4. Set supported file format. \n
+ 5. Prepare recorder. \n
+ 6. Unprepare recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_unprepare_p(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
-
- ret = recorder_create_audiorecorder(&recorder);
- if (audio_recording_supported) {
- ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
- assert_eq(ret, RECORDER_ERROR_NONE);
+ CHECK_FEATURE_AUDIO_RECORDING;
- ret = recorder_unprepare(recorder);
+ ret = utc_media_recorder_util_prepare_audio_recorder(recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
- recorder_destroy(recorder);
-
- assert_eq(ret, RECORDER_ERROR_NONE);
- } else {
- assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
- }
+ ret = recorder_unprepare(recorder);
+ assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
}
* @since_tizen 2.3
* @description To check to unprepare recorder with invalid precondition.
* @scenario This test is for checking with invalid precondition such as recorder_prepare. \n
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Unprepare recorder. \n
- 4. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Unprepare recorder.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_unprepare_n1(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
-
- ret = recorder_create_audiorecorder(&recorder);
-
- if (audio_recording_supported) {
- assert_eq(ret, RECORDER_ERROR_NONE);
-
- ret = recorder_unprepare(recorder);
- recorder_destroy(recorder);
+ CHECK_FEATURE_AUDIO_RECORDING;
- assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
- } else {
- assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
- }
+ ret = recorder_unprepare(recorder);
+ assert_eq(ret, RECORDER_ERROR_INVALID_STATE);
return 0;
}
* @since_tizen 2.3
* @description To check recorder state with valid precondition.
* @scenario This test is for checking valid state of recorder. \n
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Get state. \n
- 4. Destroy recorder.
- * @parameter N/A
- * @return 1 is the fail. You need to check log in tct tool. \n
+ 1. Check audio recording feature. \n
+ 2. Get state.
+ * @parameter N/A
+ * @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
The "ret" value should be success.
*/
int utc_media_recorder_get_state_p(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
recorder_state_e state = RECORDER_STATE_NONE;
- ret = recorder_create_audiorecorder(&recorder);
-
- if (audio_recording_supported) {
- assert_eq(ret, RECORDER_ERROR_NONE);
+ CHECK_FEATURE_AUDIO_RECORDING;
- ret = recorder_get_state(recorder, &state);
-
- recorder_destroy(recorder);
-
- assert_eq(ret, RECORDER_ERROR_NONE);
- } else {
- assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
- }
+ ret = recorder_get_state(recorder, &state);
+ assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
}
* @since_tizen 2.3
* @description To check recorder state with invalid parameter.
* @scenario This test is for checking invalid parameter such as null. \n
- 1. Create audio recorder. \n
- 2. Check microphone supported or not. \n
- 3. Get state. \n
- 4. Destroy recorder.
+ 1. Check audio recording feature. \n
+ 2. Get state.
* @parameter N/A
* @return 1 is the fail. You need to check log in tct tool. \n
0 is the success. \n
int utc_media_recorder_get_state_n2(void)
{
int ret = RECORDER_ERROR_NONE;
- recorder_h recorder = NULL;
-
- ret = recorder_create_audiorecorder(&recorder);
- if (audio_recording_supported) {
- ret = recorder_get_state(recorder, NULL);
+ CHECK_FEATURE_AUDIO_RECORDING;
- recorder_destroy(recorder);
-
- assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
- } else {
- assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
- }
+ ret = recorder_get_state(recorder, NULL);
+ assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
}
* @description To check device state with valid value in parameters.
* @scenario This test is for checking device state getting with valid parameters.
1. Get device state with valid parameters. \n
- 2. Check microphone which is supported or not. \n
+ 2. Check audio recording feature. \n
3-1. If supported, compare "ret" value with RECORDER_ERROR_NONE. \n
3-1. If not supported, compare "ret" value with RECORDER_ERROR_NOT_SUPPORTED.
* @parameter N/A
int utc_media_recorder_get_device_state_p(void)
{
int ret = RECORDER_ERROR_NONE;
- int check_ret = RECORDER_ERROR_NONE;
recorder_device_state_e device_state = RECORDER_DEVICE_STATE_IDLE;
ret = recorder_get_device_state(RECORDER_TYPE_AUDIO, &device_state);
- if (audio_recording_supported)
- check_ret = RECORDER_ERROR_NONE;
- else
- check_ret = RECORDER_ERROR_NOT_SUPPORTED;
+ CHECK_FEATURE_AUDIO_RECORDING_WITH_RETURN(ret);
- assert_eq(ret, check_ret);
+ assert_eq(ret, RECORDER_ERROR_NONE);
return 0;
}
recorder_device_state_e device_state = RECORDER_DEVICE_STATE_IDLE;
ret = recorder_get_device_state(-1, &device_state);
-
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
int ret = RECORDER_ERROR_NONE;
ret = recorder_get_device_state(RECORDER_TYPE_AUDIO, NULL);
-
assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
return 0;
return ret;
}
-void utc_media_recorder_util_get_recording_supported(bool *audio_recording_supported, bool *video_recording_supported)
+bool utc_media_recorder_util_get_feature_supported(const char *feature)
{
- if (audio_recording_supported) {
- system_info_get_platform_bool("http://tizen.org/feature/media.audio_recording", audio_recording_supported);
- dlog_print(DLOG_INFO, LOG_TAG, "Feature: Audio Recording [%d]", *audio_recording_supported);
- }
+ int ret = SYSTEM_INFO_ERROR_NONE;
+ bool supported = false;
- if (video_recording_supported) {
- system_info_get_platform_bool("http://tizen.org/feature/media.video_recording", video_recording_supported);
- dlog_print(DLOG_INFO, LOG_TAG, "Feature: Video Recording [%d]", *video_recording_supported);
- }
+ ret = system_info_get_platform_bool(feature, &supported);
+ if (ret != SYSTEM_INFO_ERROR_NONE)
+ dlog_print(DLOG_WARN, LOG_TAG, "Feature[%s] get failed[0x%x]", feature, ret);
+
+ dlog_print(DLOG_INFO, LOG_TAG, "Feature[%s] [%s]", feature, supported ? "TRUE" : "FALSE");
+
+ return supported;
}
gboolean utc_media_recorder_util_mainloop_quit(gpointer user_data)
#include <glib.h>
+#define FEATURE_AUDIO_RECORDING "http://tizen.org/feature/media.audio_recording"
+#define FEATURE_VIDEO_RECORDING "http://tizen.org/feature/media.video_recording"
+#define FEATURE_CAMERA "http://tizen.org/feature/camera"
+
bool _audio_encoder_cb(recorder_audio_codec_e codec, void *user_data);
bool _file_format_cb(recorder_file_format_e format, void *user_data);
int utc_media_recorder_util_prepare_audio_recorder(recorder_h recorder);
void utc_media_recorder_util_get_media_path(char **media_path);
-void utc_media_recorder_util_get_recording_supported(bool *audio_recording_supported, bool *video_recording_supported);
+bool utc_media_recorder_util_get_feature_supported(const char *feature);
gboolean utc_media_recorder_util_mainloop_quit(gpointer user_data);
void utc_media_recorder_util_mainloop_run(void);