From: rahul varna Date: Wed, 29 May 2013 08:33:58 +0000 (+0530) Subject: Added OUT_OF_STORAGE error in videorecorder X-Git-Tag: 2.2_release~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e8c72cebff540badb3ae1db102d0dcffb792908;p=samples%2Fnative%2FMediaApp.git Added OUT_OF_STORAGE error in videorecorder Signed-off-by: rahul varna --- diff --git a/project/src/Recorder/VideoRecorderForm.cpp b/project/src/Recorder/VideoRecorderForm.cpp index 8a31306..7881d66 100644 --- a/project/src/Recorder/VideoRecorderForm.cpp +++ b/project/src/Recorder/VideoRecorderForm.cpp @@ -4588,10 +4588,38 @@ VideoRecorderForm::OnVideoRecorderEndReached(Tizen::Media::RecordingEndCondition __pProgress->Show(); } +result +VideoRecorderForm::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 VideoRecorderForm::OnVideoRecorderErrorOccurred(Tizen::Media::RecorderErrorReason r) { AppLog("OnVideoRecorderErrorOccurred"); + result res = E_SUCCESS; + + res = ConvertRecorderErrorToError(r); + if (res == E_STORAGE_FULL) + { + __cameraError = CAMERA_ERROR_OUT_OF_MEMORY; + __pCamera->StopPreview(); + ShowErrorResult(res, METHOD_FILE_LINENO); + return; + } __pVideoRecorder->Close(); __pTimer->Cancel(); diff --git a/project/src/Recorder/VideoRecorderForm.h b/project/src/Recorder/VideoRecorderForm.h index 890839c..ca79fe5 100644 --- a/project/src/Recorder/VideoRecorderForm.h +++ b/project/src/Recorder/VideoRecorderForm.h @@ -195,6 +195,7 @@ private: bool ConvertPixelFormatToString(Tizen::Graphics::PixelFormat &pixFormat, String& strString); bool IsBatteryLevelLow(void); + result ConvertRecorderErrorToError(Tizen::Media::RecorderErrorReason r); private: //Do not change the order of the e-nums, if a new e-num is to be added add it at the end