summaryrefslogtreecommitdiff
path: root/src/lib/video_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-03-31 15:09:49 +0100
committerCarl Hetherington <cth@carlh.net>2013-03-31 15:09:49 +0100
commit127672223cca569986e35c91265e269ed5a6561c (patch)
tree853793c1b929d4c38ebdf5456808e466083989b7 /src/lib/video_content.cc
parented78fd3d138114185e43edf81ffe91db17377da0 (diff)
Runs.
Diffstat (limited to 'src/lib/video_content.cc')
-rw-r--r--src/lib/video_content.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc
new file mode 100644
index 000000000..9fc5cf1a2
--- /dev/null
+++ b/src/lib/video_content.cc
@@ -0,0 +1,28 @@
+#include "video_content.h"
+#include "video_decoder.h"
+
+int const VideoContentProperty::VIDEO_LENGTH = 0;
+int const VideoContentProperty::VIDEO_SIZE = 1;
+int const VideoContentProperty::VIDEO_FRAME_RATE = 2;
+
+using boost::shared_ptr;
+
+VideoContent::VideoContent (boost::filesystem::path f)
+ : Content (f)
+ , _video_length (0)
+{
+
+}
+
+void
+VideoContent::take_from_video_decoder (shared_ptr<VideoDecoder> d)
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _video_size = d->native_size ();
+ _video_frame_rate = d->frames_per_second ();
+ }
+
+ Changed (VideoContentProperty::VIDEO_SIZE);
+ Changed (VideoContentProperty::VIDEO_FRAME_RATE);
+}