Runs.
[dcpomatic.git] / src / lib / video_content.cc
1 #include "video_content.h"
2 #include "video_decoder.h"
3
4 int const VideoContentProperty::VIDEO_LENGTH = 0;
5 int const VideoContentProperty::VIDEO_SIZE = 1;
6 int const VideoContentProperty::VIDEO_FRAME_RATE = 2;
7
8 using boost::shared_ptr;
9
10 VideoContent::VideoContent (boost::filesystem::path f)
11         : Content (f)
12         , _video_length (0)
13 {
14
15 }
16
17 void
18 VideoContent::take_from_video_decoder (shared_ptr<VideoDecoder> d)
19 {
20         {
21                 boost::mutex::scoped_lock lm (_mutex);
22                 _video_size = d->native_size ();
23                 _video_frame_rate = d->frames_per_second ();
24         }
25         
26         Changed (VideoContentProperty::VIDEO_SIZE);
27         Changed (VideoContentProperty::VIDEO_FRAME_RATE);
28 }