summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-05-22 17:36:29 +0100
committerCarl Hetherington <cth@carlh.net>2013-05-22 17:36:29 +0100
commit929b4c37eaf9593892f61df80309a8c8ad6c05a0 (patch)
treedacbe167d7dd165f2d55ae849123a6f6b409b346 /src
parent596441a4e8cf03a88113646ca6da2f90e721a38b (diff)
Missing files.
Diffstat (limited to 'src')
-rw-r--r--src/lib/black_decoder.cc13
-rw-r--r--src/lib/black_decoder.h44
-rw-r--r--src/lib/null_content.h53
3 files changed, 110 insertions, 0 deletions
diff --git a/src/lib/black_decoder.cc b/src/lib/black_decoder.cc
new file mode 100644
index 000000000..ef7458711
--- /dev/null
+++ b/src/lib/black_decoder.cc
@@ -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
index 000000000..a585af7e2
--- /dev/null
+++ b/src/lib/black_decoder.h
@@ -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
index 000000000..4f19c3b0a
--- /dev/null
+++ b/src/lib/null_content.h
@@ -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;
+};