Changeset 45926 in vbox
- Timestamp:
- May 6, 2013 8:26:43 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r45838 r45926 823 823 uint32_t ulVideoCaptureVertRes; // requires settings version 1.12 (VirtualBox 4.3) 824 824 uint32_t ulVideoCaptureRate; // requires settings version 1.12 (VirtualBox 4.3) 825 uint32_t ulVideoCaptureFps; // requires settings version 1.12 (VirtualBox 4.3) 825 826 bool fVideoCaptureEnabled; // requires settings version 1.12 (VirtualBox 4.3) 826 827 com::Utf8Str strVideoCaptureFile; // requires settings version 1.12 (VirtualBox 4.3) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r45838 r45926 374 374 " [--vcpheight <height>]\n" 375 375 " [--vcprate <rate>]\n" 376 " [--vcpfps <fps>]\n" 376 377 #endif 377 378 " [--defaultfrontend default|<name]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r45838 r45926 2310 2310 ULONG Rate; 2311 2311 CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureRate)(&Rate), rc); 2312 ULONG Fps; 2313 CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureFps)(&Fps), rc); 2312 2314 Bstr File; 2313 2315 CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureFile)(File.asOutParam()), rc); … … 2319 2321 RTPrintf("VideoCaptureHeight=%u\n", (unsigned)Height); 2320 2322 RTPrintf("VideoCaptureRate=%u\n", (unsigned)Rate); 2323 RTPrintf("VideoCaptureFps=%u\n", (unsigned)Fps); 2321 2324 } 2322 2325 else … … 2326 2329 RTPrintf("Capture dimensions: %ux%u\n", Width, Height); 2327 2330 RTPrintf("Capture rate: %ukbps\n", Rate); 2331 RTPrintf("Capture FPS: %u\n", Fps); 2328 2332 RTPrintf("\n"); 2329 2333 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r45838 r45926 198 198 MODIFYVM_VCP_HEIGHT, 199 199 MODIFYVM_VCP_RATE, 200 MODIFYVM_VCP_FPS, 200 201 #endif 201 202 MODIFYVM_CHIPSET, … … 343 344 { "--vcpheight", MODIFYVM_VCP_HEIGHT, RTGETOPT_REQ_UINT32 }, 344 345 { "--vcprate", MODIFYVM_VCP_RATE, RTGETOPT_REQ_UINT32 }, 346 { "--vcpfps", MODIFYVM_VCP_FPS, RTGETOPT_REQ_UINT32 }, 345 347 #endif 346 348 { "--autostart-enabled", MODIFYVM_AUTOSTART_ENABLED, RTGETOPT_REQ_BOOL_ONOFF }, … … 2452 2454 break; 2453 2455 } 2456 case MODIFYVM_VCP_FPS: 2457 { 2458 CHECK_ERROR(machine, COMSETTER(VideoCaptureFps)(ValueUnion.u32)); 2459 break; 2460 } 2454 2461 #endif 2455 2462 case MODIFYVM_AUTOSTART_ENABLED: -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r45840 r45926 3975 3975 <interface 3976 3976 name="IMachine" extends="$unknown" 3977 uuid=" d8b9ebbe-3f76-4844-af2c-accb462e64b0"3977 uuid="55bf39d3-ac8f-4a77-90d8-1e2c726170ce" 3978 3978 wsmap="managed" 3979 3979 > … … 4255 4255 <attribute name="VideoCaptureRate" type="unsigned long" default="512"> 4256 4256 <desc> 4257 This setting determines the bitrate in kilobits per second 4257 This setting determines the bitrate in kilobits per second. 4258 Increasing this value makes the video look better for the 4259 cost of an increased file size. 4260 </desc> 4261 </attribute> 4262 4263 <attribute name="VideoCaptureFps" type="unsigned long" default="25"> 4264 <desc> 4265 This setting determines the maximum number of frames per second. 4266 Frames with a higher frequency will be skipped. Reducing this 4267 value increses the number of skipped frames but reduces the 4268 file size. 4258 4269 </desc> 4259 4270 </attribute> -
trunk/src/VBox/Main/include/MachineImpl.h
r45838 r45926 260 260 ULONG mVideoCaptureHeight; 261 261 ULONG mVideoCaptureRate; 262 ULONG mVideoCaptureFps; 262 263 Bstr mVideoCaptureFile; 263 264 BOOL mVideoCaptureEnabled; … … 441 442 STDMETHOD(COMGETTER(VideoCaptureRate))(ULONG *aRate); 442 443 STDMETHOD(COMSETTER(VideoCaptureRate))(ULONG aRate); 444 STDMETHOD(COMGETTER(VideoCaptureFps))(ULONG *aFps); 445 STDMETHOD(COMSETTER(VideoCaptureFps))(ULONG aFps); 443 446 STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings); 444 447 STDMETHOD(COMGETTER(SnapshotFolder))(BSTR *aSavedStateFolder); -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r45914 r45926 496 496 ULONG ulRate; 497 497 mParent->machine()->COMGETTER(VideoCaptureRate)(&ulRate); 498 ULONG ulFps; 499 mParent->machine()->COMGETTER(VideoCaptureFps)(&ulFps); 498 500 BSTR strFile; 499 501 mParent->machine()->COMGETTER(VideoCaptureFile)(&strFile); 500 if (VideoRecContextInit(mpVideoRecCtx, strFile, ulWidth, ulHeight, ulRate ))502 if (VideoRecContextInit(mpVideoRecCtx, strFile, ulWidth, ulHeight, ulRate, ulFps)) 501 503 { 502 504 LogFlow(("Failed to initialize video recording context!\n")); -
trunk/src/VBox/Main/src-client/VideoRec.cpp
r45922 r45926 97 97 /* pixel format of the current frame */ 98 98 uint32_t u32PixelFormat; 99 /* maximum number of frames per second */ 100 uint32_t uDelay; 101 uint64_t u64LastTimeStamp; 99 102 /* time stamp of the current frame */ 100 103 uint64_t u64TimeStamp; … … 426 429 */ 427 430 int VideoRecContextInit(PVIDEORECCONTEXT pVideoRecCtx, com::Bstr strFile, 428 uint32_t uWidth, uint32_t uHeight, uint32_t uRate )431 uint32_t uWidth, uint32_t uHeight, uint32_t uRate, uint32_t uFps) 429 432 { 430 433 pVideoRecCtx->uTargetWidth = uWidth; … … 460 463 /* disable multithreading */ 461 464 pVideoRecCtx->VpxConfig.g_threads = 0; 465 pVideoRecCtx->uDelay = 1000 / uFps; 462 466 463 467 struct vpx_rational arg_framerate = {30, 1}; … … 643 647 * @param uSourceHeight Height of the source image (framebuffer). 644 648 * @param pu8BufAddr Pointer to source image(framebuffer). 645 * @param u64TimeStamp Time stamp .649 * @param u64TimeStamp Time stamp (milliseconds). 646 650 */ 647 651 int VideoRecCopyToIntBuf(PVIDEORECCONTEXT pVideoRecCtx, uint32_t x, uint32_t y, … … 653 657 AssertReturn(uSourceWidth, VERR_INVALID_PARAMETER); 654 658 AssertReturn(uSourceHeight, VERR_INVALID_PARAMETER); 659 660 if (u64TimeStamp < pVideoRecCtx->u64LastTimeStamp + pVideoRecCtx->uDelay) 661 return VINF_TRY_AGAIN; 662 pVideoRecCtx->u64LastTimeStamp = u64TimeStamp; 655 663 656 664 if (ASMAtomicReadBool(&pVideoRecCtx->fRgbFilled)) -
trunk/src/VBox/Main/src-client/VideoRec.h
r45878 r45926 24 24 int VideoRecContextCreate(PVIDEORECCONTEXT *ppVideoRecContext); 25 25 int VideoRecContextInit(PVIDEORECCONTEXT pVideoRecContext, com::Bstr mFileName, 26 uint32_t uWidth, uint32_t uHeight, uint32_t uRate );26 uint32_t uWidth, uint32_t uHeight, uint32_t uRate, uint32_t uFps); 27 27 void VideoRecContextClose(PVIDEORECCONTEXT pVideoRecContext); 28 28 bool VideoRecIsEnabled(PVIDEORECCONTEXT pVideoRecContext); -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r45909 r45926 171 171 mVideoCaptureHeight = 768; 172 172 mVideoCaptureRate = 512; 173 mVideoCaptureFps = 25; 173 174 mVideoCaptureEnabled = false; 174 175 … … 1808 1809 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1809 1810 mHWData->mVideoCaptureRate = aRate; 1811 return S_OK; 1812 } 1813 1814 STDMETHODIMP Machine::COMGETTER(VideoCaptureFps)(ULONG *aFps) 1815 { 1816 AutoCaller autoCaller(this); 1817 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1818 1819 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1820 *aFps = mHWData->mVideoCaptureFps; 1821 return S_OK; 1822 } 1823 1824 STDMETHODIMP Machine::COMSETTER(VideoCaptureFps)(ULONG aFps) 1825 { 1826 AutoCaller autoCaller(this); 1827 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1828 1829 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1830 mHWData->mVideoCaptureFps = aFps; 1810 1831 return S_OK; 1811 1832 } … … 8790 8811 mHWData->mVideoCaptureEnabled = data.fVideoCaptureEnabled; 8791 8812 mHWData->mVideoCaptureRate = data.ulVideoCaptureRate; 8813 mHWData->mVideoCaptureFps = data.ulVideoCaptureFps; 8792 8814 mHWData->mVideoCaptureFile = data.strVideoCaptureFile; 8793 8815 mHWData->mFirmwareType = data.firmwareType; … … 10007 10029 data.ulVideoCaptureVertRes = mHWData->mVideoCaptureHeight; 10008 10030 data.ulVideoCaptureRate = mHWData->mVideoCaptureRate; 10031 data.ulVideoCaptureFps = mHWData->mVideoCaptureFps; 10009 10032 data.fVideoCaptureEnabled = !!mHWData->mVideoCaptureEnabled; 10010 10033 data.strVideoCaptureFile = mHWData->mVideoCaptureFile; -
trunk/src/VBox/Main/xml/Settings.cpp
r45838 r45926 1750 1750 ulVideoCaptureVertRes(768), 1751 1751 ulVideoCaptureRate(512), 1752 ulVideoCaptureFps(25), 1752 1753 fVideoCaptureEnabled(false), 1753 1754 strVideoCaptureFile("Test.webm"), … … 1824 1825 && (ulVideoCaptureVertRes == h.ulVideoCaptureVertRes) 1825 1826 && (ulVideoCaptureRate == h.ulVideoCaptureRate) 1827 && (ulVideoCaptureFps == h.ulVideoCaptureFps) 1826 1828 && (firmwareType == h.firmwareType) 1827 1829 && (pointingHIDType == h.pointingHIDType) … … 2723 2725 pelmHwChild->getAttributeValue("vertRes", hw.ulVideoCaptureVertRes); 2724 2726 pelmHwChild->getAttributeValue("rate", hw.ulVideoCaptureRate); 2727 pelmHwChild->getAttributeValue("fps", hw.ulVideoCaptureFps); 2725 2728 } 2726 2729 else if (pelmHwChild->nameEquals("RemoteDisplay")) … … 3908 3911 pelmVideoCapture->setAttribute("vertRes", hw.ulVideoCaptureVertRes); 3909 3912 pelmVideoCapture->setAttribute("rate", hw.ulVideoCaptureRate); 3913 pelmVideoCapture->setAttribute("fps", hw.ulVideoCaptureFps); 3910 3914 } 3911 3915
Note:
See TracChangeset
for help on using the changeset viewer.