NVIDIA DeepStream SDK API Reference

8.0 Release
measure_latency_probe.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #include <vector>
14 #include <iostream>
15 #include <chrono>
16 
17 #include "buffer_probe.hpp"
18 
19 
20 using namespace std;
21 
22 namespace deepstream {
23 
25  public:
26  virtual probeReturn handleBuffer(BufferProbe& probe, const Buffer& buffer) {
27  auto latency_info = buffer.measureLatency();
28  for (auto& latency : latency_info) {
29  cout << "Source id = " << latency.source_id
30  << " Frame_num = " << latency.frame_num
31  << " Frame latency = " << latency.latency << " (ms)"
32  << endl;
33  }
34  return probeReturn::Probe_Ok;
35  }
36 };
37 
38 }
buffer_probe.hpp
deepstream::BufferProbe
Represent a custom object for the purpose of probing output buffers.
Definition: buffer_probe.hpp:58
deepstream::NvDsMeasureLatency
Definition: measure_latency_probe.hpp:24
deepstream::Buffer::measureLatency
std::vector< Latency > measureLatency() const
Return latency data of the buffer.
deepstream::probeReturn
probeReturn
Return values from user implemented probe interfaces.
Definition: buffer_probe.hpp:42
deepstream
Definition: buffer.hpp:33
deepstream::BufferProbe::IBufferObserver
Readonly interface for handling buffer.
Definition: buffer_probe.hpp:87
deepstream::Buffer
Base class of a buffer.
Definition: buffer.hpp:46
deepstream::NvDsMeasureLatency::handleBuffer
virtual probeReturn handleBuffer(BufferProbe &probe, const Buffer &buffer)
Definition: measure_latency_probe.hpp:26