X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_batch.cc;h=3570dda084a2dc0a257c43169db4bf03165b2281;hb=5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f;hp=677861c3d4ae688dd58da8d759ae38c6583f3f4d;hpb=9af73fe2b9ea2ef82d641d44a995c110f8e61693;p=dcpomatic.git diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc index 677861c3d..3570dda08 100644 --- a/src/tools/dcpomatic_batch.cc +++ b/src/tools/dcpomatic_batch.cc @@ -1,19 +1,20 @@ /* Copyright (C) 2013-2015 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic 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, + DCP-o-matic 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. + along with DCP-o-matic. If not, see . */ @@ -35,12 +36,14 @@ #include #include #include +#include #include using std::exception; using std::string; using std::cout; using boost::shared_ptr; +using boost::make_shared; using boost::thread; using boost::scoped_array; @@ -127,7 +130,7 @@ public: void start_job (boost::filesystem::path path) { try { - shared_ptr film (new Film (path)); + shared_ptr film = make_shared (path); film->read_metadata (); film->make_dcp (); } catch (std::exception& e) { @@ -257,11 +260,11 @@ public: { try { int const length = socket->read_uint32 (); - cout << "len=" << length << "\n"; scoped_array buffer (new char[length]); socket->read (reinterpret_cast (buffer.get()), length); string s (buffer.get()); _frame->start_job (s); + socket->write (reinterpret_cast ("OK"), 3); } catch (...) { }