summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--cscript2
-rw-r--r--src/lib/cross.cc8
-rw-r--r--src/lib/cross.h1
-rw-r--r--src/lib/encoder.cc2
5 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e23e96c21..fea0ebc78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2014-01-28 Carl Hetherington <cth@carlh.net>
+ * Try to prevent Windows machines going to sleep during encodes.
+
* Add option to not install main program / server on Windows.
2014-01-26 Carl Hetherington <cth@carlh.net>
diff --git a/cscript b/cscript
index 05e8da288..4103f9366 100644
--- a/cscript
+++ b/cscript
@@ -123,7 +123,7 @@ def make_control(version, bits, filename, debug):
print >>f,'Architecture: amd64'
print >>f,'Section: debug'
print >>f,'Priority: extra'
- print >>f,'Depends: ${dcpomatic:Depends}, ${misc:Depends}'
+ packages('Depends', depends[version], f)
print >>f,'Description: debugging symbols for dcpomatic'
print >>f,' This package contains the debugging symbols for dcpomatic.'
print >>f,''
diff --git a/src/lib/cross.cc b/src/lib/cross.cc
index 57b3f93b2..9f7a76124 100644
--- a/src/lib/cross.cc
+++ b/src/lib/cross.cc
@@ -298,3 +298,11 @@ dcpomatic_fseek (FILE* stream, int64_t offset, int whence)
return fseek (stream, offset, whence);
#endif
}
+
+void
+kick ()
+{
+#ifdef DCPOMATIC_WINDOWS
+ SetThreadExecutionState (ES_CONTINUOUS);
+#endif
+}
diff --git a/src/lib/cross.h b/src/lib/cross.h
index 7e032e5a1..822b36631 100644
--- a/src/lib/cross.h
+++ b/src/lib/cross.h
@@ -35,3 +35,4 @@ extern boost::filesystem::path app_contents ();
#endif
extern FILE * fopen_boost (boost::filesystem::path, std::string);
extern int dcpomatic_fseek (FILE *, int64_t, int);
+void kick ();
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc
index fbec3e4d0..92b4763be 100644
--- a/src/lib/encoder.cc
+++ b/src/lib/encoder.cc
@@ -180,6 +180,8 @@ Encoder::frame_done ()
void
Encoder::process_video (shared_ptr<PlayerImage> image, Eyes eyes, ColourConversion conversion, bool same)
{
+ kick ();
+
boost::mutex::scoped_lock lock (_mutex);
/* XXX: discard 3D here if required */