本文整理汇总了C++中ContentManager::UpdateContent方法的典型用法代码示例。如果您正苦于以下问题:C++ ContentManager::UpdateContent方法的具体用法?C++ ContentManager::UpdateContent怎么用?C++ ContentManager::UpdateContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContentManager
的用法示例。
在下文中一共展示了ContentManager::UpdateContent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnActionPerformed
//.........这里部分代码省略.........
pExportThread_->filenameout = exporttempfilename;
pExportThread_->framefilepos = pPlayerThread_->curframefilepos;
pExportThread_->Start();
ExportProgressRefTimer_->Start(500);
if (exporttotype == EXPORTTYPE_VIDEO) {
pExportThread_->SendUserEvent(pExportThread_->THREAD_EXPORTMJPEG, null);
} else if (exporttotype == EXPORTTYPE_FRAME) {
pExportThread_->SendUserEvent(pExportThread_->THREAD_EXPORTFRAME, null);
}
} else if (actionId == THREADCALLBACK_EXPORTPROGRESSUPDATE) {
if (pExportThread_ != null) {
double progress = ((double)pExportThread_->TimeLapseClass_->exportfileframecurno / (double)pExportThread_->TimeLapseClass_->exportfileframescount);
if (progress > 1) progress = 1;
if (progress < 1) {
ExportProgressRefTimer_->Start(500);
}
int progressint = (int)(progress * 100.0f);
if (progressint < 0) progressint = 0;
if (progressint > 100) progressint = 100;
Osp::Ui::Controls::Progress * savingpopupprogressel_ = static_cast<Progress *>(savingpopup_->GetControl(L"IDC_PROGRESS1"));
savingpopupprogressel_->SetValue(progressint);
savingpopupprogressel_->Draw();
savingpopupprogressel_->Show();
}
} else if (actionId == THREADCALLBACK_EXPORTDONE) {
ExportProgressRefTimer_->Cancel();
Osp::Ui::Controls::Progress * savingpopupprogressel_ = static_cast<Progress *>(savingpopup_->GetControl(L"IDC_PROGRESS1"));
savingpopupprogressel_->SetValue(100);
savingpopupprogressel_->Draw();
savingpopupprogressel_->Show();
pExportThread_->Stop();
pExportThread_->Join();
delete pExportThread_;
pExportThread_ = null;
ContentId contentId;
ContentManager contentManager;
contentManager.Construct();
if (Osp::Content::ContentManagerUtil::CopyToMediaDirectory(exporttempfilename, exportfilename) != E_SUCCESS) {
savingpopup_->SetShowState(false);
this->RequestRedraw();
MessageBox msgbox;
int modalResult = 0;
msgbox.Construct("Error", "Error saving file! Maybe out of disk space.", MSGBOX_STYLE_OK, 10000);
msgbox.ShowAndWait(modalResult);
return;
}
if (Osp::Io::File::IsFileExist(exporttempfilename)) {
Osp::Io::File::Remove(exporttempfilename);
}
if (exporttotype == EXPORTTYPE_VIDEO) {
VideoContentInfo videoContentInfo;
videoContentInfo.Construct(exportfilename);
contentId = contentManager.CreateContent(videoContentInfo);
videoContentInfo.SetAuthor(L"Timelapse");
videoContentInfo.SetDescription(L"Timelapse app");
videoContentInfo.SetKeyword(L"Timelapse");
contentManager.UpdateContent(videoContentInfo);
} else if (exporttotype == EXPORTTYPE_FRAME) {
ImageContentInfo imageContentInfo;
imageContentInfo.Construct(exportfilename);
contentId = contentManager.CreateContent(imageContentInfo);
imageContentInfo.SetAuthor(L"Timelapse");
imageContentInfo.SetDescription(L"Timelapse app");
imageContentInfo.SetKeyword(L"Timelapse");
contentManager.UpdateContent(imageContentInfo);
}
savingpopup_->SetShowState(false);
this->RequestRedraw();
MessageBox msgbox;
int modalResult = 0;
msgbox.Construct("Saved", L"File saved to:\n" + exportfilename, MSGBOX_STYLE_OK, 10000);
msgbox.ShowAndWait(modalResult);
} else if (actionId == ASPEEDCHANGE) {
if ((int)pPlayerThread_->fileinfo_.playframerate == 10) {
pPlayerThread_->SetFrameRate(15);
} else if ((int)pPlayerThread_->fileinfo_.playframerate == 15) {
pPlayerThread_->SetFrameRate(20);
} else if ((int)pPlayerThread_->fileinfo_.playframerate == 20) {
pPlayerThread_->SetFrameRate(25);
} else if ((int)pPlayerThread_->fileinfo_.playframerate == 25) {
pPlayerThread_->SetFrameRate(30);
} else {
pPlayerThread_->SetFrameRate(10);
}
delete speedbtnbmpn_;
delete speedbtnbmps_;
speedbtnbmpn_ = CreateSpeedBtnBmp(164, Osp::Base::Integer::ToString((int)pPlayerThread_->fileinfo_.playframerate) + L" fps", false);
speedbtnbmps_ = CreateSpeedBtnBmp(164, Osp::Base::Integer::ToString((int)pPlayerThread_->fileinfo_.playframerate) + L" fps", true);
speedbtn->SetNormalBackgroundBitmap(*speedbtnbmpn_);
speedbtn->SetPressedBackgroundBitmap(*speedbtnbmps_);
this->RequestRedraw();
}
}