transcoder: Add options widget for voaacenc
Base GstAudioEncoder class properties are not included. Reference: https://gstreamer.freedesktop.org/documentation/voaacenc/index.html
This commit is contained in:
parent
4994091f86
commit
f7b6708e4f
@ -325,6 +325,7 @@ set(SOURCES
|
|||||||
transcoder/transcoderoptionsmp3.cpp
|
transcoder/transcoderoptionsmp3.cpp
|
||||||
transcoder/transcoderoptionsopus.cpp
|
transcoder/transcoderoptionsopus.cpp
|
||||||
transcoder/transcoderoptionsspeex.cpp
|
transcoder/transcoderoptionsspeex.cpp
|
||||||
|
transcoder/transcoderoptionsvoaac.cpp
|
||||||
transcoder/transcoderoptionsvorbis.cpp
|
transcoder/transcoderoptionsvorbis.cpp
|
||||||
transcoder/transcoderoptionswma.cpp
|
transcoder/transcoderoptionswma.cpp
|
||||||
transcoder/transcodersettingspage.cpp
|
transcoder/transcodersettingspage.cpp
|
||||||
@ -754,6 +755,7 @@ set(UI
|
|||||||
transcoder/transcoderoptionsmp3.ui
|
transcoder/transcoderoptionsmp3.ui
|
||||||
transcoder/transcoderoptionsopus.ui
|
transcoder/transcoderoptionsopus.ui
|
||||||
transcoder/transcoderoptionsspeex.ui
|
transcoder/transcoderoptionsspeex.ui
|
||||||
|
transcoder/transcoderoptionsvoaac.ui
|
||||||
transcoder/transcoderoptionsvorbis.ui
|
transcoder/transcoderoptionsvorbis.ui
|
||||||
transcoder/transcoderoptionswma.ui
|
transcoder/transcoderoptionswma.ui
|
||||||
transcoder/transcodersettingspage.ui
|
transcoder/transcodersettingspage.ui
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "transcoderoptionsmp3.h"
|
#include "transcoderoptionsmp3.h"
|
||||||
#include "transcoderoptionsopus.h"
|
#include "transcoderoptionsopus.h"
|
||||||
#include "transcoderoptionsspeex.h"
|
#include "transcoderoptionsspeex.h"
|
||||||
|
#include "transcoderoptionsvoaac.h"
|
||||||
#include "transcoderoptionsvorbis.h"
|
#include "transcoderoptionsvorbis.h"
|
||||||
#include "transcoderoptionswma.h"
|
#include "transcoderoptionswma.h"
|
||||||
#include "ui_transcoderoptionsdialog.h"
|
#include "ui_transcoderoptionsdialog.h"
|
||||||
@ -81,6 +82,8 @@ TranscoderOptionsInterface* TranscoderOptionsDialog::MakeOptionsPage(
|
|||||||
return new TranscoderOptionsAAC(parent);
|
return new TranscoderOptionsAAC(parent);
|
||||||
} else if (element == "fdkaacenc") {
|
} else if (element == "fdkaacenc") {
|
||||||
return new TranscoderOptionsFDKAAC(parent);
|
return new TranscoderOptionsFDKAAC(parent);
|
||||||
|
} else if (element == "voaacenc") {
|
||||||
|
return new TranscoderOptionsVOAAC(parent);
|
||||||
} else if (element == "lamemp3enc") {
|
} else if (element == "lamemp3enc") {
|
||||||
return new TranscoderOptionsMP3(parent);
|
return new TranscoderOptionsMP3(parent);
|
||||||
} else if (element == "vorbisenc") {
|
} else if (element == "vorbisenc") {
|
||||||
|
50
src/transcoder/transcoderoptionsvoaac.cpp
Normal file
50
src/transcoder/transcoderoptionsvoaac.cpp
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/* This file is part of Clementine.
|
||||||
|
Copyright 2021, Jim Broadus <jbroadus@gmail.com>
|
||||||
|
|
||||||
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Clementine is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Settings for the voaacenc gstreamer element.
|
||||||
|
https://gstreamer.freedesktop.org/documentation/voaacenc/index.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "transcoderoptionsvoaac.h"
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
|
#include "ui_transcoderoptionsvoaac.h"
|
||||||
|
|
||||||
|
const char* TranscoderOptionsVOAAC::kSettingsGroup = "Transcoder/voaacenc";
|
||||||
|
|
||||||
|
TranscoderOptionsVOAAC::TranscoderOptionsVOAAC(QWidget* parent)
|
||||||
|
: TranscoderOptionsInterface(parent), ui_(new Ui_TranscoderOptionsVOAAC) {
|
||||||
|
ui_->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
TranscoderOptionsVOAAC::~TranscoderOptionsVOAAC() { delete ui_; }
|
||||||
|
|
||||||
|
void TranscoderOptionsVOAAC::Load() {
|
||||||
|
QSettings s;
|
||||||
|
s.beginGroup(kSettingsGroup + settings_postfix_);
|
||||||
|
|
||||||
|
ui_->bitrate_slider->setValue(s.value("bitrate", 128000).toInt() / 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TranscoderOptionsVOAAC::Save() {
|
||||||
|
QSettings s;
|
||||||
|
s.beginGroup(kSettingsGroup + settings_postfix_);
|
||||||
|
|
||||||
|
s.setValue("bitrate", ui_->bitrate_slider->value() * 1000);
|
||||||
|
}
|
39
src/transcoder/transcoderoptionsvoaac.h
Normal file
39
src/transcoder/transcoderoptionsvoaac.h
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/* This file is part of Clementine.
|
||||||
|
Copyright 2021, Jim Broadus <jbroadus@gmail.com>
|
||||||
|
|
||||||
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
Clementine is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TRANSCODEROPTIONSVOAAC_H
|
||||||
|
#define TRANSCODEROPTIONSVOAAC_H
|
||||||
|
|
||||||
|
#include "transcoderoptionsinterface.h"
|
||||||
|
|
||||||
|
class Ui_TranscoderOptionsVOAAC;
|
||||||
|
|
||||||
|
class TranscoderOptionsVOAAC : public TranscoderOptionsInterface {
|
||||||
|
public:
|
||||||
|
TranscoderOptionsVOAAC(QWidget* parent = nullptr);
|
||||||
|
~TranscoderOptionsVOAAC();
|
||||||
|
|
||||||
|
void Load();
|
||||||
|
void Save();
|
||||||
|
|
||||||
|
private:
|
||||||
|
static const char* kSettingsGroup;
|
||||||
|
|
||||||
|
Ui_TranscoderOptionsVOAAC* ui_;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TRANSCODEROPTIONSVOAAC_H
|
104
src/transcoder/transcoderoptionsvoaac.ui
Normal file
104
src/transcoder/transcoderoptionsvoaac.ui
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>TranscoderOptionsVOAAC</class>
|
||||||
|
<widget class="QWidget" name="TranscoderOptionsVOAAC">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>480</width>
|
||||||
|
<height>344</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="bitrate_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bitrate</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="bitrate_layout">
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="bitrate_slider">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>320</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>128</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="bitrate_spinbox">
|
||||||
|
<property name="suffix">
|
||||||
|
<string> kbps</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>320</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>128</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>bitrate_slider</tabstop>
|
||||||
|
<tabstop>bitrate_spinbox</tabstop>
|
||||||
|
</tabstops>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>bitrate_slider</sender>
|
||||||
|
<signal>valueChanged(int)</signal>
|
||||||
|
<receiver>bitrate_spinbox</receiver>
|
||||||
|
<slot>setValue(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>170</x>
|
||||||
|
<y>29</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>445</x>
|
||||||
|
<y>24</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>bitrate_spinbox</sender>
|
||||||
|
<signal>valueChanged(int)</signal>
|
||||||
|
<receiver>bitrate_slider</receiver>
|
||||||
|
<slot>setValue(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>407</x>
|
||||||
|
<y>18</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>191</x>
|
||||||
|
<y>29</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
Loading…
x
Reference in New Issue
Block a user