1/* ---------------------------------------------------------------------------
2** This software is in the public domain, furnished "as is", without technical
3** support, and with no warranty, express or implied, as to its usefulness for
4** any purpose.
5**
6** V4l2ReadWriteDevice.cpp
7**
8** V4L2 source using read/write API
9**
10** -------------------------------------------------------------------------*/
11
12#include <unistd.h>
13
14#include "V4l2ReadWriteDevice.h"
15
16V4l2ReadWriteDevice::V4l2ReadWriteDevice(const V4L2DeviceParameters& params, v4l2_buf_type deviceType) : V4l2Device(params, deviceType) {
17}
18
19
20size_t V4l2ReadWriteDevice::writeInternal(char* buffer, size_t bufferSize) {
21 return ::write(m_fd, buffer, bufferSize);
22}
23
24size_t V4l2ReadWriteDevice::readInternal(char* buffer, size_t bufferSize) {
25 return ::read(m_fd, buffer, bufferSize);
26}
27
28
29
30