X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsndfile_content.h;h=701ff16b24bd0dbbdf2d75e5708e2be3c7ce9e45;hb=3ace8d6c8400939a6b66743fe395a0c16a90ecf2;hp=17423b8edd76acd053f34568190a2629a220218d;hpb=996b0c06e23bcb6b300d7b8799df94993692e07d;p=dcpomatic.git diff --git a/src/lib/sndfile_content.h b/src/lib/sndfile_content.h index 17423b8ed..701ff16b2 100644 --- a/src/lib/sndfile_content.h +++ b/src/lib/sndfile_content.h @@ -1,5 +1,3 @@ -/* -*- c-basic-offset: 8; default-tab-width: 8; -*- */ - /* Copyright (C) 2013 Carl Hetherington @@ -19,6 +17,9 @@ */ +#ifndef DCPOMATIC_SNDFILE_CONTENT_H +#define DCPOMATIC_SNDFILE_CONTENT_H + extern "C" { #include } @@ -32,7 +33,7 @@ class SndfileContent : public AudioContent { public: SndfileContent (boost::shared_ptr, boost::filesystem::path); - SndfileContent (boost::shared_ptr, boost::shared_ptr); + SndfileContent (boost::shared_ptr, boost::shared_ptr, int); boost::shared_ptr shared_from_this () { return boost::dynamic_pointer_cast (Content::shared_from_this ()); @@ -40,23 +41,23 @@ public: void examine (boost::shared_ptr); std::string summary () const; + std::string technical_summary () const; std::string information () const; void as_xml (xmlpp::Node *) const; - boost::shared_ptr clone () const; - Time length () const; + Time full_length () const; - /* AudioContent */ - int audio_channels () const { + /* AudioContent */ + int audio_channels () const { boost::mutex::scoped_lock lm (_mutex); return _audio_channels; } - ContentAudioFrame audio_length () const { + AudioContent::Frame audio_length () const { boost::mutex::scoped_lock lm (_mutex); return _audio_length; } - int content_audio_frame_rate () const { + int content_audio_frame_rate () const { boost::mutex::scoped_lock lm (_mutex); return _audio_frame_rate; } @@ -67,12 +68,16 @@ public: boost::mutex::scoped_lock lm (_mutex); return _audio_mapping; } + + void set_audio_mapping (AudioMapping); static bool valid_file (boost::filesystem::path); private: int _audio_channels; - ContentAudioFrame _audio_length; + AudioContent::Frame _audio_length; int _audio_frame_rate; AudioMapping _audio_mapping; }; + +#endif