X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsndfile_content.cc;h=9f9ea351e2a94e0f93a35d99c5075bf22c171b01;hb=6bf1fecd1064978bcadd11b8cd56a5b8d9a132a3;hp=a573d43c407f8ac8a825190a1784600ba37ac873;hpb=94201bd2a5a4cb391b7f2bdeba56b928fed7cfe1;p=dcpomatic.git diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc index a573d43c4..9f9ea351e 100644 --- a/src/lib/sndfile_content.cc +++ b/src/lib/sndfile_content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2014 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 @@ -18,21 +18,19 @@ */ #include -#include #include "sndfile_content.h" #include "sndfile_decoder.h" #include "film.h" #include "compose.hpp" #include "job.h" #include "util.h" +#include "safe_stringstream.h" #include "i18n.h" using std::string; -using std::stringstream; using std::cout; using boost::shared_ptr; -using dcp::raw_convert; SndfileContent::SndfileContent (shared_ptr f, boost::filesystem::path p) : Content (f, p) @@ -72,25 +70,6 @@ SndfileContent::technical_summary () const + " - sndfile"; } -string -SndfileContent::information () const -{ - if (_audio_frame_rate == 0) { - return ""; - } - - stringstream s; - - s << String::compose ( - _("%1 channels, %2kHz, %3 samples"), - audio_channels(), - audio_frame_rate() / 1000.0, - audio_length().frames (audio_frame_rate ()) - ); - - return s.str (); -} - bool SndfileContent::valid_file (boost::filesystem::path f) { @@ -113,7 +92,7 @@ DCPTime SndfileContent::full_length () const { shared_ptr film = _film.lock (); - assert (film); + DCPOMATIC_ASSERT (film); return DCPTime (audio_length(), film->active_frame_rate_change (position ())); }