Missing files.
authorCarl Hetherington <cth@carlh.net>
Wed, 22 May 2013 16:36:29 +0000 (17:36 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 22 May 2013 16:36:29 +0000 (17:36 +0100)
src/lib/black_decoder.cc [new file with mode: 0644]
src/lib/black_decoder.h [new file with mode: 0644]
src/lib/null_content.h [new file with mode: 0644]

diff --git a/src/lib/black_decoder.cc b/src/lib/black_decoder.cc
new file mode 100644 (file)
index 0000000..ef74587
--- /dev/null
@@ -0,0 +1,13 @@
+#include "black_decoder.h"
+
+BlackDecoder::BlackDecoder (shared_ptr<NullContent> c)
+       : Decoder (c)
+{
+
+}
+
+void
+BlackDecoder::pass ()
+{
+       
+}
diff --git a/src/lib/black_decoder.h b/src/lib/black_decoder.h
new file mode 100644 (file)
index 0000000..a585af7
--- /dev/null
@@ -0,0 +1,44 @@
+#include "video_decoder.h"
+
+class BlackDecoder : public VideoDecoder
+{
+public:
+       BlackDecoder (boost::shared_ptr<NullContent>);
+
+       bool pass ();
+       bool seek (double);
+       Time next () const;
+
+       /** @return video frame rate second, or 0 if unknown */
+       float video_frame_rate () const {
+               return 24;
+       }
+       
+       /** @return native size in pixels */
+       libdcp::Size native_size () const {
+               return libdcp::Size (256, 256);
+       }
+       
+       /** @return length according to our content's header */
+       ContentVideoFrame video_length () const {
+               return _content_length;
+       }
+
+protected:     
+
+       int time_base_numerator () const {
+               return 0;
+       }
+       
+       int time_base_denominator () const {
+               return 1;
+       }
+       
+       int sample_aspect_ratio_numerator () const {
+               return 0;
+       }
+               
+       int sample_aspect_ratio_denominator () const {
+               return 1;
+       }
+};
diff --git a/src/lib/null_content.h b/src/lib/null_content.h
new file mode 100644 (file)
index 0000000..4f19c3b
--- /dev/null
@@ -0,0 +1,53 @@
+#include <string>
+#include <boost/shared_ptr.hpp>
+#include "content.h"
+
+class NullContent : public VideoContent, public AudioContent
+{
+public:
+       NullContent (Time s, Time len)
+               : Content (s)
+               , VideoContent (s)
+               , AudioContent (s)
+               , _length (len)
+       {}
+
+       std::string summary () const {
+               return "";
+       }
+       
+       std::string information () const {
+               return "";
+       }
+       
+       boost::shared_ptr<Content> clone () const {
+               return shared_ptr<Content> ();
+       }
+
+        int audio_channels () const {
+               return MAX_AUDIO_CHANNELS;
+       }
+       
+        ContentAudioFrame audio_length () const {
+               return _length * content_audio_frame_rate() / TIME_HZ;
+       }
+       
+        int content_audio_frame_rate () const {
+               return 48000;
+       }
+       
+       int output_audio_frame_rate (boost::shared_ptr<const Film>) const {
+               return _film->dcp_audio_frame_rate (content_audio_frame_rate ());
+       }
+       
+       AudioMapping audio_mapping () const {
+               return AudioMapping ();
+       }
+       
+       Time length (boost::shared_ptr<const Film>) const {
+               return _length;
+       }
+
+private:
+       Time _length;
+};