{
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)));
}
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));
}
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
* @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));
}
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;
* @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));
}
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;