- ASDCP::JP2K::MXFReader reader_B;
- if (ASDCP_FAILURE (reader_B.OpenRead (other->path().string().c_str()))) {
- throw MXFFileError ("could not open MXF file for reading", path().string());
- }
-
- ASDCP::JP2K::PictureDescriptor desc_A;
- if (ASDCP_FAILURE (reader_A.FillPictureDescriptor (desc_A))) {
- throw DCPReadError ("could not read video MXF information");
- }
- ASDCP::JP2K::PictureDescriptor desc_B;
- if (ASDCP_FAILURE (reader_B.FillPictureDescriptor (desc_B))) {
- throw DCPReadError ("could not read video MXF information");
- }
-
- if (
- desc_A.EditRate != desc_B.EditRate ||
- desc_A.ContainerDuration != desc_B.ContainerDuration ||
- desc_A.SampleRate != desc_B.SampleRate ||
- desc_A.StoredWidth != desc_B.StoredWidth ||
- desc_A.StoredHeight != desc_B.StoredHeight ||
- desc_A.AspectRatio != desc_B.AspectRatio ||
- desc_A.Rsize != desc_B.Rsize ||
- desc_A.Xsize != desc_B.Xsize ||
- desc_A.Ysize != desc_B.Ysize ||
- desc_A.XOsize != desc_B.XOsize ||
- desc_A.YOsize != desc_B.YOsize ||
- desc_A.XTsize != desc_B.XTsize ||
- desc_A.YTsize != desc_B.YTsize ||
- desc_A.XTOsize != desc_B.XTOsize ||
- desc_A.YTOsize != desc_B.YTOsize ||
- desc_A.Csize != desc_B.Csize
-// desc_A.CodingStyleDefault != desc_B.CodingStyleDefault ||
-// desc_A.QuantizationDefault != desc_B.QuantizationDefault
- ) {
-
- notes.push_back ("video MXF picture descriptors differ");
- }
-
-// for (unsigned int j = 0; j < ASDCP::JP2K::MaxComponents; ++j) {
-// if (desc_A.ImageComponents[j] != desc_B.ImageComponents[j]) {
-// notes.pack_start ("video MXF picture descriptors differ");
-// }
-// }
- }
-
- return true;
-}
-
-
-MonoPictureAsset::MonoPictureAsset (
- sigc::slot<string, int> get_path,
- string directory,
- string mxf_name,
- sigc::signal1<void, float>* progress,
- int fps,
- int length,
- int width,
- int height)
- : PictureAsset (directory, mxf_name, progress, fps, 0, length)
-{
- _width = width;
- _height = height;
- construct (get_path);
-}
-
-MonoPictureAsset::MonoPictureAsset (
- vector<string> const & files,
- string directory,
- string mxf_name,
- sigc::signal1<void, float>* progress,
- int fps,
- int length,
- int width,
- int height)
- : PictureAsset (directory, mxf_name, progress, fps, 0, length)
-{
- _width = width;
- _height = height;
- construct (sigc::bind (sigc::mem_fun (*this, &MonoPictureAsset::path_from_list), files));
-}
-
-MonoPictureAsset::MonoPictureAsset (string directory, string mxf_name, int fps, int entry_point, int length)
- : PictureAsset (directory, mxf_name, 0, fps, entry_point, length)
-{
- ASDCP::JP2K::MXFReader reader;
- if (ASDCP_FAILURE (reader.OpenRead (path().string().c_str()))) {
- throw MXFFileError ("could not open MXF file for reading", path().string());
- }
-
- ASDCP::JP2K::PictureDescriptor desc;
- if (ASDCP_FAILURE (reader.FillPictureDescriptor (desc))) {
- throw DCPReadError ("could not read video MXF information");
- }
-
- _width = desc.StoredWidth;
- _height = desc.StoredHeight;