rates-printer.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2017 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 #include "synthetic-stream.h"
6 #include <iomanip>
7 #include <map>
8 
9 namespace librealsense
10 {
12  {
13  public:
15  virtual ~rates_printer() = default;
16 
17  protected:
19  bool should_process(const rs2::frame& frame) override;
20  private:
21  class profile
22  {
23  private:
25  int _counter;
26  std::vector<std::chrono::steady_clock::time_point> _time_points;
27  unsigned long long _last_frame_number;
28  float _actual_fps;
29  std::chrono::steady_clock::time_point _last_time;
30  public:
31  profile();
32  unsigned long long last_frame_number();
34  float get_fps();
35  void on_frame_arrival(const rs2::frame& f);
36  };
37 
38  void print();
39 
40  int _render_rate = 2;
41  std::map<const rs2_stream_profile*, profile> _profiles;
42  std::chrono::steady_clock::time_point _last_print_time;
43  };
44 }
unsigned long long last_frame_number()
std::map< const rs2_stream_profile *, profile > _profiles
Definition: rates-printer.h:41
rs2::stream_profile get_stream_profile()
std::chrono::steady_clock::time_point _last_print_time
Definition: rates-printer.h:42
bool should_process(const rs2::frame &frame) override
GLdouble f
rs2::frame process_frame(const rs2::frame_source &source, const rs2::frame &f) override
virtual ~rates_printer()=default
void on_frame_arrival(const rs2::frame &f)
GLsizei GLsizei GLchar * source
std::vector< std::chrono::steady_clock::time_point > _time_points
Definition: rates-printer.h:26
std::chrono::steady_clock::time_point _last_time
Definition: rates-printer.h:29


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