- Timestamp:
- Nov 6, 2018 10:20:06 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126371
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r75258 r75269 4766 4766 </enum> 4767 4767 4768 <enum 4769 name="CaptureVideoScalingMethod" 4770 uuid="17DA29A9-3F41-482E-A9BB-3D183BA3EE59" 4771 > 4772 <desc> 4773 Capturing video scaling method enumeration. 4774 </desc> 4775 4776 <const name="None" value="0"> 4777 <desc>No scaling performed.</desc> 4778 </const> 4779 <const name="NearestNeighbor" value="1"> 4780 <desc>Performs scaling via nearest-neighbor interpolation. 4781 Not yet implemented.</desc> 4782 </const> 4783 <const name="Bilinear" value="2"> 4784 <desc>Performs scaling via bilinear interpolation. 4785 Not yet implemented.</desc> 4786 </const> 4787 <const name="Bicubic" value="3"> 4788 <desc>Performs scaling via bicubic interpolation. 4789 Not yet implemented.</desc> 4790 </const> 4791 </enum> 4792 4793 <enum 4794 name="CaptureVideoRateControlMode" 4795 uuid="5D392E29-04EC-4FD7-989C-82452F54414C" 4796 > 4797 <desc> 4798 Capturing video rate control mode enumeration. 4799 </desc> 4800 4801 <const name="CBR" value="0"> 4802 <desc>Constant bit rate (CBR).</desc> 4803 </const> 4804 <const name="VBR" value="1"> 4805 <desc>Variable bit rate (VBR). Not yet implemented.</desc> 4806 </const> 4807 </enum> 4808 4768 4809 <interface 4769 4810 name="ICaptureScreenSettings" extends="$unknown" 4770 uuid=" 9C8FE192-DD9A-45E9-B17B-2BA23B5951F7"4811 uuid="17DA29A9-3F41-482E-A9BB-3D183BA3EE59" 4771 4812 wsmap="managed" 4772 4813 > … … 4859 4900 </attribute> 4860 4901 4902 <attribute name="audioCodec" type="CaptureAudioCodec"> 4903 <desc> 4904 Determines the audio codec to use for encoding the 4905 recorded audio data. This setting cannot be changed while capturing is 4906 enabled. 4907 </desc> 4908 </attribute> 4909 4910 <attribute name="audioHz" type="unsigned long" default="22050"> 4911 <desc> 4912 Determines the Hertz (Hz) rate of the recorded audio data. This setting 4913 cannot be changed while capturing is enabled. 4914 </desc> 4915 </attribute> 4916 4917 <attribute name="audioBits" type="unsigned long" default="16"> 4918 <desc> 4919 Determines the bits per sample of the recorded audio data. This setting 4920 cannot be changed while capturing is enabled. 4921 </desc> 4922 </attribute> 4923 4924 <attribute name="audioChannels" type="unsigned long" default="2"> 4925 <desc> 4926 Determines the audio channels of the recorded audio data. 4927 Specifiy 2 for stereo or 1 for mono. More than stereo (2) channels 4928 are not supported at the moment. This setting cannot be changed while 4929 capturing is enabled. 4930 </desc> 4931 </attribute> 4932 4933 <attribute name="videoCodec" type="CaptureVideoCodec"> 4934 <desc> 4935 Determines the video codec to use for encoding the recorded video data. 4936 This setting cannot be changed while capturing is enabled. 4937 </desc> 4938 </attribute> 4939 4861 4940 <attribute name="videoWidth" type="unsigned long" default="1024"> 4862 4941 <desc> 4863 This setting determines the horizontal resolution of the recorded4864 video. Thissetting cannot be changed while capturing is enabled.4942 Determines the horizontal resolution of the recorded video data. This 4943 setting cannot be changed while capturing is enabled. 4865 4944 </desc> 4866 4945 </attribute> … … 4868 4947 <attribute name="videoHeight" type="unsigned long" default="768"> 4869 4948 <desc> 4870 This setting determines the vertical resolution of the recorded4871 video. Thissetting cannot be changed while capturing is enabled.4949 Determines the vertical resolution of the recorded video data. This 4950 setting cannot be changed while capturing is enabled. 4872 4951 </desc> 4873 4952 </attribute> … … 4875 4954 <attribute name="videoRate" type="unsigned long" default="512"> 4876 4955 <desc> 4877 This setting determines the bitrate in kilobits per second. 4878 Increasing this value makes the video look better for the 4879 cost of an increased file size. This setting cannot be changed 4956 Determines the bitrate in kilobits per second. Increasing this value 4957 makes the video look better for the cost of an increased file size or 4958 transfer rate. This setting cannot be changed while capturing is enabled. 4959 </desc> 4960 </attribute> 4961 4962 <attribute name="videoRateControlMode" type="CaptureVideoRateControlMode"> 4963 <desc> 4964 Determines the rate control mode. This setting cannot be changed 4880 4965 while capturing is enabled. 4881 4966 </desc> … … 4884 4969 <attribute name="videoFPS" type="unsigned long" default="25"> 4885 4970 <desc> 4886 This setting determines the maximum number of frames per second. 4887 Frames with a higher frequency will be skipped. Reducing this 4888 value increases the number of skipped frames and reduces the 4889 file size. This setting cannot be changed while capturing 4890 is enabled. 4971 Determines the maximum number of frames per second (FPS). Frames with 4972 a higher frequency will be skipped. Reducing this value increases the 4973 number of skipped frames and reduces the file size or transfer rate. 4974 This setting cannot be changed while capturing is enabled. 4975 </desc> 4976 </attribute> 4977 4978 <attribute name="videoScalingMethod" type="CaptureVideoScalingMethod"> 4979 <desc> 4980 Determines the video scaling method to use. 4981 This setting cannot be changed while capturing is enabled. 4891 4982 </desc> 4892 4983 </attribute> -
trunk/src/VBox/Main/include/CaptureScreenSettingsImpl.h
r75251 r75269 75 75 HRESULT setOptions(const com::Utf8Str &aOptions); 76 76 77 HRESULT getAudioCodec(CaptureAudioCodec_T *aCodec); 78 HRESULT setAudioCodec(CaptureAudioCodec_T aCodec); 79 HRESULT getAudioHz(ULONG *aHz); 80 HRESULT setAudioHz(ULONG aHz); 81 HRESULT getAudioBits(ULONG *aBits); 82 HRESULT setAudioBits(ULONG aBits); 83 HRESULT getAudioChannels(ULONG *aChannels); 84 HRESULT setAudioChannels(ULONG aChannels); 85 86 HRESULT getVideoCodec(CaptureVideoCodec_T *aCodec); 87 HRESULT setVideoCodec(CaptureVideoCodec_T aCodec); 77 88 HRESULT getVideoWidth(ULONG *aVideoWidth); 78 89 HRESULT setVideoWidth(ULONG aVideoWidth); … … 81 92 HRESULT getVideoRate(ULONG *aVideoRate); 82 93 HRESULT setVideoRate(ULONG aVideoRate); 94 HRESULT getVideoRateControlMode(CaptureVideoRateControlMode_T *aMode); 95 HRESULT setVideoRateControlMode(CaptureVideoRateControlMode_T aMode); 83 96 HRESULT getVideoFPS(ULONG *aVideoFPS); 84 97 HRESULT setVideoFPS(ULONG aVideoFPS); 98 HRESULT getVideoScalingMethod(CaptureVideoScalingMethod_T *aMode); 99 HRESULT setVideoScalingMethod(CaptureVideoScalingMethod_T aMode); 85 100 86 101 private: -
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.