X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsndfile_content.h;h=9dcf954b5e55b09b9c6e1a088dd78a80f0d370f2;hb=1c45aa5806a0891025eb4729b9e0c8cfb9c68e44;hp=75c723518ea61ebf48ed6e06163b2894e71fe53b;hpb=e491397c0028a80ac4a48a92007f783746553c1a;p=dcpomatic.git diff --git a/src/lib/sndfile_content.h b/src/lib/sndfile_content.h index 75c723518..9dcf954b5 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,15 +20,8 @@ #ifndef DCPOMATIC_SNDFILE_CONTENT_H #define DCPOMATIC_SNDFILE_CONTENT_H -extern "C" { -#include -} #include "single_stream_audio_content.h" -namespace cxml { - class Node; -} - class SndfileContent : public SingleStreamAudioContent { public: @@ -38,16 +31,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