• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ VDJobQueue类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中VDJobQueue的典型用法代码示例。如果您正苦于以下问题:C++ VDJobQueue类的具体用法?C++ VDJobQueue怎么用?C++ VDJobQueue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了VDJobQueue类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: title

void VDUIJobControlDialog::OnJobQueueStatusChanged(VDJobQueueStatus status) {
	VDStringW title(mStandardCaption);

	if (status == kVDJQS_Running)
		title.append_sprintf(L" (%d remaining)", g_VDJobQueue.GetPendingJobCount());

	if (g_VDJobQueue.IsAutoUpdateEnabled())
		title.append_sprintf(L" [%s] (%hs:%d)", g_VDJobQueue.GetJobFilePath(), g_VDJobQueue.GetRunnerName(), (uint32)g_VDJobQueue.GetRunnerId());

	switch(status) {
		case kVDJQS_Idle:
			EnableControl(IDC_START, true);
			SetControlText(IDC_START, L"Start");
			EnableControl(IDC_ABORT, false);
			EnableControl(IDC_RELOAD, true);
			break;

		case kVDJQS_Running:
			SetControlText(IDC_START, L"Stop");
			EnableControl(IDC_START, true);
			EnableControl(IDC_ABORT, true);
			EnableControl(IDC_RELOAD, false);
			break;

		case kVDJQS_Blocked:
			SetControlText(IDC_START, L"Start");
			EnableControl(IDC_START, false);
			EnableControl(IDC_ABORT, false);
			EnableControl(IDC_RELOAD, false);
			break;
	}

	VDSetWindowTextW32(mhdlg, title.c_str());
}
开发者ID:KGE-INC,项目名称:VirtualDub,代码行数:34,代码来源:JobControlDialog.cpp


示例2: GetDlgItem

void VDUIJobControlDialog::UpdateSelectedJobEnables(const VDJob *vdjcheck) {
	HWND hwndItem = GetDlgItem(mhdlg, IDC_JOBS);
	if (!hwndItem)
		return;

	int index = ListView_GetNextItem(hwndItem, -1, LVNI_ALL | LVNI_SELECTED);
	VDJob *vdj = NULL;

	if (index >= 0)
		vdj = g_VDJobQueue.ListGet(index);

	if (vdjcheck && vdjcheck != vdj)
		return;

	if (vdj) {
		EnableControl(IDC_DELETE, vdj->GetState() != VDJob::kStateInProgress);
		EnableControl(IDC_POSTPONE, vdj->GetState() != VDJob::kStateInProgress);
		EnableControl(IDC_RELOAD, !g_VDJobQueue.IsRunInProgress());
		EnableControl(IDC_MOVE_UP, index > 0);
		EnableControl(IDC_MOVE_DOWN, index < g_VDJobQueue.ListSize()-1);
	} else {
		EnableControl(IDC_DELETE, false);
		EnableControl(IDC_POSTPONE, false);
		EnableControl(IDC_RELOAD, false);
		EnableControl(IDC_MOVE_UP, false);
		EnableControl(IDC_MOVE_DOWN, false);
	}
}
开发者ID:KGE-INC,项目名称:VirtualDub,代码行数:28,代码来源:JobControlDialog.cpp


示例3: DeinitJobSystem

void DeinitJobSystem() {
	try {
		if (g_VDJobQueue.IsModified())
			g_VDJobQueue.Flush();
	} catch(const MyError&) {
		// eat flush errors
	}

	g_VDJobQueue.Shutdown();
}
开发者ID:fishman,项目名称:virtualdub,代码行数:10,代码来源:Job.cpp


示例4: JobAddConfiguration

