summaryrefslogtreecommitdiff
path: root/src/lib/writer.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-20 09:55:24 +0100
committerCarl Hetherington <cth@carlh.net>2015-10-22 10:30:45 +0100
commit2c5398adaea8bc56fe196144a9a233981657fba0 (patch)
treef243d30eaef1f30045f0974b0f99fce3ed1d483b /src/lib/writer.h
parent3a626081718fe09edafb951ac9a69e44145bf551 (diff)
Various multi-reel fixes.
* _video_frames_enqueued -> _position * some int -> Frame replacements * Call Writer::ref_write when there is nothing to encode / write for one frame. * Assume Encoder::encode is called once per output video frame. * Possibly correct some off-by-1 overlap bugs. * Don't reset _last_written on FAKE write as I believe there is no need.
Diffstat (limited to 'src/lib/writer.h')
-rw-r--r--src/lib/writer.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/writer.h b/src/lib/writer.h
index 8f1e71278..95530a9d9 100644
--- a/src/lib/writer.h
+++ b/src/lib/writer.h
@@ -68,6 +68,7 @@ public:
*/
FAKE,
REPEAT,
+ REF,
} type;
/** encoded data for FULL */
@@ -76,6 +77,7 @@ public:
int size;
/** frame index */
int frame;
+ /** eyes for FULL, FAKE and REPEAT */
Eyes eyes;
};
@@ -101,11 +103,12 @@ public:
void start ();
- bool can_fake_write (int) const;
+ bool can_fake_write (Frame) const;
- void write (Data, int, Eyes);
- void fake_write (int, Eyes);
- void repeat (int, Eyes);
+ void write (Data, Frame, Eyes);
+ void fake_write (Frame, Eyes);
+ void ref_write (Frame);
+ void repeat (Frame, Eyes);
void write (boost::shared_ptr<const AudioBuffers>);
void write (PlayerSubtitles subs);
void write (std::list<boost::shared_ptr<Font> > fonts);
@@ -120,11 +123,13 @@ private:
public:
Reel ()
: first_nonexistant_frame (0)
+ , written (0)
{}
DCPTimePeriod period;
/** the first frame index that does not already exist in our MXF */
int first_nonexistant_frame;
+ Frame written;
boost::shared_ptr<dcp::PictureAsset> picture_asset;
boost::shared_ptr<dcp::PictureAssetWriter> picture_asset_writer;
@@ -178,6 +183,7 @@ private:
/** number of FAKE written frames */
int _fake_written;
int _repeat_written;
+ int _ref_written;
/** number of frames pushed to disk and then recovered
due to the limit of frames to be held in memory.
*/