========================================================================================*/
#include <mm_types.h>
#include <mm_attrs.h>
-#include <mm_attrs_private.h>
#include <stdarg.h>
#include "mm_streamrecorder_internal.h"
/*=======================================================================================
| TYPE DEFINITIONS |
========================================================================================*/
-typedef bool(*mmf_streamrecorder_commit_func_t) (MMHandleType handle, int attr_idx, const mmf_value_t *value);
+typedef bool(*mmf_streamrecorder_commit_func_t) (MMHandleType handle, int attr_idx, const MMAttrsValue *value);
/*=======================================================================================
| STRUCTURE DEFINITIONS |
========================================================================================*/
typedef struct {
MMStreamRecorderAttrsID attrid;
- const char *name;
+ char *name;
int value_type;
int flags;
union {
double value_double;
} default_value; /* default value */
MMStreamRecorderAttrsValidType validity_type;
- int validity_value1; /* can be int min, int *array, double *array, or cast to double min. */
- int validity_value2; /* can be int max, int count, int count, or cast to double max. */
+ union {
+ int *int_array;
+ int int_min;
+ double *double_array;
+ double double_min;
+ } validity_value_1;
+ union {
+ int int_max;
+ double double_max;
+ int count;
+ } validity_value_2;
mmf_streamrecorder_commit_func_t attr_commit;
} mm_streamrecorder_attr_construct_info;
* @see
*
*/
-bool _mmstreamrecorder_commit_streamrecorder_attrs(int attr_idx, const char *attr_name, const mmf_value_t *value, void *commit_param);
+bool _mmstreamrecorder_commit_streamrecorder_attrs(int attr_idx, const char *attr_name, const MMAttrsValue *value, void *commit_param);
-bool _mmstreamrecorder_commit_video_enable(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmstreamrecorder_commit_video_enable(MMHandleType handle, int attr_idx, const MMAttrsValue *value);
-bool _mmstreamrecorder_commit_video_encoder(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmstreamrecorder_commit_video_encoder(MMHandleType handle, int attr_idx, const MMAttrsValue *value);
-bool _mmstreamrecorder_commit_audio_enable(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmstreamrecorder_commit_audio_enable(MMHandleType handle, int attr_idx, const MMAttrsValue *value);
-bool _mmstreamrecorder_commit_audio_encoder(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmstreamrecorder_commit_audio_encoder(MMHandleType handle, int attr_idx, const MMAttrsValue *value);
-bool _mmstreamrecorder_commit_audio_samplingrate(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmstreamrecorder_commit_audio_samplingrate(MMHandleType handle, int attr_idx, const MMAttrsValue *value);
-bool _mmstreamrecorder_commit_audio_bitformat(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmstreamrecorder_commit_audio_bitformat(MMHandleType handle, int attr_idx, const MMAttrsValue *value);
-bool _mmstreamrecorder_commit_audio_channel(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmstreamrecorder_commit_audio_channel(MMHandleType handle, int attr_idx, const MMAttrsValue *value);
-bool _mmstreamrecorder_commit_audio_bitrate(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmstreamrecorder_commit_audio_bitrate(MMHandleType handle, int attr_idx, const MMAttrsValue *value);
/**
* check whether supported or not
*/
bool _mmstreamrecorder_check_supported_attribute(MMHandleType handle, int attr_index);
-/**
- * mm_streamrecorder_get_attribute_info:\n
- * Get detail information of the attribute. To manager attributes, an user may want to know the exact character of the attribute,
- * such as type, flag, and validity. This is the function to provide such information.
- * Depending on the 'validity_type', validity union would be different. To know about the type of union, please refer 'MMStreamRecorderAttrsInfo'.
- *
- * @param[in] streamrecorder Specifies the streamrecorder handle.
- * @param[in] attribute_name attribute name that user want to get information.
- * @param[out] info a structure that holds information related with the attribute.
- * @return This function returns zero(MM_ERROR_NONE) on success, or negative value with error code.\n
- * Please refer 'mm_error.h' to know the exact meaning of the error.
- * @pre None
- * @post None
- * @remarks If the function succeeds, 'info' holds detail information about the attribute, such as type,
- * flag, validity_type, validity_values, and default values.
- * @see mm_streamrecorder_get_attributes, mm_streamrecorder_set_attributes
- */
-
-int mm_streamrecorder_get_attribute_info(MMHandleType streamrecorder, const char *attribute_name, MMStreamRecorderAttrsInfo *info);
-
-bool _mmstreamrecorder_commit_video_bitrate(MMHandleType handle, int attr_idx, const mmf_value_t *value);
+bool _mmstreamrecorder_commit_video_bitrate(MMHandleType handle, int attr_idx, const MMAttrsValue *value);
#ifdef __cplusplus
}