X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fsound_mxf.cc;h=e338c16165abb2db3b28e519d3edd2f7270d88b9;hb=edf35a7acb05289dc024733efd6e13205def5174;hp=f6613867373cd7de219fd48716d32f21b783a0bc;hpb=00e9647a9ede540f2d567c19025278c25a87c830;p=libdcp.git diff --git a/src/sound_mxf.cc b/src/sound_mxf.cc index f6613867..e338c161 100644 --- a/src/sound_mxf.cc +++ b/src/sound_mxf.cc @@ -82,7 +82,7 @@ SoundMXF::SoundMXF (Fraction edit_rate, int sampling_rate, int channels) } bool -SoundMXF::equals (shared_ptr other, EqualityOptions opt, boost::function note) const +SoundMXF::equals (shared_ptr other, EqualityOptions opt, NoteHandler note) const { if (!MXF::equals (other, opt, note)) { return false; @@ -122,7 +122,7 @@ SoundMXF::equals (shared_ptr other, EqualityOptions opt, boost::f // desc_A.ChannelFormat != desc_B.ChannelFormat || ) { - note (ERROR, "audio MXF picture descriptors differ"); + note (DCP_ERROR, "audio MXF picture descriptors differ"); return false; } @@ -139,7 +139,7 @@ SoundMXF::equals (shared_ptr other, EqualityOptions opt, boost::f } if (buffer_A.Size() != buffer_B.Size()) { - note (ERROR, String::compose ("sizes of audio data for frame %1 differ", i)); + note (DCP_ERROR, String::compose ("sizes of audio data for frame %1 differ", i)); return false; } @@ -147,7 +147,7 @@ SoundMXF::equals (shared_ptr other, EqualityOptions opt, boost::f for (uint32_t i = 0; i < buffer_A.Size(); ++i) { int const d = abs (buffer_A.RoData()[i] - buffer_B.RoData()[i]); if (d > opt.max_audio_sample_error) { - note (ERROR, String::compose ("PCM data difference of %1", d)); + note (DCP_ERROR, String::compose ("PCM data difference of %1", d)); return false; } } @@ -161,7 +161,7 @@ shared_ptr SoundMXF::get_frame (int n) const { /* XXX: should add on entry point here? */ - return shared_ptr (new SoundFrame (file().string(), n, _decryption_context)); + return shared_ptr (new SoundFrame (file(), n, _decryption_context)); } shared_ptr @@ -170,9 +170,3 @@ SoundMXF::start_write (boost::filesystem::path file, Standard standard) /* XXX: can't we use a shared_ptr here? */ return shared_ptr (new SoundMXFWriter (this, file, standard)); } - -string -SoundMXF::key_type () const -{ - return "MDAK"; -}