X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsndfile_content.h;h=c07b823d4bcd52e7a82c971cf7df7c7a02e11a1f;hb=e60bb3e51bd1508b149e6b8f6608f09b5196ae26;hp=75c723518ea61ebf48ed6e06163b2894e71fe53b;hpb=94201bd2a5a4cb391b7f2bdeba56b928fed7cfe1;p=dcpomatic.git diff --git a/src/lib/sndfile_content.h b/src/lib/sndfile_content.h index 75c723518..c07b823d4 100644 --- a/src/lib/sndfile_content.h +++ b/src/lib/sndfile_content.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,10 +20,10 @@ #ifndef DCPOMATIC_SNDFILE_CONTENT_H #define DCPOMATIC_SNDFILE_CONTENT_H +#include "single_stream_audio_content.h" extern "C" { #include } -#include "single_stream_audio_content.h" namespace cxml { class Node; @@ -38,16 +38,26 @@ public: boost::shared_ptr shared_from_this () { return boost::dynamic_pointer_cast (Content::shared_from_this ()); } - + DCPTime full_length () const; - + void examine (boost::shared_ptr); std::string summary () const; std::string technical_summary () const; std::string information () const; void as_xml (xmlpp::Node *) const; - + + void take_from_audio_examiner (boost::shared_ptr); + static bool valid_file (boost::filesystem::path); + +private: + Frame audio_length () const { + boost::mutex::scoped_lock lm (_mutex); + return _audio_length; + } + + Frame _audio_length; }; #endif