#include "argb_frame.h"
#include "lut.h"
-using namespace std;
-using namespace boost;
+using std::string;
+using std::stringstream;
+using std::min;
+using std::max;
+using boost::shared_ptr;
using namespace libdcp;
string
}
string
-libdcp::make_digest (string filename, sigc::signal1<void, float>* progress)
+libdcp::make_digest (string filename, boost::signals2::signal<void (float)>* progress)
{
- int const file_size = filesystem::file_size (filename);
+ int const file_size = boost::filesystem::file_size (filename);
Kumu::FileReader reader;
if (ASDCP_FAILURE (reader.OpenRead (filename.c_str ()))) {
return TRANSITIONAL;
} else if (type == "rating") {
return RATING;
- } else if (type == "teaser") {
+ } else if (type == "teaser" || type == "Teaser") {
return TEASER;
} else if (type == "policy") {
return POLICY;
opj_cio_close (cio);
- image->x1 /= pow (2, reduce);
- image->y1 /= pow (2, reduce);
+ image->x1 = rint (float(image->x1) / pow (2, reduce));
+ image->y1 = rint (float(image->y1) / pow (2, reduce));
return image;
}
return argb_frame;
}
+
+bool
+libdcp::empty_or_white_space (string s)
+{
+ for (size_t i = 0; i < s.length(); ++i) {
+ if (s[i] != ' ' && s[i] != '\n' && s[i] != '\t') {
+ return false;
+ }
+ }
+
+ return true;
+}