projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e46ae44
)
Optionally write the KDMs to the stdout.
author
Mart Jansink
<mart@gofilex.nl>
Mon, 12 Feb 2018 17:16:18 +0000
(18:16 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 14 Feb 2018 23:28:26 +0000
(23:28 +0000)
src/lib/screen_kdm.cc
patch
|
blob
|
history
diff --git
a/src/lib/screen_kdm.cc
b/src/lib/screen_kdm.cc
index 7e934b4557b341011bb154494efd564fa2307660..3515af8a6644f1b6ed70377e1474652577b0fc88 100644
(file)
--- a/
src/lib/screen_kdm.cc
+++ b/
src/lib/screen_kdm.cc
@@
-25,6
+25,7
@@
#include <boost/foreach.hpp>
using std::string;
+using std::cout;
using std::list;
using boost::shared_ptr;
@@
-45,6
+46,16
@@
ScreenKDM::write_files (
{
int written = 0;
+ if (directory == "-") {
+ /* Write KDMs to the stdout */
+ BOOST_FOREACH (ScreenKDM const & i, screen_kdms) {
+ cout << i.kdm.as_xml ();
+ ++written;
+ }
+
+ return written;
+ }
+
if (!boost::filesystem::exists (directory)) {
boost::filesystem::create_directories (directory);
}