archive.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2019 Intel Corporation. All Rights Reserved.
3 
4 
5 #include <src/archive.h>
6 #include <src/frame-archive.h>
7 #include <src/core/video-frame.h>
8 #include <src/core/pose-frame.h>
11 #include <src/composite-frame.h>
12 #include <src/points.h>
13 
14 
15 namespace librealsense
16 {
17 
18  std::shared_ptr<archive_interface> make_archive(rs2_extension type,
19  std::atomic<uint32_t>* in_max_frame_queue_size,
20  std::shared_ptr<metadata_parser_map> parsers)
21  {
22  switch (type)
23  {
25  return std::make_shared<frame_archive<video_frame>>(in_max_frame_queue_size, parsers);
26 
28  return std::make_shared<frame_archive<composite_frame>>(in_max_frame_queue_size, parsers);
29 
31  return std::make_shared<frame_archive<motion_frame>>(in_max_frame_queue_size, parsers);
32 
34  return std::make_shared<frame_archive<points>>(in_max_frame_queue_size, parsers);
35 
37  return std::make_shared<frame_archive<depth_frame>>(in_max_frame_queue_size, parsers);
38 
40  return std::make_shared<frame_archive<pose_frame>>(in_max_frame_queue_size, parsers);
41 
43  return std::make_shared<frame_archive<disparity_frame>>(in_max_frame_queue_size, parsers);
44 
45  default:
46  throw std::runtime_error("Requested frame type is not supported!");
47  }
48  }
49 }
librealsense
Definition: algo.h:18
RS2_EXTENSION_MOTION_FRAME
@ RS2_EXTENSION_MOTION_FRAME
Definition: rs_types.h:145
rs2_extension
rs2_extension
Specifies advanced interfaces (capabilities) objects may implement.
Definition: rs_types.h:134
video-frame.h
RS2_EXTENSION_COMPOSITE_FRAME
@ RS2_EXTENSION_COMPOSITE_FRAME
Definition: rs_types.h:146
librealsense::make_archive
std::shared_ptr< archive_interface > make_archive(rs2_extension type, std::atomic< uint32_t > *in_max_frame_queue_size, std::shared_ptr< metadata_parser_map > parsers)
Definition: archive.cpp:18
motion-frame.h
type
GLenum type
Definition: glad/glad/glad.h:135
composite-frame.h
points.h
pose-frame.h
RS2_EXTENSION_VIDEO_FRAME
@ RS2_EXTENSION_VIDEO_FRAME
Definition: rs_types.h:144
disparity-frame.h
RS2_EXTENSION_DEPTH_FRAME
@ RS2_EXTENSION_DEPTH_FRAME
Definition: rs_types.h:148
archive.h
RS2_EXTENSION_POINTS
@ RS2_EXTENSION_POINTS
Definition: rs_types.h:147
RS2_EXTENSION_POSE_FRAME
@ RS2_EXTENSION_POSE_FRAME
Definition: rs_types.h:156
RS2_EXTENSION_DISPARITY_FRAME
@ RS2_EXTENSION_DISPARITY_FRAME
Definition: rs_types.h:154
frame-archive.h


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