More boost::filesystem jibber jabber.
authorCarl Hetherington <cth@carlh.net>
Fri, 4 Oct 2013 10:01:35 +0000 (11:01 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 4 Oct 2013 10:01:35 +0000 (11:01 +0100)
src/mono_picture_asset.cc
src/mono_picture_frame.cc
src/mono_picture_frame.h
src/stereo_picture_frame.cc
src/stereo_picture_frame.h

index 7830d829c9841b1d0d2854db0c24fccabaa23e45..81508065eadaca5982c8d9e8e767b0b61a0b3176 100644 (file)
@@ -48,7 +48,7 @@ MonoPictureAsset::create (boost::function<boost::filesystem::path (int)> get_pat
 {
        ASDCP::JP2K::CodestreamParser j2k_parser;
        ASDCP::JP2K::FrameBuffer frame_buffer (4 * Kumu::Megabyte);
-       if (ASDCP_FAILURE (j2k_parser.OpenReadFrame (get_path(0).c_str(), frame_buffer))) {
+       if (ASDCP_FAILURE (j2k_parser.OpenReadFrame (get_path(0).string().c_str(), frame_buffer))) {
                boost::throw_exception (FileError ("could not open JPEG2000 file for reading", get_path (0)));
        }
        
@@ -68,7 +68,7 @@ MonoPictureAsset::create (boost::function<boost::filesystem::path (int)> get_pat
 
                boost::filesystem::path const path = get_path (i);
 
-               if (ASDCP_FAILURE (j2k_parser.OpenReadFrame (path.c_str(), frame_buffer))) {
+               if (ASDCP_FAILURE (j2k_parser.OpenReadFrame (path.string().c_str(), frame_buffer))) {
                        boost::throw_exception (FileError ("could not open JPEG2000 file for reading", path));
                }
 
@@ -115,7 +115,7 @@ MonoPictureAsset::path_from_list (int f, vector<boost::filesystem::path> const &
 shared_ptr<const MonoPictureFrame>
 MonoPictureAsset::get_frame (int n) const
 {
-       return shared_ptr<const MonoPictureFrame> (new MonoPictureFrame (path().string(), n, _decryption_context));
+       return shared_ptr<const MonoPictureFrame> (new MonoPictureFrame (path(), n, _decryption_context));
 }
 
 bool
index 474b0715438c5817fdc3c044f4195f14a117ca9b..04f2efd7a53842d72811930614b5c6a067f75daa 100644 (file)
@@ -38,10 +38,10 @@ using namespace libdcp;
  *  @param mxf_path Path to the asset's MXF file.
  *  @param n Frame within the asset, not taking EntryPoint into account.
  */
-MonoPictureFrame::MonoPictureFrame (string mxf_path, int n, ASDCP::AESDecContext* c)
+MonoPictureFrame::MonoPictureFrame (boost::filesystem::path mxf_path, int n, ASDCP::AESDecContext* c)
 {
        ASDCP::JP2K::MXFReader reader;
-       if (ASDCP_FAILURE (reader.OpenRead (mxf_path.c_str()))) {
+       if (ASDCP_FAILURE (reader.OpenRead (mxf_path.string().c_str()))) {
                boost::throw_exception (FileError ("could not open MXF file for reading", mxf_path));
        }
 
index 83b80c5cb5c246fc95c090ea10ffa6659282f840..0eedfb95033d1030fbefe504fd0a5dfbf3ac7549 100644 (file)
@@ -37,7 +37,7 @@ class ARGBFrame;
 class MonoPictureFrame
 {
 public:
-       MonoPictureFrame (std::string mxf_path, int n, ASDCP::AESDecContext *);
+       MonoPictureFrame (boost::filesystem::path mxf_path, int n, ASDCP::AESDecContext *);
        ~MonoPictureFrame ();
 
        boost::shared_ptr<ARGBFrame> argb_frame (int reduce = 0, float srgb_gamma = 2.4) const;
index 279fe7a07af9ac0508456b507cc27ed3b4845abf..6af790336fe0ce9d19dc1ef803a771297b1f4d2d 100644 (file)
@@ -38,10 +38,10 @@ using namespace libdcp;
  *  @param mxf_path Path to the asset's MXF file.
  *  @param n Frame within the asset, not taking EntryPoint into account.
  */
-StereoPictureFrame::StereoPictureFrame (string mxf_path, int n)
+StereoPictureFrame::StereoPictureFrame (boost::filesystem::path mxf_path, int n)
 {
        ASDCP::JP2K::MXFSReader reader;
-       if (ASDCP_FAILURE (reader.OpenRead (mxf_path.c_str()))) {
+       if (ASDCP_FAILURE (reader.OpenRead (mxf_path.string().c_str()))) {
                boost::throw_exception (FileError ("could not open MXF file for reading", mxf_path));
        }
 
index b72eabc9378ad90fb368469c6a2dd34b5415ff54..ab99ceac8e9b7c02893c80718dd265c2cc4dc17d 100644 (file)
@@ -37,7 +37,7 @@ class ARGBFrame;
 class StereoPictureFrame
 {
 public:
-       StereoPictureFrame (std::string mxf_path, int n);
+       StereoPictureFrame (boost::filesystem::path mxf_path, int n);
        ~StereoPictureFrame ();
 
        boost::shared_ptr<ARGBFrame> argb_frame (Eye eye, int reduce = 0, float srgb_gamma = 2.4) const;