Show maximum pixel error on equals().
[libdcp.git] / src / sound_asset.cc
index dae66f900659ff17346e2b7f90fe06920272767d..71d1d9ff0a29e0f5185a98ea818e1c677da7cfb3 100644 (file)
@@ -57,7 +57,7 @@ SoundAsset::SoundAsset (string directory, string mxf_name, int fps, int length)
        : Asset (directory, mxf_name, 0, fps, length)
        , _channels (0)
 {
-       _digest = make_digest (mxf_path().string(), 0);
+
 }
 
 string
@@ -120,7 +120,7 @@ SoundAsset::construct (sigc::slot<string, Channel> get_path)
        fill_writer_info (&writer_info);
 
        ASDCP::PCM::MXFWriter mxf_writer;
-       if (ASDCP_FAILURE (mxf_writer.OpenWrite (mxf_path().c_str(), writer_info, audio_desc))) {
+       if (ASDCP_FAILURE (mxf_writer.OpenWrite (mxf_path().string().c_str(), writer_info, audio_desc))) {
                throw FileError ("could not open audio MXF for writing", mxf_path().string());
        }
 
@@ -161,8 +161,6 @@ SoundAsset::construct (sigc::slot<string, Channel> get_path)
        if (ASDCP_FAILURE (mxf_writer.Finalize())) {
                throw MiscError ("could not finalise audio MXF");
        }
-
-       _digest = make_digest (mxf_path().string(), _progress);
 }
 
 void
@@ -179,19 +177,19 @@ SoundAsset::write_to_cpl (ostream& s) const
 }
 
 list<string>
-SoundAsset::equals (shared_ptr<const Asset> other, EqualityFlags flags) const
+SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt) const
 {
-       list<string> notes = Asset::equals (other, flags);
+       list<string> notes = Asset::equals (other, opt);
                     
-       if (flags & MXF_INSPECT) {
+       if (opt.flags & MXF_INSPECT) {
                ASDCP::PCM::MXFReader reader_A;
-               if (ASDCP_FAILURE (reader_A.OpenRead (mxf_path().c_str()))) {
+               if (ASDCP_FAILURE (reader_A.OpenRead (mxf_path().string().c_str()))) {
                        cout << "failed " << mxf_path() << "\n";
                        throw FileError ("could not open MXF file for reading", mxf_path().string());
                }
 
                ASDCP::PCM::MXFReader reader_B;
-               if (ASDCP_FAILURE (reader_B.OpenRead (other->mxf_path().c_str()))) {
+               if (ASDCP_FAILURE (reader_B.OpenRead (other->mxf_path().string().c_str()))) {
                        cout << "failed " << other->mxf_path() << "\n";
                        throw FileError ("could not open MXF file for reading", mxf_path().string());
                }