Changeset 68426 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Aug 16, 2017 8:27:10 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 117568
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/VideoRec.cpp
r67914 r68426 769 769 bool fHasVideoTrack = true; 770 770 #ifdef VBOX_WITH_AUDIO_VIDEOREC 771 bool fHasAudioTrack = true; 771 bool fHasAudioTrack = true; 772 /* By default we use 48kHz, 16-bit, stereo for the audio track. */ 773 uint16_t uAudioHz = 48000; 774 uint8_t uAudioBits = 16; 775 uint8_t uAudioChannels = 2; 772 776 #endif 773 777 … … 819 823 #endif 820 824 } 825 else if (key.compare("ac_profile", Utf8Str::CaseInsensitive) == 0) 826 { 827 #ifdef VBOX_WITH_AUDIO_VIDEOREC 828 if (value.compare("low", Utf8Str::CaseInsensitive) == 0) 829 { 830 uAudioHz = 8000; 831 uAudioBits = 16; 832 uAudioChannels = 1; 833 } 834 else if (value.compare("med" /* "med[ium]" */, Utf8Str::CaseInsensitive) == 0) 835 { 836 uAudioHz = 22050; 837 uAudioBits = 16; 838 uAudioChannels = 2; 839 } 840 else if (value.compare("high", Utf8Str::CaseInsensitive) == 0) 841 { 842 /* Stay with the default set above. */ 843 } 844 #endif 845 } 821 846 else 822 847 LogRel(("VideoRec: Unknown option '%s' (value '%s'), skipping\n", key.c_str(), value.c_str())); … … 856 881 if (fHasAudioTrack) 857 882 { 858 rc = pStream->pEBML->AddAudioTrack( 48000, 2, 16, &pStream->uTrackAudio); /** @todo Make this configurable. */883 rc = pStream->pEBML->AddAudioTrack(uAudioHz, uAudioChannels, uAudioBits, &pStream->uTrackAudio); 859 884 if (RT_FAILURE(rc)) 860 885 { … … 863 888 } 864 889 865 LogRel(("VideoRec: Recording audio enabled\n")); 890 LogRel(("VideoRec: Recording audio in %RU16Hz, %RU8 bit, %RU8 %s\n", 891 uAudioHz, uAudioBits, uAudioChannels, uAudioChannels == 1 ? "channel" : "channels")); 866 892 } 867 893 #endif
Note:
See TracChangeset
for help on using the changeset viewer.