X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsndfile_content.h;h=75c723518ea61ebf48ed6e06163b2894e71fe53b;hb=d2137ac5db409e686b4d9b3fa567935a5e416d41;hp=1ef4b3f026514526bbb26e0157d218581ab4fcc8;hpb=237a0052c60af768f4d62b00321932918b7ba4d9;p=dcpomatic.git diff --git a/src/lib/sndfile_content.h b/src/lib/sndfile_content.h index 1ef4b3f02..75c723518 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,60 +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::filesystem::path); - SndfileContent (boost::shared_ptr); + SndfileContent (boost::shared_ptr, boost::filesystem::path); + 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, boost::shared_ptr, bool); + 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; - boost::shared_ptr clone () const; - Time length (boost::shared_ptr) const; - - /* AudioContent */ - int audio_channels () const { - boost::mutex::scoped_lock lm (_mutex); - return _audio_channels; - } - - ContentAudioFrame 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 (boost::shared_ptr) const; - - AudioMapping audio_mapping () const { - boost::mutex::scoped_lock lm (_mutex); - return _audio_mapping; - } static bool valid_file (boost::filesystem::path); - -private: - int _audio_channels; - ContentAudioFrame _audio_length; - int _audio_frame_rate; - AudioMapping _audio_mapping; }; + +#endif