summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/export_handler.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-13 09:50:38 +0200
committerRobin Gareus <robin@gareus.org>2015-10-13 09:55:53 +0200
commit6ec38e9193d3936b6521e6cbb084cf0ff20a9998 (patch)
treedb885f0fe57737fddfe456db6635cb5ac708f62e /libs/ardour/ardour/export_handler.h
parent8e83ca5753e6c507e6c9cfff381706538a9b199c (diff)
remove last ofstream
Diffstat (limited to 'libs/ardour/ardour/export_handler.h')
-rw-r--r--libs/ardour/ardour/export_handler.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h
index 526d32b4c6..3d92888d60 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 <map>
-#include <fstream>
#include <boost/operators.hpp>
#include <boost/shared_ptr.hpp>
+#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;
}
@@ -156,13 +159,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;