5 #include "TelemetryLayout.h" 6 #include "TelemetryOverlay.h" 8 #include <mcrt_dataio/engine/merger/GlobalNodeInfo.h> 9 #include <mcrt_dataio/share/util/FloatValueTracker.h> 10 #include <mcrt_messages/BaseFrame.h> 11 #include <scene_rdl2/common/grid_util/Parser.h> 12 #include <scene_rdl2/common/rec_time/RecTime.h> 15 #include <unordered_map> 23 unsigned mOverlayWidth {0};
24 unsigned mOverlayHeight {0};
26 unsigned mImageWidth {0};
27 unsigned mImageHeight {0};
30 uint32_t mFrameId {0};
31 mcrt::BaseFrame::Status mStatus {mcrt::BaseFrame::FINISHED};
32 float mRenderPrepProgress {0.0f};
33 float mProgress {0.0f};
34 unsigned mFbActivityCounter {0};
35 unsigned mDecodeProgressiveFrameCounter {0};
36 bool mIsCoarsePass {
true};
37 float mCurrentLatencySec {0.0f};
38 float mReceiveImageDataFps {0.0f};
40 const GlobalNodeInfo* mGlobalNodeInfo {
nullptr};
44 std::string show()
const;
50 using Arg = scene_rdl2::grid_util::Arg;
51 using Parser = scene_rdl2::grid_util::Parser;
52 using Align = Overlay::Align;
54 Display() { parserConfigure(); };
56 void setActive(
bool sw) { mActive = sw; }
57 bool getActive()
const {
return mActive; }
59 void bakeOverlayRgb888(std::vector<unsigned char>& rgbFrame,
60 const bool top2bottomFlag,
62 bool bakeWithPrevArchive);
64 void switchLayoutNext() { switchLayoutToNextOnTheList(); }
66 Parser& getParser() {
return mParser; }
68 std::string show()
const;
75 unsigned calcFontSize()
const;
78 std::vector<unsigned char>& rgbFrame,
79 const bool top2bottomFlag,
80 bool bakeWithPrevArchive);
82 std::vector<unsigned char>& rgbFrame,
83 const bool top2bottomFlag,
84 bool bakeWithPrevArchive);
89 std::vector<unsigned char>& rgbFrame,
90 const bool top2bottomFlag,
93 bool bakeWithPrevArchive);
94 void copyArchive(std::vector<unsigned char>& rgbFrame)
const;
95 void clearBgArchive();
97 void switchLayoutByName(
const std::string& name,
98 const std::function<
void(
const std::string& msg)>);
99 void switchLayoutToNextOnTheList();
101 void parserConfigure();
103 std::string showTestInfo()
const;
104 std::string showAlign(Align align)
const;
105 std::string showLayoutNameList()
const;
106 std::string showCurrentLayoutName()
const;
107 std::string showTimingProfile()
const;
108 void resetTimingProfile();
112 bool mActive {
false};
113 bool mDoParallel {
true};
114 bool mTimingProfile {
false};
115 bool mTestMode {
false};
117 unsigned mOverwriteWidth {0};
118 unsigned mOverwriteHeight {0};
120 std::shared_ptr<Overlay> mOverlay;
121 std::shared_ptr<Font> mFont;
123 std::vector<unsigned char> mBgArchive;
130 std::shared_ptr<LayoutBase> mCurrLayout;
131 std::unordered_map<std::string, std::shared_ptr<LayoutBase>> mLayoutMap;
136 std::unique_ptr<Font> mTestFont;
137 unsigned mTestStrX {0};
138 unsigned mTestStrY {0};
139 unsigned mTestStrCol[3] {255, 255, 255};
140 unsigned mTestBgCol[4] {0, 0, 0, 0};
141 std::string mTestMsg {
"This is a test"};
142 std::string mTestFontTTFFileName {
"/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf"};
143 int mTestFontPoint {12};
144 Align mTestHAlign {Align::MIDDLE};
145 Align mTestVAlign {Align::MIDDLE};
150 scene_rdl2::rec_time::RecTime mRecTime;
151 FloatValueTracker mOverlayClear {64};
152 FloatValueTracker mDrawStrTime {64};
153 FloatValueTracker mCopyArchiveTime {64};
154 FloatValueTracker mFinalizeRgb888Time {64};
Definition: TelemetryDisplay.h:20
Definition: TelemetryDisplay.h:47
Definition: ClientReceiverConsoleDriver.cc:9