libcamera: Declare functions before variables in class definitions
The preferred coding style in libcamera is to declare private functions before private variables in class definitions. This rule isn't followed by some of the internal classes. Update them accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <email@uajain.com>
This commit is contained in:
parent
16c5f44c69
commit
e239ded90b
6 changed files with 32 additions and 32 deletions
|
@ -36,10 +36,6 @@ public:
|
||||||
int enumerate() final;
|
int enumerate() final;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct udev *udev_;
|
|
||||||
struct udev_monitor *monitor_;
|
|
||||||
EventNotifier *notifier_;
|
|
||||||
|
|
||||||
using DependencyMap = std::map<dev_t, std::list<MediaEntity *>>;
|
using DependencyMap = std::map<dev_t, std::list<MediaEntity *>>;
|
||||||
|
|
||||||
struct MediaDeviceDeps {
|
struct MediaDeviceDeps {
|
||||||
|
@ -58,16 +54,20 @@ private:
|
||||||
DependencyMap deps_;
|
DependencyMap deps_;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::set<dev_t> orphans_;
|
|
||||||
std::list<MediaDeviceDeps> pending_;
|
|
||||||
std::map<dev_t, MediaDeviceDeps *> devMap_;
|
|
||||||
|
|
||||||
int addUdevDevice(struct udev_device *dev);
|
int addUdevDevice(struct udev_device *dev);
|
||||||
int populateMediaDevice(MediaDevice *media, DependencyMap *deps);
|
int populateMediaDevice(MediaDevice *media, DependencyMap *deps);
|
||||||
std::string lookupDeviceNode(dev_t devnum);
|
std::string lookupDeviceNode(dev_t devnum);
|
||||||
|
|
||||||
int addV4L2Device(dev_t devnum);
|
int addV4L2Device(dev_t devnum);
|
||||||
void udevNotify(EventNotifier *notifier);
|
void udevNotify(EventNotifier *notifier);
|
||||||
|
|
||||||
|
struct udev *udev_;
|
||||||
|
struct udev_monitor *monitor_;
|
||||||
|
EventNotifier *notifier_;
|
||||||
|
|
||||||
|
std::set<dev_t> orphans_;
|
||||||
|
std::list<MediaDeviceDeps> pending_;
|
||||||
|
std::map<dev_t, MediaDeviceDeps *> devMap_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
|
@ -41,16 +41,16 @@ private:
|
||||||
EventNotifier *notifiers[3];
|
EventNotifier *notifiers[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int poll(std::vector<struct pollfd> *pollfds);
|
||||||
|
void processInterrupt(const struct pollfd &pfd);
|
||||||
|
void processNotifiers(const std::vector<struct pollfd> &pollfds);
|
||||||
|
void processTimers();
|
||||||
|
|
||||||
std::map<int, EventNotifierSetPoll> notifiers_;
|
std::map<int, EventNotifierSetPoll> notifiers_;
|
||||||
std::list<Timer *> timers_;
|
std::list<Timer *> timers_;
|
||||||
int eventfd_;
|
int eventfd_;
|
||||||
|
|
||||||
bool processingEvents_;
|
bool processingEvents_;
|
||||||
|
|
||||||
int poll(std::vector<struct pollfd> *pollfds);
|
|
||||||
void processInterrupt(const struct pollfd &pfd);
|
|
||||||
void processNotifiers(const std::vector<struct pollfd> &pollfds);
|
|
||||||
void processTimers();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
|
@ -29,8 +29,6 @@ public:
|
||||||
uint32_t minVersion);
|
uint32_t minVersion);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<IPAModule *> modules_;
|
|
||||||
|
|
||||||
IPAManager();
|
IPAManager();
|
||||||
~IPAManager();
|
~IPAManager();
|
||||||
|
|
||||||
|
@ -40,6 +38,8 @@ private:
|
||||||
|
|
||||||
bool isSignatureValid(IPAModule *ipa) const;
|
bool isSignatureValid(IPAModule *ipa) const;
|
||||||
|
|
||||||
|
std::vector<IPAModule *> modules_;
|
||||||
|
|
||||||
#if HAVE_IPA_PUBKEY
|
#if HAVE_IPA_PUBKEY
|
||||||
static const uint8_t publicKeyData_[];
|
static const uint8_t publicKeyData_[];
|
||||||
static const PubKey pubKey_;
|
static const PubKey pubKey_;
|
||||||
|
|
|
@ -42,6 +42,8 @@ protected:
|
||||||
std::string logPrefix() const override;
|
std::string logPrefix() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
int loadIPAModuleInfo();
|
||||||
|
|
||||||
struct IPAModuleInfo info_;
|
struct IPAModuleInfo info_;
|
||||||
std::vector<uint8_t> signature_;
|
std::vector<uint8_t> signature_;
|
||||||
|
|
||||||
|
@ -52,8 +54,6 @@ private:
|
||||||
void *dlHandle_;
|
void *dlHandle_;
|
||||||
typedef struct ipa_context *(*IPAIntfFactory)(void);
|
typedef struct ipa_context *(*IPAIntfFactory)(void);
|
||||||
IPAIntfFactory ipaCreate_;
|
IPAIntfFactory ipaCreate_;
|
||||||
|
|
||||||
int loadIPAModuleInfo();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
|
@ -58,26 +58,13 @@ protected:
|
||||||
std::string logPrefix() const;
|
std::string logPrefix() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string driver_;
|
|
||||||
std::string deviceNode_;
|
|
||||||
std::string model_;
|
|
||||||
unsigned int version_;
|
|
||||||
|
|
||||||
int fd_;
|
|
||||||
bool valid_;
|
|
||||||
bool acquired_;
|
|
||||||
bool lockOwner_;
|
|
||||||
|
|
||||||
int open();
|
int open();
|
||||||
void close();
|
void close();
|
||||||
|
|
||||||
std::map<unsigned int, MediaObject *> objects_;
|
|
||||||
MediaObject *object(unsigned int id);
|
MediaObject *object(unsigned int id);
|
||||||
bool addObject(MediaObject *object);
|
bool addObject(MediaObject *object);
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
std::vector<MediaEntity *> entities_;
|
|
||||||
|
|
||||||
struct media_v2_interface *findInterface(const struct media_v2_topology &topology,
|
struct media_v2_interface *findInterface(const struct media_v2_topology &topology,
|
||||||
unsigned int entityId);
|
unsigned int entityId);
|
||||||
bool populateEntities(const struct media_v2_topology &topology);
|
bool populateEntities(const struct media_v2_topology &topology);
|
||||||
|
@ -87,6 +74,19 @@ private:
|
||||||
|
|
||||||
friend int MediaLink::setEnabled(bool enable);
|
friend int MediaLink::setEnabled(bool enable);
|
||||||
int setupLink(const MediaLink *link, unsigned int flags);
|
int setupLink(const MediaLink *link, unsigned int flags);
|
||||||
|
|
||||||
|
std::string driver_;
|
||||||
|
std::string deviceNode_;
|
||||||
|
std::string model_;
|
||||||
|
unsigned int version_;
|
||||||
|
|
||||||
|
int fd_;
|
||||||
|
bool valid_;
|
||||||
|
bool acquired_;
|
||||||
|
bool lockOwner_;
|
||||||
|
|
||||||
|
std::map<unsigned int, MediaObject *> objects_;
|
||||||
|
std::vector<MediaEntity *> entities_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
|
@ -107,6 +107,8 @@ private:
|
||||||
MediaEntity(const MediaEntity &) = delete;
|
MediaEntity(const MediaEntity &) = delete;
|
||||||
~MediaEntity();
|
~MediaEntity();
|
||||||
|
|
||||||
|
void addPad(MediaPad *pad);
|
||||||
|
|
||||||
std::string name_;
|
std::string name_;
|
||||||
unsigned int function_;
|
unsigned int function_;
|
||||||
unsigned int flags_;
|
unsigned int flags_;
|
||||||
|
@ -115,8 +117,6 @@ private:
|
||||||
unsigned int minor_;
|
unsigned int minor_;
|
||||||
|
|
||||||
std::vector<MediaPad *> pads_;
|
std::vector<MediaPad *> pads_;
|
||||||
|
|
||||||
void addPad(MediaPad *pad);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue