* #MEDIAMUXER_ERROR_INVALID_PATH,
* #MEDIAMUXER_ERROR_RESOURCE_LIMIT
* @since_tizen 3.0
- * @param[in] error The error that occurred in media muxer
- * @param[in] user_data The user data passed from the code where
+ * @param[in] error The error that occurred in media muxer
+ * @param[in] user_data The user data passed from the code where
* mediamuxer_set_error_cb() was invoked
* This data will be accessible from @a mediamuxer_error_cb
* @pre Create media muxer handle by calling mediamuxer_create() function.
typedef void (*mediamuxer_error_cb)(mediamuxer_error_e error, void *user_data);
/**
+ * @brief Called when end of stream occurs in media muxer.
+ * @since_tizen 4.0
+ * @param[in] user_data The user data passed from the code where
+ * mediamuxer_set_eos_cb() was invoked;\n
+ * this data will be accessible from mediamuxer_eos_cb()
+ * @pre Create media muxer handle by calling mediamuxer_create() function.
+ * @see mediamuxer_set_eos_cb()
+ * @see mediamuxer_unset_eos_cb()
+ */
+typedef void (*mediamuxer_eos_cb)(void *user_data);
+
+/**
* @brief Creates a media muxer handle for muxing.
* @since_tizen 3.0
* @param[out] muxer A new handle to media muxer
* */
int mediamuxer_unset_error_cb(mediamuxer_h muxer);
+ /**
+ * @brief Registers an EOS (end of stream) callback function to be invoked when an EOS occurs.
+ * @since_tizen 4.0
+ * @param[in] muxer The media muxer handle
+ * @param[in] callback Callback function pointer
+ * @param[in] user_data The user data passed from the code where
+ * mediamuxer_set_eos_cb() was invoked;\n
+ * this data will be accessible from mediamuxer_eos_cb()
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #MEDIAMUXER_ERROR_NONE Successful
+ * @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state
+ * @pre Create a media muxer handle by calling mediamuxer_create() function.
+ * @post mediamuxer_eos_cb() will be invoked.
+ * @see mediamuxer_unset_eos_cb()
+ * @see mediamuxer_eos_cb()
+ * */
+int mediamuxer_set_eos_cb(mediamuxer_h muxer, mediamuxer_eos_cb callback, void *user_data);
+
+/**
+ * @brief Unregisters the EOS (end of stream) callback function.
+ * @since_tizen 4.0
+ * @param[in] muxer The media muxer handle
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #MEDIAMUXER_ERROR_NONE Successful
+ * @retval #MEDIAMUXER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIAMUXER_ERROR_INVALID_STATE Invalid state
+ * @see mediamuxer_eos_cb()
+ * */
+int mediamuxer_unset_eos_cb(mediamuxer_h muxer);
+
/**
* @}
*/