X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fsndfile_content.h;h=701ff16b24bd0dbbdf2d75e5708e2be3c7ce9e45;hb=c008066160d85b9ec9e5485375d7baaa5d27bda2;hp=876d66088c6f7a5a84f4b289de622d43256d1d97;hpb=09a9ac376db005a40a351736bcff4077f098825d;p=dcpomatic.git diff --git a/src/lib/sndfile_content.h b/src/lib/sndfile_content.h index 876d66088..cb255fd74 100644 --- a/src/lib/sndfile_content.h +++ b/src/lib/sndfile_content.h @@ -17,62 +17,37 @@ */ +#ifndef DCPOMATIC_SNDFILE_CONTENT_H +#define DCPOMATIC_SNDFILE_CONTENT_H + extern "C" { #include } -#include "audio_content.h" +#include "single_stream_audio_content.h" namespace cxml { class Node; } -class SndfileContent : public AudioContent +class SndfileContent : public SingleStreamAudioContent { public: SndfileContent (boost::shared_ptr, boost::filesystem::path); - SndfileContent (boost::shared_ptr, boost::shared_ptr); + SndfileContent (boost::shared_ptr, cxml::ConstNodePtr, int); boost::shared_ptr shared_from_this () { return boost::dynamic_pointer_cast (Content::shared_from_this ()); } - void examine (boost::shared_ptr); + DCPTime full_length () const; + + void examine (boost::shared_ptr, bool calculate_digest); 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; - - /* AudioContent */ - int audio_channels () const { - boost::mutex::scoped_lock lm (_mutex); - return _audio_channels; - } - - AudioContent::Frame audio_length () const { - boost::mutex::scoped_lock lm (_mutex); - return _audio_length; - } - - int content_audio_frame_rate () const { - boost::mutex::scoped_lock lm (_mutex); - return _audio_frame_rate; - } - - int output_audio_frame_rate () const; - - AudioMapping audio_mapping () const { - 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; - AudioContent::Frame _audio_length; - int _audio_frame_rate; - AudioMapping _audio_mapping; }; + +#endif