void JobAddConfiguration(const DubOptions *opt, const wchar_t *szFileInput, const wchar_t *pszInputDriver, const wchar_t *szFileOutput, bool fCompatibility, List2<InputFilenameNode> *pListAppended, long lSpillThreshold, long lSpillFrameThreshold, bool bIncludeEditList) {
	JobScriptOutput output;

	JobAddConfigurationInputs(output, szFileInput, pszInputDriver, pListAppended);
	JobCreateScript(output, opt, bIncludeEditList);
	JobAddReloadMarker(output);

	// Add actual run option
	if (lSpillThreshold)
		output.addf("VirtualDub.SaveSegmentedAVI(\"%s\", %d, %d);", strCify(VDTextWToU8(VDStringW(szFileOutput)).c_str()), lSpillThreshold, lSpillFrameThreshold);
	else
		output.addf("VirtualDub.Save%sAVI(\"%s\");", fCompatibility ? "Compatible" : "", strCify(VDTextWToU8(VDStringW(szFileOutput)).c_str()));

	JobAddClose(output);

	///////////////////

	vdautoptr<VDJob> vdj(new VDJob);
	vdj->SetInputFile(szFileInput);
	vdj->SetOutputFile(szFileOutput);

	const JobScriptOutput::Script& script = output.getscript();
	vdj->SetScript(script.data(), script.size(), true);
	g_VDJobQueue.Add(vdj.release(), false);
}
开发者ID:fishman,项目名称:virtualdub,代码行数:25,代码来源:Job.cpp


示例5: JobAddConfigurationImages

void JobAddConfigurationImages(const DubOptions *opt, const wchar_t *szFileInput, const wchar_t *pszInputDriver, const wchar_t *szFilePrefix, const wchar_t *szFileSuffix, int minDigits, int imageFormat, int quality, List2<InputFilenameNode> *pListAppended) {
	JobScriptOutput output;

	JobAddConfigurationInputs(output, szFileInput, pszInputDriver, pListAppended);
	JobCreateScript(output, opt);
	JobAddReloadMarker(output);

	// Add actual run option
	VDStringA s(strCify(VDTextWToU8(VDStringW(szFilePrefix)).c_str()));

	output.addf("VirtualDub.SaveImageSequence(\"%s\", \"%s\", %d, %d, %d);", s.c_str(), strCify(VDTextWToU8(VDStringW(szFileSuffix)).c_str()), minDigits, imageFormat, quality);

	JobAddClose(output);

	///////////////////

	vdautoptr<VDJob> vdj(new VDJob);
	vdj->SetInputFile(szFileInput);
	VDStringW outputFile;
	outputFile.sprintf(L"%ls*%ls", szFilePrefix, szFileSuffix);
	vdj->SetOutputFile(outputFile.c_str());

	const JobScriptOutput::Script& script = output.getscript();
	vdj->SetScript(script.data(), script.size(), true);
	g_VDJobQueue.Add(vdj.release(), false);
}
开发者ID:fishman,项目名称:virtualdub,代码行数:26,代码来源:Job.cpp


示例6: JobAddConfigurationRunVideoAnalysisPass

void JobAddConfigurationRunVideoAnalysisPass(const DubOptions *opt, const wchar_t *srcFile, const wchar_t *srcInputDriver, List2<InputFilenameNode> *pListAppended, bool includeEditList) {
	JobScriptOutput output;

	JobAddConfigurationInputs(output, srcFile, srcInputDriver, pListAppended);
	JobCreateScript(output, opt, includeEditList);
	JobAddReloadMarker(output);

	// Add actual run option
	output.adds("VirtualDub.RunNullVideoPass();");

	JobAddClose(output);

	///////////////////

	vdautoptr<VDJob> vdj(new VDJob);
	vdj->SetInputFile(srcFile);

	const JobScriptOutput::Script& script = output.getscript();
	vdj->SetScript(script.data(), script.size(), true);
	g_VDJobQueue.Add(vdj.release(), false);
}
开发者ID:fishman,项目名称:virtualdub,代码行数:21,代码来源:Job.cpp


示例7: JobAddConfigurationSaveAudio

