}
-AudioContent::AudioContent (Content* parent, vector<shared_ptr<Content> > c)
+AudioContent::AudioContent (Content* parent, vector<shared_ptr<Content>> c)
: ContentPart (parent)
{
auto ref = c[0]->audio;
private:
mutable boost::mutex _mutex;
- std::list<std::pair<std::shared_ptr<const AudioBuffers>, dcpomatic::DCPTime> > _buffers;
+ std::list<std::pair<std::shared_ptr<const AudioBuffers>, dcpomatic::DCPTime>> _buffers;
int _used_in_head = 0;
};
*/
+
#include "check_content_change_job.h"
-#include "job_manager.h"
-#include "examine_content_job.h"
#include "content.h"
+#include "examine_content_job.h"
#include "film.h"
+#include "job_manager.h"
#include <iostream>
#include "i18n.h"
-using std::string;
-using std::list;
+
using std::cout;
+using std::list;
+using std::make_shared;
using std::shared_ptr;
+using std::string;
+
/** @param gui true if we are running this job from the GUI, false if it's the CLI */
CheckContentChangeJob::CheckContentChangeJob (shared_ptr<const Film> film, shared_ptr<Job> following, bool gui)
{
set_progress_unknown ();
- list<shared_ptr<Content> > changed;
+ list<shared_ptr<Content>> changed;
for (auto i: _film->content()) {
bool ic = false;
if (!changed.empty()) {
if (_gui) {
for (auto i: changed) {
- JobManager::instance()->add(shared_ptr<Job>(new ExamineContentJob(_film, i)));
+ JobManager::instance()->add(make_shared<ExamineContentJob>(_film, i));
}
string m = _("Some files have been changed since they were added to the project.\n\nThese files will now be re-examined, so you may need to check their settings.");
if (_following) {
return _utc_offset_minute;
}
- std::list<std::shared_ptr<dcpomatic::Screen> > screens () const {
+ std::list<std::shared_ptr<dcpomatic::Screen>> screens () const {
return _screens;
}
return _tms_password;
}
- std::list<std::shared_ptr<Cinema> > cinemas () const {
+ std::list<std::shared_ptr<Cinema>> cinemas () const {
return _cinemas;
}
- std::list<std::shared_ptr<DKDMRecipient> > dkdm_recipients () const {
+ std::list<std::shared_ptr<DKDMRecipient>> dkdm_recipients () const {
return _dkdm_recipients;
}
*/
boost::optional<boost::filesystem::path> _default_kdm_directory;
bool _upload_after_make_dcp;
- std::list<std::shared_ptr<Cinema> > _cinemas;
- std::list<std::shared_ptr<DKDMRecipient> > _dkdm_recipients;
+ std::list<std::shared_ptr<Cinema>> _cinemas;
+ std::list<std::shared_ptr<DKDMRecipient>> _dkdm_recipients;
std::string _mail_server;
int _mail_port;
EmailProtocol _mail_protocol;
extern void dcpomatic_sleep_milliseconds (int);
extern std::string cpu_info ();
extern void run_ffprobe (boost::filesystem::path, boost::filesystem::path);
-extern std::list<std::pair<std::string, std::string> > mount_info ();
+extern std::list<std::pair<std::string, std::string>> mount_info ();
extern boost::filesystem::path openssl_path ();
extern void make_foreground_application ();
#ifdef DCPOMATIC_DISK
void maybe_add_subtitle ();
- std::list<std::shared_ptr<VideoFilterGraph> > _filter_graphs;
+ std::list<std::shared_ptr<VideoFilterGraph>> _filter_graphs;
boost::mutex _filter_graphs_mutex;
dcpomatic::ContentTime _pts_offset;
void audio (std::shared_ptr<AudioBuffers>);
private:
- std::map<Eyes, std::shared_ptr<FFmpegFileEncoder> > _encoders;
+ std::map<Eyes, std::shared_ptr<FFmpegFileEncoder>> _encoders;
};
int _output_audio_channels;
/** > 0 if we are suspended (i.e. pass() and seek() do nothing) */
boost::atomic<int> _suspended;
- std::list<std::shared_ptr<Piece> > _pieces;
+ std::list<std::shared_ptr<Piece>> _pieces;
/** Size of the image we are rendering to; this may be the DCP frame size, or
* the size of preview in a window.
AudioMerger _audio_merger;
std::unique_ptr<Shuffler> _shuffler;
- std::list<std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> > _delay;
+ std::list<std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime>> _delay;
class StreamState
{
std::string marked_up (std::list<StringText> subtitles, int target_height, float fade_factor, std::string font_name);
std::list<PositionImage> render_text (
- std::list<StringText>, std::list<std::shared_ptr<dcpomatic::Font> > fonts, dcp::Size, dcpomatic::DCPTime, int
+ std::list<StringText>, std::list<std::shared_ptr<dcpomatic::Font>> fonts, dcp::Size, dcpomatic::DCPTime, int
);
* @param cpl_name Name of the CPL that the KDMs are for.
*/
SendKDMEmailJob::SendKDMEmailJob (
- list<list<KDMWithMetadataPtr> > kdms,
+ list<list<KDMWithMetadataPtr>> kdms,
dcp::NameFormat container_name_format,
dcp::NameFormat filename_format,
string cpl_name
private:
void text (PlayerText subs, TextType type, boost::optional<DCPTextTrack> track, dcpomatic::DCPTimePeriod period);
- std::vector<std::pair<std::shared_ptr<dcp::SubtitleAsset>, boost::filesystem::path> > _assets;
+ std::vector<std::pair<std::shared_ptr<dcp::SubtitleAsset>, boost::filesystem::path>> _assets;
std::vector<dcpomatic::DCPTimePeriod> _reels;
bool _split_reels;
bool _include_font;
return _y_scale;
}
- std::list<std::shared_ptr<dcpomatic::Font> > fonts () const {
+ std::list<std::shared_ptr<dcpomatic::Font>> fonts () const {
boost::mutex::scoped_lock lm (_mutex);
return _fonts;
}
double _x_scale;
/** y scale factor to apply to subtitles */
double _y_scale;
- std::list<std::shared_ptr<dcpomatic::Font> > _fonts;
+ std::list<std::shared_ptr<dcpomatic::Font>> _fonts;
boost::optional<dcp::Colour> _colour;
boost::optional<dcp::Effect> _effect;
boost::optional<dcp::Colour> _effect_colour;
}
-VideoContent::VideoContent (Content* parent, vector<shared_ptr<Content> > c)
+VideoContent::VideoContent (Content* parent, vector<shared_ptr<Content>> c)
: ContentPart (parent)
, _length (0)
, _yuv (false)
}
for (auto i: cc.content) {
- boost::filesystem::path const can = boost::filesystem::canonical (i.path);
- list<shared_ptr<Content> > content;
+ auto const can = boost::filesystem::canonical (i.path);
+ list<shared_ptr<Content>> content;
if (boost::filesystem::exists (can / "ASSETMAP") || (boost::filesystem::exists (can / "ASSETMAP.xml"))) {
content.push_back (shared_ptr<DCPContent>(new DCPContent(can)));
return;
}
- list<shared_ptr<Content> > content;
+ list<shared_ptr<Content>> content;
try {
content = content_factory (path);
ContentPropertiesDialog (wxWindow* parent, std::shared_ptr<const Film> film, std::shared_ptr<Content> content);
private:
- void maybe_add_group (std::map<UserProperty::Category, std::list<UserProperty> > const & groups, UserProperty::Category category);
+ void maybe_add_group (std::map<UserProperty::Category, std::list<UserProperty>> const & groups, UserProperty::Category category);
};
return _wrapped;
}
- typedef std::vector<std::shared_ptr<Content> > List;
+ typedef std::vector<std::shared_ptr<Content>> List;
/** Set the content that this control is working on (i.e. the selected content) */
void set_content (List content)
{
- for (typename std::list<boost::signals2::connection>::iterator i = _connections.begin(); i != _connections.end(); ++i) {
- i->disconnect ();
+ for (auto& i: _connections) {
+ i.disconnect ();
}
_connections.clear ();
update_from_model ();
- for (typename List::iterator i = _content.begin(); i != _content.end(); ++i) {
+ for (auto i: _content) {
#if BOOST_VERSION >= 106100
- _connections.push_back ((*i)->Change.connect (boost::bind (&ContentWidget::model_changed, this, boost::placeholders::_1, boost::placeholders::_3)));
+ _connections.push_back (i->Change.connect(boost::bind(&ContentWidget::model_changed, this, boost::placeholders::_1, boost::placeholders::_3)));
#else
- _connections.push_back ((*i)->Change.connect (boost::bind (&ContentWidget::model_changed, this, _1, _3)));
+ _connections.push_back (i->Change.connect(boost::bind(&ContentWidget::model_changed, this, _1, _3)));
#endif
}
}
return;
}
- typename List::iterator i = _content.begin ();
+ auto i = _content.begin ();
U const v = boost::bind (_model_getter, _part(_content.front().get()).get())();
while (i != _content.end() && boost::bind (_model_getter, _part(i->get()).get())() == v) {
++i;
}
fv->set_outline_subtitles (rect);
} else {
- fv->set_outline_subtitles (optional<dcpomatic::Rect<double> >());
+ fv->set_outline_subtitles ({});
}
}
_labels_canvas->GetViewStart (&vsx, &vsy);
gc->Translate (-vsx * _x_scroll_rate, -vsy * _y_scroll_rate + tracks_y_offset());
- _labels_view->paint (gc, list<dcpomatic::Rect<int> >());
+ _labels_view->paint (gc, {});
delete gc;
}
}
void
-TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> > overlaps)
+TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>> overlaps)
{
DCPOMATIC_ASSERT (_track);
return;
}
- DCPTime const position = cont->position ();
- DCPTime const len = cont->length_after_trim (film);
+ auto const position = cont->position ();
+ auto const len = cont->length_after_trim (film);
wxColour selected (background_colour().Red() / 2, background_colour().Green() / 2, background_colour().Blue() / 2);
}
void
-TimelineTimeAxisView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> >)
+TimelineTimeAxisView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>>)
{
if (!_timeline.pixels_per_second()) {
return;
void set_y (int y);
private:
- void do_paint (wxGraphicsContext* gc, std::list<dcpomatic::Rect<int> > overlaps);
+ void do_paint (wxGraphicsContext* gc, std::list<dcpomatic::Rect<int>> overlaps);
int _y; ///< y position in tracks (not pixels)
};
void
-checked_set (wxChoice* widget, vector<pair<string, string> > items)
+checked_set (wxChoice* widget, vector<pair<string, string>> items)
{
vector<pair<string, string>> current;
for (unsigned int i = 0; i < widget->GetCount(); ++i) {
extern void checked_set (wxSpinCtrlDouble* widget, double value);
extern void checked_set (wxChoice* widget, int value);
extern void checked_set (wxChoice* widget, std::string value);
-extern void checked_set (wxChoice* widget, std::vector<std::pair<std::string, std::string> > items);
+extern void checked_set (wxChoice* widget, std::vector<std::pair<std::string, std::string>> items);
extern void checked_set (wxTextCtrl* widget, std::string value);
extern void checked_set (wxTextCtrl* widget, wxString value);
extern void checked_set (PasswordEntry* widget, std::string value);
/* This approximates the logic which splits command lines up into argc/argv */
boost::escaped_list_separator<char> els ("", " ", "\"\'");
- boost::tokenizer<boost::escaped_list_separator<char> > tok (cmd, els);
+ boost::tokenizer<boost::escaped_list_separator<char>> tok (cmd, els);
std::vector<char*> argv(256);
int argc = 0;
- for (boost::tokenizer<boost::escaped_list_separator<char> >::iterator i = tok.begin(); i != tok.end(); ++i) {
- argv[argc++] = strdup (i->c_str());
+ for (auto i: tok) {
+ argv[argc++] = strdup (i.c_str());
}
CreateCLI cc (argc, argv.data());