X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsndfile_content.cc;h=e757c77c5469704e48c386b81199b5532bfc91b2;hb=59e769023c392c332331567a1aea94660002c463;hp=a573d43c407f8ac8a825190a1784600ba37ac873;hpb=04eebe07e2f64bd15f6887a10ab51fb92c52901a;p=dcpomatic.git diff --git a/src/lib/sndfile_content.cc b/src/lib/sndfile_content.cc index a573d43c4..e757c77c5 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 @@ -25,11 +25,11 @@ #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; @@ -72,25 +72,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 +94,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 ())); }