void JobAddConfigurationSaveAudio(const DubOptions *opt, const wchar_t *srcFile, const wchar_t *srcInputDriver, List2<InputFilenameNode> *pListAppended, const wchar_t *dstFile, bool raw, bool includeEditList) {
	JobScriptOutput output;

	JobAddConfigurationInputs(output, srcFile, srcInputDriver, pListAppended);
	JobCreateScript(output, opt, includeEditList);
	JobAddReloadMarker(output);

	// Add actual run option
	output.addf("VirtualDub.Save%s(\"%s\");", raw ? "RawAudio" : "WAV", strCify(VDTextWToU8(VDStringW(dstFile)).c_str()));

	JobAddClose(output);

	///////////////////

	vdautoptr<VDJob> vdj(new VDJob);
	vdj->SetInputFile(srcFile);
	vdj->SetOutputFile(dstFile);

	const JobScriptOutput::Script& script = output.getscript();
	vdj->SetScript(script.data(), script.size(), true);
	g_VDJobQueue.Add(vdj.release(), false);
}
开发者ID:fishman,项目名称:virtualdub,代码行数:22,代码来源:Job.cpp


示例8: JobRunList

void JobRunList() {
	g_VDJobQueue.RunAllStart();
}
开发者ID:fishman,项目名称:virtualdub,代码行数:3,代码来源:Job.cpp


示例9: JobClearList

void JobClearList() {
	g_VDJobQueue.ListClear();
}
开发者ID:fishman,项目名称:virtualdub,代码行数:3,代码来源:Job.cpp


示例10: JobUnlockDubber

void JobUnlockDubber() {
	g_VDJobQueue.SetBlocked(false);
}
开发者ID:fishman,项目名称:virtualdub,代码行数:3,代码来源:Job.cpp


示例11: JobLockDubber

void JobLockDubber() {
	g_VDJobQueue.SetBlocked(true);
}
开发者ID:fishman,项目名称:virtualdub,代码行数:3,代码来源:Job.cpp


示例12: OnMenuHit

