streamrecorder_s * handle = (streamrecorder_s *)user_data;
MMMessageParamType *m = (MMMessageParamType *)param;
streamrecorder_notify_e notification = STREAMRECORDER_NOTIFY_NONE;
- streamrecorder_state_e previous_state;
streamrecorder_recording_limit_type_e type;
int streamrecorder_error = 0;
switch (message) {
LOGW("not supported message");
break;
case MM_MESSAGE_STREAMRECORDER_STATE_CHANGED:
- previous_state = handle->state;
notification = STREAMRECORDER_NOTIFY_STATE_CHANGED;
- if (previous_state != handle->state && handle->user_cb[_STREAMRECORDER_EVENT_TYPE_NOTIFY])
- ((streamrecorder_notify_cb)handle->user_cb[_STREAMRECORDER_EVENT_TYPE_NOTIFY])(previous_state, handle->state, notification, handle->user_data[_STREAMRECORDER_EVENT_TYPE_NOTIFY]);
-
+ if (handle->user_cb[_STREAMRECORDER_EVENT_TYPE_NOTIFY])
+ ((streamrecorder_notify_cb)handle->user_cb[_STREAMRECORDER_EVENT_TYPE_NOTIFY])(
+ m->state.previous, m->state.current, notification,
+ handle->user_data[_STREAMRECORDER_EVENT_TYPE_NOTIFY]);
break;
+
case MM_MESSAGE_STREAMRECORDER_MAX_SIZE:
case MM_MESSAGE_STREAMRECORDER_NO_FREE_SPACE:
case MM_MESSAGE_STREAMRECORDER_TIME_LIMIT: