implemented audio exporting

The encoder was moved to its own thread and will transcode the PCM from the
audio renderer into the chosen codec while the video frames are still
received. The implementation isn't perfect and could use some cleaning up, but
it is functional at the moment.
This commit is contained in:
itsmattkc
2019-12-23 01:45:27 +11:00
parent a8beae64ae
commit 3a7b3ffac6
19 changed files with 377 additions and 159 deletions
+7 -2
View File
@@ -27,7 +27,7 @@ ExportAudioTab::ExportAudioTab(QWidget* parent) :
sample_rate_combobox_ = new QComboBox();
sample_rates_ = Core::SupportedSampleRates();
foreach (const int& sr, sample_rates_) {
sample_rate_combobox_->addItem(Core::SampleRateToString(sr));
sample_rate_combobox_->addItem(Core::SampleRateToString(sr), sr);
}
layout->addWidget(sample_rate_combobox_, row, 1);
@@ -38,7 +38,7 @@ ExportAudioTab::ExportAudioTab(QWidget* parent) :
channel_layout_combobox_ = new QComboBox();
channel_layouts_ = Core::SupportedChannelLayouts();
foreach (const uint64_t& layout, channel_layouts_) {
channel_layout_combobox_->addItem(Core::ChannelLayoutToString(layout));
channel_layout_combobox_->addItem(Core::ChannelLayoutToString(layout), layout);
}
layout->addWidget(channel_layout_combobox_, row, 1);
@@ -60,6 +60,11 @@ QComboBox *ExportAudioTab::sample_rate_combobox() const
return sample_rate_combobox_;
}
QComboBox *ExportAudioTab::channel_layout_combobox() const
{
return channel_layout_combobox_;
}
void ExportAudioTab::set_sample_rate(int rate)
{
sample_rate_combobox_->setCurrentIndex(sample_rates_.indexOf(rate));