uvc-parser.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 "uvc-types.h"
7 #include "../types.h"
8 
9 #include "stdio.h"
10 #include "stdlib.h"
11 #include <cstring>
12 #include <string>
13 #include <chrono>
14 #include <thread>
15 
16 typedef void(uvc_frame_callback_t)(struct librealsense::platform::frame_object *frame, void *user_ptr);
17 
18 namespace librealsense
19 {
20  namespace platform
21  {
22  class uvc_parser
23  {
24  public:
26  virtual ~uvc_parser();
27 
32  const std::map<int,std::vector<uvc_format_desc_t>>& get_formats() { return _formats; }
33 
34  private:
35  void scan_control(int interface_number);
36  void scan_streaming(int interface_number);
37 
38  void parse_video_control(const std::vector<uint8_t>& block);
39  void parse_video_control_header(const std::vector<uint8_t>& block);
40  void parse_video_control_input_terminal(const std::vector<uint8_t>& block);
41  void parse_video_control_selector_unit(const std::vector<uint8_t>& block);
42  void parse_video_control_processing_unit(const std::vector<uint8_t>& block);
43  void parse_video_control_extension_unit(const std::vector<uint8_t>& block);
44 
45  void parse_video_stream_format(int interface_number, int index);
46  void parse_video_stream_frame(int interface_number, int index);
47 
48  void parse_video_stream_input_header(const std::vector<uint8_t>& block);
49 
50  void parse_video_stream_frame_format(const std::vector<uint8_t>& block, uvc_format_desc_t& format);
51  void parse_video_stream_format_uncompressed(const std::vector<uint8_t>& block, uvc_format_desc_t& format);
52  void parse_video_stream_format_mjpeg(const std::vector<uint8_t>& block, uvc_format_desc_t& format);
53 
54  void parse_video_stream_frame_uncompressed(const std::vector<uint8_t>& block, uvc_format_desc_t& format);
55  void parse_video_stream_frame_frame(const std::vector<uint8_t>& block, uvc_format_desc_t& format);
56 
57 
59 
61 
62  // uvc internal
71 
72  std::map<int,std::vector<uvc_format_desc_t>> _formats;
73  };
74  }
75 }
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
const uvc_device_info _info
Definition: uvc-parser.h:58
void parse_video_stream_format_mjpeg(const std::vector< uint8_t > &block, uvc_format_desc_t &format)
Definition: uvc-parser.cpp:55
uvc_extension_unit_t _extension_unit
Definition: uvc-parser.h:70
uvc_processing_unit_t get_processing_unit()
Definition: uvc-parser.h:28
void parse_video_stream_input_header(const std::vector< uint8_t > &block)
Definition: uvc-parser.cpp:34
std::map< int, std::vector< uvc_format_desc_t > > _formats
Definition: uvc-parser.h:72
unsigned short uint16_t
Definition: stdint.h:79
void parse_video_control_extension_unit(const std::vector< uint8_t > &block)
Definition: uvc-parser.cpp:296
void scan_streaming(int interface_number)
Definition: uvc-parser.cpp:196
void( uvc_frame_callback_t)(struct librealsense::platform::frame_object *frame, void *user_ptr)
Definition: uvc-parser.h:16
unsigned char uint8_t
Definition: stdint.h:78
uvc_input_terminal_t _input_terminal
Definition: uvc-parser.h:67
uvc_processing_unit_t _processing_unit
Definition: uvc-parser.h:69
GLuint index
uvc_selector_unit_t _selector_unit
Definition: uvc-parser.h:68
def info(name, value, persistent=False)
Definition: test.py:301
void parse_video_control_processing_unit(const std::vector< uint8_t > &block)
Definition: uvc-parser.cpp:287
GLint GLint GLsizei GLint GLenum format
uvc_input_terminal_t get_input_terminal()
Definition: uvc-parser.h:29
void parse_video_control(const std::vector< uint8_t > &block)
Definition: uvc-parser.cpp:312
void parse_video_control_input_terminal(const std::vector< uint8_t > &block)
Definition: uvc-parser.cpp:265
void parse_video_control_selector_unit(const std::vector< uint8_t > &block)
Definition: uvc-parser.cpp:282
void parse_video_stream_frame_format(const std::vector< uint8_t > &block, uvc_format_desc_t &format)
Definition: uvc-parser.cpp:69
void parse_video_stream_frame_frame(const std::vector< uint8_t > &block, uvc_format_desc_t &format)
Definition: uvc-parser.cpp:117
void parse_video_stream_format(int interface_number, int index)
Definition: uvc-parser.cpp:147
void parse_video_stream_frame_uncompressed(const std::vector< uint8_t > &block, uvc_format_desc_t &format)
Definition: uvc-parser.cpp:84
void parse_video_stream_format_uncompressed(const std::vector< uint8_t > &block, uvc_format_desc_t &format)
Definition: uvc-parser.cpp:40
const std::map< int, std::vector< uvc_format_desc_t > > & get_formats()
Definition: uvc-parser.h:32
void scan_control(int interface_number)
Definition: uvc-parser.cpp:365
void parse_video_stream_frame(int interface_number, int index)
Definition: uvc-parser.cpp:175
std::shared_ptr< usb_device > rs_usb_device
Definition: usb-device.h:29
void parse_video_control_header(const std::vector< uint8_t > &block)
Definition: uvc-parser.cpp:242
uvc_parser(const rs_usb_device &usb_device, const uvc_device_info &info)
Definition: uvc-parser.cpp:23


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:13