summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-04-29 13:31:29 +0100
committerCarl Hetherington <cth@carlh.net>2015-04-29 13:31:29 +0100
commit56cdff7fbb1f9c55f9ad3076fcb885e4005189ce (patch)
tree0780f2df14a4f3644985bd00bb60a724c932af91 /src
parentaa1b59ba45b756c893d45d4c891b0c0b3aa51d7e (diff)
parent8acffb9e32b1b608c32768f5c6efafa8d250ede0 (diff)
Merge TO_PORT.
Diffstat (limited to 'src')
-rw-r--r--src/lib/writer.cc16
-rw-r--r--src/lib/writer.h8
-rw-r--r--src/wx/about_dialog.cc1
3 files changed, 15 insertions, 10 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 4270a42a7..8d73b3126 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -71,8 +71,6 @@ using boost::shared_ptr;
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
-int const Writer::_maximum_frames_in_memory = Config::instance()->num_local_encoding_threads() + 4;
-
Writer::Writer (shared_ptr<const Film> f, weak_ptr<Job> j)
: _film (f)
, _job (j)
@@ -151,7 +149,7 @@ Writer::write (shared_ptr<const EncodedData> encoded, int frame, Eyes eyes)
{
boost::mutex::scoped_lock lock (_mutex);
- while (_queued_full_in_memory > _maximum_frames_in_memory) {
+ while (_queued_full_in_memory > maximum_frames_in_memory ()) {
/* The queue is too big; wait until that is sorted out */
_full_condition.wait (lock);
}
@@ -184,7 +182,7 @@ Writer::fake_write (int frame, Eyes eyes)
{
boost::mutex::scoped_lock lock (_mutex);
- while (_queued_full_in_memory > _maximum_frames_in_memory) {
+ while (_queued_full_in_memory > maximum_frames_in_memory ()) {
/* The queue is too big; wait until that is sorted out */
_full_condition.wait (lock);
}
@@ -266,7 +264,7 @@ try
while (true) {
- if (_finish || _queued_full_in_memory > _maximum_frames_in_memory || have_sequenced_image_at_queue_head ()) {
+ if (_finish || _queued_full_in_memory > maximum_frames_in_memory () || have_sequenced_image_at_queue_head ()) {
/* We've got something to do: go and do it */
break;
}
@@ -352,7 +350,7 @@ try
}
}
- while (_queued_full_in_memory > _maximum_frames_in_memory) {
+ while (_queued_full_in_memory > maximum_frames_in_memory ()) {
done_something = true;
/* Too many frames in memory which can't yet be written to the stream.
Write some FULL frames to disk.
@@ -685,3 +683,9 @@ operator== (QueueItem const & a, QueueItem const & b)
{
return a.frame == b.frame && a.eyes == b.eyes;
}
+
+int
+Writer::maximum_frames_in_memory () const
+{
+ return Config::instance()->num_local_encoding_threads() + 4;
+}
diff --git a/src/lib/writer.h b/src/lib/writer.h
index 6aa0f4c1f..68ac972ee 100644
--- a/src/lib/writer.h
+++ b/src/lib/writer.h
@@ -107,6 +107,10 @@ private:
void check_existing_picture_mxf ();
bool check_existing_picture_mxf_frame (FILE *, int, Eyes);
bool have_sequenced_image_at_queue_head ();
+ /** maximum number of frames to hold in memory, for when we are managing
+ * ordering
+ */
+ int maximum_frames_in_memory () const;
/** our Film */
boost::shared_ptr<const Film> _film;
@@ -133,10 +137,6 @@ private:
/** the index of the last written frame */
int _last_written_frame;
Eyes _last_written_eyes;
- /** maximum number of frames to hold in memory, for when we are managing
- ordering
- */
- static const int _maximum_frames_in_memory;
/** number of FULL written frames */
int _full_written;
diff --git a/src/wx/about_dialog.cc b/src/wx/about_dialog.cc
index 54cbb090c..98dd83262 100644
--- a/src/wx/about_dialog.cc
+++ b/src/wx/about_dialog.cc
@@ -218,6 +218,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
tested_by.Add (wxT ("Gérald Maruccia"));
tested_by.Add (wxT ("Will Meadows"));
tested_by.Add (wxT ("Brad Miller"));
+ tested_by.Add (wxT ("Ash Mitchell"));
tested_by.Add (wxT ("Anders Nordentoft-Madsen"));
tested_by.Add (wxT ("Mauro Ottonello"));
tested_by.Add (wxT ("Peter Puchner"));