diff options
Diffstat (limited to 'services/inputflinger/EventHub.cpp')
-rw-r--r-- | services/inputflinger/EventHub.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/services/inputflinger/EventHub.cpp b/services/inputflinger/EventHub.cpp index aa241a00e9..18c3ded880 100644 --- a/services/inputflinger/EventHub.cpp +++ b/services/inputflinger/EventHub.cpp @@ -1028,6 +1028,16 @@ size_t EventHub::getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSiz return event - buffer; } +std::vector<TouchVideoFrame> EventHub::getVideoFrames(int32_t deviceId) { + AutoMutex _l(mLock); + + Device* device = getDeviceLocked(deviceId); + if (!device || !device->videoDevice) { + return {}; + } + return device->videoDevice->consumeFrames(); +} + void EventHub::wake() { ALOGV("wake() called"); |