/*
- Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
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
*/
#include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
#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<const Film> f, boost::filesystem::path p)
: Content (f, p)
+ " - 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)
{
SndfileContent::full_length () const
{
shared_ptr<const Film> film = _film.lock ();
- assert (film);
+ DCPOMATIC_ASSERT (film);
return DCPTime (audio_length(), film->active_frame_rate_change (position ()));
}