4 #ifndef LIBREALSENSE_RS2_PIPELINE_HPP 5 #define LIBREALSENSE_RS2_PIPELINE_HPP 31 std::vector<stream_profile> results;
34 std::shared_ptr<rs2_stream_profile_list> list(
46 results.push_back(profile);
64 if (
s.stream_type() == stream_type && (stream_index == -1 ||
s.stream_index() == stream_index))
69 throw std::runtime_error(
"Profile does not contain the requested stream");
86 std::shared_ptr<rs2_device>
dev(
100 operator bool()
const 130 _config = std::shared_ptr<rs2_config>(
171 enable_stream(stream_type, stream_index, 0, 0,
RS2_FORMAT_ANY, 0);
185 enable_stream(stream_type, -1, width, height,
format, framerate);
197 enable_stream(stream_type, -1, 0, 0, format, framerate);
210 enable_stream(stream_type, stream_index, 0, 0, format, framerate);
317 auto profile = std::shared_ptr<rs2_pipeline_profile>(
340 std::shared_ptr<rs2_config>
get()
const 344 explicit operator std::shared_ptr<rs2_config>()
const 375 _pipeline = std::shared_ptr<rs2_pipeline>(
395 auto p = std::shared_ptr<rs2_pipeline_profile>(
424 auto p = std::shared_ptr<rs2_pipeline_profile>(
445 auto p = std::shared_ptr<rs2_pipeline_profile>(
473 auto p = std::shared_ptr<rs2_pipeline_profile>(
537 throw std::invalid_argument(
"null frameset");
552 throw std::invalid_argument(
"null frameset");
574 auto p = std::shared_ptr<rs2_pipeline_profile>(
582 operator std::shared_ptr<rs2_pipeline>()
const 586 explicit pipeline(std::shared_ptr<rs2_pipeline> ptr) : _pipeline(ptr) {}
593 #endif // LIBREALSENSE_RS2_PROCESSING_HPP config(std::shared_ptr< rs2_config > cfg)
frameset wait_for_frames(unsigned int timeout_ms=RS2_DEFAULT_TIMEOUT) const
int rs2_pipeline_poll_for_frames(rs2_pipeline *pipe, rs2_frame **output_frame, rs2_error **error)
void rs2_config_enable_stream(rs2_config *config, rs2_stream stream, int index, int width, int height, rs2_format format, int framerate, rs2_error **error)
int rs2_pipeline_try_wait_for_frames(rs2_pipeline *pipe, rs2_frame **output_frame, unsigned int timeout_ms, rs2_error **error)
rs2_pipeline_profile * rs2_config_resolve(rs2_config *config, rs2_pipeline *pipe, rs2_error **error)
rs2_pipeline_profile * rs2_pipeline_start_with_callback_cpp(rs2_pipeline *pipe, rs2_frame_callback *callback, rs2_error **error)
pipeline_profile start(const config &config)
rs2_pipeline_profile * rs2_pipeline_start(rs2_pipeline *pipe, rs2_error **error)
void rs2_delete_device(rs2_device *device)
void rs2_config_disable_indexed_stream(rs2_config *config, rs2_stream stream, int index, rs2_error **error)
rs2_config * rs2_create_config(rs2_error **error)
rs2_pipeline * rs2_create_pipeline(rs2_context *ctx, rs2_error **error)
pipeline(std::shared_ptr< rs2_pipeline > ptr)
pipeline_profile start(const config &config, S callback)
void rs2_config_enable_record_to_file(rs2_config *config, const char *file, rs2_error **error)
std::shared_ptr< rs2_pipeline > _pipeline
pipeline(context ctx=context())
bool try_wait_for_frames(frameset *f, unsigned int timeout_ms=RS2_DEFAULT_TIMEOUT) const
GLsizei const GLchar *const * string
void enable_device(const std::string &serial)
rs2_pipeline_profile * rs2_pipeline_get_active_profile(rs2_pipeline *pipe, rs2_error **error)
void rs2_config_enable_all_stream(rs2_config *config, rs2_error **error)
void enable_stream(rs2_stream stream_type, int stream_index, rs2_format format, int framerate=0)
rs2_device * rs2_pipeline_profile_get_device(rs2_pipeline_profile *profile, rs2_error **error)
rs2_pipeline_profile * rs2_pipeline_start_with_config_and_callback_cpp(rs2_pipeline *pipe, rs2_config *config, rs2_frame_callback *callback, rs2_error **error)
pipeline_profile start(S callback)
bool poll_for_frames(frameset *f) const
rs2_stream_profile_list * rs2_pipeline_profile_get_streams(rs2_pipeline_profile *profile, rs2_error **error)
rs2_frame * rs2_pipeline_wait_for_frames(rs2_pipeline *pipe, unsigned int timeout_ms, rs2_error **error)
void rs2_config_disable_all_streams(rs2_config *config, rs2_error **error)
std::shared_ptr< rs2_config > get() const
void disable_all_streams()
GLint GLsizei GLsizei height
int rs2_config_can_resolve(rs2_config *config, rs2_pipeline *pipe, rs2_error **error)
GLint GLint GLsizei GLint GLenum format
const rs2_stream_profile * rs2_get_stream_profile(const rs2_stream_profile_list *list, int index, rs2_error **error)
stream_profile get_stream(rs2_stream stream_type, int stream_index=-1) const
void disable_stream(rs2_stream stream, int index=-1)
rs2_format
A stream's format identifies how binary data is encoded within a frame.
#define RS2_DEFAULT_TIMEOUT
pipeline_profile(std::shared_ptr< rs2_pipeline_profile > profile)
void rs2_config_enable_device_from_file_repeat_option(rs2_config *config, const char *file, int repeat_playback, rs2_error **error)
void enable_all_streams()
void enable_stream(rs2_stream stream_type, int stream_index, int width, int height, rs2_format format=RS2_FORMAT_ANY, int framerate=0)
bool can_resolve(std::shared_ptr< rs2_pipeline > p) const
static void handle(rs2_error *e)
rs2_stream
Streams are different types of data provided by RealSense devices.
device get_device() const
rs2_pipeline_profile * rs2_pipeline_start_with_config(rs2_pipeline *pipe, rs2_config *config, rs2_error **error)
void enable_stream(rs2_stream stream_type, int width, int height, rs2_format format=RS2_FORMAT_ANY, int framerate=0)
pipeline_profile resolve(std::shared_ptr< rs2_pipeline > p) const
std::vector< stream_profile > get_streams() const
void enable_record_to_file(const std::string &file_name)
std::shared_ptr< rs2_config > _config
void rs2_delete_stream_profiles_list(rs2_stream_profile_list *list)
void rs2_pipeline_stop(rs2_pipeline *pipe, rs2_error **error)
std::shared_ptr< rs2_pipeline_profile > _pipeline_profile
void enable_stream(rs2_stream stream_type, int stream_index=-1)
void rs2_delete_config(rs2_config *config)
void enable_device_from_file(const std::string &file_name, bool repeat_playback=true)
void rs2_config_enable_device(rs2_config *config, const char *serial, rs2_error **error)
pipeline_profile get_active_profile() const
int rs2_get_stream_profiles_count(const rs2_stream_profile_list *list, rs2_error **error)
void rs2_delete_pipeline_profile(rs2_pipeline_profile *profile)
void rs2_delete_pipeline(rs2_pipeline *pipe)
struct rs2_frame rs2_frame
void enable_stream(rs2_stream stream_type, rs2_format format, int framerate=0)