From 3d1c6d379655cd9957f6e1f3b26e7c6df500c7e8 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 11 Mar 2022 04:11:49 +0100 Subject: [PATCH] Add export format option to re-import exported file(s) --- libs/ardour/ardour/export_format_specification.h | 3 +++ libs/ardour/export_format_specification.cc | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/libs/ardour/ardour/export_format_specification.h b/libs/ardour/ardour/export_format_specification.h index c5c0e6e5c7..22597108b1 100644 --- a/libs/ardour/ardour/export_format_specification.h +++ b/libs/ardour/ardour/export_format_specification.h @@ -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 */ diff --git a/libs/ardour/export_format_specification.cc b/libs/ardour/export_format_specification.cc index 87212f5d2b..59c3f2852f 100644 --- a/libs/ardour/export_format_specification.cc +++ b/libs/ardour/export_format_specification.cc @@ -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; }