9 #include <unordered_map> 12 #define B_TO_BYTE(p) ((int8_t)(p)[0]) 15 #define SW_TO_SHORT(p) ((uint8_t)(p)[0] | \ 16 ((int8_t)(p)[1] << 8)) 19 #define DW_TO_INT(p) ((uint8_t)(p)[0] | \ 20 ((uint8_t)(p)[1] << 8) | \ 21 ((uint8_t)(p)[2] << 16) | \ 22 ((int8_t)(p)[3] << 24)) 25 #define QW_TO_QUAD(p) (((uint64_t)(p)[0]) | \ 26 (((uint64_t)(p)[1]) << 8) | \ 27 (((uint64_t)(p)[2]) << 16) | \ 28 (((uint64_t)(p)[3]) << 24) | \ 29 (((uint64_t)(p)[4]) << 32) | \ 30 (((uint64_t)(p)[5]) << 40) | \ 31 (((uint64_t)(p)[6]) << 48) | \ 32 (((int64_t)(p)[7]) << 56)) 36 #define SHORT_TO_SW(s, p) \ 37 (p)[0] = (uint8_t)(s); \ 38 (p)[1] = (uint8_t)((s) >> 8); 41 #define INT_TO_DW(i, p) \ 42 (p)[0] = (uint8_t)(i); \ 43 (p)[1] = (uint8_t)((i) >> 8); \ 44 (p)[2] = (uint8_t)((i) >> 16); \ 45 (p)[3] = (uint8_t)((i) >> 24); 48 #define QUAD_TO_QW(i, p) \ 49 (p)[0] = (uint8_t)(i); \ 50 (p)[1] = (uint8_t)((i) >> 8); \ 51 (p)[2] = (uint8_t)((i) >> 16); \ 52 (p)[3] = (uint8_t)((i) >> 24); \ 53 (p)[4] = (uint8_t)((i) >> 32); \ 54 (p)[5] = (uint8_t)((i) >> 40); \ 55 (p)[6] = (uint8_t)((i) >> 48); \ 56 (p)[7] = (uint8_t)((i) >> 56); \ 59 const std::unordered_map<uint32_t, uint32_t>
fourcc_map = {
60 { 0x59382020, 0x47524559 },
61 { 0x52573130, 0x70524141 },
62 { 0x32000000, 0x47524559 },
63 { 0x50000000, 0x5a313620 },
64 { 0x52415738, 0x47524559 },
65 { 0x52573136, 0x42595232 }
406 template <
typename T>
410 for(
int i = 0;
i <
sizeof(
T);
i++)
412 rv += data[index +
i] << (
i*8);
struct uvc_format uvc_format_t
std::unique_ptr< backend_frame, cleanup_ptr > backend_frame_ptr
backend_frame & operator=(const backend_frame &other)
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
uint64_t bmLayoutPerStream
const char * manufacturer
struct uvc_processing_unit uvc_processing_unit_t
const char * serialNumber
std::vector< uint8_t > pixels
backend_frame(const backend_frame &other)
T as(const std::vector< uint8_t > &data, size_t index)
struct uvc_device_descriptor uvc_device_descriptor_t
struct uvc_selector_unit uvc_selector_unit_t
backend_frame(backend_frame &&other)
uint32_t dwFrameIntervalStep
uint32_t dwMaxVideoFrameBufferSize
uint8_t bFrameIntervalType
uint32_t dwMaxPayloadTransferSize
struct uvc_stream_ctrl uvc_stream_ctrl_t
const std::unordered_map< uint32_t, uint32_t > fourcc_map
uint32_t dwClockFrequency
unsigned __int64 uint64_t
uvc_vs_desc_subtype bDescriptorSubtype
backend_frames_archive * owner
struct uvc_input_terminal uvc_input_terminal_t
uint32_t dwMaxVideoFrameSize
uint16_t bmRateControlModes
struct uvc_extension_unit uvc_extension_unit_t
struct uvc_format_desc uvc_format_desc_t
librealsense::platform::frame_object fo
uint8_t bMaxNumberOfRefFramesPlus1
uint32_t dwMinFrameInterval
single_consumer_queue< backend_frame_ptr > backend_frames_queue
void(* cleanup_ptr)(backend_frame *)
uint8_t bPreferredVersion
uint32_t dwMaxFrameInterval
uint32_t dwDefaultFrameInterval
struct uvc_frame_desc uvc_frame_desc_t
librealsense::small_heap< backend_frame, 10 > backend_frames_archive
std::vector< uint32_t > intervals