bool VDUIJobControlDialog::OnCommand(uint32 id, uint32 extcode) {
	OnMenuHit(id);
	
	if (extcode == BN_CLICKED) {
		HWND hwndItem = GetDlgItem(mhdlg, IDC_JOBS);
		int index = ListView_GetNextItem(hwndItem, -1, LVNI_ALL | LVNI_SELECTED);
		VDJob *vdj = NULL;

		if (index >= 0)
			vdj = g_VDJobQueue.ListGet(index);

		switch(id) {
		case IDOK:
			Destroy();
			return true;

		case IDC_DELETE:
			if (vdj) {
				// Do not delete jobs that are in progress!

				if (vdj->GetState() != VDJob::kStateInProgress) {
					fUpdateDisable = true;
					g_VDJobQueue.Delete(vdj, false);
					delete vdj;
					g_VDJobQueue.SetModified();
					fUpdateDisable = false;
					if (g_VDJobQueue.ListSize() > 0)
						ListView_SetItemState(hwndItem, index==g_VDJobQueue.ListSize() ? index-1 : index, LVIS_SELECTED, LVIS_SELECTED);
				}
			}

			return TRUE;

		case IDC_POSTPONE:
			if (vdj) {
				// Do not postpone jobs in progress

				int state = vdj->GetState();
				if (state != VDJob::kStateInProgress) {
					if (state == VDJob::kStatePostponed)
						vdj->SetState(VDJob::kStateWaiting);
					else
						vdj->SetState(VDJob::kStatePostponed);

					vdj->Refresh();

					g_VDJobQueue.SetModified();
				}
			}

			return TRUE;

		case IDC_MOVE_UP:
			if (!vdj || index <= 0)
				return TRUE;

			g_VDJobQueue.Swap(index-1, index);

			ListView_SetItemState(hwndItem, index  , 0, LVIS_SELECTED | LVIS_FOCUSED);
			ListView_SetItemState(hwndItem, index-1, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
			ListView_RedrawItems(hwndItem, index-1, index);

			g_VDJobQueue.SetModified();

			return TRUE;

		case IDC_MOVE_DOWN:
			if (!vdj || index >= g_VDJobQueue.ListSize()-1)
				return TRUE;

			g_VDJobQueue.Swap(index+1, index);
			
			ListView_SetItemState(hwndItem, index  , 0, LVIS_SELECTED | LVIS_FOCUSED);
			ListView_SetItemState(hwndItem, index+1, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
			ListView_RedrawItems(hwndItem, index, index+1);

			g_VDJobQueue.SetModified();

			return TRUE;

		case IDC_START:
			if (g_VDJobQueue.IsRunInProgress()) {
				g_VDJobQueue.RunAllStop();
				EnableControl(IDC_START, FALSE);
			} else
				g_VDJobQueue.RunAllStart();
			return TRUE;

		case IDC_ABORT:
			if (g_VDJobQueue.IsRunInProgress()) {
				g_VDJobQueue.RunAllStop();
				EnableControl(IDC_START, false);
				EnableControl(IDC_ABORT, false);
				if (g_dubber) g_dubber->Abort();
			}

			return TRUE;

		case IDC_RELOAD:
			if (!vdj)
//.........这里部分代码省略.........
开发者ID:KGE-INC,项目名称:VirtualDub,代码行数:101,代码来源:JobControlDialog.cpp


示例13: InitJobSystem

bool InitJobSystem() {
	g_VDJobQueue.SetJobFilePath(NULL, false, false);

	return true;
}
开发者ID:fishman,项目名称:virtualdub,代码行数:5,代码来源:Job.cpp


示例14: list

bool VDUIJobControlDialog::OnMenuHit(uint32 id) {
	static const wchar_t fileFilters[]=
		L"VirtualDub job list (*.jobs)\0"			L"*.jobs\0"
		L"VirtualDub script (*.syl, *.vdscript)\0"	L"*.syl;*.vdscript\0"
		L"All files (*.*)\0"						L"*.*\0";

	try {
		switch(id) {

			case ID_FILE_LOADJOBLIST:
				{
					VDStringW filename(VDGetLoadFileName(kFileDialog_JobList, (VDGUIHandle)mhdlg, L"Load job list", fileFilters, NULL));

					if (!filename.empty())
						g_VDJobQueue.ListLoad(filename.c_str(), false);
				}
				break;

			case ID_FILE_SAVEJOBLIST:
				{
					VDStringW filename(VDGetSaveFileName(kFileDialog_JobList, (VDGUIHandle)mhdlg, L"Save job list", fileFilters, NULL));

					if (!filename.empty())
						g_VDJobQueue.Flush(filename.c_str());
				}
				break;

			case ID_FILE_USELOCALJOBQUEUE:
				if (g_VDJobQueue.IsRunInProgress())
					MessageBox(mhdlg, "Cannot switch job queues while a job is in progress.", g_szError, MB_ICONERROR | MB_OK);
				else
					g_VDJobQueue.SetJobFilePath(NULL, false, false);
				break;

			case ID_FILE_USEREMOTEJOBQUEUE:
				if (g_VDJobQueue.IsRunInProgress())
					MessageBox(mhdlg, "Cannot switch job queues while a job is in progress.", g_szError, MB_ICONERROR | MB_OK);
				else {
					const VDFileDialogOption opts[]={
						{ VDFileDialogOption::kConfirmFile, 0, NULL, 0, 0},
						{0}
					};

					int optvals[]={ false };

					VDStringW filename(VDGetSaveFileName(kFileDialog_JobList, (VDGUIHandle)mhdlg, L"Use shared job list", fileFilters, NULL, opts, optvals));

					if (!filename.empty()) {
						if (!_wcsicmp(filename.c_str(), g_VDJobQueue.GetDefaultJobFilePath())) {
							DWORD res = MessageBox(mhdlg,
								"Using the same job file that is normally used for local job queue operation is not recommended as "
								"it can cause job queue corruption.\n"
								"\n"
								"Are you sure you want to use this file for the remote queue too?",
								"VirtualDub Warning",
								MB_ICONEXCLAMATION | MB_YESNO);

							if (res != IDYES)
								break;
						}

						g_VDJobQueue.SetJobFilePath(filename.c_str(), true, true);
					}
				}
				break;

			case ID_EDIT_CLEARLIST:
				if (IDOK != MessageBox(mhdlg, "Really clear job list?", "VirtualDub job system", MB_OKCANCEL | MB_ICONEXCLAMATION))
					break;

				g_VDJobQueue.ListClear(false);
				break;

			case ID_EDIT_DELETEDONEJOBS:
				for(uint32 i=0; i<g_VDJobQueue.ListSize();) {
					VDJob *vdj = g_VDJobQueue.ListGet(i);

					if (vdj->GetState() == VDJob::kStateCompleted) {
						g_VDJobQueue.Delete(vdj, false);
						delete vdj;
					} else
						++i;
				}

				break;

			case ID_EDIT_FAILEDTOWAITING:
				g_VDJobQueue.Transform(VDJob::kStateAborted, VDJob::kStateWaiting);
				g_VDJobQueue.Transform(VDJob::kStateError, VDJob::kStateWaiting);
				break;

			case ID_EDIT_WAITINGTOPOSTPONED:
				g_VDJobQueue.Transform(VDJob::kStateWaiting, VDJob::kStatePostponed);
				break;

			case ID_EDIT_POSTPONEDTOWAITING:
				g_VDJobQueue.Transform(VDJob::kStatePostponed, VDJob::kStateWaiting);
				break;

			case ID_EDIT_DONETOWAITING:
//.........这里部分代码省略.........
开发者ID:KGE-INC,项目名称:VirtualDub,代码行数:101,代码来源:JobControlDialog.cpp


示例15: JobPollAutoRun

bool JobPollAutoRun() {
	return g_VDJobQueue.PollAutoRun();
}
开发者ID:fishman,项目名称:virtualdub,代码行数:3,代码来源:Job.cpp


示例16: switch

VDZINT_PTR VDUIJobControlDialog::DlgProc(VDZUINT msg, VDZWPARAM wParam, VDZLPARAM lParam) {
	int index;

	switch(msg) {
	case WM_COMMAND:
		// we have to filter out WM_COMMAND messages from the list view edit control
		// because some moron on the Windows team used IDOK as the edit control identifier
		if (lParam) {
			switch(HIWORD(wParam)) {
				case EN_SETFOCUS:
				case EN_KILLFOCUS:
				case EN_CHANGE:
				case EN_UPDATE:
				case EN_ERRSPACE:
				case EN_MAXTEXT:
				case EN_HSCROLL:
				case EN_VSCROLL:
					return FALSE;
			}
		}

		// fall through to default handler
		break;

	case WM_NOTIFY:
		{
			NMHDR *nm = (NMHDR *)lParam;

			if (nm->idFrom == IDC_JOBS) {
				NMLVDISPINFO *nldi = (NMLVDISPINFO *)nm;
				NMLISTVIEW *nmlv;
				VDJob *vdj;

				switch(nm->code) {
				case LVN_GETDISPINFOA:
					GetJobListDispInfoA(nldi);
					return TRUE;
				case LVN_GETDISPINFOW:
					GetJobListDispInfoW((NMLVDISPINFOW *)nldi);
					return TRUE;
				case LVN_ENDLABELEDITA:
					SetWindowLongPtr(mhdlg, DWLP_MSGRESULT, TRUE);
					vdj = g_VDJobQueue.ListGet(nldi->item.iItem);

					if (vdj && nldi->item.pszText)
						vdj->SetName(nldi->item.pszText);

					return TRUE;
				case LVN_ENDLABELEDITW:
					SetWindowLongPtr(mhdlg, DWLP_MSGRESULT, TRUE);
					vdj = g_VDJobQueue.ListGet(nldi->item.iItem);

					if (vdj && nldi->item.pszText)
						vdj->SetName(VDTextWToA(((NMLVDISPINFOW *)nldi)->item.pszText).c_str());

					return TRUE;
				case LVN_ITEMCHANGED:

					if (fUpdateDisable) return TRUE;

					nmlv = (NMLISTVIEW *)lParam;
					vdj = g_VDJobQueue.ListGet(nmlv->iItem);

					UpdateSelectedJobEnables(NULL);
					return TRUE;

				case LVN_KEYDOWN:
					switch(((LPNMLVKEYDOWN)lParam)->wVKey) {
					case VK_DELETE:
						SendMessage(mhdlg, WM_COMMAND, IDC_DELETE, (LPARAM)GetDlgItem(mhdlg, IDC_DELETE));
					}
					return TRUE;

				case NM_DBLCLK:

					//	Previous state		Next state		Action
					//	--------------		----------		------
					//	Error				Waiting			Show error message
					//	Done (warnings)		Done			Show log
					//	Done				Waiting
					//	Postponed			Waiting
					//	Aborted				Waiting
					//	All others			Postponed

					index = ListView_GetNextItem(GetDlgItem(mhdlg, IDC_JOBS), -1, LVNI_ALL | LVNI_SELECTED);
					if (index>=0) {
						vdj = g_VDJobQueue.ListGet(index);

						switch(vdj->GetState()) {
						case VDJob::kStateError:
							if (VDUIJobErrorDialog(*vdj).ShowDialog((VDGUIHandle)mhdlg)) {
								vdj->SetState(VDJob::kStateWaiting);
								vdj->Refresh();
								g_VDJobQueue.SetModified();
							}
							break;
						case VDJob::kStateCompleted:
							if (!vdj->mLogEntries.empty()) {
								if (!VDUIJobLogDialog(vdj->mLogEntries).ShowDialog((VDGUIHandle)mhdlg))
									break;
//.........这里部分代码省略.........
开发者ID:KGE-INC,项目名称:VirtualDub,代码行数:101,代码来源:JobControlDialog.cpp


示例17: GetJobListDispInfoW

void VDUIJobControlDialog::GetJobListDispInfoW(NMLVDISPINFOW *nldi) {
	VDJob *vdj = g_VDJobQueue.ListGet(nldi->item.iItem);
	SYSTEMTIME st;
	SYSTEMTIME ct;
	static const wchar_t *const dow[]={L"Sun",L"Mon",L"Tue",L"Wed",L"Thu",L"Fri",L"Sat"};

	if (!(nldi->item.mask & LVIF_TEXT))
		return;

	nldi->item.mask			= LVIF_TEXT;
	nldi->item.pszText[0]	= 0;

	if (!vdj)
		return;

	uint64 *ft = &vdj->mDateEnd;

	switch(nldi->item.iSubItem) {
	case 0:
		VDTextAToW(nldi->item.pszText, nldi->item.cchTextMax, vdj->GetName());
		break;
	case 1:		// file in
		VDTextAToW(nldi->item.pszText, nldi->item.cchTextMax, VDFileSplitPath(vdj->GetInputFile()));
		break;
	case 2:		// file out
		VDTextAToW(nldi->item.pszText, nldi->item.cchTextMax, VDFileSplitPath(vdj->GetOutputFile()));
		break;
	case 3:		// time in
		ft = &vdj->mDateStart;
	case 4:		// time out

		{
			FILETIME ft2, ftl;
			ft2.dwLowDateTime = (uint32)*ft;
			ft2.dwHighDateTime = (uint32)(*ft >> 32);

			FileTimeToLocalFileTime(&ft2, &ftl);

			FileTimeToSystemTime(&ftl, &st);
		}

		GetLocalTime(&ct);
		if (!*ft)
			nldi->item.pszText = L"-";
		else if (ct.wYear != st.wYear
			|| ct.wMonth != st.wMonth
			|| ct.wDay != st.wDay) {

			swprintf(nldi->item.pszText, nldi->item.cchTextMax, L"%s %d %d:%02d%c"
						,dow[st.wDayOfWeek]
						,st.wDay
						,st.wHour==12||!st.wHour ? 12 : st.wHour%12
						,st.wMinute
						,st.wHour>=12 ? 'p' : 'a');
		} else {
			swprintf(nldi->item.pszText, nldi->item.cchTextMax, L"%d:%02d%c"
						,st.wHour==12||!st.wHour ? 12 : st.wHour%12
						,st.wMinute
						,st.wHour>=12 ? 'p' : 'a');
		}
		break;
	case 5:		// status
		switch(vdj->GetState()) {
		case VDJob::kStateWaiting:		nldi->item.pszText = L"Waiting"		; break;
		case VDJob::kStateInProgress:
			if (vdj->mRunnerName.empty() || vdj->IsLocal())
				nldi->item.pszText = L"In progress";
			else
				swprintf(nldi->item.pszText, nldi->item.cchTextMax, L"In progress (%hs:%d)", vdj->mRunnerName.c_str(), (uint32)vdj->GetRunnerId());
			break;
		case VDJob::kStateStarting:
			if (vdj->mRunnerName.empty() || vdj->IsLocal())
				nldi->item.pszText = L"Starting";
			else
				swprintf(nldi->item.pszText, nldi->item.cchTextMax, L"Starting (%hs:%d)", vdj->mRunnerName.c_str(), (uint32)vdj->GetRunnerId());
			break;
		case VDJob::kStateAborting:
			if (vdj->mRunnerName.empty() || vdj->IsLocal())
				nldi->item.pszText = L"Aborting";
			else
				swprintf(nldi->item.pszText, nldi->item.cchTextMax, L"Aborting (%hs:%d)", vdj->mRunnerName.c_str(), (uint32)vdj->GetRunnerId());
			break;
		case VDJob::kStateCompleted:
			if (vdj->mRunnerName.empty() || vdj->IsLocal())
				swprintf(nldi->item.pszText, nldi->item.cchTextMax, L"Done%hs", vdj->mLogEntries.empty() ? "" : " (warnings)");
			else
				swprintf(nldi->item.pszText, nldi->item.cchTextMax, L"Done%hs (%hs:%d)", vdj->mLogEntries.empty() ? "" : " (warnings)", vdj->mRunnerName.c_str(), (uint32)vdj->GetRunnerId());
			break;
		case VDJob::kStatePostponed:
			nldi->item.pszText = L"Postponed";
			break;
		case VDJob::kStateAborted:
			if (vdj->mRunnerName.empty() || vdj->IsLocal())
				nldi->item.pszText = L"Aborted";
			else
				swprintf(nldi->item.pszText, nldi->item.cchTextMax, L"Aborted (%hs:%d)", vdj->mRunnerName.c_str(), (uint32)vdj->GetRunnerId());
			break;
		case VDJob::kStateError:
			if (vdj->mRunnerName.empty() || vdj->IsLocal())
				nldi->item.pszText = L"Error";
//.........这里部分代码省略.........
开发者ID:KGE-INC,项目名称:VirtualDub,代码行数:101,代码来源:JobControlDialog.cpp


示例18: JobSetQueueFile

void JobSetQueueFile(const wchar_t *filename, bool distributed, bool autorun) {
	g_VDJobQueue.SetAutoRunEnabled(false);
	g_VDJobQueue.SetJobFilePath(filename, distributed, distributed);
	g_VDJobQueue.SetAutoRunEnabled(autorun);
}
开发者ID:fishman,项目名称:virtualdub,代码行数:5,代码来源:Job.cpp


示例19: VDSetDialogDefaultIcons

bool VDUIJobControlDialog::OnLoaded() {
	VDSetDialogDefaultIcons(mhdlg);

	mStandardCaption = VDGetWindowTextW32(mhdlg);

	static const char *const szColumnNames[]={ "Name","Source","Dest","Start","End","Status" };
	HWND hwndItem = GetDlgItem(mhdlg, IDC_JOBS);
	for (int i=0; i<6; i++) {
		LV_COLUMN lvc;
		lvc.mask = LVCF_FMT | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH;
		lvc.fmt = LVCFMT_LEFT;
		lvc.cx = 1;
		lvc.pszText = (LPSTR)szColumnNames[i];

		ListView_InsertColumn(hwndItem, i, &lvc);
	}

	static const float kRelativeColumnWidths[]={ 50,100,100,50,50,100 };
	VDUISetListViewColumnsW32(hwndItem, kRelativeColumnWidths, 6);

	mResizer.Init(mhdlg);
	mResizer.Add(IDOK,				VDDialogResizerW32::kTR);
	mResizer.Add(IDC_MOVE_UP,		VDDialogResizerW32::kTR);
	mResizer.Add(IDC_MOVE_DOWN,		VDDialogResizerW32::kTR);
	mResizer.Add(IDC_POSTPONE,		VDDialogResizerW32::kTR);
	mResizer.Add(IDC_DELETE,		VDDialogResizerW32::kTR);
	mResizer.Add(IDC_START,			VDDialogResizerW32::kTR);
	mResizer.Add(IDC_ABORT,			VDDialogResizerW32::kTR);
	mResizer.Add(IDC_RELOAD,		VDDialogResizerW32::kTR);
	mResizer.Add(IDC_AUTOSTART,		VDDialogResizerW32::kTR);
	mResizer.Add(IDC_JOBS,			VDDialogResizerW32::kMC);
	mResizer.Add(IDC_CURRENTJOB,	VDDialogResizerW32::kBL);
	mResizer.Add(IDC_PROGRESS,		VDDialogResizerW32::kBC);
	mResizer.Add(IDC_PERCENT,		VDDialogResizerW32::kBR);

	GetWindowRect(mhdlg, &rInitial);
	VDUIRestoreWindowPlacementW32(mhdlg, "Job control", SW_SHOWNORMAL);
	VDUIRestoreListViewColumnsW32(hwndItem, "Job control: Columns");

	fUpdateDisable = false;

	ListView_SetExtendedListViewStyleEx(hwndItem, LVS_EX_FULLROWSELECT , LVS_EX_FULLROWSELECT);

	RECT rLV;
	GetClientRect(hwndItem, &rLV);

	OnJobQueueReloaded();
	OnJobQueueStatusChanged(g_VDJobQueue.GetQueueStatus());

	CheckButton(IDC_AUTOSTART, g_VDJobQueue.IsAutoRunEnabled());

	SendDlgItemMessage(mhdlg, IDC_PROGRESS, PBM_SETRANGE, 0, MAKELPARAM(0, 16384));

	if (g_dubber || g_VDJobQueue.IsRunInProgress()) {
		EnableControl(IDC_PROGRESS, false);
		EnableControl(IDC_PERCENT, false);
	} else {
		EnableControl(IDC_PROGRESS, true);
		EnableControl(IDC_PERCENT, true);
	}

	g_hwndJobs = mhdlg;

	g_VDJobQueue.SetCallback(this);

	return VDDialogFrameW32::OnLoaded();
}
开发者ID:KGE-INC,项目名称:VirtualDub,代码行数:67,代码来源:JobControlDialog.cpp



注:本文中的VDJobQueue类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ VDPAUContext类代码示例发布时间:2022-05-31
下一篇:
C++ VDATA类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap