Missing files.
[dcpomatic.git] / src / lib / null_content.h
1 #include <string>
2 #include <boost/shared_ptr.hpp>
3 #include "content.h"
4
5 class NullContent : public VideoContent, public AudioContent
6 {
7 public:
8         NullContent (Time s, Time len)
9                 : Content (s)
10                 , VideoContent (s)
11                 , AudioContent (s)
12                 , _length (len)
13         {}
14
15         std::string summary () const {
16                 return "";
17         }
18         
19         std::string information () const {
20                 return "";
21         }
22         
23         boost::shared_ptr<Content> clone () const {
24                 return shared_ptr<Content> ();
25         }
26
27         int audio_channels () const {
28                 return MAX_AUDIO_CHANNELS;
29         }
30         
31         ContentAudioFrame audio_length () const {
32                 return _length * content_audio_frame_rate() / TIME_HZ;
33         }
34         
35         int content_audio_frame_rate () const {
36                 return 48000;
37         }
38         
39         int output_audio_frame_rate (boost::shared_ptr<const Film>) const {
40                 return _film->dcp_audio_frame_rate (content_audio_frame_rate ());
41         }
42         
43         AudioMapping audio_mapping () const {
44                 return AudioMapping ();
45         }
46         
47         Time length (boost::shared_ptr<const Film>) const {
48                 return _length;
49         }
50
51 private:
52         Time _length;
53 };