SendUserEvent(RECORDER_ON_CLOSE, null);
}
+result
+AudioRecorderForm::ConvertRecorderErrorToError(Tizen::Media::RecorderErrorReason r)
+{
+ result res = E_SUCCESS;
+ switch (r)
+ {
+ case RECORDER_ERROR_OUT_OF_STORAGE:
+ //fall through
+ case RECORDER_ERROR_STORAGE_FAILED:
+ res = E_STORAGE_FULL;
+ break;
+ default:
+ break;
+ }
+
+ return res;
+}
+
void
AudioRecorderForm::OnAudioRecorderErrorOccurred(RecorderErrorReason r)
{
AppLog("OnAudioRecorderErrorOccurred Enter result = %d", r);
- __pAudioRecorder->Close();
- __pTimer->Cancel();
+ result res = E_SUCCESS;
+
+ __pTimer->Cancel();
__pProgress->SetValue(0);
__pProgress->Draw();
__pProgress->Show();
SetFooterItem(1, String(L"Start"), ID_START);
CreateDisplayString();
Draw();
+
+ res = ConvertRecorderErrorToError(r);
+ if (res == E_STORAGE_FULL)
+ {
+ ShowErrorResult(res, METHOD_FILE_LINENO);
+ return;
+ }
+ else
+ {
+ __pAudioRecorder->Close();
+ }
}
void
void ReadAudioPreProcessedFile(String fileName);
void DeletePopup(Popup** pPopup);
Tizen::Media::MediaContainerType GetAudioRecorderFormat(Tizen::Media::CodecType audioCodecType);
+ result ConvertRecorderErrorToError(Tizen::Media::RecorderErrorReason r);
private:
enum