DCPReadError -> ReadError in libdcp.
authorCarl Hetherington <cth@carlh.net>
Tue, 14 Apr 2020 19:02:56 +0000 (21:02 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 14 Apr 2020 19:02:56 +0000 (21:02 +0200)
13 files changed:
src/lib/atmos_mxf_content.cc
src/lib/dcp.cc
src/lib/dcp_content.cc
src/lib/dcp_examiner.cc
src/lib/image_examiner.cc
src/lib/job.cc
src/lib/types.cc
src/lib/video_mxf_content.cc
src/lib/video_mxf_decoder.cc
src/lib/video_mxf_examiner.cc
src/tools/dcpomatic_player.cc
src/wx/content_menu.cc
src/wx/content_view.cc

index fa27f600b4df195e2f624e62d9984fe221f804f7..581b1b2f06c0efe0c13b19da9220356d399fe466 100644 (file)
@@ -56,7 +56,7 @@ AtmosMXFContent::valid_mxf (boost::filesystem::path path)
                return true;
        } catch (dcp::MXFFileError& e) {
 
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
 
        }
 
index 565b172291356156bd83091d7dcdc8f748341d38..c62b339fa2207260c4c9ac81509aa264825d6169 100644 (file)
@@ -80,7 +80,7 @@ DCP::cpls () const
                                if (j.code() == dcp::VerificationNote::EMPTY_ASSET_PATH) {
                                        LOG_WARNING("Empty path in ASSETMAP of %1", i.string());
                                } else {
-                                       boost::throw_exception(dcp::DCPReadError(dcp::note_to_string(j)));
+                                       boost::throw_exception(dcp::ReadError(dcp::note_to_string(j)));
                                }
                        }
                }
