Add "http://tizen.org/feature/multimedia.stream_recorder" feature 68/227568/10 accepted/tizen/5.5/unified/20200326.232330 submit/tizen_5.5/20200324.063643 submit/tizen_5.5/20200326.024040
authorHyunsoo Park <hance.park@samsung.com>
Mon, 2 Mar 2020 08:30:13 +0000 (17:30 +0900)
committerHyunsoo Park <hance.park@samsung.com>
Tue, 24 Mar 2020 04:27:33 +0000 (13:27 +0900)
Change-Id: Iab7748881019cfa08c8b03c934cd72ee440256a1
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
CMakeLists.txt
include/streamrecorder.h
include/streamrecorder_private.h
packaging/capi-media-streamrecorder.spec
src/streamrecorder.c

index d915d94..7dab946 100644 (file)
@@ -22,7 +22,7 @@ SET(service "media")
 SET(submodule "streamrecorder")
 
 # for package file
-SET(dependents "dlog mm-streamrecorder capi-media-tool")
+SET(dependents "dlog mm-streamrecorder capi-media-tool capi-system-info")
 SET(pc_dependents "capi-base-common capi-media-tool")
 
 SET(fw_name "${project_prefix}-${service}-${submodule}")
index 32e9915..541a24d 100644 (file)
@@ -292,6 +292,7 @@ typedef bool (*streamrecorder_supported_video_encoder_cb)(streamrecorder_video_c
  * @param[out]  recorder       A handle to the streamrecorder
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_OUT_OF_MEMORY Out of memory
  * @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation
@@ -304,11 +305,14 @@ int streamrecorder_create(streamrecorder_h *recorder);
  * @param[in]  recorder    The handle to the streamrecorder
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre  The recorder state should be #STREAMRECORDER_STATE_CREATED.
  * @post The recorder state will be #STREAMRECORDER_STATE_NONE.
+ * @see streamrecorder_create()
  */
 int streamrecorder_destroy(streamrecorder_h recorder);
 
@@ -321,12 +325,15 @@ int streamrecorder_destroy(streamrecorder_h recorder);
  * @param[in]  recorder  The handle to the streamrecorder
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre  The recorder state should be #STREAMRECORDER_STATE_CREATED. \n
  *           The streamrecorder_enable_source_buffer() should be invoked before this function.
  * @post The streamrecorder state will be #STREAMRECORDER_STATE_PREPARED
+ * @see streamrecorder_create()
  * @see        streamrecorder_unprepare()
  * @see        streamrecorder_set_audio_encoder()
  * @see        streamrecorder_set_video_encoder()
@@ -340,11 +347,14 @@ int streamrecorder_prepare(streamrecorder_h recorder);
  * @param[in]  recorder  The handle to the streamrecorder
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre  The streamrecorder state should be #STREAMRECORDER_STATE_PREPARED set by streamrecorder_prepare(), streamrecorder_cancel() or streamrecorder_commit().
  * @post The streamrecorder state will be #STREAMRECORDER_STATE_CREATED.
+ * @see streamrecorder_create()
  * @see        streamrecorder_prepare()
  * @see        streamrecorder_cancel()
  * @see        streamrecorder_commit()
@@ -362,13 +372,16 @@ int streamrecorder_unprepare(streamrecorder_h recorder);
  * @param[in]  recorder  The handle to the streamrecorder
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
  * @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_PREPARED by streamrecorder_prepare() or #STREAMRECORDER_STATE_PAUSED by streamrecorder_pause(). \n
  * The filename should be set by streamrecorder_set_filename().
  * @post The recorder state will be #STREAMRECORDER_STATE_RECORDING.
+ * @see streamrecorder_create()
  * @see        streamrecorder_pause()
  * @see        streamrecorder_commit()
  * @see        streamrecorder_cancel()
@@ -387,11 +400,14 @@ int streamrecorder_start(streamrecorder_h recorder);
  * @param[in]  recorder  The handle to the streamrecorder
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_RECORDING.
  * @post The streamrecorder state will be #STREAMRECORDER_STATE_PAUSED.
+ * @see streamrecorder_create()
  * @see streamrecorder_commit()
  * @see streamrecorder_cancel()
  */
@@ -406,12 +422,15 @@ int streamrecorder_pause(streamrecorder_h recorder);
  * @param[in]  recorder  The handle to the streamrecorder
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
  * @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_RECORDING set by streamrecorder_start() or #STREAMRECORDER_STATE_PAUSED by streamrecorder_pause().
  * @post The streamrecorder state will be #STREAMRECORDER_STATE_PREPARED.
+ * @see streamrecorder_create()
  * @see streamrecorder_pause()
  * @see streamrecorder_cancel()
  * @see streamrecorder_set_filename()
@@ -429,12 +448,15 @@ int streamrecorder_commit(streamrecorder_h recorder);
  * @param[in]  recorder  The handle to the streamrecorder
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
  * @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_RECORDING set by streamrecorder_start() or #STREAMRECORDER_STATE_PAUSED by streamrecorder_pause().
  * @post The streamrecorder state will be #STREAMRECORDER_STATE_PREPARED.
+ * @see streamrecorder_create()
  * @see streamrecorder_pause()
  * @see streamrecorder_commit()
  * @see streamrecorder_start()
@@ -451,22 +473,28 @@ int streamrecorder_cancel(streamrecorder_h recorder);
  * @param[in]  inbuf The media packet containing buffer and other associated values
  * @return  @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  */
 int streamrecorder_push_stream_buffer(streamrecorder_h recorder, media_packet_h inbuf);
 
 /**
- * @brief Sets the video source as live buffer to be used for recording
+ * @brief Sets the video source as live buffer to be used for recording.
  * @since_tizen 3.0
  * @remarks if you want to enable video or audio or both recording, call before streamrecorder_prepare()
  * @param[in]  recorder  A handle to the streamrecorder
  * @param[in]  type The type of source input
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be only #STREAMRECORDER_STATE_CREATED
+ * @see streamrecorder_create()
  */
 int streamrecorder_enable_source_buffer(streamrecorder_h recorder, streamrecorder_source_e type);
 
@@ -477,7 +505,10 @@ int streamrecorder_enable_source_buffer(streamrecorder_h recorder, streamrecorde
  * @param[out] state  The current state of the streamrecorder
  * @return  @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  */
 int streamrecorder_get_state(streamrecorder_h recorder, streamrecorder_state_e *state);
 
@@ -500,10 +531,13 @@ int streamrecorder_get_state(streamrecorder_h recorder, streamrecorder_state_e *
  * @param[in]  path The recording file path
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n
  *          streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see streamrecorder_get_filename()
  */
 int streamrecorder_set_filename(streamrecorder_h recorder, const char *path);
@@ -516,8 +550,11 @@ int streamrecorder_set_filename(streamrecorder_h recorder, const char *path);
  * @param[out] path    The recording file path
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  *          streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_filename()
  */
 int streamrecorder_get_filename(streamrecorder_h recorder, char **path);
@@ -529,11 +566,14 @@ int streamrecorder_get_filename(streamrecorder_h recorder, char **path);
  * @param[in] format   The media file format
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
  * @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n
  *          streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see streamrecorder_get_file_format()
  * @see streamrecorder_foreach_supported_file_format()
  */
@@ -547,14 +587,16 @@ int streamrecorder_set_file_format(streamrecorder_h recorder, streamrecorder_fil
  * @param[out] format   The media file format
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see streamrecorder_set_file_format()
  * @see streamrecorder_foreach_supported_file_format()
  */
 int streamrecorder_get_file_format(streamrecorder_h recorder, streamrecorder_file_format_e *format);
 
-
 /**
  * @brief Sets the audio codec for encoding an audio stream.
  * @since_tizen 3.0
@@ -563,12 +605,14 @@ int streamrecorder_get_file_format(streamrecorder_h recorder, streamrecorder_fil
  * @param[in] codec    The audio codec
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
- * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_OPERATION Invalid operation
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n
  *          streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_get_audio_encoder()
  * @see streamrecorder_foreach_supported_audio_encoder()
  */
@@ -581,9 +625,11 @@ int streamrecorder_set_audio_encoder(streamrecorder_h recorder, streamrecorder_a
  * @param[out] codec   The audio codec
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_audio_encoder()
  * @see streamrecorder_foreach_supported_audio_encoder()
  */
@@ -598,11 +644,13 @@ int streamrecorder_get_audio_encoder(streamrecorder_h recorder, streamrecorder_a
  * @param[in] height   The input height
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
- * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre    The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n
  *          streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_start()
  * @see        streamrecorder_get_video_resolution()
  * @see        streamrecorder_foreach_supported_video_resolution()
@@ -617,9 +665,11 @@ int streamrecorder_set_video_resolution(streamrecorder_h recorder, int width, in
  * @param[out] height  The video height
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_video_resolution()
  * @see        streamrecorder_foreach_supported_video_resolution()
  */
@@ -633,11 +683,13 @@ int streamrecorder_get_video_resolution(streamrecorder_h recorder, int *width, i
  * @param[in] codec    The video codec
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
- * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n
  *          streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see streamrecorder_get_video_encoder()
  * @see streamrecorder_foreach_supported_video_encoder()
  */
@@ -650,9 +702,11 @@ int streamrecorder_set_video_encoder(streamrecorder_h recorder, streamrecorder_v
  * @param[out] codec   The video codec
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED The feature is not supported
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see streamrecorder_set_video_encoder()
  * @see streamrecorder_foreach_supported_video_encoder()
  */
@@ -666,8 +720,11 @@ int streamrecorder_get_video_encoder(streamrecorder_h recorder, streamrecorder_v
  * @param[in] framerate The frame rate for recording
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  * @see streamrecorder_get_video_framerate()
  */
 int streamrecorder_set_video_framerate(streamrecorder_h recorder, int framerate);
@@ -679,7 +736,10 @@ int streamrecorder_set_video_framerate(streamrecorder_h recorder, int framerate)
  * @param[out] framerate The frame rate for recording that already is set
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  * @see streamrecorder_set_video_framerate()
  */
 int streamrecorder_get_video_framerate(streamrecorder_h recorder, int *framerate);
@@ -692,8 +752,11 @@ int streamrecorder_get_video_framerate(streamrecorder_h recorder, int *framerate
  * @param[in] format The color type of video source
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  * @see streamrecorder_get_video_source_format()
  */
 int streamrecorder_set_video_source_format(streamrecorder_h recorder, streamrecorder_video_source_format_e format);
@@ -706,7 +769,10 @@ int streamrecorder_set_video_source_format(streamrecorder_h recorder, streamreco
  * @param[out] format The color type of video source that already is set
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  * @see streamrecorder_set_video_source_format()
  */
 int streamrecorder_get_video_source_format(streamrecorder_h recorder, streamrecorder_video_source_format_e *format);
@@ -722,10 +788,13 @@ int streamrecorder_get_video_source_format(streamrecorder_h recorder, streamreco
  *                     @c 0 means unlimited recording size or time.
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n
  *          streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_get_recording_limit()
  */
 int streamrecorder_set_recording_limit(streamrecorder_h recorder, streamrecorder_recording_limit_type_e type, int limit);
@@ -740,8 +809,11 @@ int streamrecorder_set_recording_limit(streamrecorder_h recorder, streamrecorder
  *                     @c 0 means unlimited recording size or time.
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_recording_limit()
  */
 int streamrecorder_get_recording_limit(streamrecorder_h recorder, streamrecorder_recording_limit_type_e type, int *limit);
@@ -753,10 +825,13 @@ int streamrecorder_get_recording_limit(streamrecorder_h recorder, streamrecorder
  * @param[in] samplerate The sample rate in Hertz
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n
  *          streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_get_audio_samplerate()
  */
 int streamrecorder_set_audio_samplerate(streamrecorder_h recorder, int samplerate);
@@ -768,8 +843,11 @@ int streamrecorder_set_audio_samplerate(streamrecorder_h recorder, int samplerat
  * @param[out] samplerate  The sample rate in Hertz
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_audio_samplerate()
  */
 int streamrecorder_get_audio_samplerate(streamrecorder_h recorder, int *samplerate);
@@ -781,10 +859,13 @@ int streamrecorder_get_audio_samplerate(streamrecorder_h recorder, int *samplera
  * @param[in] bitrate   The bitrate (for mms : 12200[bps], normal : 288000[bps])
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n
  *          streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_get_audio_encoder_bitrate()
  */
 int streamrecorder_set_audio_encoder_bitrate(streamrecorder_h recorder, int bitrate);
@@ -796,10 +877,13 @@ int streamrecorder_set_audio_encoder_bitrate(streamrecorder_h recorder, int bitr
  * @param[in] bitrate   The bitrate in bits per second
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED. \n
  *          streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_get_video_encoder_bitrate()
  */
 int streamrecorder_set_video_encoder_bitrate(streamrecorder_h recorder, int bitrate);
@@ -811,8 +895,11 @@ int streamrecorder_set_video_encoder_bitrate(streamrecorder_h recorder, int bitr
  * @param[out] bitrate   The bitrate in bits per second
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_audio_encoder_bitrate()
  */
 int streamrecorder_get_audio_encoder_bitrate(streamrecorder_h recorder, int *bitrate);
@@ -824,8 +911,11 @@ int streamrecorder_get_audio_encoder_bitrate(streamrecorder_h recorder, int *bit
  * @param[out] bitrate   The bitrate in bits per second
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_audio_encoder_bitrate()
  */
 int streamrecorder_get_video_encoder_bitrate(streamrecorder_h recorder, int *bitrate);
@@ -840,10 +930,13 @@ int streamrecorder_get_video_encoder_bitrate(streamrecorder_h recorder, int *bit
  * @param[in] channel_count  The number of the audio channel
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #STREAMRECORDER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder state must be #STREAMRECORDER_STATE_CREATED.\n
  *          streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_get_audio_channel()
  */
 int streamrecorder_set_audio_channel(streamrecorder_h recorder, int channel_count);
@@ -855,8 +948,11 @@ int streamrecorder_set_audio_channel(streamrecorder_h recorder, int channel_coun
  * @param[out] channel_count  The number of the audio channel
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @pre The streamrecorder_enable_source_buffer() should be invoked before this function.
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_audio_channel()
  */
 int streamrecorder_get_audio_channel(streamrecorder_h recorder, int *channel_count);
@@ -879,8 +975,11 @@ int streamrecorder_get_audio_channel(streamrecorder_h recorder, int *channel_cou
  * @param[in] user_data        The user data to be passed to the callback function
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @post  streamrecorder_supported_file_format_cb() will be invoked.
+ * @see streamrecorder_create()
  * @see streamrecorder_get_file_format()
  * @see streamrecorder_set_file_format()
  * @see streamrecorder_supported_file_format_cb()
@@ -895,8 +994,11 @@ int streamrecorder_foreach_supported_file_format(streamrecorder_h recorder, stre
  * @param[in] user_data        The user data to be passed to the callback function
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @post  streamrecorder_supported_audio_encoder_cb() will be invoked.
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_audio_encoder()
  * @see        streamrecorder_get_audio_encoder()
  * @see        streamrecorder_supported_audio_encoder_cb()
@@ -911,8 +1013,11 @@ int streamrecorder_foreach_supported_audio_encoder(streamrecorder_h recorder, st
  * @param[in] user_data        The user data to be passed to the callback function
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @post  streamrecorder_supported_video_encoder_cb() will be invoked.
+ * @see streamrecorder_create()
  * @see streamrecorder_set_video_encoder()
  * @see streamrecorder_get_video_encoder()
  * @see        streamrecorder_supported_video_encoder_cb()
@@ -927,8 +1032,11 @@ int streamrecorder_foreach_supported_video_encoder(streamrecorder_h recorder, st
  * @param[in] user_data        The user data to be passed to the callback function
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @post       This function invokes streamrecorder_supported_video_resolution_cb() repeatedly to retrieve each supported video resolution.
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_video_resolution()
  * @see        streamrecorder_get_video_resolution()
  * @see        streamrecorder_supported_video_resolution_cb()
@@ -954,8 +1062,11 @@ int streamrecorder_foreach_supported_video_resolution(streamrecorder_h recorder,
  * @param[in] user_data The user data to be passed to the callback function
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @post  streamrecorder_notify_cb() will be invoked.
+ * @see streamrecorder_create()
  * @see streamrecorder_unset_notify_cb()
  * @see streamrecorder_notify_cb()
  */
@@ -967,7 +1078,10 @@ int streamrecorder_set_notify_cb(streamrecorder_h recorder, streamrecorder_notif
  * @param[in]  recorder The handle to the streamrecorder
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  * @see streamrecorder_set_notify_cb()
  */
 int streamrecorder_unset_notify_cb(streamrecorder_h recorder);
@@ -980,8 +1094,11 @@ int streamrecorder_unset_notify_cb(streamrecorder_h recorder);
  * @param[in]  user_data  The user data to be passed to the callback function
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @post  streamrecorder_recording_status_cb() will be invoked.
+ * @see streamrecorder_create()
  * @see        streamrecorder_unset_recording_status_cb()
  * @see        streamrecorder_recording_status_cb()
  */
@@ -993,7 +1110,9 @@ int streamrecorder_set_recording_status_cb(streamrecorder_h recorder, streamreco
  * @param[in]  recorder    The handle to the streamrecorder
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @see        streamrecorder_set_recording_status_cb()
  */
 int streamrecorder_unset_recording_status_cb(streamrecorder_h recorder);
@@ -1006,8 +1125,11 @@ int streamrecorder_unset_recording_status_cb(streamrecorder_h recorder);
  * @param[in]  user_data       The user data to be passed to the callback function
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @post  streamrecorder_recording_limit_reached_cb() will be invoked.
+ * @see streamrecorder_create()
  * @see        streamrecorder_unset_recording_limit_reached_cb()
  * @see        streamrecorder_set_time_limit()
  * @see        streamrecorder_recording_limit_reached_cb()
@@ -1020,7 +1142,10 @@ int streamrecorder_set_recording_limit_reached_cb(streamrecorder_h recorder, str
  * @param[in]  recorder  The handle to the streamrecorder
  * @return @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_recording_limit_reached_cb()
  */
 int streamrecorder_unset_recording_limit_reached_cb(streamrecorder_h recorder);
@@ -1038,8 +1163,11 @@ int streamrecorder_unset_recording_limit_reached_cb(streamrecorder_h recorder);
  * @param[in]  user_data       The user data to be passed to the callback function
  * @return  @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
  * @post       This function will invoke streamrecorder_error_cb() when an asynchronous operation error occur.
+ * @see streamrecorder_create()
  * @see        streamrecorder_unset_error_cb()
  * @see        streamrecorder_error_cb()
  */
@@ -1052,7 +1180,10 @@ int streamrecorder_set_error_cb(streamrecorder_h recorder, streamrecorder_error_
  * @param[in]  recorder        The handle to the streamrecorder
  * @return  @c on success, otherwise a negative error value
  * @retval    #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval    #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_error_cb()
  */
 int streamrecorder_unset_error_cb(streamrecorder_h recorder);
@@ -1067,7 +1198,10 @@ int streamrecorder_unset_error_cb(streamrecorder_h recorder);
  * @param[in]  user_data       The user data to be passed to the callback function
  * @return  @c 0 on success, otherwise a negative error value
  * @retval #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  * @see        streamrecorder_unset_buffer_consume_completed_cb()
  * @see        streamrecorder_push_stream_buffer()
  */
@@ -1079,7 +1213,10 @@ int streamrecorder_set_buffer_consume_completed_cb(streamrecorder_h recorder, st
  * @param[in]  recorder        The handle to the streamrecorder
  * @return  @c on success, otherwise a negative error value
  * @retval    #STREAMRECORDER_ERROR_NONE Successful
+ * @retval #STREAMRECORDER_ERROR_NOT_SUPPORTED Not supported
  * @retval    #STREAMRECORDER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Create a stream recorder handle by calling streamrecorder_create().
+ * @see streamrecorder_create()
  * @see        streamrecorder_set_buffer_consume_completed_cb()
  */
 int streamrecorder_unset_buffer_consume_completed_cb(streamrecorder_h recorder);
index 70923d5..a0aee26 100644 (file)
@@ -29,6 +29,22 @@ extern "C" {
 
 #define MAX_MPACKET_DATA 100
 
+#define STREAMRECORDER_RECORD_FEATURE "http://tizen.org/feature/multimedia.stream_recorder"
+
+#define CHECK_FEATURE_SUPPORTED(feature_name)\
+       do {\
+               bool feature_supported = FALSE;\
+               if (!system_info_get_platform_bool(feature_name, &feature_supported)) {\
+                       if (feature_supported == FALSE) {\
+                               LOGE("%s feature is disabled", feature_name);\
+                               return STREAMRECORDER_ERROR_NOT_SUPPORTED; \
+                       } \
+               } else {\
+                       LOGE("Error - Feature getting from System Info");\
+                       return STREAMRECORDER_ERROR_INVALID_OPERATION; \
+               } \
+       } while (0);
+
 typedef enum {
        _STREAMRECORDER_EVENT_TYPE_NOTIFY,
        _STREAMRECORDER_EVENT_TYPE_RECORDING_LIMITED,
index 28d05ec..99e6215 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-streamrecorder
 Summary:    A Streamrecorder library in Tizen Native API
-Version:    0.0.26
+Version:    0.0.27
 Release:    0
 Group:      Multimedia/Other
 License:    Apache-2.0
@@ -10,6 +10,7 @@ BuildRequires:  pkgconfig(dlog)
 Buildrequires:  pkgconfig(mm-streamrecorder)
 BuildRequires:  pkgconfig(capi-base-common)
 BuildRequires:  pkgconfig(capi-media-tool)
+BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(libtbm)
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
index 83fb8bd..8656409 100644 (file)
@@ -31,6 +31,7 @@
 #include <tbm_surface.h>
 #include <tbm_bufmgr.h>
 #include <tbm_surface_internal.h>
+#include <system_info.h>
 
 #ifdef LOG_TAG
 #undef LOG_TAG
@@ -42,6 +43,8 @@ static int __mm_streamrecorder_msg_cb(int message, void *param, void *user_data)
 
 int streamrecorder_create(streamrecorder_h *recorder)
 {
+       CHECK_FEATURE_SUPPORTED(STREAMRECORDER_RECORD_FEATURE);
+
        int ret = STREAMRECORDER_ERROR_NONE;
 
        streamrecorder_s *handle = NULL;
@@ -230,6 +233,8 @@ int streamrecorder_push_stream_buffer(streamrecorder_h recorder, media_packet_h
 
 int streamrecorder_destroy(streamrecorder_h recorder)
 {
+       CHECK_FEATURE_SUPPORTED(STREAMRECORDER_RECORD_FEATURE);
+
        int ret = STREAMRECORDER_ERROR_NONE;
 
        if (recorder == NULL) {
@@ -245,6 +250,8 @@ int streamrecorder_destroy(streamrecorder_h recorder)
 
 int streamrecorder_prepare(streamrecorder_h recorder)
 {
+       CHECK_FEATURE_SUPPORTED(STREAMRECORDER_RECORD_FEATURE);
+
        int ret = STREAMRECORDER_ERROR_NONE;
        if (recorder == NULL) {
                LOGE("NULL pointer handle");
@@ -258,6 +265,8 @@ int streamrecorder_prepare(streamrecorder_h recorder)
 
 int streamrecorder_unprepare(streamrecorder_h recorder)
 {
+       CHECK_FEATURE_SUPPORTED(STREAMRECORDER_RECORD_FEATURE);
+
        int ret = STREAMRECORDER_ERROR_NONE;
        if (recorder == NULL) {
                LOGE("NULL pointer handle");
@@ -272,6 +281,8 @@ int streamrecorder_unprepare(streamrecorder_h recorder)
 
 int streamrecorder_start(streamrecorder_h recorder)
 {
+       CHECK_FEATURE_SUPPORTED(STREAMRECORDER_RECORD_FEATURE);
+
        int ret = STREAMRECORDER_ERROR_NONE;
 
        if (recorder == NULL) {
@@ -286,6 +297,8 @@ int streamrecorder_start(streamrecorder_h recorder)
 
 int streamrecorder_pause(streamrecorder_h recorder)
 {
+       CHECK_FEATURE_SUPPORTED(STREAMRECORDER_RECORD_FEATURE);
+
        int ret = STREAMRECORDER_ERROR_NONE;
 
        if (recorder == NULL) {
@@ -300,6 +313,8 @@ int streamrecorder_pause(streamrecorder_h recorder)
 
 int streamrecorder_commit(streamrecorder_h recorder)
 {
+       CHECK_FEATURE_SUPPORTED(STREAMRECORDER_RECORD_FEATURE);
+
        int ret = STREAMRECORDER_ERROR_NONE;
 
        if (recorder == NULL) {
@@ -314,6 +329,8 @@ int streamrecorder_commit(streamrecorder_h recorder)
 
 int streamrecorder_cancel(streamrecorder_h recorder)
 {
+       CHECK_FEATURE_SUPPORTED(STREAMRECORDER_RECORD_FEATURE);
+
        int ret = STREAMRECORDER_ERROR_NONE;
 
        if (recorder == NULL) {