Changeset 75269 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Nov 6, 2018 10:20:06 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126371
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/CaptureScreenSettingsImpl.cpp
r75264 r75269 409 409 } 410 410 411 HRESULT CaptureScreenSettings::getAudioCodec(CaptureAudioCodec_T *aCodec) 412 { 413 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 414 415 *aCodec = m->bd->Audio.enmAudioCodec; 416 417 return S_OK; 418 } 419 420 HRESULT CaptureScreenSettings::setAudioCodec(CaptureAudioCodec_T aCodec) 421 { 422 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 423 424 if (!i_canChangeSettings()) 425 return setError(E_INVALIDARG, tr("Cannot change audio codec while capturing is enabled")); 426 427 m->pMachine->i_setModified(Machine::IsModified_Capture); 428 m->bd.backup(); 429 430 m->bd->Audio.enmAudioCodec = aCodec; 431 432 return S_OK; 433 } 434 435 HRESULT CaptureScreenSettings::getAudioHz(ULONG *aHz) 436 { 437 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 438 439 *aHz = m->bd->Audio.uHz; 440 441 return S_OK; 442 } 443 444 HRESULT CaptureScreenSettings::setAudioHz(ULONG aHz) 445 { 446 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 447 448 if (!i_canChangeSettings()) 449 return setError(E_INVALIDARG, tr("Cannot change audio Hertz rate while capturing is enabled")); 450 451 m->pMachine->i_setModified(Machine::IsModified_Capture); 452 m->bd.backup(); 453 454 m->bd->Audio.uHz = (uint16_t)aHz; 455 456 return S_OK; 457 } 458 459 HRESULT CaptureScreenSettings::getAudioBits(ULONG *aBits) 460 { 461 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 462 463 *aBits = m->bd->Audio.cBits; 464 465 return S_OK; 466 } 467 468 HRESULT CaptureScreenSettings::setAudioBits(ULONG aBits) 469 { 470 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 471 472 if (!i_canChangeSettings()) 473 return setError(E_INVALIDARG, tr("Cannot change audio bits while capturing is enabled")); 474 475 m->pMachine->i_setModified(Machine::IsModified_Capture); 476 m->bd.backup(); 477 478 m->bd->Audio.cBits = (uint8_t)aBits; 479 480 return S_OK; 481 } 482 483 HRESULT CaptureScreenSettings::getAudioChannels(ULONG *aChannels) 484 { 485 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 486 487 *aChannels = m->bd->Audio.cChannels; 488 489 return S_OK; 490 } 491 492 HRESULT CaptureScreenSettings::setAudioChannels(ULONG aChannels) 493 { 494 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 495 496 if (!i_canChangeSettings()) 497 return setError(E_INVALIDARG, tr("Cannot change audio channels while capturing is enabled")); 498 499 m->pMachine->i_setModified(Machine::IsModified_Capture); 500 m->bd.backup(); 501 502 m->bd->Audio.cChannels = (uint8_t)aChannels; 503 504 return S_OK; 505 } 506 507 HRESULT CaptureScreenSettings::getVideoCodec(CaptureVideoCodec_T *aCodec) 508 { 509 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 510 511 *aCodec = m->bd->Video.enmCodec; 512 513 return S_OK; 514 } 515 516 HRESULT CaptureScreenSettings::setVideoCodec(CaptureVideoCodec_T aCodec) 517 { 518 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 519 520 if (!i_canChangeSettings()) 521 return setError(E_INVALIDARG, tr("Cannot change video codec while capturing is enabled")); 522 523 m->pMachine->i_setModified(Machine::IsModified_Capture); 524 m->bd.backup(); 525 526 m->bd->Video.enmCodec = aCodec; 527 528 return S_OK; 529 } 530 411 531 HRESULT CaptureScreenSettings::getVideoWidth(ULONG *aVideoWidth) 412 532 { … … 481 601 } 482 602 603 HRESULT CaptureScreenSettings::getVideoRateControlMode(CaptureVideoRateControlMode_T *aMode) 604 { 605 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 606 607 *aMode = CaptureVideoRateControlMode_CBR; /** @todo Implement VBR. */ 608 609 return S_OK; 610 } 611 612 HRESULT CaptureScreenSettings::setVideoRateControlMode(CaptureVideoRateControlMode_T aMode) 613 { 614 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 615 616 if (!i_canChangeSettings()) 617 return setError(E_INVALIDARG, tr("Cannot change video rate control mode while capturing is enabled")); 618 619 /** @todo Implement this. */ 620 RT_NOREF(aMode); 621 622 return E_NOTIMPL; 623 } 624 483 625 HRESULT CaptureScreenSettings::getVideoFPS(ULONG *aVideoFPS) 484 626 { … … 495 637 496 638 if (!i_canChangeSettings()) 497 return setError(E_INVALIDARG, tr("Cannot change parameterswhile capturing is enabled"));639 return setError(E_INVALIDARG, tr("Cannot change video FPS while capturing is enabled")); 498 640 499 641 m->pMachine->i_setModified(Machine::IsModified_Capture); … … 503 645 504 646 return S_OK; 647 } 648 649 HRESULT CaptureScreenSettings::getVideoScalingMethod(CaptureVideoScalingMethod_T *aMode) 650 { 651 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 652 653 *aMode = CaptureVideoScalingMethod_None; /** @todo Implement this. */ 654 655 return S_OK; 656 } 657 658 HRESULT CaptureScreenSettings::setVideoScalingMethod(CaptureVideoScalingMethod_T aMode) 659 { 660 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 661 662 if (!i_canChangeSettings()) 663 return setError(E_INVALIDARG, tr("Cannot change video rate scaling method while capturing is enabled")); 664 665 /** @todo Implement this. */ 666 RT_NOREF(aMode); 667 668 return E_NOTIMPL; 505 669 } 506 670
Note:
See TracChangeset
for help on using the changeset viewer.