| 63 | } |
| 64 | |
| 65 | std::unique_ptr<RawDecoder> CiffParser::getDecoder(const CameraMetaData* meta) { |
| 66 | if (!mRootIFD) |
| 67 | parseData(); |
| 68 | |
| 69 | const auto potentials(mRootIFD->getIFDsWithTag(CIFF_MAKEMODEL)); |
| 70 | |
| 71 | for (const auto& potential : potentials) { |
| 72 | const auto* const mm = potential->getEntry(CIFF_MAKEMODEL); |
| 73 | const string make = trimSpaces(mm->getString()); |
| 74 | |
| 75 | if (make == "Canon") |
| 76 | return std::make_unique<CrwDecoder>(move(mRootIFD), mInput); |
| 77 | } |
| 78 | |
| 79 | ThrowCPE("No decoder found. Sorry."); |
| 80 | } |
| 81 | |
| 82 | } // namespace rawspeed |
nothing calls this directly
no test coverage detected