: public Tizen::Media::ICameraEventListener
, public Tizen::Media::IVideoRecorderEventListener
, public Tizen::System::IDeviceEventListener
+ ,public Tizen::Content::IContentScanListener
{
public:
enum CameraMode
virtual void OnVideoRecorderStopped(result r);
virtual void OnDeviceStateChanged(Tizen::System::DeviceType deviceType, const Tizen::Base::String& state);
+ virtual void OnContentScanCompleted (RequestId reqId, const Tizen::Base::String &scanPath, result r);
+
private:
CameraPresentationModel(void);
Tizen::Graphics::Bitmap* __pBitmap;
Tizen::Base::String __lastestContentName;
Tizen::Base::String __errorResult;
+ Tizen::Base::String __CurrentVideoFileName;
int __appControlRequestType;
Tizen::Ui::OrientationStatus __dir;
int __cameraMode;
result r = E_SUCCESS;
contentSearch.Construct(contentType);
+ AppLogDebug("Createthumbnail file name is %ls",pFilename.GetPointer());
strQuery = MakeQuerybyContentFileName(pFilename);
+ AppLogDebug("strQuery is %ls",strQuery.GetPointer());
pSearchResultList = contentSearch.SearchN(page, MAX_CONTENTSEARCH_COUNTPERPAGE, totalPage, totalCount, strQuery, sortColumn, SORT_ORDER_NONE);
TryCatch(pSearchResultList != null, r = E_SYSTEM, "pSearchResultList is null");
__pBitmap = null;
r = GetLatestContentName(currentCameraMode, latestContentName);
+ AppLogDebug("latest content name is %ls",latestContentName.GetPointer());
TryCatch(r == E_SUCCESS, , "GetLatestContentName() fail[%s]", GetErrorMessage(r));
if (currentCameraMode == CAMERA_MODE_SNAPSHOT)
}
else
{
- __pBitmap = CreateThumbnailN(latestContentName, CONTENT_TYPE_VIDEO);
+ __pBitmap = CreateThumbnailN(__CurrentVideoFileName,CONTENT_TYPE_VIDEO);
if (latestContentName == L"")
{
r = __pVideoRecorder->SetRecordingRotation(rotate);
TryCatch(r == E_SUCCESS, , "VideoRecorder::SetRecordingRotation() fail[%s]", GetErrorMessage(r));
- r = __pVideoRecorder->CreateVideoFile(camcorderTemporaryFilePath, true);
+ AppLogDebug("latest file name is %ls",__lastestContentName.GetPointer());
+ r = __pVideoRecorder->CreateVideoFile(__lastestContentName, true);
+ AppLogDebug("create video file result is %ls",GetErrorMessage(r));
TryCatch(r == E_SUCCESS, , "VideoRecorder::CreateVideoFile() fail[%s]", GetErrorMessage(r));
r = __pVideoRecorder->Record();
{
AppLogDebug("ENTER");
ContentManager* pContentManager = null;
- VideoContentInfo* videoContentInfo = null;
ContentId contentId;
+ String replaceFilePath;
String camcorderTemporaryFilePath;
int storageType;
result ret = E_SUCCESS;
ret = pContentManager->Construct();
TryCatch(ret == E_SUCCESS, , "ContentManager->Construct() failed(%s)", GetErrorMessage(r));
- contentId = pContentManager->CreateContent(camcorderTemporaryFilePath, __lastestContentName, true);
- TryCatch(Tizen::Base::UuId::GetInvalidUuId() != contentId, GetLastResult(), "CreateContent failed.");
-
- videoContentInfo = static_cast<VideoContentInfo*>(pContentManager->GetContentInfoN(contentId));
- TryCatch(videoContentInfo != null, , "videoContentInfo is null");
+ r = ContentManager::ScanFile(__lastestContentName);
+ __CurrentVideoFileName = __lastestContentName;
+ replaceFilePath = Environment::GetMediaPath();
+ replaceFilePath.Append(STRING_CAMERA_FOLDER_NAME);
+ replaceFilePath.Append("/");
+ AppLogDebug("Replace filepath is %ls",replaceFilePath.GetPointer());
+ __CurrentVideoFileName.Replace(replaceFilePath,"");
+ AppLogDebug("__CurrentVideoFileName path is %ls",__CurrentVideoFileName.GetPointer());
- delete __pBitmap;
- __pBitmap = null;
-
- __pBitmap = videoContentInfo->GetThumbnailN();
- TryCatch(__pBitmap != null, , "__pBitmap is null");
+ __pBitmap = CreateThumbnailN(__CurrentVideoFileName,CONTENT_TYPE_VIDEO);
SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_SUCCEEDED);
delete pContentManager;
pContentManager = null;
- delete videoContentInfo;
- videoContentInfo = null;
+ //delete videoContentInfo;
+ //videoContentInfo = null;
delete __pBitmap;
__pBitmap = null;
AppLogDebug("EXIT");
return rotate;
}
+
+void
+CameraPresentationModel::OnContentScanCompleted (RequestId reqId, const Tizen::Base::String &scanPath, result r)
+{
+ AppLogDebug("Enter");
+ AppLogDebug("Exit");
+}
+
+
+