hd-rum-recompress: Avoid copying shared_ptr

This commit is contained in:
Martin Piatka
2026-03-03 11:21:52 +01:00
parent 6a5678b9f1
commit cae185534c
2 changed files with 4 additions and 4 deletions

View File

@@ -62,7 +62,7 @@
namespace {
struct compress_state_deleter{
void operator()(struct compress_state *s){ compress_done(s); }
void operator()(struct compress_state *s) const{ compress_done(s); }
};
}
@@ -127,7 +127,7 @@ recompress_output_port::recompress_output_port(
// UltraGrid RTP
params["decoder_mode"].l = VIDEO_NORMAL;
params["display_device"].ptr = NULL;
params["display_device"].ptr = nullptr;
auto rxtx = video_rxtx::create("ultragrid_rtp", params);
if (this->host.find(':') != std::string::npos) {
@@ -324,7 +324,7 @@ struct state_recompress *recompress_init(struct module *parent) {
return state;
}
void recompress_process_async(state_recompress *s, std::shared_ptr<video_frame> frame){
void recompress_process_async(state_recompress *s, const std::shared_ptr<video_frame>& frame){
PROFILE_FUNC;
std::lock_guard<std::mutex> lock(s->mut);
for(const auto& worker : s->workers){

View File

@@ -76,6 +76,6 @@ int recompress_get_num_active_ports(struct state_recompress *s);
#ifdef __cplusplus
#include <memory>
#include <string>
void recompress_process_async(state_recompress *state, std::shared_ptr<video_frame> frame);
void recompress_process_async(state_recompress *state, const std::shared_ptr<video_frame>& frame);
#endif
#endif // HD_RUM_RECOMPRESS_H_270dffd1fb25