Changeset 42861 in vbox for trunk/src/VBox
- Timestamp:
- Aug 17, 2012 12:06:25 PM (12 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r42844 r42861 333 333 { "--chipset", MODIFYVM_CHIPSET, RTGETOPT_REQ_STRING }, 334 334 #ifdef VBOX_WITH_VPX 335 { "--v ideocapture", MODIFYVM_VCP ,RTGETOPT_REQ_BOOL_ONOFF },336 { "--vcpfile name",MODIFYVM_VCP_FILENAME, RTGETOPT_REQ_STRING },335 { "--vcpenabled", MODIFYVM_VCP, RTGETOPT_REQ_BOOL_ONOFF }, 336 { "--vcpfile", MODIFYVM_VCP_FILENAME, RTGETOPT_REQ_STRING }, 337 337 { "--vcpwidth", MODIFYVM_VCP_WIDTH, RTGETOPT_REQ_UINT32 }, 338 338 { "--vcpheight", MODIFYVM_VCP_HEIGHT, RTGETOPT_REQ_UINT32 }, … … 2412 2412 case MODIFYVM_VCP_FILENAME: 2413 2413 { 2414 //CHECK_ERROR(machine, COMSETTER(VideoRecFilename)(ValueUnion.psz)); 2414 Bstr bstr(ValueUnion.psz); 2415 CHECK_ERROR(machine, COMSETTER(VideoCaptureFile)(bstr.raw())); 2415 2416 break; 2416 2417 } -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r42844 r42861 430 430 HRESULT Display::init (Console *aParent) 431 431 { 432 LogRelFlowFunc(("this=%p: aParent=%p\n", this, aParent));433 434 432 ComAssertRet(aParent, E_INVALIDARG); 435 433 HRESULT res; 436 434 /* Enclose the state transition NotReady->InInit->Ready */ 437 435 AutoInitSpan autoInitSpan(this); … … 449 447 ULONG ulVideoCaptureHorzRes; 450 448 ULONG ulVideoCaptureVertRes; 451 char *pchVideoCaptureFile;452 449 BSTR strVideoCaptureFile; 453 bool Enabled; 454 LogFlow(("Init And Create\n")); 455 int res = VideoRecContextCreate(&pVideoRecContext); 450 BOOL fEnabled = false; 451 if (VideoRecContextCreate(&pVideoRecContext)) 452 { 453 LogFlow(("Failed to create Video Recording Context \n")); 454 return E_FAIL; 455 } 456 456 res = RTCritSectInit(&pVideoRecContext->CritSect); 457 AssertReturn(res == VINF_SUCCESS, E_UNEXPECTED); 457 AssertReturn(res == S_OK, E_UNEXPECTED); 458 pVideoRecContext->fEnabled = false; 458 459 mParent->machine()->COMGETTER(VideoCaptureWidth)(&ulVideoCaptureHorzRes); 459 460 mParent->machine()->COMGETTER(VideoCaptureHeight)(&ulVideoCaptureVertRes); 460 461 mParent->machine()->COMGETTER(VideoCaptureFile)(&strVideoCaptureFile); 461 if(res == VINF_SUCCESS) 462 res = VideoRecContextInit(pVideoRecContext,strVideoCaptureFile, ulVideoCaptureHorzRes, ulVideoCaptureVertRes); 462 mParent->machine()->COMGETTER(VideoCaptureEnabled)(&fEnabled); 463 if (fEnabled) 464 { 465 LogFlow(("VidoeRecording VPX enabled \n")); 466 if (VideoRecContextInit(pVideoRecContext,strVideoCaptureFile, 467 ulVideoCaptureHorzRes, ulVideoCaptureVertRes)) 468 { 469 LogFlow(("Failed to initialize video recording context \n")); 470 return E_FAIL; 471 } 472 pVideoRecContext->fEnabled = true; 473 } 463 474 #endif 464 475 mcMonitors = ul; … … 549 560 mpVMMDev = NULL; 550 561 mfVMMDevInited = true; 562 563 #ifdef VBOX_WITH_VPX 564 VideoRecContextClose(pVideoRecContext); 565 #endif 551 566 } 552 567 … … 3260 3275 } 3261 3276 } 3277 3262 3278 #ifdef VBOX_WITH_VPX 3263 3279 uint32_t u32VideoRecImgFormat = VPX_IMG_FMT_NONE; … … 3302 3318 break; 3303 3319 case 24: 3304 u32VideoRecImgFormat 3320 u32VideoRecImgFormat = VPX_IMG_FMT_RGB24; 3305 3321 Log2(("FFmpeg::RequestResize: setting ffmpeg pixel format to VPX_IMG_FMT_RGB24\n")); 3306 3322 break; … … 3315 3331 } 3316 3332 3317 if (u32VideoRecImgFormat != VPX_IMG_FMT_NONE && address != NULL) 3333 if (u32VideoRecImgFormat != VPX_IMG_FMT_NONE && address != NULL 3334 && pVideoRecContext->fEnabled) 3318 3335 { 3319 3336 VideoRecCopyToIntBuffer(pVideoRecContext, pFBInfo->xOrigin, pFBInfo->yOrigin, … … 3348 3365 LogRelFlowFunc (("\n")); 3349 3366 3350 3367 /* Disable VBVA mode. */ 3351 3368 pDrv->pDisplay->VideoAccelEnable (false, NULL); 3352 3369 } … … 3543 3560 if (uScreenId != VBOX_VIDEO_PRIMARY_SCREEN) 3544 3561 { 3545 /* Primary screen resize is initiatedby the VGA device. */3562 /* Primary screen resize is eeeeeeeee by the VGA device. */ 3546 3563 if (pFBInfo->fDisabled) 3547 3564 { -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r42858 r42861 1696 1696 STDMETHODIMP Machine::COMSETTER(VideoCaptureFile)(IN_BSTR aFile) 1697 1697 { 1698 Utf8Str strFile(aFile); 1698 1699 AutoCaller autoCaller(this); 1699 1700 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1700 1701 1701 1702 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1702 mHWData->mVideoCaptureFile = aFile; 1703 if(strFile.isEmpty()) 1704 strFile = "VideoCap.webm"; 1705 mHWData->mVideoCaptureFile = strFile; 1703 1706 return S_OK; 1704 1707 }
Note:
See TracChangeset
for help on using the changeset viewer.