void VDPositionControlW32::UpdateString(VDPosition pos) { wchar_t buf[512]; if (pos < 0) pos = mPosition; bool success = false; if (mpCB) success = mpCB->GetFrameString(buf, sizeof buf / sizeof buf[0], pos); if (!success) { if (mFrameRate.getLo()) { int ms, sec, min; long ticks = (long)mFrameRate.scale64ir(pos * 1000); ms = ticks %1000; ticks /= 1000; sec = ticks % 60; ticks /= 60; min = ticks % 60; ticks /= 60; success = (unsigned)swprintf(buf, sizeof buf / sizeof buf[0], L" Frame %I64d (%d:%02d:%02d.%03d)", (sint64)pos, ticks, min, sec, ms) < sizeof buf / sizeof buf[0]; } else success = (unsigned)swprintf(buf, sizeof buf / sizeof buf[0], L" Frame %I64d", (sint64)pos) < sizeof buf / sizeof buf[0]; } if (success) { HWND hwndFrame = GetDlgItem(mhwnd, IDC_FRAME); VDSetWindowTextW32(hwndFrame, buf); } }
sint32 VDVideoFilterInput::Prepare() { VDPixmap& outformat = *mpContext->mpOutput->mpFormat; const BITMAPINFOHEADER& srcformat = *mpSource->getDecompressedFormat(); outformat.w = srcformat.biWidth; outformat.h = srcformat.biHeight; outformat.format = nsVDPixmap::kPixFormat_XRGB8888; const VDFraction rate(mpSource->asStream()->getRate()); mpContext->mpOutput->mFrameRateHi = rate.getHi(); mpContext->mpOutput->mFrameRateLo = rate.getLo(); mpContext->mpOutput->mLength = mpSource->asStream()->getLength(); mpContext->mpOutput->mStart = 0; return 0; }
void VDVideoWindow::SetSourcePAR(const VDFraction& fr) { mSourcePAR = 0; if (fr.getLo()) mSourcePAR = fr.asDouble(); UpdateSourcePARMenuItem(); }