summaryrefslogtreecommitdiff
path: root/src/qcam/assets/feathericons/coffee.svg
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-07-28 14:01:19 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-08-06 15:44:02 +0100
commitc09aee4ccb7043484047d060f7f8bc1e0192ea23 (patch)
tree1835a1127703a38bcfcd0c79a508cf8ead1208d8 /src/qcam/assets/feathericons/coffee.svg
parent9f07aebde85e1ec4a19beafbdd09ce26db5d7932 (diff)
android: camera_device: Generate ResultMetadata earlier
Generate the ResultMetadata before performing JPEG compression so that JPEG specific metadata can be added to the metadata when it has been processed. Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/qcam/assets/feathericons/coffee.svg')
0 files changed, 0 insertions, 0 deletions
id='n49' href='#n49'>49 50 51 52 53 54 55 56 57 58
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2018, Google Inc.
 *
 * device_enumerator.h - API to enumerate and find media devices
 */
#ifndef __LIBCAMERA_DEVICE_ENUMERATOR_H__
#define __LIBCAMERA_DEVICE_ENUMERATOR_H__

#include <memory>
#include <string>
#include <vector>

#include <linux/media.h>

namespace libcamera {

class MediaDevice;

class DeviceMatch
{
public:
	DeviceMatch(const std::string &driver);

	void add(const std::string &entity);

	bool match(const MediaDevice *device) const;

private:
	std::string driver_;
	std::vector<std::string> entities_;
};

class DeviceEnumerator
{
public:
	static std::unique_ptr<DeviceEnumerator> create();

	virtual ~DeviceEnumerator();

	virtual int init() = 0;
	virtual int enumerate() = 0;

	std::shared_ptr<MediaDevice> search(const DeviceMatch &dm);

protected:
	int addDevice(const std::string &deviceNode);
	void removeDevice(const std::string &deviceNode);

private:
	std::vector<std::shared_ptr<MediaDevice>> devices_;

	virtual std::string lookupDeviceNode(int major, int minor) = 0;
};

} /* namespace libcamera */

#endif	/* __LIBCAMERA_DEVICE_ENUMERATOR_H__ */