summaryrefslogtreecommitdiff
path: root/src/lib/matcher.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-03-06 00:46:10 +0000
committerCarl Hetherington <cth@carlh.net>2013-03-06 00:46:10 +0000
commit59de84a29b81ac32477a4b804ca8bb9ec2760e67 (patch)
treeec0f37c766f2c65318c5b020818944614b101016 /src/lib/matcher.h
parent18614dda0d53b713ace5ad1df57298d049dba87f (diff)
First cut.
Diffstat (limited to 'src/lib/matcher.h')
-rw-r--r--src/lib/matcher.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/lib/matcher.h b/src/lib/matcher.h
index 4a66f4e70..2f580b589 100644
--- a/src/lib/matcher.h
+++ b/src/lib/matcher.h
@@ -30,6 +30,10 @@ public:
void process_end ();
private:
+ void fix_start ();
+ void match (double);
+ void repeat_last_video ();
+
int _sample_rate;
float _frames_per_second;
int _video_frames;
@@ -37,4 +41,36 @@ private:
boost::optional<AVPixelFormat> _pixel_format;
boost::optional<libdcp::Size> _size;
boost::optional<int> _channels;
+
+ struct VideoRecord {
+ VideoRecord (boost::shared_ptr<Image> i, bool s, boost::shared_ptr<Subtitle> sub, double t)
+ : image (i)
+ , same (s)
+ , subtitle (sub)
+ , time (t)
+ {}
+
+ boost::shared_ptr<Image> image;
+ bool same;
+ boost::shared_ptr<Subtitle> subtitle;
+ double time;
+ };
+
+ std::list<VideoRecord> _pending_video;
+
+ struct AudioRecord {
+ AudioRecord (boost::shared_ptr<AudioBuffers> a, double t)
+ : audio (a)
+ , time (t)
+ {}
+
+ boost::shared_ptr<AudioBuffers> audio;
+ double time;
+ };
+
+ std::list<AudioRecord> _pending_audio;
+
+ boost::optional<double> _first_input;
+ boost::shared_ptr<Image> _last_image;
+ boost::shared_ptr<Subtitle> _last_subtitle;
};