X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fexport_handler.h;h=8336cea732aa896718445c15c4feedb7ecee4043;hb=c96ec968c7bb4b1d7c358f522a49b0685c022920;hp=79a90ebb6f56ca8b760de3f643ee98a3d128eed9;hpb=7468fdb9ca9892cec9b298690bf0edf3655d6453;p=ardour.git diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h index 79a90ebb6f..8336cea732 100644 --- a/libs/ardour/ardour/export_handler.h +++ b/libs/ardour/ardour/export_handler.h @@ -22,16 +22,16 @@ #define __ardour_export_handler_h__ #include -#include #include #include #include -#include "ardour/ardour.h" #include "ardour/export_pointers.h" #include "ardour/session.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" +#include "pbd/signals.h" namespace AudioGrapher { class BroadcastInfo; @@ -45,9 +45,9 @@ class ExportChannelConfiguration; class ExportFormatSpecification; class ExportFilename; class ExportGraphBuilder; +class Location; - -class ExportElementFactory +class LIBARDOUR_API ExportElementFactory { public: @@ -69,7 +69,7 @@ class ExportElementFactory Session & session; }; -class ExportHandler : public ExportElementFactory +class LIBARDOUR_API ExportHandler : public ExportElementFactory, public sigc::trackable { public: struct FileSpec { @@ -83,22 +83,11 @@ class ExportHandler : public ExportElementFactory {} ExportChannelConfigPtr channel_config; - ExportFormatSpecPtr format; + ExportFormatSpecPtr format; ExportFilenamePtr filename; BroadcastInfoPtr broadcast_info; }; - private: - - /* Stuff for export configs - * The multimap maps timespans to file specifications - */ - - typedef std::pair ConfigPair; - typedef std::multimap ConfigMap; - - typedef boost::shared_ptr GraphBuilderPtr; - private: /* Session::get_export_handler() should be used to obtain an export handler * This ensures that it doesn't go out of scope before finalize_audio_export is called @@ -107,24 +96,45 @@ class ExportHandler : public ExportElementFactory friend boost::shared_ptr Session::get_export_handler(); ExportHandler (Session & session); + void command_output(std::string output, size_t size); + public: ~ExportHandler (); bool add_export_config (ExportTimespanPtr timespan, ExportChannelConfigPtr channel_config, ExportFormatSpecPtr format, ExportFilenamePtr filename, BroadcastInfoPtr broadcast_info); - void do_export (bool rt = false); + void do_export (); + + std::string get_cd_marker_filename(std::string filename, CDMarkerFormat format); + + /** signal emitted when soundcloud export reports progress updates during upload. + * The parameters are total and current bytes downloaded, and the current filename + */ + PBD::Signal3 SoundcloudProgress; + + /* upload credentials & preferences */ + std::string soundcloud_username; + std::string soundcloud_password; + bool soundcloud_make_public; + bool soundcloud_open_page; + bool soundcloud_downloadable; private: + void handle_duplicate_format_extensions(); int process (framecnt_t frames); Session & session; - GraphBuilderPtr graph_builder; + boost::shared_ptr graph_builder; ExportStatusPtr export_status; + + /* The timespan and corresponding file specifications that we are exporting; + there can be multiple FileSpecs for each ExportTimespan. + */ + typedef std::multimap ConfigMap; ConfigMap config_map; - bool realtime; bool normalizing; /* Timespan management */ @@ -183,6 +193,9 @@ class ExportHandler : public ExportElementFactory void write_index_info_toc (CDMarkerStatus & status); void frames_to_cd_frames_string (char* buf, framepos_t when); + std::string toc_escape_cdtext (const std::string&); + std::string toc_escape_filename (const std::string&); + std::string cue_escape_cdtext (const std::string& txt); int cue_tracknum; int cue_indexnum;