diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-10 14:04:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-10 14:04:10 +0100 |
| commit | 5c0a67869dbddb924c9f5ccb4126aa06d85b9b8b (patch) | |
| tree | c923ed014e373f5ad84cfe82f3736bcba6b7eabf /src/lib | |
| parent | 717ad0a42f8f3b744ad3bffcb094518ad59ef7b3 (diff) | |
Rename EncodedData -> Data and trim it a bit.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/data.cc | 81 | ||||
| -rw-r--r-- | src/lib/data.h | 47 | ||||
| -rw-r--r-- | src/lib/dcp_video.cc | 12 | ||||
| -rw-r--r-- | src/lib/dcp_video.h | 6 | ||||
| -rw-r--r-- | src/lib/encoded_data.cc | 125 | ||||
| -rw-r--r-- | src/lib/encoded_data.h | 83 | ||||
| -rw-r--r-- | src/lib/encoder.cc | 4 | ||||
| -rw-r--r-- | src/lib/encoder.h | 4 | ||||
| -rw-r--r-- | src/lib/j2k_image_proxy.cc | 10 | ||||
| -rw-r--r-- | src/lib/j2k_image_proxy.h | 6 | ||||
| -rw-r--r-- | src/lib/player_video.cc | 2 | ||||
| -rw-r--r-- | src/lib/player_video.h | 4 | ||||
| -rw-r--r-- | src/lib/server.cc | 7 | ||||
| -rw-r--r-- | src/lib/writer.cc | 25 | ||||
| -rw-r--r-- | src/lib/writer.h | 12 | ||||
| -rw-r--r-- | src/lib/wscript | 2 |
16 files changed, 177 insertions, 253 deletions
diff --git a/src/lib/data.cc b/src/lib/data.cc new file mode 100644 index 000000000..e117199a1 --- /dev/null +++ b/src/lib/data.cc @@ -0,0 +1,81 @@ +/* + Copyright (C) 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 + 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, + 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. + +*/ + +#include "data.h" +#include "cross.h" +#include "exceptions.h" + +#include "i18n.h" + +using boost::shared_array; + +Data::Data (int size) + : _data (new uint8_t[size]) + , _size (size) +{ + +} + +Data::Data (uint8_t const * data, int size) + : _data (new uint8_t[size]) + , _size (size) +{ + memcpy (_data.get(), data, size); +} + +Data::Data (boost::filesystem::path file) +{ + _size = boost::filesystem::file_size (file); + _data.reset (new uint8_t[_size]); + + FILE* f = fopen_boost (file, "rb"); + if (!f) { + throw FileError (_("could not open file for reading"), file); + } + + size_t const r = fread (_data.get(), 1, _size, f); + if (r != size_t (_size)) { + fclose (f); + throw FileError (_("could not read from file"), file); + } + + fclose (f); +} + +void +Data::write (boost::filesystem::path file) const +{ + FILE* f = fopen_boost (file, "wb"); + if (!f) { + throw WriteFileError (file, errno); + } + size_t const r = fwrite (_data.get(), 1, _size, f); + if (r != size_t (_size)) { + fclose (f); + throw FileError ("could not write to file", file); + } + fclose (f); +} + +void +Data::write_via_temp (boost::filesystem::path temp, boost::filesystem::path final) const +{ + write (temp); + boost::filesystem::rename (temp, final); +} diff --git a/src/lib/data.h b/src/lib/data.h new file mode 100644 index 000000000..84ff6671a --- /dev/null +++ b/src/lib/data.h @@ -0,0 +1,47 @@ +/* + Copyright (C) 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 + 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, + 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. + +*/ + +#include <boost/shared_array.hpp> +#include <boost/filesystem.hpp> +#include <stdint.h> + +class Data +{ +public: + Data (int size); + Data (uint8_t const * data, int size); + Data (boost::filesystem::path file); + + virtual ~Data () {} + + void write (boost::filesystem::path file) const; + void write_via_temp (boost::filesystem::path temp, boost::filesystem::path final) const; + + boost::shared_array<uint8_t> data () const { + return _data; + } + + int size () const { + return _size; + } + +private: + boost::shared_array<uint8_t> _data; + int _size; +}; diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc index f2d765f7d..af614a10f 100644 --- a/src/lib/dcp_video.cc +++ b/src/lib/dcp_video.cc @@ -38,7 +38,7 @@ #include "cross.h" #include "player_video.h" #include "raw_convert.h" -#include "encoded_data.h" +#include "data.h" #include <libcxml/cxml.h> #include <dcp/xyz_image.h> #include <dcp/rgb_xyz.h> @@ -104,7 +104,7 @@ DCPVideo::DCPVideo (shared_ptr<const PlayerVideo> frame, shared_ptr<const cxml:: /** J2K-encode this frame on the local host. * @return Encoded data. */ -shared_ptr<EncodedData> +shared_ptr<Data> DCPVideo::encode_locally (dcp::NoteHandler note) { shared_ptr<dcp::XYZImage> xyz; @@ -236,7 +236,7 @@ DCPVideo::encode_locally (dcp::NoteHandler note) break; } - shared_ptr<EncodedData> enc (new LocallyEncodedData (cio->buffer, cio_tell (cio))); + shared_ptr<Data> enc (new Data (cio->buffer, cio_tell (cio))); opj_cio_close (cio); free (parameters.cp_comment); @@ -249,7 +249,7 @@ DCPVideo::encode_locally (dcp::NoteHandler note) * @param serv Server to send to. * @return Encoded data. */ -shared_ptr<EncodedData> +shared_ptr<Data> DCPVideo::encode_remotely (ServerDescription serv) { boost::asio::io_service io_service; @@ -280,8 +280,8 @@ DCPVideo::encode_remotely (ServerDescription serv) /* Read the response (JPEG2000-encoded data); this blocks until the data is ready and sent back. */ - shared_ptr<EncodedData> e (new RemotelyEncodedData (socket->read_uint32 ())); - socket->read (e->data(), e->size()); + shared_ptr<Data> e (new Data (socket->read_uint32 ())); + socket->read (e->data().get(), e->size()); LOG_GENERAL (N_("Finished remotely-encoded frame %1"), _index); diff --git a/src/lib/dcp_video.h b/src/lib/dcp_video.h index 125e2c818..37d95826c 100644 --- a/src/lib/dcp_video.h +++ b/src/lib/dcp_video.h @@ -32,7 +32,7 @@ class Image; class Log; class Subtitle; class PlayerVideo; -class EncodedData; +class Data; /** @class DCPVideo * @brief A single frame of video destined for a DCP. @@ -49,8 +49,8 @@ public: DCPVideo (boost::shared_ptr<const PlayerVideo>, int, int, int, Resolution, bool b, boost::shared_ptr<Log>); DCPVideo (boost::shared_ptr<const PlayerVideo>, cxml::ConstNodePtr, boost::shared_ptr<Log>); - boost::shared_ptr<EncodedData> encode_locally (dcp::NoteHandler note); - boost::shared_ptr<EncodedData> encode_remotely (ServerDescription); + boost::shared_ptr<Data> encode_locally (dcp::NoteHandler note); + boost::shared_ptr<Data> encode_remotely (ServerDescription); int index () const { return _index; diff --git a/src/lib/encoded_data.cc b/src/lib/encoded_data.cc deleted file mode 100644 index 4f8aaab4b..000000000 --- a/src/lib/encoded_data.cc +++ /dev/null @@ -1,125 +0,0 @@ -/* - 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 - 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, - 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. - -*/ - -#include "encoded_data.h" -#include "cross.h" -#include "exceptions.h" -#include "film.h" -#include "dcpomatic_socket.h" - -#include "i18n.h" - -using boost::shared_ptr; - -EncodedData::EncodedData (int s) - : _data (new uint8_t[s]) - , _size (s) -{ - -} - -EncodedData::EncodedData (uint8_t const * d, int s) - : _data (new uint8_t[s]) - , _size (s) -{ - memcpy (_data, d, s); -} - -EncodedData::EncodedData (boost::filesystem::path file) -{ - _size = boost::filesystem::file_size (file); - _data = new uint8_t[_size]; - - FILE* f = fopen_boost (file, "rb"); - if (!f) { - throw FileError (_("could not open file for reading"), file); - } - - size_t const r = fread (_data, 1, _size, f); - if (r != size_t (_size)) { - fclose (f); - throw FileError (_("could not read encoded data"), file); - } - - fclose (f); -} - - -EncodedData::~EncodedData () -{ - delete[] _data; -} - -/** Write this data to a J2K file. - * @param Film Film. - * @param frame DCP frame index. - */ -void -EncodedData::write (shared_ptr<const Film> film, int frame, Eyes eyes) const -{ - boost::filesystem::path const tmp_j2c = film->j2c_path (frame, eyes, true); - - FILE* f = fopen_boost (tmp_j2c, "wb"); - - if (!f) { - throw WriteFileError (tmp_j2c, errno); - } - - fwrite (_data, 1, _size, f); - fclose (f); - - boost::filesystem::path const real_j2c = film->j2c_path (frame, eyes, false); - - /* Rename the file from foo.j2c.tmp to foo.j2c now that it is complete */ - boost::filesystem::rename (tmp_j2c, real_j2c); -} - -void -EncodedData::write_info (shared_ptr<const Film> film, int frame, Eyes eyes, dcp::FrameInfo info) const -{ - 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. - * @param socket Socket - */ -void -EncodedData::send (shared_ptr<Socket> socket) -{ - socket->write (_size); - socket->write (_data, _size); -} - -LocallyEncodedData::LocallyEncodedData (uint8_t* d, int s) - : EncodedData (s) -{ - memcpy (_data, d, s); -} - -/** @param s Size of data in bytes */ -RemotelyEncodedData::RemotelyEncodedData (int s) - : EncodedData (s) -{ - -} diff --git a/src/lib/encoded_data.h b/src/lib/encoded_data.h deleted file mode 100644 index 368f267f1..000000000 --- a/src/lib/encoded_data.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright (C) 2012-2014 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 - 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, - 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. - -*/ - -#include "types.h" -#include <dcp/picture_asset_writer.h> -#include <boost/noncopyable.hpp> -#include <boost/filesystem.hpp> - -class Socket; -class Film; - -/** @class EncodedData - * @brief Container for J2K-encoded data. - */ -class EncodedData : public boost::noncopyable -{ -public: - /** @param s Size of data, in bytes */ - EncodedData (int s); - EncodedData (uint8_t const * d, int s); - - EncodedData (boost::filesystem::path); - - virtual ~EncodedData (); - - void send (boost::shared_ptr<Socket> socket); - void write (boost::shared_ptr<const Film>, int, Eyes) const; - void write_info (boost::shared_ptr<const Film>, int, Eyes, dcp::FrameInfo) const; - - /** @return data */ - uint8_t* data () const { - return _data; - } - - /** @return data size, in bytes */ - int size () const { - return _size; - } - -protected: - uint8_t* _data; ///< data - int _size; ///< data size in bytes -}; - -/** @class LocallyEncodedData - * @brief EncodedData that was encoded locally; this class - * just keeps a pointer to the data, but does no memory - * management. - */ -class LocallyEncodedData : public EncodedData -{ -public: - /** @param d Data (which will be copied by this class) - * @param s Size of data, in bytes. - */ - LocallyEncodedData (uint8_t* d, int s); -}; - -/** @class RemotelyEncodedData - * @brief EncodedData that is being read from a remote server; - * this class allocates and manages memory for the data. - */ -class RemotelyEncodedData : public EncodedData -{ -public: - RemotelyEncodedData (int s); -}; diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index 7a0295e4c..c6cb8b9df 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -279,7 +279,7 @@ try */ int remote_backoff = 0; shared_ptr<DCPVideo> last_dcp_video; - shared_ptr<EncodedData> last_encoded; + shared_ptr<Data> last_encoded; while (true) { @@ -300,7 +300,7 @@ try lock.unlock (); - shared_ptr<EncodedData> encoded; + shared_ptr<Data> encoded; if (last_dcp_video && vf->same (last_dcp_video)) { /* We already have encoded data for the same input as this one, so take a short-cut */ diff --git a/src/lib/encoder.h b/src/lib/encoder.h index a4fe55874..3b8c233bb 100644 --- a/src/lib/encoder.h +++ b/src/lib/encoder.h @@ -1,5 +1,5 @@ /* - 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 @@ -45,10 +45,8 @@ class AudioBuffers; class Film; class ServerDescription; class DCPVideo; -class EncodedData; class Writer; class Job; -class ServerFinder; class PlayerVideo; /** @class Encoder diff --git a/src/lib/j2k_image_proxy.cc b/src/lib/j2k_image_proxy.cc index 59106098a..3fc6ce9b2 100644 --- a/src/lib/j2k_image_proxy.cc +++ b/src/lib/j2k_image_proxy.cc @@ -20,7 +20,7 @@ #include "j2k_image_proxy.h" #include "dcpomatic_socket.h" #include "image.h" -#include "encoded_data.h" +#include "data.h" #include "raw_convert.h" #include <dcp/mono_picture_frame.h> #include <dcp/stereo_picture_frame.h> @@ -116,16 +116,16 @@ J2KImageProxy::send_binary (shared_ptr<Socket> socket) const } } -shared_ptr<EncodedData> +shared_ptr<Data> J2KImageProxy::j2k () const { if (_mono) { - return shared_ptr<EncodedData> (new EncodedData (_mono->j2k_data(), _mono->j2k_size())); + return shared_ptr<Data> (new Data (_mono->j2k_data(), _mono->j2k_size())); } else { if (_eye.get() == dcp::EYE_LEFT) { - return shared_ptr<EncodedData> (new EncodedData (_stereo->left_j2k_data(), _stereo->left_j2k_size())); + return shared_ptr<Data> (new Data (_stereo->left_j2k_data(), _stereo->left_j2k_size())); } else { - return shared_ptr<EncodedData> (new EncodedData (_stereo->right_j2k_data(), _stereo->right_j2k_size())); + return shared_ptr<Data> (new Data (_stereo->right_j2k_data(), _stereo->right_j2k_size())); } } } diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h index 67609dfce..1392f66b9 100644 --- a/src/lib/j2k_image_proxy.h +++ b/src/lib/j2k_image_proxy.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington <cth@carlh.net> + Copyright (C) 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 @@ -20,7 +20,7 @@ #include "image_proxy.h" #include <dcp/util.h> -class EncodedData; +class Data; class J2KImageProxy : public ImageProxy { @@ -34,7 +34,7 @@ public: void add_metadata (xmlpp::Node *) const; void send_binary (boost::shared_ptr<Socket>) const; - boost::shared_ptr<EncodedData> j2k () const; + boost::shared_ptr<Data> j2k () const; dcp::Size size () const { return _size; } diff --git a/src/lib/player_video.cc b/src/lib/player_video.cc index 0375fa01b..4faed9da3 100644 --- a/src/lib/player_video.cc +++ b/src/lib/player_video.cc @@ -177,7 +177,7 @@ PlayerVideo::has_j2k () const return _crop == Crop () && _inter_size == j2k->size(); } -shared_ptr<EncodedData> +shared_ptr<Data> PlayerVideo::j2k () const { shared_ptr<const J2KImageProxy> j2k = dynamic_pointer_cast<const J2KImageProxy> (_in); diff --git a/src/lib/player_video.h b/src/lib/player_video.h index c4537f713..3abca8267 100644 --- a/src/lib/player_video.h +++ b/src/lib/player_video.h @@ -29,7 +29,7 @@ extern "C" { class Image; class ImageProxy; class Socket; -class EncodedData; +class Data; /** Everything needed to describe a video frame coming out of the player, but with the * bits still their raw form. We may want to combine the bits on a remote machine, @@ -60,7 +60,7 @@ public: void send_binary (boost::shared_ptr<Socket> socket, bool send_subtitles) const; bool has_j2k () const; - boost::shared_ptr<EncodedData> j2k () const; + boost::shared_ptr<Data> j2k () const; DCPTime time () const { return _time; diff --git a/src/lib/server.cc b/src/lib/server.cc index 50ac4e786..6dc79ec65 100644 --- a/src/lib/server.cc +++ b/src/lib/server.cc @@ -29,7 +29,7 @@ #include "config.h" #include "cross.h" #include "player_video.h" -#include "encoded_data.h" +#include "data.h" #include "safe_stringstream.h" #include "raw_convert.h" #include <libcxml/cxml.h> @@ -119,12 +119,13 @@ Server::process (shared_ptr<Socket> socket, struct timeval& after_read, struct t gettimeofday (&after_read, 0); - shared_ptr<EncodedData> encoded = dcp_video_frame.encode_locally (boost::bind (&Log::dcp_log, _log.get(), _1, _2)); + shared_ptr<Data> encoded = dcp_video_frame.encode_locally (boost::bind (&Log::dcp_log, _log.get(), _1, _2)); gettimeofday (&after_encode, 0); try { - encoded->send (socket); + socket->write (encoded->size ()); + socket->write (encoded->data ().get (), encoded->size ()); } catch (std::exception& e) { cerr << "Send failed; frame " << dcp_video_frame.index() << "\n"; LOG_ERROR ("Send failed; frame %1", dcp_video_frame.index()); diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 97b8eefbe..a0a57e0bb 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -30,7 +30,7 @@ #include "cross.h" #include "audio_buffers.h" #include "md5_digester.h" -#include "encoded_data.h" +#include "data.h" #include "version.h" #include "font.h" #include "util.h" @@ -158,7 +158,7 @@ Writer::~Writer () } void -Writer::write (shared_ptr<const EncodedData> encoded, int frame, Eyes eyes) +Writer::write (shared_ptr<const Data> encoded, int frame, Eyes eyes) { boost::mutex::scoped_lock lock (_mutex); @@ -328,11 +328,16 @@ try { LOG_GENERAL (N_("Writer FULL-writes %1 (%2)"), qi.frame, qi.eyes); if (!qi.encoded) { - qi.encoded.reset (new EncodedData (_film->j2c_path (qi.frame, qi.eyes, false))); + qi.encoded.reset (new Data (_film->j2c_path (qi.frame, qi.eyes, false))); } - dcp::FrameInfo fin = _picture_asset_writer->write (qi.encoded->data(), qi.encoded->size()); - qi.encoded->write_info (_film, qi.frame, qi.eyes, fin); + dcp::FrameInfo fin = _picture_asset_writer->write (qi.encoded->data().get (), qi.encoded->size()); + FILE* file = fopen_boost (_film->info_file(), "ab"); + if (!file) { + throw OpenFileError (_film->info_file ()); + } + write_frame_info (file, qi.frame, qi.eyes, fin); + fclose (file); _last_written[qi.eyes] = qi.encoded; ++_full_written; break; @@ -390,8 +395,8 @@ try _last_written_frame + 1, _last_written_eyes, i->frame ); - - i->encoded->write (_film, i->frame, i->eyes); + + i->encoded->write_via_temp (_film->j2c_path (i->frame, i->eyes, true), _film->j2c_path (i->frame, i->eyes, false)); lock.lock (); i->encoded.reset (); @@ -596,15 +601,15 @@ Writer::check_existing_picture_asset_frame (FILE* asset, int f, Eyes eyes) /* Read the data from the asset and hash it */ dcpomatic_fseek (asset, info.offset, SEEK_SET); - EncodedData data (info.size); - size_t const read = fread (data.data(), 1, data.size(), asset); + Data data (info.size); + size_t const read = fread (data.data().get(), 1, data.size(), asset); if (read != static_cast<size_t> (data.size ())) { LOG_GENERAL ("Existing frame %1 is incomplete", f); return false; } MD5Digester digester; - digester.add (data.data(), data.size()); + digester.add (data.data().get(), data.size()); if (digester.get() != info.hash) { LOG_GENERAL ("Existing frame %1 failed hash check", f); return false; diff --git a/src/lib/writer.h b/src/lib/writer.h index a176eb191..bc274d2b8 100644 --- a/src/lib/writer.h +++ b/src/lib/writer.h @@ -31,7 +31,7 @@ #include <list> class Film; -class EncodedData; +class Data; class AudioBuffers; class Job; class Font; @@ -62,7 +62,7 @@ public: } type; /** encoded data for FULL */ - boost::shared_ptr<const EncodedData> encoded; + boost::shared_ptr<const Data> encoded; /** size of data for FAKE */ int size; /** frame index */ @@ -76,11 +76,11 @@ bool operator== (QueueItem const & a, QueueItem const & b); /** @class Writer * @brief Class to manage writing JPEG2000 and audio data to assets on disk. * - * This class creates sound and picture assets, then takes EncodedData + * This class creates sound and picture assets, then takes Data * or AudioBuffers objects (containing image or sound data respectively) * and writes them to the assets. * - * ::write() for EncodedData can be called out of order, and the Writer + * ::write() for Data can be called out of order, and the Writer * will sort it out. write() for AudioBuffers must be called in order. */ @@ -92,7 +92,7 @@ public: bool can_fake_write (int) const; - void write (boost::shared_ptr<const EncodedData>, int, Eyes); + void write (boost::shared_ptr<const Data>, int, Eyes); void fake_write (int, Eyes); void write (boost::shared_ptr<const AudioBuffers>); void write (PlayerSubtitles subs); @@ -131,7 +131,7 @@ private: /** condition to manage thread wakeups when we have too much to do */ boost::condition _full_condition; /** the data of the last written frame, or 0 if there isn't one */ - boost::shared_ptr<const EncodedData> _last_written[EYES_COUNT]; + boost::shared_ptr<const Data> _last_written[EYES_COUNT]; /** the index of the last written frame */ int _last_written_frame; Eyes _last_written_eyes; diff --git a/src/lib/wscript b/src/lib/wscript index 258ad96a0..85cbcb7b6 100644 --- a/src/lib/wscript +++ b/src/lib/wscript @@ -38,6 +38,7 @@ sources = """ content_factory.cc content_subtitle.cc cross.cc + data.cc dcp_content.cc dcp_content_type.cc dcp_decoder.cc @@ -50,7 +51,6 @@ sources = """ dcpomatic_time.cc dolby_cp750.cc encoder.cc - encoded_data.cc environment_info.cc examine_content_job.cc exceptions.cc |
