summaryrefslogtreecommitdiff
path: root/src/qcam
AgeCommit message (Expand)Author
2021-03-28meson: Summarize which applications and adaptation layers are builtLaurent Pinchart
2021-03-23meson: Use subdir_done() to reduce indentationLaurent Pinchart
2021-02-11meson: Fix coding style when declaring arraysLaurent Pinchart
2020-12-01qcam: Make log less verbose by defaultLaurent Pinchart
2020-12-01qcam: main: Fix comment incorrectly referring to the cam applicationLaurent Pinchart
2020-11-13qcam: Clear the pool of free requests upon stopCapture()Paul Elder
2020-11-07qcam: viewfinder_gl: Add support for RGB formatsLaurent Pinchart
2020-11-07qcam: viewfinder_gl: Store textures in an arrayLaurent Pinchart
2020-11-07qcam: viewfinder_gl: Rename yuvData_ to data_Laurent Pinchart
2020-11-07qcam: viewfinder_gl: Rename YUV.vert to identity.vertLaurent Pinchart
2020-11-07qcam: viewfinder_gl: Remove unneeded castsLaurent Pinchart
2020-11-07qcam: viewfinder_gl: Keep fragment shader when format doesn't changeLaurent Pinchart
2020-11-07qcam: viewfinder_gl: Fix fragment shader rebuild when setting formatLaurent Pinchart
2020-10-23libcamera: Declare empty virtual destructors as defaultedLaurent Pinchart
2020-10-21qcam: main_window: Explicitly name raw bufferKieran Bingham
2020-10-12libcamera, android, cam, gstreamer, qcam, v4l2: Reuse RequestPaul Elder
2020-10-04qcam: viewfinder_gl: Add shader to render packed YUV formatsLaurent Pinchart
2020-10-04qcam: viewfinder_gl: Merge the semi-planar UV and VU shadersLaurent Pinchart
2020-10-04qcam: viewfinder_gl: Support #define in shadersLaurent Pinchart
2020-10-04qcam: viewfinder_gl: Rename shader filesLaurent Pinchart
2020-10-04qcam: viewfinder_gl: Hardcode the vertex shader file nameLaurent Pinchart
2020-10-04qcam: viewfinder_gl: Don't store texture IDs in class membersLaurent Pinchart
2020-10-04qcam: Remove unneeded './' file prefix in *.qrcLaurent Pinchart
2020-10-02qcam: dng_writer: Record camera modelNiklas Söderlund
2020-09-30libcamera: stream: Rename StillCaptureRaw to RawNiklas Söderlund
2020-09-15qcam: Add additional command line option to select the renderer typeShow Liu
2020-09-15qcam: Add ViewFinderGL class to accelerate the format conversionShow Liu
2020-09-15qcam: New viewfinder hierarchyShow Liu
2020-09-15qcam: Add OpenGL shader code as Qt resourceShow Liu
2020-09-12qcam: format_converter: Support R8 GreyscaleKieran Bingham
2020-08-25meson: Remove -Wno-unused-parameterLaurent Pinchart
2020-08-14libcamera: request: Make Stream pointer constNiklas Söderlund
2020-08-14libcamera: request: Declare a using directive for map of buffersNiklas Söderlund
2020-08-05libcamera: camera: Rename name() to id()Niklas Söderlund
2020-07-27qcam: Fix camera reference leak on hot-unplugUmang Jain
2020-07-27qcam: Fix spellingYou-Sheng Yang
2020-07-25libcamera: qcam: Improve colour information in DNG filesDavid Plowman
2020-06-24meson: options: Add an option to control compilation of qcamNiklas Söderlund
2020-06-18qcam: Replace explicit DRM FourCCs with libcamera formatsLaurent Pinchart
2020-06-17qcam: main_window: Introduce initial hotplug supportUmang Jain
2020-06-16qcam: dng_writer: Record creation time in the EXIF directoryNiklas Söderlund
2020-06-15qcam: dng_writer: Add support for IPU3 Bayer formatsNiklas Söderlund
2020-06-09qcam: Specify Feather icons license in DEP5Laurent Pinchart
2020-06-09libcamera: Add missing SPDX headers to miscellaneous small filesLaurent Pinchart
2020-06-09qcam: Fix compilation with Qt v5.15.0Peter Seiderer
2020-06-06libcamera: Rename pixelformats.{cpp,h} to pixel_format.{cpp,h}Laurent Pinchart
2020-05-28qcam: viewfinder: Use correct DRM/QImage mappingsKieran Bingham
2020-05-18(q)cam: Fix header guardsLaurent Pinchart
2020-05-13licenses: License all meson files under CC0-1.0Laurent Pinchart
2020-05-04qcam: dng_writer: Write EXIF IFD as custom directoryLaurent Pinchart
">for (const auto &dir : utils::split(modulePaths, ":")) { if (dir.empty()) continue; int ret = addDir(dir.c_str()); if (ret > 0) ipaCount += ret; } if (!ipaCount) LOG(IPAManager, Warning) << "No IPA found in '" IPA_MODULE_DIR "' and '" << modulePaths << "'"; } IPAManager::~IPAManager() { for (IPAModule *module : modules_) delete module; } /** * \brief Retrieve the IPA manager instance * * The IPAManager is a singleton and can't be constructed manually. This * function shall instead be used to retrieve the single global instance of the * manager. * * \return The IPA manager instance */ IPAManager *IPAManager::instance() { static IPAManager ipaManager; return &ipaManager; } /** * \brief Load IPA modules from a directory * \param[in] libDir directory to search for IPA modules * * This method tries to create an IPAModule instance for every shared object * found in \a libDir, and skips invalid IPA modules. * * \return Number of modules loaded by this call, or a negative error code * otherwise */ int IPAManager::addDir(const char *libDir) { struct dirent *ent; DIR *dir; dir = opendir(libDir); if (!dir) return -errno; std::vector<std::string> paths; while ((ent = readdir(dir)) != nullptr) { int offset = strlen(ent->d_name) - 3; if (offset < 0) continue; if (strcmp(&ent->d_name[offset], ".so")) continue; paths.push_back(std::string(libDir) + "/" + ent->d_name); } closedir(dir); /* Ensure a stable ordering of modules. */ std::sort(paths.begin(), paths.end()); unsigned int count = 0; for (const std::string &path : paths) { IPAModule *ipaModule = new IPAModule(path); if (!ipaModule->isValid()) { delete ipaModule; continue; } LOG(IPAManager, Debug) << "Loaded IPA module '" << path << "'"; modules_.push_back(ipaModule); count++; } return count; } /** * \brief Create an IPA interface that matches a given pipeline handler * \param[in] pipe The pipeline handler that wants a matching IPA interface * \param[in] minVersion Minimum acceptable version of IPA module * \param[in] maxVersion Maximum acceptable version of IPA module * * \return A newly created IPA interface, or nullptr if no matching * IPA module is found or if the IPA interface fails to initialize */ std::unique_ptr<IPAInterface> IPAManager::createIPA(PipelineHandler *pipe, uint32_t maxVersion, uint32_t minVersion) { IPAModule *m = nullptr; for (IPAModule *module : modules_) { if (module->match(pipe, minVersion, maxVersion)) { m = module; break; } } if (!m) return nullptr; if (!m->isOpenSource()) { IPAProxyFactory *pf = nullptr; std::vector<IPAProxyFactory *> &factories = IPAProxyFactory::factories(); for (IPAProxyFactory *factory : factories) { /* TODO: Better matching */ if (!strcmp(factory->name().c_str(), "IPAProxyLinux")) { pf = factory; break; } } if (!pf) { LOG(IPAManager, Error) << "Failed to get proxy factory"; return nullptr; } std::unique_ptr<IPAProxy> proxy = pf->create(m); if (!proxy->isValid()) { LOG(IPAManager, Error) << "Failed to load proxy"; return nullptr; } return proxy; } if (!m->load()) return nullptr; struct ipa_context *ctx = m->createContext(); if (!ctx) return nullptr; return std::make_unique<IPAContextWrapper>(ctx); } } /* namespace libcamera */