summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/comparable_shared_ptr.h56
-rw-r--r--libs/ardour/ardour/export_channel.h14
-rw-r--r--libs/ardour/ardour/export_filename.h23
-rw-r--r--libs/ardour/ardour/export_format_manager.h36
-rw-r--r--libs/ardour/ardour/export_graph_builder.h3
-rw-r--r--libs/ardour/ardour/export_handler.h68
-rw-r--r--libs/ardour/ardour/export_pointers.h66
-rw-r--r--libs/ardour/ardour/export_profile_manager.h58
-rw-r--r--libs/ardour/ardour/export_timespan.h7
-rw-r--r--libs/ardour/ardour/types.h1
10 files changed, 213 insertions, 119 deletions
diff --git a/libs/ardour/ardour/comparable_shared_ptr.h b/libs/ardour/ardour/comparable_shared_ptr.h
new file mode 100644
index 0000000000..5ff19af419
--- /dev/null
+++ b/libs/ardour/ardour/comparable_shared_ptr.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2011 Paul Davis
+ Author: Sakari Bergen
+
+ This program 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 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __ardour_comparable_shared_ptr_h__
+#define __ardour_comparable_shared_ptr_h__
+
+namespace ARDOUR {
+
+template<typename T>
+class ComparableSharedPtr : public boost::shared_ptr<T>
+ , public boost::less_than_comparable<ComparableSharedPtr<T> >
+{
+ public:
+ ComparableSharedPtr () {}
+ template<class Y>
+ explicit ComparableSharedPtr (Y * p) : boost::shared_ptr<T> (p) {}
+
+ template<class Y, class D>
+ ComparableSharedPtr (Y * p, D d) : boost::shared_ptr<T> (p, d) {}
+
+ template<class Y, class D, class A>
+ ComparableSharedPtr (Y * p, D d, A a) : boost::shared_ptr<T> (p, d, a) {}
+
+ ComparableSharedPtr (ComparableSharedPtr const & r) : boost::shared_ptr<T> (r) {}
+
+ template<class Y>
+ ComparableSharedPtr(ComparableSharedPtr<Y> const & r) : boost::shared_ptr<T> (r) {}
+
+ template<class Y>
+ ComparableSharedPtr(ComparableSharedPtr<Y> const & r, T * p) : boost::shared_ptr<T> (r, p) {}
+
+ template<class Y>
+ bool operator< (ComparableSharedPtr<Y> const & other) const { return **this < *other; }
+};
+
+
+} // namespace ARDOUR
+
+#endif // __ardour_comparable_shared_ptr_h__
diff --git a/libs/ardour/ardour/export_channel.h b/libs/ardour/ardour/export_channel.h
index cbb894c66a..1a71f14c3c 100644
--- a/libs/ardour/ardour/export_channel.h
+++ b/libs/ardour/ardour/export_channel.h
@@ -26,11 +26,11 @@
#include <boost/signals2.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_array.hpp>
-#include <boost/operators.hpp>
#include "pbd/signals.h"
#include "ardour/buffer_set.h"
+#include "ardour/export_pointers.h"
namespace ARDOUR {
@@ -62,17 +62,6 @@ class ExportChannel : public boost::less_than_comparable<ExportChannel>
virtual bool operator< (ExportChannel const & other) const = 0;
};
-/// Safe pointer for storing ExportChannels in ordered STL containers
-class ExportChannelPtr : public boost::shared_ptr<ExportChannel>
- , public boost::less_than_comparable<ExportChannel>
-{
- public:
- ExportChannelPtr () {}
- template<typename Y> explicit ExportChannelPtr (Y * ptr) : boost::shared_ptr<ExportChannel> (ptr) {}
-
- bool operator< (ExportChannelPtr const & other) const { return **this < *other; }
-};
-
/// Basic export channel that reads from AudioPorts
class PortExportChannel : public ExportChannel
{
@@ -99,6 +88,7 @@ class PortExportChannel : public ExportChannel
framecnt_t buffer_size;
};
+
/// Handles RegionExportChannels and does actual reading from region
class RegionExportChannelFactory
{
diff --git a/libs/ardour/ardour/export_filename.h b/libs/ardour/ardour/export_filename.h
index d046b9a501..b5f0bde234 100644
--- a/libs/ardour/ardour/export_filename.h
+++ b/libs/ardour/ardour/export_filename.h
@@ -22,24 +22,19 @@
#define __ardour_export_filename_h__
#include <boost/shared_ptr.hpp>
+
#include <string>
+
+#include <ardour/export_pointers.h>
+
#include "pbd/statefuldestructible.h"
namespace ARDOUR
{
class Session;
-class ExportTimespan;
-class ExportChannelConfiguration;
-class ExportFormatSpecification;
class ExportFilename {
- private:
-
- typedef boost::shared_ptr<ExportTimespan> TimespanPtr;
- typedef boost::shared_ptr<ExportChannelConfiguration> ChannelConfigPtr;
- typedef boost::shared_ptr<ExportFormatSpecification const> FormatPtr;
-
public:
enum DateFormat {
@@ -68,7 +63,7 @@ class ExportFilename {
/* data access */
- std::string get_path (FormatPtr format) const;
+ std::string get_path (ExportFormatSpecPtr format) const;
std::string get_folder () const { return folder; }
TimeFormat get_time_format () const { return time_format; }
@@ -88,8 +83,8 @@ class ExportFilename {
void set_channel (uint32_t value) { channel = value; }
bool set_folder (std::string path);
- void set_timespan (TimespanPtr ts) { timespan = ts; }
- void set_channel_config (ChannelConfigPtr cc) { channel_config = cc; }
+ void set_timespan (ExportTimespanPtr ts) { timespan = ts; }
+ void set_channel_config (ExportChannelConfigPtr cc) { channel_config = cc; }
/* public members */
@@ -119,8 +114,8 @@ class ExportFilename {
// Due to the static allocation used in strftime(), no destructor or copy-ctor is needed for this
struct tm * time_struct;
- TimespanPtr timespan;
- ChannelConfigPtr channel_config;
+ ExportTimespanPtr timespan;
+ ExportChannelConfigPtr channel_config;
/* Serialization helpers */
diff --git a/libs/ardour/ardour/export_format_manager.h b/libs/ardour/ardour/export_format_manager.h
index f82230b8c3..019a986f35 100644
--- a/libs/ardour/ardour/export_format_manager.h
+++ b/libs/ardour/ardour/export_format_manager.h
@@ -25,11 +25,11 @@
#include <string>
#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
#include "pbd/signals.h"
#include "ardour/export_formats.h"
+#include "ardour/export_pointers.h"
namespace ARDOUR
{
@@ -43,13 +43,8 @@ class ExportFormatManager : public PBD::ScopedConnectionList
{
public:
- typedef boost::shared_ptr<ExportFormatCompatibility> CompatPtr;
- typedef boost::weak_ptr<ExportFormatCompatibility> WeakCompatPtr;
- typedef std::list<CompatPtr> CompatList;
-
- typedef boost::shared_ptr<ExportFormat> FormatPtr;
- typedef boost::weak_ptr<ExportFormat> WeakFormatPtr;
- typedef std::list<FormatPtr> FormatList;
+ typedef std::list<ExportFormatCompatibilityPtr> CompatList;
+ typedef std::list<ExportFormatPtr> FormatList;
typedef HasSampleFormat::SampleFormatPtr SampleFormatPtr;
typedef HasSampleFormat::SampleFormatList SampleFormatList;
@@ -58,9 +53,6 @@ class ExportFormatManager : public PBD::ScopedConnectionList
typedef HasSampleFormat::DitherTypePtr DitherTypePtr;
typedef HasSampleFormat::WeakDitherTypePtr WeakDitherTypePtr;
- typedef boost::shared_ptr<ExportFormatSpecification> SpecPtr;
- typedef boost::shared_ptr<ExportFormatBase> FormatBasePtr;
-
/* Quality states */
class QualityState : public ExportFormatBase::SelectableCompatible {
@@ -87,7 +79,7 @@ class ExportFormatManager : public PBD::ScopedConnectionList
public:
- explicit ExportFormatManager (SpecPtr specification);
+ explicit ExportFormatManager (ExportFormatSpecPtr specification);
~ExportFormatManager ();
/* Signals */
@@ -121,16 +113,16 @@ class ExportFormatManager : public PBD::ScopedConnectionList
void init_formats ();
void init_sample_rates ();
- void add_compatibility (CompatPtr ptr);
+ void add_compatibility (ExportFormatCompatibilityPtr ptr);
void add_quality (QualityPtr ptr);
- void add_format (FormatPtr ptr);
+ void add_format (ExportFormatPtr ptr);
void add_sample_rate (SampleRatePtr ptr);
/* Connected to signals */
- void change_compatibility_selection (bool select, WeakCompatPtr const & compat);
+ void change_compatibility_selection (bool select, WeakExportFormatCompatibilityPtr const & compat);
void change_quality_selection (bool select, WeakQualityPtr const & quality);
- void change_format_selection (bool select, WeakFormatPtr const & format);
+ void change_format_selection (bool select, WeakExportFormatPtr const & format);
void change_sample_rate_selection (bool select, WeakSampleRatePtr const & rate);
void change_sample_format_selection (bool select, WeakSampleFormatPtr const & format);
@@ -138,9 +130,9 @@ class ExportFormatManager : public PBD::ScopedConnectionList
/* Do actual selection */
- void select_compatibility (WeakCompatPtr const & compat);
+ void select_compatibility (WeakExportFormatCompatibilityPtr const & compat);
void select_quality (QualityPtr const & quality);
- void select_format (FormatPtr const & format);
+ void select_format (ExportFormatPtr const & format);
void select_sample_rate (SampleRatePtr const & rate);
void select_sample_format (SampleFormatPtr const & format);
@@ -152,15 +144,15 @@ class ExportFormatManager : public PBD::ScopedConnectionList
/* Formats and compatibilities */
QualityPtr get_selected_quality ();
- FormatPtr get_selected_format ();
+ ExportFormatPtr get_selected_format ();
SampleRatePtr get_selected_sample_rate ();
SampleFormatPtr get_selected_sample_format ();
- FormatBasePtr get_compatibility_intersection ();
+ ExportFormatBasePtr get_compatibility_intersection ();
- FormatBasePtr universal_set;
- SpecPtr current_selection;
+ ExportFormatBasePtr universal_set;
+ ExportFormatSpecPtr current_selection;
CompatList compatibilities;
QualityList qualities;
diff --git a/libs/ardour/ardour/export_graph_builder.h b/libs/ardour/ardour/export_graph_builder.h
index 444f1ae659..bce6838d02 100644
--- a/libs/ardour/ardour/export_graph_builder.h
+++ b/libs/ardour/ardour/export_graph_builder.h
@@ -51,7 +51,6 @@ class ExportGraphBuilder
{
private:
typedef ExportHandler::FileSpec FileSpec;
- typedef ExportElementFactory::FilenamePtr FilenamePtr;
typedef boost::shared_ptr<AudioGrapher::Sink<Sample> > FloatSinkPtr;
typedef boost::shared_ptr<AudioGrapher::IdentityVertex<Sample> > IdentityVertexPtr;
@@ -90,7 +89,7 @@ class ExportGraphBuilder
void copy_files (std::string orig_path);
FileSpec config;
- std::list<FilenamePtr> filenames;
+ std::list<ExportFilenamePtr> filenames;
PBD::ScopedConnection copy_files_connection;
// Only one of these should be available at a time
diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h
index ab78899a17..79a90ebb6f 100644
--- a/libs/ardour/ardour/export_handler.h
+++ b/libs/ardour/ardour/export_handler.h
@@ -25,9 +25,11 @@
#include <list>
#include <fstream>
+#include <boost/operators.hpp>
#include <boost/shared_ptr.hpp>
#include "ardour/ardour.h"
+#include "ardour/export_pointers.h"
#include "ardour/session.h"
#include "ardour/types.h"
@@ -48,26 +50,20 @@ class ExportGraphBuilder;
class ExportElementFactory
{
public:
- typedef boost::shared_ptr<ExportTimespan> TimespanPtr;
- typedef boost::shared_ptr<ExportChannelConfiguration> ChannelConfigPtr;
- typedef boost::shared_ptr<ExportFormatSpecification> FormatPtr;
- typedef boost::shared_ptr<ExportFilename> FilenamePtr;
-
- public:
ExportElementFactory (Session & session);
~ExportElementFactory ();
- TimespanPtr add_timespan ();
+ ExportTimespanPtr add_timespan ();
- ChannelConfigPtr add_channel_config ();
+ ExportChannelConfigPtr add_channel_config ();
- FormatPtr add_format ();
- FormatPtr add_format (XMLNode const & state);
- FormatPtr add_format_copy (FormatPtr other);
+ ExportFormatSpecPtr add_format ();
+ ExportFormatSpecPtr add_format (XMLNode const & state);
+ ExportFormatSpecPtr add_format_copy (ExportFormatSpecPtr other);
- FilenamePtr add_filename ();
- FilenamePtr add_filename_copy (FilenamePtr other);
+ ExportFilenamePtr add_filename ();
+ ExportFilenamePtr add_filename_copy (ExportFilenamePtr other);
private:
Session & session;
@@ -78,17 +74,18 @@ class ExportHandler : public ExportElementFactory
public:
struct FileSpec {
FileSpec() {}
- FileSpec (ChannelConfigPtr channel_config, FormatPtr format, FilenamePtr filename, boost::shared_ptr<AudioGrapher::BroadcastInfo> broadcast_info)
+ FileSpec (ExportChannelConfigPtr channel_config, ExportFormatSpecPtr format,
+ ExportFilenamePtr filename, BroadcastInfoPtr broadcast_info)
: channel_config (channel_config)
, format (format)
, filename (filename)
, broadcast_info (broadcast_info)
{}
- ChannelConfigPtr channel_config;
- FormatPtr format;
- FilenamePtr filename;
- boost::shared_ptr<AudioGrapher::BroadcastInfo> broadcast_info;
+ ExportChannelConfigPtr channel_config;
+ ExportFormatSpecPtr format;
+ ExportFilenamePtr filename;
+ BroadcastInfoPtr broadcast_info;
};
private:
@@ -97,11 +94,10 @@ class ExportHandler : public ExportElementFactory
* The multimap maps timespans to file specifications
*/
- typedef std::pair<TimespanPtr, FileSpec> ConfigPair;
- typedef std::multimap<TimespanPtr, FileSpec> ConfigMap;
+ typedef std::pair<ExportTimespanPtr, FileSpec> ConfigPair;
+ typedef std::multimap<ExportTimespanPtr, FileSpec> ConfigMap;
typedef boost::shared_ptr<ExportGraphBuilder> GraphBuilderPtr;
- typedef boost::shared_ptr<ExportStatus> StatusPtr;
private:
/* Session::get_export_handler() should be used to obtain an export handler
@@ -114,7 +110,9 @@ class ExportHandler : public ExportElementFactory
public:
~ExportHandler ();
- bool add_export_config (TimespanPtr timespan, ChannelConfigPtr channel_config, FormatPtr format, FilenamePtr filename, boost::shared_ptr<AudioGrapher::BroadcastInfo> broadcast_info);
+ bool add_export_config (ExportTimespanPtr timespan, ExportChannelConfigPtr channel_config,
+ ExportFormatSpecPtr format, ExportFilenamePtr filename,
+ BroadcastInfoPtr broadcast_info);
void do_export (bool rt = false);
private:
@@ -123,7 +121,7 @@ class ExportHandler : public ExportElementFactory
Session & session;
GraphBuilderPtr graph_builder;
- StatusPtr export_status;
+ ExportStatusPtr export_status;
ConfigMap config_map;
bool realtime;
@@ -137,7 +135,7 @@ class ExportHandler : public ExportElementFactory
void finish_timespan ();
typedef std::pair<ConfigMap::iterator, ConfigMap::iterator> TimespanBounds;
- TimespanPtr current_timespan;
+ ExportTimespanPtr current_timespan;
TimespanBounds timespan_bounds;
PBD::ScopedConnection process_connection;
@@ -146,21 +144,22 @@ class ExportHandler : public ExportElementFactory
/* CD Marker stuff */
struct CDMarkerStatus {
- CDMarkerStatus (std::string out_file, TimespanPtr timespan, FormatPtr format, std::string filename) :
- out (out_file.c_str()), timespan (timespan), format (format), filename (filename), marker(0),
- track_number (1), track_position (0), track_duration (0), track_start_frame (0),
- index_number (1), index_position (0)
+ CDMarkerStatus (std::string out_file, ExportTimespanPtr timespan,
+ ExportFormatSpecPtr format, std::string filename)
+ : out (out_file.c_str()), timespan (timespan), format (format), filename (filename), marker(0)
+ , track_number (1), track_position (0), track_duration (0), track_start_frame (0)
+ , index_number (1), index_position (0)
{}
/* General info */
std::ofstream out;
- TimespanPtr timespan;
- FormatPtr format;
- std::string filename;
- Location * marker;
+ ExportTimespanPtr timespan;
+ ExportFormatSpecPtr format;
+ std::string filename;
+ Location * marker;
/* Track info */
- uint32_t track_number;
+ uint32_t track_number;
framepos_t track_position;
framepos_t track_duration;
framepos_t track_start_frame;
@@ -171,7 +170,8 @@ class ExportHandler : public ExportElementFactory
};
- void export_cd_marker_file (TimespanPtr timespan, FormatPtr file_format, std::string filename, CDMarkerFormat format);
+ void export_cd_marker_file (ExportTimespanPtr timespan, ExportFormatSpecPtr file_format,
+ std::string filename, CDMarkerFormat format);
void write_cue_header (CDMarkerStatus & status);
void write_toc_header (CDMarkerStatus & status);
diff --git a/libs/ardour/ardour/export_pointers.h b/libs/ardour/ardour/export_pointers.h
new file mode 100644
index 0000000000..edd7f91325
--- /dev/null
+++ b/libs/ardour/ardour/export_pointers.h
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 2011 Paul Davis
+ Author: Sakari Bergen
+
+ This program 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 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __ardour_export_pointers_h__
+#define __ardour_export_pointers_h__
+
+#include <boost/operators.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+
+#include "ardour/comparable_shared_ptr.h"
+
+namespace AudioGrapher {
+ class BroadcastInfo;
+}
+
+namespace ARDOUR {
+
+class ExportTimespan;
+class ExportChannel;
+class ExportChannelConfiguration;
+class ExportFormat;
+class ExportFormatBase;
+class ExportFormatSpecification;
+class ExportFormatCompatibility;
+class ExportFilename;
+class ExportStatus;
+class ExportPreset;
+
+typedef ComparableSharedPtr<ExportChannel> ExportChannelPtr;
+typedef ComparableSharedPtr<ExportTimespan> ExportTimespanPtr;
+
+typedef boost::shared_ptr<ExportChannelConfiguration> ExportChannelConfigPtr;
+typedef boost::shared_ptr<ExportFormatBase> ExportFormatBasePtr;
+typedef boost::shared_ptr<ExportFormat> ExportFormatPtr;
+typedef boost::shared_ptr<ExportFormatSpecification> ExportFormatSpecPtr;
+typedef boost::shared_ptr<ExportFormatCompatibility> ExportFormatCompatibilityPtr;
+typedef boost::shared_ptr<ExportFilename> ExportFilenamePtr;
+typedef boost::shared_ptr<ExportStatus> ExportStatusPtr;
+typedef boost::shared_ptr<ExportPreset> ExportPresetPtr;
+
+typedef boost::weak_ptr<ExportFormatCompatibility> WeakExportFormatCompatibilityPtr;
+typedef boost::weak_ptr<ExportFormat> WeakExportFormatPtr;
+
+typedef boost::shared_ptr<AudioGrapher::BroadcastInfo> BroadcastInfoPtr;
+
+} // namespace ARDOUR
+
+#endif // __ardour_export_pointers_h__
diff --git a/libs/ardour/ardour/export_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h
index fef6f3aad5..c0d2bb1dd8 100644
--- a/libs/ardour/ardour/export_profile_manager.h
+++ b/libs/ardour/ardour/export_profile_manager.h
@@ -28,7 +28,6 @@
#include <string>
#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
#include "pbd/uuid.h"
#include "pbd/file_utils.h"
@@ -37,16 +36,12 @@
#include "ardour/filesystem_paths.h"
#include "ardour/location.h"
#include "ardour/types.h"
+#include "ardour/export_handler.h"
namespace ARDOUR
{
class ExportHandler;
-class ExportTimespan;
-class ExportChannelConfiguration;
-class ExportFormatSpecification;
-class ExportFilename;
-class ExportPreset;
class Location;
class Session;
@@ -61,13 +56,12 @@ class ExportProfileManager
void load_profile ();
void prepare_for_export ();
- typedef boost::shared_ptr<ExportPreset> PresetPtr;
- typedef std::list<PresetPtr> PresetList;
+ typedef std::list<ExportPresetPtr> PresetList;
PresetList const & get_presets () { return preset_list; }
- bool load_preset (PresetPtr preset);
- PresetPtr new_preset (std::string const & name);
- PresetPtr save_preset (std::string const & name);
+ bool load_preset (ExportPresetPtr preset);
+ ExportPresetPtr new_preset (std::string const & name);
+ ExportPresetPtr save_preset (std::string const & name);
void remove_preset ();
private:
@@ -92,9 +86,9 @@ class ExportProfileManager
void serialize_global_profile (XMLNode & root);
void serialize_local_profile (XMLNode & root);
- PresetList preset_list;
- PresetPtr current_preset;
- FileMap preset_file_map;
+ PresetList preset_list;
+ ExportPresetPtr current_preset;
+ FileMap preset_file_map;
std::vector<PBD::sys::path> find_file (std::string const & pattern);
@@ -104,8 +98,7 @@ class ExportProfileManager
/* Timespans */
public:
- typedef boost::shared_ptr<ExportTimespan> TimespanPtr;
- typedef std::list<TimespanPtr> TimespanList;
+ typedef std::list<ExportTimespanPtr> TimespanList;
typedef boost::shared_ptr<TimespanList> TimespanListPtr;
typedef std::list<Location *> LocationList;
@@ -165,12 +158,10 @@ class ExportProfileManager
/* Channel Configs */
public:
- typedef boost::shared_ptr<ExportChannelConfiguration> ChannelConfigPtr;
-
struct ChannelConfigState {
- ChannelConfigPtr config;
+ ExportChannelConfigPtr config;
- ChannelConfigState (ChannelConfigPtr ptr) : config (ptr) {}
+ ChannelConfigState (ExportChannelConfigPtr ptr) : config (ptr) {}
};
typedef boost::shared_ptr<ChannelConfigState> ChannelConfigStatePtr;
typedef std::list<ChannelConfigStatePtr> ChannelConfigStateList;
@@ -188,14 +179,13 @@ class ExportProfileManager
/* Formats */
public:
- typedef boost::shared_ptr<ExportFormatSpecification> FormatPtr;
- typedef std::list<FormatPtr> FormatList;
+ typedef std::list<ExportFormatSpecPtr> FormatList;
struct FormatState {
boost::shared_ptr<FormatList const> list;
- FormatPtr format;
+ ExportFormatSpecPtr format;
- FormatState (boost::shared_ptr<FormatList const> list, FormatPtr format) :
+ FormatState (boost::shared_ptr<FormatList const> list, ExportFormatSpecPtr format) :
list (list), format (format) {}
};
typedef boost::shared_ptr<FormatState> FormatStatePtr;
@@ -205,9 +195,9 @@ class ExportProfileManager
FormatStatePtr duplicate_format_state (FormatStatePtr state);
void remove_format_state (FormatStatePtr state);
- PBD::sys::path save_format_to_disk (FormatPtr format);
- void remove_format_profile (FormatPtr format);
- FormatPtr get_new_format (FormatPtr original);
+ PBD::sys::path save_format_to_disk (ExportFormatSpecPtr format);
+ void remove_format_profile (ExportFormatSpecPtr format);
+ ExportFormatSpecPtr get_new_format (ExportFormatSpecPtr original);
PBD::Signal0<void> FormatListChanged;
@@ -221,7 +211,7 @@ class ExportProfileManager
void load_formats ();
- FormatPtr load_format (XMLNode & node);
+ ExportFormatSpecPtr load_format (XMLNode & node);
void load_format_from_disk (PBD::sys::path const & path);
boost::shared_ptr<FormatList> format_list;
@@ -230,12 +220,10 @@ class ExportProfileManager
/* Filenames */
public:
- typedef boost::shared_ptr<ExportFilename> FilenamePtr;
-
struct FilenameState {
- FilenamePtr filename;
+ ExportFilenamePtr filename;
- FilenameState (FilenamePtr ptr) : filename (ptr) {}
+ FilenameState (ExportFilenamePtr ptr) : filename (ptr) {}
};
typedef boost::shared_ptr<FilenameState> FilenameStatePtr;
typedef std::list<FilenameStatePtr> FilenameStateList;
@@ -249,7 +237,7 @@ class ExportProfileManager
FilenameStateList filenames;
bool init_filenames (XMLNodeList nodes);
- FilenamePtr load_filename (XMLNode & node);
+ ExportFilenamePtr load_filename (XMLNode & node);
/* Warnings */
public:
@@ -268,8 +256,8 @@ class ExportProfileManager
FormatStatePtr format_state,
FilenameStatePtr filename_state);
- bool check_format (FormatPtr format, uint32_t channels);
- bool check_sndfile_format (FormatPtr format, unsigned int channels);
+ bool check_format (ExportFormatSpecPtr format, uint32_t channels);
+ bool check_sndfile_format (ExportFormatSpecPtr format, unsigned int channels);
/* Utilities */
diff --git a/libs/ardour/ardour/export_timespan.h b/libs/ardour/ardour/export_timespan.h
index ba31fd6f6a..9273aab6c7 100644
--- a/libs/ardour/ardour/export_timespan.h
+++ b/libs/ardour/ardour/export_timespan.h
@@ -58,6 +58,13 @@ class ExportTimespan
framepos_t get_start () const { return start_frame; }
framepos_t get_end () const { return end_frame; }
+ /// Primarily compare start time, then end time
+ bool operator< (ExportTimespan const & other) {
+ if (start_frame < other.start_frame) { return true; }
+ if (start_frame > other.start_frame) { return false; }
+ return end_frame < other.end_frame;
+ }
+
private:
ExportStatusPtr status;
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index 26775a8d70..42264cf1cb 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -251,6 +251,7 @@ namespace ARDOUR {
case Seconds:
return seconds == other.seconds;
}
+ return false; // get rid of warning
}
bool not_zero() const