Skip to content

Commit b913041

Browse files
committed
Fix linter errors
Signed-off-by: Victor Chang <vicchang@nvidia.com>
1 parent 76abd57 commit b913041

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

operators/append_timestamp/python/append_timestamp_pydoc.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18-
#ifndef PYHOLOHUB_OPERATORS_APPEND_TIMESTAMP_OP_PYDOC_HPP
19-
#define PYHOLOHUB_OPERATORS_APPEND_TIMESTAMP_OP_PYDOC_HPP
18+
#ifndef PYHOLOHUB_OPERATORS_APPEND_TIMESTAMP_PYDOC_HPP
19+
#define PYHOLOHUB_OPERATORS_APPEND_TIMESTAMP_PYDOC_HPP
2020

2121
#include <string>
2222

@@ -47,9 +47,8 @@ name : str, optional
4747
4848
)doc")
4949

50-
} // namespace TensorToVideoBufferOp
50+
} // namespace AppendTimestampOp
5151

5252
} // namespace holoscan::doc
5353

54-
#endif // PYHOLOHUB_OPERATORS_VIDEO_DECODER_RESPONSE_PYDOC_HPP
55-
54+
#endif // PYHOLOHUB_OPERATORS_APPEND_TIMESTAMP_PYDOC_HPP

operators/dds/video/dds_video_subscriber/dds_video_subscriber.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ void DDSVideoSubscriberOp::compute(InputContext& op_input, OutputContext& op_out
148148
if (transfer_times_.size() > 0) {
149149
// Calculate average
150150
auto sum = std::accumulate(transfer_times_.begin(), transfer_times_.end(), 0LL);
151-
double avg_ns = static_cast<double>(sum) / static_cast<double>(transfer_times_.size());
151+
double avg_ns =
152+
static_cast<double>(sum) / static_cast<double>(transfer_times_.size());
152153
average_transfer_time = avg_ns / 1000000.0;
153154

154155
// Calculate jitter (standard deviation)
@@ -158,17 +159,20 @@ void DDSVideoSubscriberOp::compute(InputContext& op_input, OutputContext& op_out
158159
double diff = static_cast<double>(time) - avg_ns;
159160
variance_sum += diff * diff;
160161
}
161-
double variance = variance_sum / static_cast<double>(transfer_times_.size() - 1);
162+
double variance =
163+
variance_sum / static_cast<double>(transfer_times_.size() - 1);
162164
jitter_time = std::sqrt(variance) / 1000000.0; // Convert to ms
163165
}
164166
}
165167

166168
auto sum_frame_sizes = std::accumulate(frame_sizes.begin(), frame_sizes.end(), 0LL);
167-
double avg_frame_size = static_cast<double>(sum_frame_sizes) / static_cast<double>(frame_sizes.size());
169+
double avg_frame_size =
170+
static_cast<double>(sum_frame_sizes) / static_cast<double>(frame_sizes.size());
168171

169172
HOLOSCAN_LOG_INFO(
170173
"DDS Video Subscriber - Stream ID: {} | Total Frames: {} | "
171-
"Average FPS: {:.3f} | Total Time: {:.3f}s | Width: {} | Height: {} | Avg Size: {} "
174+
"Average FPS: {:.3f} | Total Time: {:.3f}s | Width: {} | Height: {} | Avg "
175+
"Size: {} "
172176
"| Codec: {} | Avg Transfer Time: {:.3f}ms | Jitter: {:.3f}ms",
173177
stream_id_.get(),
174178
frame_count_,

0 commit comments

Comments
 (0)