#include "exceptions.h"
#include "types.h"
#include "player_subtitles.h"
+#include "data.h"
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <boost/thread.hpp>
#include <list>
class Film;
-class EncodedData;
+class Data;
class AudioBuffers;
class Job;
class Font;
class PictureAssetWriter;
class SoundAsset;
class SoundAssetWriter;
- class InteropSubtitleAsset;
+ class SubtitleAsset;
}
struct QueueItem
} type;
/** encoded data for FULL */
- boost::shared_ptr<const EncodedData> encoded;
+ boost::optional<Data> encoded;
/** size of data for FAKE */
int size;
/** frame index */
/** @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.
*/
bool can_fake_write (int) const;
- void write (boost::shared_ptr<const EncodedData>, int, Eyes);
+ void write (Data, int, Eyes);
void fake_write (int, Eyes);
void write (boost::shared_ptr<const AudioBuffers>);
void write (PlayerSubtitles subs);
boost::condition _empty_condition;
/** 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];
+ /** the data of the last written frame, if there is one */
+ boost::optional<Data> _last_written[EYES_COUNT];
/** the index of the last written frame */
int _last_written_frame;
Eyes _last_written_eyes;
boost::shared_ptr<dcp::PictureAssetWriter> _picture_asset_writer;
boost::shared_ptr<dcp::SoundAsset> _sound_asset;
boost::shared_ptr<dcp::SoundAssetWriter> _sound_asset_writer;
- boost::shared_ptr<dcp::InteropSubtitleAsset> _subtitle_asset;
+ boost::shared_ptr<dcp::SubtitleAsset> _subtitle_asset;
std::list<boost::shared_ptr<Font> > _fonts;
};