/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
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
#include "cross.h"
#include "exceptions.h"
#include "film.h"
+#include "dcpomatic_socket.h"
#include "i18n.h"
}
void
-EncodedData::write_info (shared_ptr<const Film> film, int frame, Eyes eyes, dcp::FrameInfo fin) const
+EncodedData::write_info (shared_ptr<const Film> film, int frame, Eyes eyes, dcp::FrameInfo info) const
{
- boost::filesystem::path const info = film->info_path (frame, eyes);
- FILE* h = fopen_boost (info, "w");
- fin.write (h);
- fclose (h);
+ FILE* file = fopen_boost (film->info_file(), "ab");
+ if (!file) {
+ throw OpenFileError (film->info_file ());
+ }
+ write_frame_info (file, frame, eyes, info);
+ fclose (file);
}
/** Send this data to a socket.