summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-12-29 19:30:59 +0000
committerCarl Hetherington <cth@carlh.net>2013-12-29 19:30:59 +0000
commitb8fb440b93ff5ee835249204bd5642cf95a4ac99 (patch)
tree5435fc683da85716ed4ce74b9f2f3cbce0f2753b /src/lib
parent521c09170d9e62cd72cc2da66c41816761008a4b (diff)
parentea366080377aae73e7b6720729d3fd1c523e4c48 (diff)
Merge branch '1.0' into 1.0-seek
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cross.cc2
-rw-r--r--src/lib/dcp_video_frame.cc6
-rw-r--r--src/lib/file_group.cc3
-rw-r--r--src/lib/scp_dcp_job.cc3
-rw-r--r--src/lib/writer.cc2
5 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/cross.cc b/src/lib/cross.cc
index 7436dbf26..746b4f509 100644
--- a/src/lib/cross.cc
+++ b/src/lib/cross.cc
@@ -187,7 +187,7 @@ run_ffprobe (boost::filesystem::path content, boost::filesystem::path out, share
return;
}
- FILE* o = fopen (out.string().c_str(), "w");
+ FILE* o = fopen_boost (out, "w");
if (!o) {
log->log ("ffprobe call failed (could not create output file)");
return;
diff --git a/src/lib/dcp_video_frame.cc b/src/lib/dcp_video_frame.cc
index 00dc1ac74..78d73ad00 100644
--- a/src/lib/dcp_video_frame.cc
+++ b/src/lib/dcp_video_frame.cc
@@ -111,7 +111,7 @@ DCPVideoFrame::DCPVideoFrame (shared_ptr<const Image> image, shared_ptr<const cx
_conversion = ColourConversion (node->node_child ("ColourConversion"));
_frames_per_second = node->number_child<int> ("FramesPerSecond");
_j2k_bandwidth = node->number_child<int> ("J2KBandwidth");
- _resolution = Resolution (node->optional_number_child<int>("J2KBandwidth").get_value_or (RESOLUTION_2K));
+ _resolution = Resolution (node->optional_number_child<int>("Resolution").get_value_or (RESOLUTION_2K));
}
/** J2K-encode this frame on the local host.
@@ -352,7 +352,7 @@ EncodedData::EncodedData (boost::filesystem::path file)
_size = boost::filesystem::file_size (file);
_data = new uint8_t[_size];
- FILE* f = fopen (file.string().c_str(), N_("rb"));
+ FILE* f = fopen_boost (file, "rb");
if (!f) {
throw FileError (_("could not open file for reading"), file);
}
@@ -381,7 +381,7 @@ EncodedData::write (shared_ptr<const Film> film, int frame, Eyes eyes) const
{
boost::filesystem::path const tmp_j2c = film->j2c_path (frame, eyes, true);
- FILE* f = fopen (tmp_j2c.string().c_str (), N_("wb"));
+ FILE* f = fopen_boost (tmp_j2c, "wb");
if (!f) {
throw WriteFileError (tmp_j2c, errno);
diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc
index 9c2065141..dfe336b8f 100644
--- a/src/lib/file_group.cc
+++ b/src/lib/file_group.cc
@@ -21,6 +21,7 @@
#include <sndfile.h>
#include "file_group.h"
#include "exceptions.h"
+#include "cross.h"
using std::vector;
using std::cout;
@@ -78,7 +79,7 @@ FileGroup::ensure_open_path (size_t p) const
}
_current_path = p;
- _current_file = fopen (_paths[_current_path].string().c_str(), "rb");
+ _current_file = fopen_boost (_paths[_current_path], "rb");
if (_current_file == 0) {
throw OpenFileError (_paths[_current_path]);
}
diff --git a/src/lib/scp_dcp_job.cc b/src/lib/scp_dcp_job.cc
index 779c8dd44..310303c09 100644
--- a/src/lib/scp_dcp_job.cc
+++ b/src/lib/scp_dcp_job.cc
@@ -33,6 +33,7 @@
#include "config.h"
#include "log.h"
#include "film.h"
+#include "cross.h"
#include "i18n.h"
@@ -170,7 +171,7 @@ SCPDCPJob::run ()
boost::uintmax_t to_do = boost::filesystem::file_size (*i);
ssh_scp_push_file (sc.scp, leaf.c_str(), to_do, S_IRUSR | S_IWUSR);
- FILE* f = fopen (boost::filesystem::path (*i).string().c_str(), N_("rb"));
+ FILE* f = fopen_boost (boost::filesystem::path (*i), "rb");
if (f == 0) {
throw NetworkError (String::compose (_("Could not open %1 to send"), *i));
}
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 109447f73..4129b7a82 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -478,7 +478,7 @@ Writer::check_existing_picture_mxf ()
boost::filesystem::path p;
p /= _film->internal_video_mxf_dir ();
p /= _film->internal_video_mxf_filename ();
- FILE* mxf = fopen (p.string().c_str(), "rb");
+ FILE* mxf = fopen_boost (p, "rb");
if (!mxf) {
_film->log()->log (String::compose ("Could not open existing MXF at %1 (errno=%2)", p.string(), errno));
return;