syncer-processing-block.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 <stdint.h>
7 #include <vector>
8 #include <mutex>
9 #include <memory>
10 
11 #include "types.h"
12 #include "archive.h"
13 #include "option.h"
14 
15 namespace librealsense
16 {
17  class processing_block;
18  class timestamp_composite_matcher;
20  {
21  public:
22  syncer_process_unit(std::initializer_list< bool_option::ptr > enable_opts, bool log = true);
23 
24  syncer_process_unit( bool_option::ptr is_enabled_opt = nullptr, bool log = true)
25  : syncer_process_unit( { is_enabled_opt }, log) {}
26 
27  void add_enabling_option( bool_option::ptr is_enabled_opt )
28  {
29  _enable_opts.push_back( is_enabled_opt );
30  }
31 
32  // Stopping the syncer means no more frames will be enqueued, and any existing frames
33  // pending dispatch will be lost!
34  void stop()
35  {
36  _matcher->stop();
37  }
38 
40  {
41  _matcher.reset();
42  }
43  private:
44  std::shared_ptr<matcher> _matcher;
45  std::vector< std::weak_ptr<bool_option> > _enable_opts;
46 
48  std::mutex _callback_mutex;
49  };
50 }
std::vector< std::weak_ptr< bool_option > > _enable_opts
syncer_process_unit(std::initializer_list< bool_option::ptr > enable_opts, bool log=true)
std::shared_ptr< bool_option > ptr
Definition: option.h:281
single_consumer_frame_queue< frame_holder > _matches
void log(std::string message)
syncer_process_unit(bool_option::ptr is_enabled_opt=nullptr, bool log=true)
void add_enabling_option(bool_option::ptr is_enabled_opt)


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