X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fexport_handler.h;h=7204bc33c87193d42b34720cde56346df96375a7;hb=ef1e20f6a281f4e6a030b92382c2e3dc5809fe3c;hp=526d32b4c6614b36aab7ee016292e43b88bdb3f2;hpb=acd1ee1989549ecd48ee896a3e1d2158c92d6609;p=ardour.git diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h index 526d32b4c6..7204bc33c8 100644 --- a/libs/ardour/ardour/export_handler.h +++ b/libs/ardour/ardour/export_handler.h @@ -22,17 +22,20 @@ #define __ardour_export_handler_h__ #include -#include #include #include +#include "pbd/gstdio_compat.h" + #include "ardour/export_pointers.h" #include "ardour/session.h" #include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "pbd/signals.h" +#include "i18n.h" + namespace AudioGrapher { class BroadcastInfo; } @@ -69,6 +72,7 @@ class LIBARDOUR_API ExportElementFactory Session & session; }; +/** Export Handler */ class LIBARDOUR_API ExportHandler : public ExportElementFactory, public sigc::trackable { public: @@ -156,13 +160,31 @@ class LIBARDOUR_API ExportHandler : public ExportElementFactory, public sigc::tr struct CDMarkerStatus { 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) + : path (out_file) + , 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 () { + if (!g_file_set_contents (path.c_str(), out.str().c_str(), -1, NULL)) { + PBD::error << string_compose(_("Editor: cannot open \"%1\" as export file for CD marker file"), path) << endmsg; + } + + } + + /* I/O */ + std::string path; + std::stringstream out; + /* General info */ - std::ofstream out; ExportTimespanPtr timespan; ExportFormatSpecPtr format; std::string filename;