backend-v4l2.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include "backend.h"
8 #include <src/metadata.h>
9 #include "types.h"
10 
11 #include <cassert>
12 #include <cstdlib>
13 #include <cstdio>
14 #include <cstring>
15 
16 #include <algorithm>
17 #include <array>
18 #include <functional>
19 #include <string>
20 #include <sstream>
21 #include <fstream>
22 #include <regex>
23 #include <thread>
24 #include <utility> // for pair
25 #include <chrono>
26 #include <thread>
27 #include <atomic>
28 
29 #include <dirent.h>
30 #include <fcntl.h>
31 #include <unistd.h>
32 #include <limits.h>
33 #include <cmath>
34 #include <errno.h>
35 #include <sys/stat.h>
36 #include <sys/mman.h>
37 #include <sys/ioctl.h>
38 #include <linux/usb/video.h>
39 #include <linux/uvcvideo.h>
40 #include <linux/videodev2.h>
41 #include <regex>
42 #include <list>
43 
44 // Metadata streaming nodes are available with kernels 4.16+
45 #ifdef V4L2_META_FMT_UVC
46 constexpr bool metadata_node = true;
47 #else
48 #pragma message ( "\nLibrealsense notification: V4L2_META_FMT_UVC was not defined, adding metadata constructs")
49 
50 constexpr bool metadata_node = false;
51 
52 // Providing missing parts from videodev2.h
53 // V4L2_META_FMT_UVC >> V4L2_CAP_META_CAPTURE is also defined, but the opposite does not hold
54 #define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header */
55 
56 #ifndef V4L2_CAP_META_CAPTURE
57 #define V4L2_CAP_META_CAPTURE 0x00800000 /* Specified in kernel header v4.16 */
58 #endif // V4L2_CAP_META_CAPTURE
59 
60 #endif // V4L2_META_FMT_UVC
61 
62 #ifndef V4L2_META_FMT_D4XX
63 #define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D400 Payload Header metadata */
64 #endif
65 
66 #undef DEBUG_V4L
67 #ifdef DEBUG_V4L
68 #define LOG_DEBUG_V4L(...) do { CLOG(DEBUG ,LIBREALSENSE_ELPP_ID) << __VA_ARGS__; } while(false)
69 #else
70 #define LOG_DEBUG_V4L(...)
71 #endif //DEBUG_V4L
72 
73 // Use local definition of buf type to resolve for kernel versions
74 constexpr auto LOCAL_V4L2_BUF_TYPE_META_CAPTURE = (v4l2_buf_type)(13);
75 
76 #pragma pack(push, 1)
77 // The struct definition is identical to uvc_meta_buf defined uvcvideo.h/ kernel 4.16 headers, and is provided to allow for cross-kernel compilation
79  __u64 ns; // system timestamp of the payload in nanoseconds
80  __u16 sof; // USB Frame Number
81  __u8 length; // length of the payload metadata header
82  __u8 flags; // payload header flags
83  __u8* buf; //device-specific metadata payload data
84 };
85 #pragma pack(pop)
86 
87 
88 namespace librealsense
89 {
90  namespace platform
91  {
93  {
94  public:
95  named_mutex(const std::string& device_path, unsigned timeout);
96 
97  named_mutex(const named_mutex&) = delete;
98 
99  ~named_mutex();
100 
101  void lock();
102 
103  void unlock();
104 
105  bool try_lock();
106 
107  private:
108  void acquire();
109  void release();
110 
113  int _fildes;
114  static std::recursive_mutex _init_mutex;
115  static std::map<std::string, std::recursive_mutex> _dev_mutex;
116  static std::map<std::string, int> _dev_mutex_cnt;
118  std::mutex _mutex;
119  };
120  static int xioctl(int fh, unsigned long request, void *arg);
121 
122  class buffer
123  {
124  public:
125  buffer(int fd, v4l2_buf_type type, bool use_memory_map, uint32_t index);
126 
127  void prepare_for_streaming(int fd);
128 
129  ~buffer();
130 
131  void attach_buffer(const v4l2_buffer& buf);
132 
133  void detach_buffer();
134 
135  void request_next_frame(int fd, bool force=false);
136 
137  uint32_t get_full_length() const { return _length; }
139 
140  uint8_t* get_frame_start() const { return _start; }
141 
142  bool use_memory_map() const { return _use_memory_map; }
143 
144  private:
145  v4l2_buf_type _type;
152  v4l2_buffer _buf;
153  std::mutex _mutex;
154  bool _must_enqueue = false;
155  };
156 
158  {
162  };
163 
164 
165  // RAII for buffer exchange with kernel
167  {
169  {
170  if (_data_buf && (!_managed))
171  {
172  if (_file_desc > 0)
173  {
174  if (xioctl(_file_desc, (int)VIDIOC_QBUF, &_dq_buf) < 0)
175  {
176  LOG_DEBUG_V4L("xioctl(VIDIOC_QBUF) guard failed for fd " << std::dec << _file_desc);
177  if (xioctl(_file_desc, (int)VIDIOC_DQBUF, &_dq_buf) >= 0)
178  {
179  LOG_DEBUG_V4L("xioctl(VIDIOC_QBUF) Re-enqueue succeeded for fd " << std::dec << _file_desc);
180  if (xioctl(_file_desc, (int)VIDIOC_QBUF, &_dq_buf) < 0)
181  LOG_DEBUG_V4L("xioctl(VIDIOC_QBUF) re-deque failed for fd " << std::dec << _file_desc);
182  else
183  LOG_DEBUG_V4L("xioctl(VIDIOC_QBUF) re-deque succeeded for fd " << std::dec << _file_desc);
184  }
185  else
186  LOG_DEBUG_V4L("xioctl(VIDIOC_QBUF) Re-enqueue failed for fd " << std::dec << _file_desc);
187  }
188  else
189  LOG_DEBUG_V4L("Enqueue (e) buf " << std::dec << _dq_buf.index << " for fd " << _file_desc);
190  }
191  }
192  }
193 
194  std::shared_ptr<platform::buffer> _data_buf=nullptr;
195  v4l2_buffer _dq_buf{};
196  int _file_desc=-1;
197  bool _managed=false;
198  };
199 
200  // RAII handling of kernel buffers interchanges
202  {
203  public:
204  buffers_mgr(bool memory_mapped_buf) :
205  _md_start(nullptr),
206  _md_size(0),
207  _mmap_bufs(memory_mapped_buf)
208  {}
209 
211 
212  void request_next_frame();
213  void handle_buffer(supported_kernel_buf_types buf_type, int file_desc,
214  v4l2_buffer buf= v4l2_buffer(),
215  std::shared_ptr<platform::buffer> data_buf=nullptr);
216 
217  uint8_t metadata_size() const { return _md_size; }
218  void* metadata_start() const { return _md_start; }
219 
220  void set_md_attributes(uint8_t md_size, void* md_start)
221  { _md_start = md_start; _md_size = md_size; }
222  void set_md_from_video_node(bool compressed);
223  bool verify_vd_md_sync() const;
224  bool md_node_present() const;
225 
226  std::array<kernel_buf_guard, e_max_kernel_buf_type>& get_buffers()
227  { return buffers; }
228 
229  private:
230  void* _md_start; // marks the address of metadata blob
231  uint8_t _md_size; // metadata size is bounded by 255 bytes by design
233 
234 
235  std::array<kernel_buf_guard, e_max_kernel_buf_type> buffers;
236  };
237 
239  {
240  virtual void capture_loop() = 0;
241 
242  virtual bool has_metadata() const = 0;
243 
244  virtual void streamon() const = 0;
245  virtual void streamoff() const = 0;
246  virtual void negotiate_kernel_buffers(size_t num) const = 0;
247 
248  virtual void allocate_io_buffers(size_t num) = 0;
249  virtual void map_device_descriptor() = 0;
250  virtual void unmap_device_descriptor() = 0;
251  virtual void set_format(stream_profile profile) = 0;
252  virtual void prepare_capture_buffers() = 0;
253  virtual void stop_data_capture() = 0;
254  virtual void acquire_metadata(buffers_mgr & buf_mgr,fd_set &fds, bool compressed_format) = 0;
255  };
256 
258  {
259  public:
261 
262  struct sync_buffer
263  {
264  std::shared_ptr<v4l2_buffer> _v4l2_buf;
265  int _fd;
267  };
268 
269  // pushing video buffer to the video queue
270  void push_video(const sync_buffer& video_buffer);
271  // pushing metadata buffer to the metadata queue
272  void push_metadata(const sync_buffer& md_buffer);
273 
274  // pulling synced data
275  // if returned value is true - the data could have been pulled
276  // if returned value is false - no data is returned via the inout params because data could not be synced
277  bool pull_video_with_metadata(std::shared_ptr<v4l2_buffer>& video_buffer, std::shared_ptr<v4l2_buffer>& md_buffer, int& video_fd, int& md_fd);
278 
279  inline void start() {_is_ready = true;}
280  void stop();
281 
282  private:
283  void enqueue_buffer_before_throwing_it(const sync_buffer& sb) const;
284  void enqueue_front_buffer_before_throwing_it(std::queue<sync_buffer>& sync_queue);
285  void flush_queues();
286 
287  std::mutex _syncer_mutex;
288  std::queue<sync_buffer> _video_queue;
289  std::queue<sync_buffer> _md_queue;
290  bool _is_ready;
291  };
292 
293  // The aim of the frame_drop_monitor is to check the frames drops kpi - which requires
294  // that no more than some percentage of the frames are dropped
295  // It is checked using the fps, and the previous corrupted frames, on the last 30 seconds
296  // for example, for frame rate of 30 fps, and kpi of 5%, the criteria will be:
297  // if at least 45 frames (= 30[fps] * 5%[kpi]* 30[sec]) drops have occured in the previous 30 seconds,
298  // then the kpi is violated
300  {
301  public:
302  frame_drop_monitor(double kpi_frames_drops_percentage) : _kpi_frames_drops_pct(kpi_frames_drops_percentage) {}
303  // update_and_check_kpi method returns whether the kpi has been violated
304  // it should be called each time a partial frame is caught
305  bool update_and_check_kpi(const stream_profile& profile, const timeval& timestamp);
306 
307  private:
308  // container used to store the latest timestamps of the partial frames, per profile
309  std::vector<std::pair<stream_profile, std::deque<long int>>> drops_per_stream;
311  };
312 
314  {
315  public:
316  static void foreach_uvc_device(
317  std::function<void(const uvc_device_info&,
318  const std::string&)> action);
319 
320  static std::vector<std::string> get_video_paths();
321 
322  static bool is_usb_path_valid(const std::string& usb_video_path, const std::string &dev_name,
323  std::string &busnum, std::string &devnum, std::string &devpath);
324 
325  static bool is_usb_device_path(const std::string& video_path);
326 
328 
330 
331  static void get_mipi_device_info(const std::string& dev_name,
332  std::string& bus_info, std::string& card);
333 
334  v4l_uvc_device(const uvc_device_info& info, bool use_memory_map = false);
335 
336  virtual ~v4l_uvc_device() override;
337 
338  void probe_and_commit(stream_profile profile, frame_callback callback, int buffers) override;
339 
340  void stream_on(std::function<void(const notification& n)> error_handler) override;
341 
342  void start_callbacks() override;
343 
344  void stop_callbacks() override;
345 
346  void close(stream_profile) override;
347 
349 
350  void signal_stop();
351 
352  void poll();
353 
354  void set_power_state(power_state state) override;
355  power_state get_power_state() const override { return _state; }
356 
357  void init_xu(const extension_unit&) override {}
358  bool set_xu(const extension_unit& xu, uint8_t control, const uint8_t* data, int size) override;
359  bool get_xu(const extension_unit& xu, uint8_t control, uint8_t* data, int size) const override;
360  control_range get_xu_range(const extension_unit& xu, uint8_t control, int len) const override;
361 
362  bool get_pu(rs2_option opt, int32_t& value) const override;
363 
364  bool set_pu(rs2_option opt, int32_t value) override;
365 
367 
368  std::vector<stream_profile> get_profiles() const override;
369 
370  void lock() const override;
371  void unlock() const override;
372 
373  std::string get_device_location() const override { return _device_path; }
374  usb_spec get_usb_specification() const override { return _device_usb_spec; }
375 
376  bool is_platform_jetson() const override {return false;}
377 
378  protected:
379  virtual uint32_t get_cid(rs2_option option) const;
380 
381  virtual void capture_loop() override;
382 
383  virtual bool has_metadata() const override;
384 
385  virtual void streamon() const override;
386  virtual void streamoff() const override;
387  virtual void negotiate_kernel_buffers(size_t num) const override;
388 
389  virtual void allocate_io_buffers(size_t num) override;
390  virtual void map_device_descriptor() override;
391  virtual void unmap_device_descriptor() override;
392  virtual void set_format(stream_profile profile) override;
393  virtual void prepare_capture_buffers() override;
394  virtual void stop_data_capture() override;
395  virtual void acquire_metadata(buffers_mgr & buf_mgr,fd_set &fds, bool compressed_format = false) override;
396  virtual void set_metadata_attributes(buffers_mgr& buf_mgr, __u32 bytesused, uint8_t* md_start);
397  void subscribe_to_ctrl_event(uint32_t control_id);
398  void unsubscribe_from_ctrl_event(uint32_t control_id);
401  void populate_imu_data(metadata_hid_raw& meta_data, uint8_t* frame_start, uint8_t& md_size, void** md_start) const;
402  // checking if metadata is streamed
403  virtual inline bool is_metadata_streamed() const { return false;}
404  virtual inline std::shared_ptr<buffer> get_video_buffer(__u32 index) const {return _buffers[index];}
405  virtual inline std::shared_ptr<buffer> get_md_buffer(__u32 index) const {return nullptr;}
406 
412 
413  std::vector<std::shared_ptr<buffer>> _buffers;
416  std::atomic<bool> _is_capturing;
417  std::atomic<bool> _is_alive;
418  std::atomic<bool> _is_started;
419  std::unique_ptr<std::thread> _thread;
420  std::unique_ptr<named_mutex> _named_mtx;
421  struct device {
422  enum v4l2_buf_type buf_type;
423  unsigned char num_planes;
424  struct v4l2_capability cap;
425  struct v4l2_cropcap cropcap;
426  } _dev;
428  int _max_fd = 0; // specifies the maximal pipe number the polling process will monitor
429  std::vector<int> _fds; // list the file descriptors to be monitored during frames polling
430  buffers_mgr _buf_dispatch; // Holder for partial (MD only) frames that shall be preserved between 'select' calls when polling v4l buffers
431  int _fd = 0;
432  frame_drop_monitor _frame_drop_monitor; // used to check the frames drops kpi
434 
435  private:
436  int _stop_pipe_fd[2]; // write to _stop_pipe_fd[1] and read from _stop_pipe_fd[0]
437 
438  };
439 
440  // Composition layer for uvc/metadata split nodes introduced with kernel 4.16
442  {
443  public:
444  v4l_uvc_meta_device(const uvc_device_info& info, bool use_memory_map = false);
445 
446  virtual ~v4l_uvc_meta_device();
447 
448  bool is_platform_jetson() const override {return false;}
449 
450  protected:
451 
452  void streamon() const;
453  void streamoff() const;
454  void negotiate_kernel_buffers(size_t num) const;
455  void allocate_io_buffers(size_t num);
456  void map_device_descriptor();
460  virtual void acquire_metadata(buffers_mgr & buf_mgr,fd_set &fds, bool compressed_format=false);
461  // checking if metadata is streamed
462  virtual inline bool is_metadata_streamed() const { return _md_fd > 0;}
463  virtual inline std::shared_ptr<buffer> get_md_buffer(__u32 index) const {return _md_buffers[index];}
464  int _md_fd = -1;
467 
468  std::vector<std::shared_ptr<buffer>> _md_buffers;
469  };
470 
471  // D457 Development. To be merged into underlying class
473  {
474  public:
475  v4l_mipi_device(const uvc_device_info& info, bool use_memory_map = true);
476 
477  virtual ~v4l_mipi_device();
478 
479  bool get_pu(rs2_option opt, int32_t& value) const override;
480  bool set_pu(rs2_option opt, int32_t value) override;
481  bool set_xu(const extension_unit& xu, uint8_t control, const uint8_t* data, int size) override;
482  bool get_xu(const extension_unit& xu, uint8_t control, uint8_t* data, int size) const override;
483  control_range get_xu_range(const extension_unit& xu, uint8_t control, int len) const override;
485  void set_metadata_attributes(buffers_mgr& buf_mgr, __u32 bytesused, uint8_t* md_start) override;
486  bool is_platform_jetson() const override;
487  protected:
488  virtual uint32_t get_cid(rs2_option option) const;
489  uint32_t xu_to_cid(const extension_unit& xu, uint8_t control) const; // Find the mapping of XU to the underlying control
490  };
491 
492  class v4l_backend : public backend
493  {
494  public:
495  std::shared_ptr<uvc_device> create_uvc_device(uvc_device_info info) const override;
496  std::vector<uvc_device_info> query_uvc_devices() const override;
497 
498  std::shared_ptr<command_transfer> create_usb_device(usb_device_info info) const override;
499  std::vector<usb_device_info> query_usb_devices() const override;
500 
501  std::shared_ptr<hid_device> create_hid_device(hid_device_info info) const override;
502  std::vector<hid_device_info> query_hid_devices() const override;
503 
504  std::shared_ptr<device_watcher> create_device_watcher() const override;
505  };
506  }
507 }
librealsense::platform::v4l2_video_md_syncer::enqueue_buffer_before_throwing_it
void enqueue_buffer_before_throwing_it(const sync_buffer &sb) const
Definition: backend-v4l2.cpp:2954
librealsense::platform::v4l_mipi_device::set_xu
bool set_xu(const extension_unit &xu, uint8_t control, const uint8_t *data, int size) override
Definition: backend-v4l2.cpp:2612
librealsense::platform::v4l_uvc_meta_device::negotiate_kernel_buffers
void negotiate_kernel_buffers(size_t num) const
Definition: backend-v4l2.cpp:2338
librealsense::platform::v4l_uvc_device::get_pu
bool get_pu(rs2_option opt, int32_t &value) const override
Definition: backend-v4l2.cpp:1878
librealsense::platform::buffers_mgr::metadata_size
uint8_t metadata_size() const
Definition: backend-v4l2.h:217
librealsense::platform::v4l_uvc_device::unsubscribe_from_ctrl_event
void unsubscribe_from_ctrl_event(uint32_t control_id)
Definition: backend-v4l2.cpp:2258
librealsense::platform::v4l_uvc_meta_device::is_metadata_streamed
virtual bool is_metadata_streamed() const
Definition: backend-v4l2.h:462
librealsense
Definition: algo.h:18
uint8_t
unsigned char uint8_t
Definition: stdint.h:78
realdds::topics::metadata::header::key::timestamp
const std::string timestamp
Definition: dds/test-metadata.py:173
librealsense::platform::e_max_kernel_buf_type
@ e_max_kernel_buf_type
Definition: backend-v4l2.h:161
librealsense::platform::v4l_uvc_device::get_pu_range
control_range get_pu_range(rs2_option option) const override
Definition: backend-v4l2.cpp:1934
librealsense::platform::v4l_uvc_device
Definition: backend-v4l2.h:313
librealsense::platform::v4l_uvc_interface::allocate_io_buffers
virtual void allocate_io_buffers(size_t num)=0
librealsense::platform::v4l2_video_md_syncer::_md_queue
std::queue< sync_buffer > _md_queue
Definition: backend-v4l2.h:289
librealsense::platform::v4l_uvc_device::_name
std::string _name
Definition: backend-v4l2.h:408
test-librs-connections.n
n
Definition: test-librs-connections.py:38
librealsense::platform::v4l_uvc_device::stop_data_capture
virtual void stop_data_capture() override
Definition: backend-v4l2.cpp:1282
librealsense::platform::v4l_uvc_device::set_format
virtual void set_format(stream_profile profile) override
Definition: backend-v4l2.cpp:2213
librealsense::platform::buffer::_type
v4l2_buf_type _type
Definition: backend-v4l2.h:145
librealsense::platform::v4l_mipi_device::is_platform_jetson
bool is_platform_jetson() const override
Definition: backend-v4l2.cpp:1741
librealsense::platform::v4l_uvc_interface::prepare_capture_buffers
virtual void prepare_capture_buffers()=0
librealsense::platform::buffer::_buf
v4l2_buffer _buf
Definition: backend-v4l2.h:152
librealsense::platform::v4l_uvc_device::stop_callbacks
void stop_callbacks() override
Definition: backend-v4l2.cpp:1302
librealsense::platform::buffer::_mutex
std::mutex _mutex
Definition: backend-v4l2.h:153
librealsense::platform::hid_device_info
Definition: hid-device-info.h:13
uvc-device.h
librealsense::platform::v4l_uvc_device::get_xu
bool get_xu(const extension_unit &xu, uint8_t control, uint8_t *data, int size) const override
Definition: backend-v4l2.cpp:1787
librealsense::platform::v4l_uvc_device::subscribe_to_ctrl_event
void subscribe_to_ctrl_event(uint32_t control_id)
Definition: backend-v4l2.cpp:2245
librealsense::platform::v4l2_video_md_syncer::stop
void stop()
Definition: backend-v4l2.cpp:2976
librealsense::platform::named_mutex::_mutex
std::mutex _mutex
Definition: backend-v4l2.h:118
librealsense::platform::uvc_device
Definition: platform/uvc-device.h:114
librealsense::platform::v4l_uvc_device::fourcc_to_string
std::string fourcc_to_string(uint32_t id) const
Definition: backend-v4l2.cpp:1326
librealsense::platform::v4l_mipi_device::get_cid
virtual uint32_t get_cid(rs2_option option) const
Definition: backend-v4l2.cpp:2707
librealsense::platform::v4l_uvc_meta_device::v4l_uvc_meta_device
v4l_uvc_meta_device(const uvc_device_info &info, bool use_memory_map=false)
Definition: backend-v4l2.cpp:2290
librealsense::platform::named_mutex::_object_lock_counter
int _object_lock_counter
Definition: backend-v4l2.h:117
librealsense::platform::frame_drop_monitor::update_and_check_kpi
bool update_and_check_kpi(const stream_profile &profile, const timeval &timestamp)
Definition: backend-v4l2.cpp:1090
librealsense::platform::v4l_uvc_device::populate_imu_data
void populate_imu_data(metadata_hid_raw &meta_data, uint8_t *frame_start, uint8_t &md_size, void **md_start) const
Definition: backend-v4l2.cpp:1657
librealsense::platform::buffers_mgr::_md_size
uint8_t _md_size
Definition: backend-v4l2.h:231
librealsense::platform::v4l_uvc_device::get_info_from_mipi_device_path
static uvc_device_info get_info_from_mipi_device_path(const std::string &video_path, const std::string &name)
Definition: backend-v4l2.cpp:825
librealsense::platform::v4l_mipi_device::~v4l_mipi_device
virtual ~v4l_mipi_device()
Definition: backend-v4l2.cpp:2553
data
Definition: parser.hpp:153
librealsense::platform::buffers_mgr::~buffers_mgr
~buffers_mgr()
Definition: backend-v4l2.h:210
librealsense::platform::v4l_uvc_device::get_video_paths
static std::vector< std::string > get_video_paths()
Definition: backend-v4l2.cpp:639
librealsense::platform::v4l_uvc_device::poll
void poll()
Definition: backend-v4l2.cpp:1369
librealsense::platform::v4l_uvc_meta_device::prepare_capture_buffers
void prepare_capture_buffers()
Definition: backend-v4l2.cpp:2488
librealsense::platform::v4l_uvc_device::close
void close(stream_profile) override
Definition: backend-v4l2.cpp:1307
librealsense::platform::v4l_uvc_meta_device::_md_type
v4l2_buf_type _md_type
Definition: backend-v4l2.h:466
index
GLuint index
Definition: glad/glad/glad.h:2777
librealsense::platform::v4l_uvc_device::capture_loop
virtual void capture_loop() override
Definition: backend-v4l2.cpp:2079
librealsense::platform::v4l_uvc_device::_buf_dispatch
buffers_mgr _buf_dispatch
Definition: backend-v4l2.h:430
librealsense::metadata_hid_raw
metadata_hid_raw - HID metadata structure layout populated by backend
Definition: src/metadata.h:807
string
GLsizei const GLchar *const * string
Definition: glad/glad/glad.h:2861
librealsense::platform::frame_drop_monitor::_kpi_frames_drops_pct
double _kpi_frames_drops_pct
Definition: backend-v4l2.h:310
uvc_meta_buffer::flags
__u8 flags
Definition: backend-v4l2.h:82
librealsense::platform::buffer::_offset
uint32_t _offset
Definition: backend-v4l2.h:149
librealsense::platform::named_mutex::_init_mutex
static std::recursive_mutex _init_mutex
Definition: backend-v4l2.h:114
librealsense::platform::named_mutex::lock
void lock()
Definition: backend-v4l2.cpp:191
librealsense::platform::v4l_uvc_device::get_usb_specification
usb_spec get_usb_specification() const override
Definition: backend-v4l2.h:374
librealsense::platform::named_mutex::unlock
void unlock()
Definition: backend-v4l2.cpp:197
librealsense::platform::v4l2_video_md_syncer::start
void start()
Definition: backend-v4l2.h:279
librealsense::platform::v4l_uvc_device::allocate_io_buffers
virtual void allocate_io_buffers(size_t num) override
Definition: backend-v4l2.cpp:2120
librealsense::platform::v4l2_video_md_syncer::push_video
void push_video(const sync_buffer &video_buffer)
Definition: backend-v4l2.cpp:2823
librealsense::platform::v4l_backend
Definition: backend-v4l2.h:492
librealsense::platform::v4l_uvc_interface::set_format
virtual void set_format(stream_profile profile)=0
librealsense::platform::v4l_uvc_device::_buffers
std::vector< std::shared_ptr< buffer > > _buffers
Definition: backend-v4l2.h:413
librealsense::platform::v4l_uvc_device::get_md_buffer
virtual std::shared_ptr< buffer > get_md_buffer(__u32 index) const
Definition: backend-v4l2.h:405
LOCAL_V4L2_BUF_TYPE_META_CAPTURE
constexpr auto LOCAL_V4L2_BUF_TYPE_META_CAPTURE
Definition: backend-v4l2.h:74
librealsense::platform::v4l_uvc_meta_device::_md_name
std::string _md_name
Definition: backend-v4l2.h:465
example1 - object detection.num
num
Definition: example1 - object detection.py:54
librealsense::platform::v4l_uvc_device::set_metadata_attributes
virtual void set_metadata_attributes(buffers_mgr &buf_mgr, __u32 bytesused, uint8_t *md_start)
Definition: backend-v4l2.cpp:1729
librealsense::platform::v4l_uvc_device::negotiate_kernel_buffers
virtual void negotiate_kernel_buffers(size_t num) const override
Definition: backend-v4l2.cpp:2113
librealsense::platform::v4l2_video_md_syncer::sync_buffer::_buffer_index
__u32 _buffer_index
Definition: backend-v4l2.h:266
librealsense::platform::named_mutex::~named_mutex
~named_mutex()
Definition: backend-v4l2.cpp:179
librealsense::platform::v4l_uvc_device::get_info_from_usb_device_path
static uvc_device_info get_info_from_usb_device_path(const std::string &video_path, const std::string &name)
Definition: backend-v4l2.cpp:735
librealsense::platform::v4l_uvc_interface::map_device_descriptor
virtual void map_device_descriptor()=0
librealsense::platform::buffers_mgr::verify_vd_md_sync
bool verify_vd_md_sync() const
Definition: backend-v4l2.cpp:483
librealsense::platform::usb_spec
usb_spec
Definition: usb-types.h:112
librealsense::platform::buffers_mgr::_mmap_bufs
bool _mmap_bufs
Definition: backend-v4l2.h:232
librealsense::platform::v4l_uvc_device::pend_for_ctrl_status_event
bool pend_for_ctrl_status_event()
Definition: backend-v4l2.cpp:2272
librealsense::platform::named_mutex::release
void release()
Definition: backend-v4l2.cpp:246
librealsense::platform::v4l_mipi_device::v4l_mipi_device
v4l_mipi_device(const uvc_device_info &info, bool use_memory_map=true)
Definition: backend-v4l2.cpp:2549
librealsense::platform::v4l_uvc_device::is_usb_device_path
static bool is_usb_device_path(const std::string &video_path)
Definition: backend-v4l2.cpp:906
librealsense::platform::v4l2_video_md_syncer::v4l2_video_md_syncer
v4l2_video_md_syncer()
Definition: backend-v4l2.h:260
librealsense::platform::xioctl
static int xioctl(int fh, unsigned long request, void *arg)
Definition: backend-v4l2.cpp:283
librealsense::platform::v4l_uvc_meta_device
Definition: backend-v4l2.h:441
librealsense::platform::v4l_uvc_meta_device::_md_buffers
std::vector< std::shared_ptr< buffer > > _md_buffers
Definition: backend-v4l2.h:468
librealsense::platform::v4l_uvc_meta_device::set_format
void set_format(stream_profile profile)
Definition: backend-v4l2.cpp:2428
librealsense::platform::v4l_mipi_device::get_xu_range
control_range get_xu_range(const extension_unit &xu, uint8_t control, int len) const override
Definition: backend-v4l2.cpp:2678
librealsense::platform::frame_drop_monitor::drops_per_stream
std::vector< std::pair< stream_profile, std::deque< long int > > > drops_per_stream
Definition: backend-v4l2.h:309
librealsense::platform::buffer::~buffer
~buffer()
Definition: backend-v4l2.cpp:358
librealsense::platform::buffers_mgr::handle_buffer
void handle_buffer(supported_kernel_buf_types buf_type, int file_desc, v4l2_buffer buf=v4l2_buffer(), std::shared_ptr< platform::buffer > data_buf=nullptr)
Definition: backend-v4l2.cpp:406
librealsense::platform::buffer::get_frame_start
uint8_t * get_frame_start() const
Definition: backend-v4l2.h:140
librealsense::platform::supported_kernel_buf_types
supported_kernel_buf_types
Definition: backend-v4l2.h:157
librealsense::platform::v4l2_video_md_syncer::sync_buffer::_v4l2_buf
std::shared_ptr< v4l2_buffer > _v4l2_buf
Definition: backend-v4l2.h:264
librealsense::platform::v4l_uvc_device::_fds
std::vector< int > _fds
Definition: backend-v4l2.h:429
type
GLenum type
Definition: glad/glad/glad.h:135
uvc_meta_buffer::sof
__u16 sof
Definition: backend-v4l2.h:80
size
GLsizeiptr size
Definition: glad/glad/glad.h:2734
librealsense::platform::v4l_uvc_device::_video_md_syncer
v4l2_video_md_syncer _video_md_syncer
Definition: backend-v4l2.h:433
librealsense::platform::named_mutex::_timeout
uint32_t _timeout
Definition: backend-v4l2.h:112
librealsense::platform::v4l_uvc_device::_device_path
std::string _device_path
Definition: backend-v4l2.h:409
librealsense::platform::v4l_uvc_device::_info
uvc_device_info _info
Definition: backend-v4l2.h:411
librealsense::platform::v4l_uvc_meta_device::unmap_device_descriptor
void unmap_device_descriptor()
Definition: backend-v4l2.cpp:2416
librealsense::platform::v4l_uvc_device::_fd
int _fd
Definition: backend-v4l2.h:431
librealsense::platform::v4l_backend::query_uvc_devices
std::vector< uvc_device_info > query_uvc_devices() const override
Definition: backend-v4l2.cpp:2769
librealsense::platform::v4l_uvc_device::probe_and_commit
void probe_and_commit(stream_profile profile, frame_callback callback, int buffers) override
Definition: backend-v4l2.cpp:1180
librealsense::platform::v4l_uvc_device::_thread
std::unique_ptr< std::thread > _thread
Definition: backend-v4l2.h:419
librealsense::platform::frame_drop_monitor
Definition: backend-v4l2.h:299
librealsense::platform::D3
@ D3
Definition: platform/uvc-device.h:57
librealsense::platform::v4l_uvc_meta_device::streamon
void streamon() const
Definition: backend-v4l2.cpp:2301
librealsense::platform::v4l2_video_md_syncer::enqueue_front_buffer_before_throwing_it
void enqueue_front_buffer_before_throwing_it(std::queue< sync_buffer > &sync_queue)
Definition: backend-v4l2.cpp:2964
librealsense::platform::v4l_uvc_meta_device::allocate_io_buffers
void allocate_io_buffers(size_t num)
Definition: backend-v4l2.cpp:2352
librealsense::platform::v4l_uvc_meta_device::is_platform_jetson
bool is_platform_jetson() const override
Definition: backend-v4l2.h:448
librealsense::platform::v4l_uvc_device::device::cap
struct v4l2_capability cap
Definition: backend-v4l2.h:424
librealsense::platform::v4l_uvc_device::signal_stop
void signal_stop()
Definition: backend-v4l2.cpp:1335
librealsense::platform::frame_callback
std::function< void(stream_profile, frame_object, std::function< void() >) > frame_callback
Definition: platform/uvc-device.h:80
uint32_t
unsigned int uint32_t
Definition: stdint.h:80
librealsense::platform::named_mutex::_device_path
std::string _device_path
Definition: backend-v4l2.h:111
librealsense::platform::v4l_uvc_device::_max_fd
int _max_fd
Definition: backend-v4l2.h:428
librealsense::platform::v4l2_video_md_syncer
Definition: backend-v4l2.h:257
librealsense::platform::buffers_mgr::set_md_from_video_node
void set_md_from_video_node(bool compressed)
Definition: backend-v4l2.cpp:442
librealsense::platform::v4l_uvc_interface::capture_loop
virtual void capture_loop()=0
librealsense::platform::named_mutex::_dev_mutex
static std::map< std::string, std::recursive_mutex > _dev_mutex
Definition: backend-v4l2.h:115
librealsense::platform::v4l_mipi_device::get_pu
bool get_pu(rs2_option opt, int32_t &value) const override
Definition: backend-v4l2.cpp:2572
librealsense::platform::buffer::_use_memory_map
bool _use_memory_map
Definition: backend-v4l2.h:150
librealsense::platform::v4l_uvc_interface::has_metadata
virtual bool has_metadata() const =0
librealsense::platform::v4l_mipi_device::get_xu
bool get_xu(const extension_unit &xu, uint8_t control, uint8_t *data, int size) const override
Definition: backend-v4l2.cpp:2642
librealsense::platform::v4l_uvc_device::set_power_state
void set_power_state(power_state state) override
Definition: backend-v4l2.cpp:1759
librealsense::platform::v4l_uvc_device::upload_video_and_metadata_from_syncer
void upload_video_and_metadata_from_syncer(buffers_mgr &buf_mgr)
Definition: backend-v4l2.cpp:1671
librealsense::platform::v4l_uvc_device::streamoff
virtual void streamoff() const override
Definition: backend-v4l2.cpp:2108
buffers
const GLuint * buffers
Definition: glad/glad/glad.h:2725
librealsense::platform::v4l_uvc_meta_device::map_device_descriptor
void map_device_descriptor()
Definition: backend-v4l2.cpp:2376
librealsense::platform::v4l_uvc_device::_callback
frame_callback _callback
Definition: backend-v4l2.h:415
librealsense::platform::v4l_uvc_device::device
Definition: backend-v4l2.h:421
librealsense::platform::v4l_uvc_interface::acquire_metadata
virtual void acquire_metadata(buffers_mgr &buf_mgr, fd_set &fds, bool compressed_format)=0
librealsense::platform::buffer::_must_enqueue
bool _must_enqueue
Definition: backend-v4l2.h:154
value
GLfloat value
Definition: glad/glad/glad.h:2099
librealsense::platform::buffers_mgr
Definition: backend-v4l2.h:201
librealsense::platform::v4l_uvc_device::unlock
void unlock() const override
Definition: backend-v4l2.cpp:2052
librealsense::platform::v4l_uvc_device::is_usb_path_valid
static bool is_usb_path_valid(const std::string &usb_video_path, const std::string &dev_name, std::string &busnum, std::string &devnum, std::string &devpath)
Definition: backend-v4l2.cpp:699
librealsense::platform::v4l2_video_md_syncer::pull_video_with_metadata
bool pull_video_with_metadata(std::shared_ptr< v4l2_buffer > &video_buffer, std::shared_ptr< v4l2_buffer > &md_buffer, int &video_fd, int &md_fd)
Definition: backend-v4l2.cpp:2869
librealsense::platform::extension_unit
Definition: platform/uvc-device.h:46
librealsense::platform::v4l_uvc_device::_is_alive
std::atomic< bool > _is_alive
Definition: backend-v4l2.h:417
librealsense::platform::v4l_uvc_device::_frame_drop_monitor
frame_drop_monitor _frame_drop_monitor
Definition: backend-v4l2.h:432
librealsense::platform::buffer::buffer
buffer(int fd, v4l2_buf_type type, bool use_memory_map, uint32_t index)
Definition: backend-v4l2.cpp:292
librealsense::platform::kernel_buf_guard::_file_desc
int _file_desc
Definition: backend-v4l2.h:196
librealsense::platform::v4l_mipi_device::set_metadata_attributes
void set_metadata_attributes(buffers_mgr &buf_mgr, __u32 bytesused, uint8_t *md_start) override
Definition: backend-v4l2.cpp:1736
librealsense::platform::v4l_uvc_device::init_xu
void init_xu(const extension_unit &) override
Definition: backend-v4l2.h:357
librealsense::platform::v4l_uvc_device::get_power_state
power_state get_power_state() const override
Definition: backend-v4l2.h:355
librealsense::platform::v4l_uvc_device::_state
power_state _state
Definition: backend-v4l2.h:407
librealsense::platform::v4l_uvc_device::get_video_buffer
virtual std::shared_ptr< buffer > get_video_buffer(__u32 index) const
Definition: backend-v4l2.h:404
librealsense::platform::power_state
power_state
Definition: platform/uvc-device.h:54
librealsense::platform::v4l_uvc_device::start_callbacks
void start_callbacks() override
Definition: backend-v4l2.cpp:1297
librealsense::platform::v4l_backend::query_usb_devices
std::vector< usb_device_info > query_usb_devices() const override
Definition: backend-v4l2.cpp:2789
librealsense::platform::v4l_uvc_device::get_mipi_device_info
static void get_mipi_device_info(const std::string &dev_name, std::string &bus_info, std::string &card)
Definition: backend-v4l2.cpp:791
realdds::topics::reply::key::control
const std::string control
librealsense::platform::v4l_uvc_device::_use_memory_map
bool _use_memory_map
Definition: backend-v4l2.h:427
librealsense::platform::v4l_uvc_meta_device::get_md_buffer
virtual std::shared_ptr< buffer > get_md_buffer(__u32 index) const
Definition: backend-v4l2.h:463
librealsense::platform::control_range
Definition: platform/uvc-device.h:83
librealsense::platform::buffer::get_length_frame_only
uint32_t get_length_frame_only() const
Definition: backend-v4l2.h:138
devices.action
action
Definition: third-party/realdds/scripts/devices.py:6
rs2_option
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls,...
Definition: rs_option.h:26
librealsense::platform::v4l_uvc_device::stream_on
void stream_on(std::function< void(const notification &n)> error_handler) override
Definition: backend-v4l2.cpp:1257
librealsense::platform::v4l_uvc_device::device::buf_type
enum v4l2_buf_type buf_type
Definition: backend-v4l2.h:422
backend.h
librealsense::platform::v4l_uvc_device::streamon
virtual void streamon() const override
Definition: backend-v4l2.cpp:2103
librealsense::platform::v4l_mipi_device::xu_to_cid
uint32_t xu_to_cid(const extension_unit &xu, uint8_t control) const
Definition: backend-v4l2.cpp:2732
name
GLuint const GLchar * name
Definition: glad/glad/glad.h:2777
librealsense::platform::v4l_uvc_device::_stop_pipe_fd
int _stop_pipe_fd[2]
Definition: backend-v4l2.h:436
uvc_meta_buffer::ns
__u64 ns
Definition: backend-v4l2.h:79
librealsense::platform::v4l_uvc_interface::unmap_device_descriptor
virtual void unmap_device_descriptor()=0
librealsense::platform::buffers_mgr::md_node_present
bool md_node_present() const
Definition: backend-v4l2.cpp:496
librealsense::platform::v4l2_video_md_syncer::sync_buffer::_fd
int _fd
Definition: backend-v4l2.h:265
librealsense::platform::v4l_uvc_device::_dev
struct librealsense::platform::v4l_uvc_device::device _dev
librealsense::platform::v4l_uvc_device::has_metadata
virtual bool has_metadata() const override
Definition: backend-v4l2.cpp:2098
librealsense::platform::v4l_uvc_device::is_metadata_streamed
virtual bool is_metadata_streamed() const
Definition: backend-v4l2.h:403
librealsense::platform::buffers_mgr::buffers
std::array< kernel_buf_guard, e_max_kernel_buf_type > buffers
Definition: backend-v4l2.h:235
uvc_meta_buffer
Definition: backend-v4l2.h:78
librealsense::platform::buffers_mgr::get_buffers
std::array< kernel_buf_guard, e_max_kernel_buf_type > & get_buffers()
Definition: backend-v4l2.h:226
fps.info
info
Definition: fps.py:50
librealsense::platform::named_mutex::_fildes
int _fildes
Definition: backend-v4l2.h:113
librealsense::platform::backend
Definition: backend.h:33
librealsense::platform::e_metadata_buf
@ e_metadata_buf
Definition: backend-v4l2.h:160
librealsense::platform::v4l_backend::create_uvc_device
std::shared_ptr< uvc_device > create_uvc_device(uvc_device_info info) const override
Definition: backend-v4l2.cpp:2759
librealsense::platform::v4l_uvc_device::v4l_uvc_device
v4l_uvc_device(const uvc_device_info &info, bool use_memory_map=false)
Definition: backend-v4l2.cpp:1141
librealsense::platform::buffer::_original_length
uint32_t _original_length
Definition: backend-v4l2.h:148
librealsense::platform::v4l_uvc_device::map_device_descriptor
virtual void map_device_descriptor() override
Definition: backend-v4l2.cpp:2139
librealsense::platform::v4l_backend::create_device_watcher
std::shared_ptr< device_watcher > create_device_watcher() const override
Definition: backend-v4l2.cpp:2809
librealsense::platform::v4l_uvc_device::prepare_capture_buffers
virtual void prepare_capture_buffers() override
Definition: backend-v4l2.cpp:1277
librealsense::platform::named_mutex::acquire
void acquire()
Definition: backend-v4l2.cpp:220
librealsense::platform::buffers_mgr::_md_start
void * _md_start
Definition: backend-v4l2.h:230
librealsense::notification
Definition: notification.h:14
LOG_DEBUG_V4L
#define LOG_DEBUG_V4L(...)
Definition: backend-v4l2.h:70
uvc_meta_buffer::buf
__u8 * buf
Definition: backend-v4l2.h:83
librealsense::platform::buffer::prepare_for_streaming
void prepare_for_streaming(int fd)
Definition: backend-v4l2.cpp:336
librealsense::platform::named_mutex::named_mutex
named_mutex(const std::string &device_path, unsigned timeout)
Definition: backend-v4l2.cpp:164
librealsense::platform::v4l_uvc_device::device::cropcap
struct v4l2_cropcap cropcap
Definition: backend-v4l2.h:425
librealsense::platform::v4l_uvc_device::~v4l_uvc_device
virtual ~v4l_uvc_device() override
Definition: backend-v4l2.cpp:1170
librealsense::platform::v4l_uvc_device::get_cid
virtual uint32_t get_cid(rs2_option option) const
Definition: backend-v4l2.cpp:2057
librealsense::platform::usb_undefined
@ usb_undefined
Definition: usb-types.h:113
librealsense::platform::named_mutex::try_lock
bool try_lock()
Definition: backend-v4l2.cpp:203
librealsense::platform::v4l_uvc_device::get_profiles
std::vector< stream_profile > get_profiles() const override
Definition: backend-v4l2.cpp:1960
librealsense::platform::v4l2_video_md_syncer::_video_queue
std::queue< sync_buffer > _video_queue
Definition: backend-v4l2.h:288
librealsense::platform::v4l_uvc_device::unmap_device_descriptor
virtual void unmap_device_descriptor() override
Definition: backend-v4l2.cpp:2198
librealsense::platform::v4l_uvc_device::_device_usb_spec
usb_spec _device_usb_spec
Definition: backend-v4l2.h:410
librealsense::platform::v4l_uvc_device::_is_started
std::atomic< bool > _is_started
Definition: backend-v4l2.h:418
librealsense::platform::buffer
Definition: backend-v4l2.h:122
librealsense::platform::e_video_buf
@ e_video_buf
Definition: backend-v4l2.h:159
librealsense::platform::v4l_uvc_meta_device::streamoff
void streamoff() const
Definition: backend-v4l2.cpp:2322
librealsense::platform::v4l_uvc_device::get_device_location
std::string get_device_location() const override
Definition: backend-v4l2.h:373
int32_t
signed int int32_t
Definition: stdint.h:77
librealsense::platform::v4l_uvc_device::acquire_metadata
virtual void acquire_metadata(buffers_mgr &buf_mgr, fd_set &fds, bool compressed_format=false) override
Definition: backend-v4l2.cpp:1751
librealsense::platform::buffers_mgr::request_next_frame
void request_next_frame()
Definition: backend-v4l2.cpp:430
librealsense::platform::v4l_uvc_device::_is_capturing
std::atomic< bool > _is_capturing
Definition: backend-v4l2.h:416
librealsense::option
Definition: option-interface.h:22
librealsense::platform::v4l_uvc_device::_profile
stream_profile _profile
Definition: backend-v4l2.h:414
librealsense::platform::kernel_buf_guard::_dq_buf
v4l2_buffer _dq_buf
Definition: backend-v4l2.h:195
librealsense::platform::v4l_mipi_device::get_pu_range
control_range get_pu_range(rs2_option option) const override
Definition: backend-v4l2.cpp:2702
librealsense::platform::v4l_uvc_device::set_xu
bool set_xu(const extension_unit &xu, uint8_t control, const uint8_t *data, int size) override
Definition: backend-v4l2.cpp:1773
librealsense::platform::v4l_uvc_meta_device::_md_fd
int _md_fd
Definition: backend-v4l2.h:464
state
Definition: rs-measure.cpp:80
librealsense::platform::v4l2_video_md_syncer::_is_ready
bool _is_ready
Definition: backend-v4l2.h:290
librealsense::platform::v4l_uvc_meta_device::~v4l_uvc_meta_device
virtual ~v4l_uvc_meta_device()
Definition: backend-v4l2.cpp:2297
librealsense::platform::v4l_uvc_device::get_xu_range
control_range get_xu_range(const extension_unit &xu, uint8_t control, int len) const override
Definition: backend-v4l2.cpp:1802
librealsense::platform::v4l_uvc_device::foreach_uvc_device
static void foreach_uvc_device(std::function< void(const uvc_device_info &, const std::string &)> action)
Definition: backend-v4l2.cpp:912
librealsense::platform::kernel_buf_guard::_managed
bool _managed
Definition: backend-v4l2.h:197
librealsense::platform::buffer::_start
uint8_t * _start
Definition: backend-v4l2.h:146
librealsense::platform::buffer::attach_buffer
void attach_buffer(const v4l2_buffer &buf)
Definition: backend-v4l2.cpp:371
librealsense::platform::v4l_uvc_interface::streamoff
virtual void streamoff() const =0
librealsense::platform::buffers_mgr::buffers_mgr
buffers_mgr(bool memory_mapped_buf)
Definition: backend-v4l2.h:204
librealsense::platform::v4l_backend::create_usb_device
std::shared_ptr< command_transfer > create_usb_device(usb_device_info info) const override
Definition: backend-v4l2.cpp:2781
librealsense::platform::v4l_uvc_interface::negotiate_kernel_buffers
virtual void negotiate_kernel_buffers(size_t num) const =0
librealsense::platform::v4l_backend::query_hid_devices
std::vector< hid_device_info > query_hid_devices() const override
Definition: backend-v4l2.cpp:2800
librealsense::platform::kernel_buf_guard::~kernel_buf_guard
~kernel_buf_guard()
Definition: backend-v4l2.h:168
librealsense::platform::buffers_mgr::metadata_start
void * metadata_start() const
Definition: backend-v4l2.h:218
librealsense::platform::v4l2_video_md_syncer::push_metadata
void push_metadata(const sync_buffer &md_buffer)
Definition: backend-v4l2.cpp:2842
librealsense::platform::buffer::get_full_length
uint32_t get_full_length() const
Definition: backend-v4l2.h:137
librealsense::platform::named_mutex::_dev_mutex_cnt
static std::map< std::string, int > _dev_mutex_cnt
Definition: backend-v4l2.h:116
librealsense::platform::v4l_mipi_device
Definition: backend-v4l2.h:472
librealsense::platform::v4l_uvc_device::device::num_planes
unsigned char num_planes
Definition: backend-v4l2.h:423
metadata.h
librealsense::platform::v4l2_video_md_syncer::flush_queues
void flush_queues()
Definition: backend-v4l2.cpp:2982
librealsense::platform::v4l_uvc_interface
Definition: backend-v4l2.h:238
librealsense::platform::v4l_backend::create_hid_device
std::shared_ptr< hid_device > create_hid_device(hid_device_info info) const override
Definition: backend-v4l2.cpp:2795
librealsense::platform::v4l_uvc_meta_device::acquire_metadata
virtual void acquire_metadata(buffers_mgr &buf_mgr, fd_set &fds, bool compressed_format=false)
Definition: backend-v4l2.cpp:2502
metadata_node
constexpr bool metadata_node
Definition: backend-v4l2.h:50
librealsense::platform::v4l_uvc_interface::streamon
virtual void streamon() const =0
librealsense::platform::buffer::_index
uint32_t _index
Definition: backend-v4l2.h:151
librealsense::platform::v4l2_video_md_syncer::_syncer_mutex
std::mutex _syncer_mutex
Definition: backend-v4l2.h:287
librealsense::platform::frame_drop_monitor::frame_drop_monitor
frame_drop_monitor(double kpi_frames_drops_percentage)
Definition: backend-v4l2.h:302
librealsense::platform::buffer::use_memory_map
bool use_memory_map() const
Definition: backend-v4l2.h:142
librealsense::platform::v4l_uvc_device::lock
void lock() const override
Definition: backend-v4l2.cpp:2048
librealsense::platform::kernel_buf_guard
Definition: backend-v4l2.h:166
librealsense::platform::kernel_buf_guard::_data_buf
std::shared_ptr< platform::buffer > _data_buf
Definition: backend-v4l2.h:194
librealsense::platform::buffer::request_next_frame
void request_next_frame(int fd, bool force=false)
Definition: backend-v4l2.cpp:384
librealsense::platform::v4l_uvc_interface::stop_data_capture
virtual void stop_data_capture()=0
librealsense::platform::v4l2_video_md_syncer::sync_buffer
Definition: backend-v4l2.h:262
librealsense::platform::v4l_uvc_device::is_platform_jetson
bool is_platform_jetson() const override
Definition: backend-v4l2.h:376
librealsense::platform::stream_profile
Definition: platform/stream-profile.h:17
librealsense::platform::buffer::detach_buffer
void detach_buffer()
Definition: backend-v4l2.cpp:378
timeout
GLbitfield GLuint64 timeout
Definition: glad/glad/glad.h:3384
librealsense::platform::uvc_device_info
Definition: uvc-device-info.h:15
librealsense::platform::v4l_uvc_device::set_pu
bool set_pu(rs2_option opt, int32_t value) override
Definition: backend-v4l2.cpp:1895
librealsense::platform::named_mutex
Definition: backend-v4l2.h:92
librealsense::platform::v4l_mipi_device::set_pu
bool set_pu(rs2_option opt, int32_t value) override
Definition: backend-v4l2.cpp:2593
uvc_meta_buffer::length
__u8 length
Definition: backend-v4l2.h:81
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glad/glad/glad.h:3610
librealsense::platform::buffer::_length
uint32_t _length
Definition: backend-v4l2.h:147
profile
Definition: unit-tests-common.h:58
librealsense::platform::usb_device_info
Definition: usb-types.h:146
librealsense::platform::v4l_uvc_device::_named_mtx
std::unique_ptr< named_mutex > _named_mtx
Definition: backend-v4l2.h:420
librealsense::platform::buffers_mgr::set_md_attributes
void set_md_attributes(uint8_t md_size, void *md_start)
Definition: backend-v4l2.h:220


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:01