summaryrefslogtreecommitdiff
path: root/src/lib/video_content.h
blob: 25cb289384fad94d3ad3374ef30e50ae687f9272 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef DVDOMATIC_VIDEO_CONTENT_H
#define DVDOMATIC_VIDEO_CONTENT_H

#include "content.h"
#include "util.h"

class VideoDecoder;

class VideoContentProperty
{
public:
	static int const VIDEO_LENGTH;
	static int const VIDEO_SIZE;
	static int const VIDEO_FRAME_RATE;
};

class VideoContent : public virtual Content
{
public:
	VideoContent (boost::filesystem::path);
	VideoContent (boost::shared_ptr<const cxml::Node>);
	VideoContent (VideoContent const &);

	void as_xml (xmlpp::Node *) const;

	ContentVideoFrame video_length () const {
		boost::mutex::scoped_lock lm (_mutex);
		return _video_length;
	}

	libdcp::Size video_size () const {
		boost::mutex::scoped_lock lm (_mutex);
		return _video_size;
	}
	
	float video_frame_rate () const {
		boost::mutex::scoped_lock lm (_mutex);
		return _video_frame_rate;
	}

protected:
	void take_from_video_decoder (boost::shared_ptr<VideoDecoder>);

	ContentVideoFrame _video_length;

private:
	libdcp::Size _video_size;
	float _video_frame_rate;
};

#endif