Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 12598681 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Add video device to epoll in EventHub

The video device is already being watched, and we now need to start
actually reading the video frames. This is done similarly to the input
devices. The video device fd is added to epoll. Whenever an epoll
detects new data, the frames will be added to video device's internal
queue. In the subsequent commits we will consume these frames and report
them to the InputClassifier HAL.

Note here that registering for epoll is a bit complex. It is important
to only have the video device in epoll if the input device is in epoll.

There are several situations possible here:
1) Video device is found during directory traversal of /dev
2) Video device is found through inotify
3) Video device is added after matching input device
4) Video device is added before matching input device
5) Video device is added while input device is disabled
6) As long as input device is enabled, and has a video device, the video
device should be part of epoll. That means input device.enable() should
add the video device to epoll.

Therefore, the decision here was made to registerVideoDevice inside
registerDevice (=registerInputDevice), which should account for most
cases. For the other corner cases, handle adding video device to epoll
separately.

Test: video device is being read, because InputClassifier receives video
frames and classifies them.
Bug: 111480215

Change-Id: I340b44a9b17182444b8a3308e3ab322ae1ad444c
parent 49a99b9f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment