13
0

Add export format option to re-import exported file(s)

This commit is contained in:
Robin Gareus 2022-03-11 04:11:49 +01:00
parent e58c312420
commit 3d1c6d3796
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 11 additions and 0 deletions

View File

@ -111,6 +111,7 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
void set_soundcloud_upload (bool yn) { _soundcloud_upload = yn; }
void set_command (std::string command) { _command = command; }
void set_analyse (bool yn) { _analyse = yn; }
void set_reimport (bool yn) { _reimport = yn; }
void set_codec_quality (int q) { _codec_quality = q; }
void set_silence_beginning (AnyTime const & value) { _silence_beginning = value; }
@ -185,6 +186,7 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
bool soundcloud_upload() const { return _soundcloud_upload; }
std::string command() const { return _command; }
bool analyse() const { return _analyse; }
bool reimport() const { return _reimport; }
int codec_quality() const { return _codec_quality; }
bool tag () const { return _tag && _supports_tagging; }
@ -249,6 +251,7 @@ class LIBARDOUR_API ExportFormatSpecification : public ExportFormatBase {
std::string _command;
bool _analyse;
bool _reimport;
int _codec_quality;
/* serialization helpers */

View File

@ -163,6 +163,7 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s)
, _demo_noise_interval (0)
, _command ("")
, _analyse (true)
, _reimport (false)
, _codec_quality (0)
{
format_ids.insert (F_None);
@ -203,6 +204,7 @@ ExportFormatSpecification::ExportFormatSpecification (Session & s, XMLNode const
, _demo_noise_interval (0)
, _command ("")
, _analyse (true)
, _reimport (false)
, _codec_quality (0)
{
_silence_beginning.type = Time::Timecode;
@ -225,6 +227,7 @@ ExportFormatSpecification::ExportFormatSpecification (ExportFormatSpecification
, _demo_noise_interval (other._demo_noise_interval)
, _command (other._command)
, _analyse (other._analyse)
, _reimport (other._reimport)
, _codec_quality (other._codec_quality)
{
if (modify_name) {
@ -283,6 +286,7 @@ ExportFormatSpecification::get_state ()
root->set_property ("with-mp4chaps", _with_mp4chaps);
root->set_property ("command", _command);
root->set_property ("analyse", _analyse);
root->set_property ("reimport", _reimport);
root->set_property ("soundcloud-upload", _soundcloud_upload);
node = root->add_child ("Encoding");
@ -380,6 +384,10 @@ ExportFormatSpecification::set_state (const XMLNode & root)
_analyse = false;
}
if (!root.get_property ("reimport", _reimport)) {
_reimport = false;
}
if (!root.get_property ("soundcloud-upload", _soundcloud_upload)) {
_soundcloud_upload = false;
}