index d0f434e5a87af1e0b0da304ca73c136620c7623e..52ac6132c2dc12de27e7c4345cd80507097816c4 100644 (file)
@@ -549,7 +549,7 @@ DCPContent::can_reference (shared_ptr<const Film> film, function<bool (shared_pt
        list<DCPTimePeriod> reel_list;
        try {
                reel_list = reels (film);
-       } catch (dcp::DCPReadError &) {
+       } catch (dcp::ReadError &) {
                /* We couldn't read the DCP; it's probably missing */
                return false;
        } catch (dcp::KDMDecryptionError &) {
@@ -627,7 +627,7 @@ DCPContent::can_reference_audio (shared_ptr<const Film> film, string& why_not) c
        shared_ptr<DCPDecoder> decoder;
        try {
                decoder.reset (new DCPDecoder (film, shared_from_this(), false, film->tolerant(), shared_ptr<DCPDecoder>()));
-       } catch (dcp::DCPReadError &) {
+       } catch (dcp::ReadError &) {
                /* We couldn't read the DCP, so it's probably missing */
                return false;
        } catch (DCPError &) {
@@ -662,7 +662,7 @@ DCPContent::can_reference_text (shared_ptr<const Film> film, TextType type, stri
        shared_ptr<DCPDecoder> decoder;
        try {
                decoder.reset (new DCPDecoder (film, shared_from_this(), false, film->tolerant(), shared_ptr<DCPDecoder>()));
-       } catch (dcp::DCPReadError &) {
+       } catch (dcp::ReadError &) {
                /* We couldn't read the DCP, so it's probably missing */
                return false;
        } catch (dcp::KDMDecryptionError &) {
index 8866ba7219aa4ee00b2783f7466f1f66f13d45b5..9bf401125dda6dea75e3a880541603256588e079 100644 (file)
@@ -219,7 +219,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
                                i->main_subtitle()->asset()->subtitles ();
                        }
                }
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
                _kdm_valid = false;
        } catch (dcp::MiscError& e) {
                _kdm_valid = false;
index 775a69eebac4779b69226f7a8f408f9ad19d43c2..b9ef89865163e17e4622f04bfdb1b85d06cedef7 100644 (file)
@@ -57,7 +57,7 @@ ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const Imag
                fclose (f);
                try {
                        _video_size = dcp::decompress_j2k (buffer, size, 0)->size ();
-               } catch (dcp::DCPReadError& e) {
+               } catch (dcp::ReadError& e) {
                        delete[] buffer;
                        throw DecodeError (String::compose (_("Could not decode JPEG2000 file %1 (%2)"), path, e.what ()));
                }
index a4ea9ec6f033d04d65302186dfe268572a49972b..0feda64355fd95cc0e2d18472c7305cd94b6ec86 100644 (file)
@@ -214,7 +214,7 @@ Job::run_wrapper ()
                set_progress (1);
                set_state (FINISHED_ERROR);
 
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
 
                set_error (e.message(), e.detail().get_value_or(""));
                set_progress (1);
index 9806c99712eb8d1a6c87e43cab4f39aeb530921f..9519b309729db5ed323ccdd7bcd8ef0ad93a9d1d 100644 (file)
@@ -197,7 +197,7 @@ CPLSummary::CPLSummary (boost::filesystem::path p)
        list<dcp::VerificationNote> notes;
        dcp.read (&notes);
        if (!notes.empty()) {
-               throw dcp::DCPReadError(dcp::note_to_string(notes.front()));
+               throw dcp::ReadError(dcp::note_to_string(notes.front()));
        }
 
        cpl_id = dcp.cpls().front()->id();
index bf8bb9f469b22fb772c9b547f8876e40284f4175..0c905a624219eec3ce07527583ac0d6fd6065d4a 100644 (file)
@@ -59,7 +59,7 @@ VideoMXFContent::valid_mxf (boost::filesystem::path path)
                return true;
        } catch (dcp::MXFFileError& e) {
 
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
 
        }
 
@@ -69,7 +69,7 @@ VideoMXFContent::valid_mxf (boost::filesystem::path path)
                return true;
        } catch (dcp::MXFFileError& e) {
 
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
 
        }
 
index 4482606f030b08bc98d4db0309b175d0f5e2b5c4..030db64ef6e2fd2300369c7c3ecc996bb0790b58 100644 (file)
@@ -44,7 +44,7 @@ VideoMXFDecoder::VideoMXFDecoder (shared_ptr<const Film> film, shared_ptr<const
                mono.reset (new dcp::MonoPictureAsset (_content->path(0)));
        } catch (dcp::MXFFileError& e) {
                /* maybe it's stereo */
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
                /* maybe it's stereo */
        }
 
@@ -55,7 +55,7 @@ VideoMXFDecoder::VideoMXFDecoder (shared_ptr<const Film> film, shared_ptr<const
                if (!mono) {
                        throw;
                }
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
                if (!mono) {
                        throw;
                }
index c7e0e41b42a458eac138f5bb26ca4fecc1607ae6..652dc6941d55f3b39b058dc28ad2a85d6e04c22c 100644 (file)
@@ -33,7 +33,7 @@ VideoMXFExaminer::VideoMXFExaminer (shared_ptr<const VideoMXFContent> content)
                _asset.reset (new dcp::MonoPictureAsset (content->path(0)));
        } catch (dcp::MXFFileError& e) {
                /* maybe it's stereo */
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
                /* maybe it's stereo */
        }
 
index 8ee6572619ca7b3e43ba0e4ffda9c81abe7d81bc..7009d17ce652c864c04e8f199c261fe50752febd 100644 (file)
@@ -400,7 +400,7 @@ public:
 #ifndef DCPOMATIC_VARIANT_SWAROOP
                        Config::instance()->add_to_player_history (dir);
 #endif
-               } catch (dcp::DCPReadError& e) {
+               } catch (dcp::ReadError& e) {
                        error_dialog (this, wxString::Format(_("Could not load a DCP from %s"), std_to_wx(dir.string())), std_to_wx(e.what()));
                }
        }
index c5dc1606d790bb577a0a5ba5382b218febc45867..7cb924a73882f45f64f5e61ebba07c2de8d2a970 100644 (file)
@@ -142,7 +142,7 @@ ContentMenu::popup (weak_ptr<Film> film, ContentList c, TimelineContentViewList
                                                );
                                        item->Check (dcp->cpl() && dcp->cpl() == i->id());
                                }
-                       } catch (dcp::DCPReadError &) {
+                       } catch (dcp::ReadError &) {
                                /* The DCP is probably missing */
                        } catch (dcp::KDMDecryptionError &) {
                                /* We have an incorrect KDM */
index 1cdfbc00f8f4fb49d95a9594330404195d34695d..d4e18108dd3a97225222f16132bf445cf03d10b3 100644 (file)
@@ -96,7 +96,7 @@ ContentView::update ()
                        }
                } catch (boost::filesystem::filesystem_error& e) {
                        /* Never mind */
-               } catch (dcp::DCPReadError& e) {
+               } catch (dcp::ReadError& e) {
                        /* Never mind */
                }
        }