diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-08-08 10:24:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-08-14 11:18:18 +0100 |
| commit | 63b0d6b180a41547aee9028d200992f53c5a043f (patch) | |
| tree | f7f7d4458db79e2f916548c37d6424e395ef481f /src/lib/transcode_job.cc | |
| parent | e65d31fbccad80c80f743516ecdd8269826d2114 (diff) | |
Basic stuff to count successful DCP encodes.
Diffstat (limited to 'src/lib/transcode_job.cc')
| -rw-r--r-- | src/lib/transcode_job.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc index 420f5a8d2..23f30991e 100644 --- a/src/lib/transcode_job.cc +++ b/src/lib/transcode_job.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -23,6 +23,7 @@ */ #include "transcode_job.h" +#include "analytics.h" #include "dcp_encoder.h" #include "upload_job.h" #include "job_manager.h" @@ -44,6 +45,7 @@ using std::fixed; using std::setprecision; using std::cout; using boost::shared_ptr; +using boost::dynamic_pointer_cast; /** @param film Film to use */ TranscodeJob::TranscodeJob (shared_ptr<const Film> film) @@ -92,6 +94,11 @@ TranscodeJob::run () } LOG_GENERAL (N_("Transcode job completed successfully: %1 fps"), fps); + + if (dynamic_pointer_cast<DCPEncoder>(_encoder)) { + Analytics::instance()->successful_dcp_encode(); + } + _encoder.reset (); /* XXX: this shouldn't be here */ |
