|
NVIDIA DeepStream SDK API Reference
|
7.1 Release
|
Go to the documentation of this file.
13 #ifndef __NVSTREAMMUX_BATCH__H
14 #define __NVSTREAMMUX_BATCH__H
21 #include <unordered_map>
32 #include "gstnvstreammeta.h"
33 #include "gstnvdsmeta_int.h"
36 typedef std::chrono::steady_clock
Clock;
37 using TimePoint = std::chrono::time_point<std::chrono::steady_clock, NanoSecondsType>;
70 std::unordered_map< unsigned int, NvStreammuxSourceProps>
source_props;
96 virtual unsigned int copy(
void * buf,
unsigned int pos,
unsigned int num_surfaces)
120 virtual unsigned int copy_buf(std::shared_ptr<BufferWrapper> buf,
unsigned int pos) = 0;
122 virtual void copy_meta(
unsigned int id, std::shared_ptr<BufferWrapper> src_buffer,
unsigned int batch_id,
unsigned int frame_number,
unsigned int num_surfaces_per_frame,
NvDsBatchMeta * dest_batch_meta,
unsigned int source_id){};
173 std::list<unsigned int>::iterator
get_next_pos(std::list<unsigned int>::iterator pos);
177 unsigned int get_at(std::list<unsigned int>::iterator pos);
180 std::list<unsigned int> store;
282 unsigned int allowed_buffers);
289 unsigned int get_allowed(
unsigned int source_id,
float fps,
unsigned int available);
298 std::unordered_map<unsigned int, float> src_max_fps;
299 std::unordered_map<unsigned int, NanoSecondsType> min_src_fps_dur;
300 std::unordered_map<unsigned int, TimePoint> src_push_times;
301 std::unordered_map<unsigned int, unsigned int> src_num_pushed;
308 std::multimap<int, int> sources;
309 std::unordered_map<unsigned int, SinkPad *> * inputs;
310 std::chrono::time_point<std::chrono::steady_clock> last_batch_time;
311 unsigned int batch_size;
320 unsigned int num_sources_idle;
325 unsigned int num_sources_eos;
326 unsigned int num_surfaces_per_frame;
void set_size(unsigned int size)
void sorted_insert(unsigned int)
virtual bool push(SourcePad *pad, unsigned long pts)
unsigned int source_max_fps_d
void update_last_batch_time()
virtual void copy_meta(unsigned int id, std::shared_ptr< BufferWrapper > src_buffer, unsigned int batch_id, unsigned int frame_number, unsigned int num_surfaces_per_frame, NvDsBatchMeta *dest_batch_meta, unsigned int source_id)
void set_batch_size(unsigned int)
unsigned int total_buf_available
std::unordered_map< int, int > num_sources
virtual unsigned int copy_buf(std::shared_ptr< BufferWrapper > buf, unsigned int pos)=0
Copy input buffer (buf) to this NvDsBatchBufferWrapper.
unsigned int check_repeats_per_batch()
std::list< unsigned int >::iterator get_least_pos()
bool is_ready_or_due(Batch *b)
unsigned int get_config_batch_size()
bool enable_max_fps_control
enables or disables the throttling control in push_loop() implementing max_fps configuration support
unsigned int max_num_frames_per_batch
int priority_list_position
unsigned int overall_max_fps_n
std::chrono::steady_clock Clock
virtual ~NvDsBatchBufferWrapper()
std::unordered_map< unsigned int, NvStreammuxSourceProps > source_props
std::list< unsigned int >::iterator get_next_pos(std::list< unsigned int >::iterator pos)
unsigned int overall_min_fps_d
void update_eos_sources(unsigned int eos_count)
void update_push_stats(unsigned int source_id, unsigned int num_pushed)
virtual unsigned int copy(void *buf, unsigned int pos, unsigned int num_surfaces)
virtual bool push(SourcePad *pad, TimePoint play_start, NanoSecondsType accum_dur)
unsigned int get_batch_size()
unsigned int get_at(std::list< unsigned int >::iterator pos)
unsigned int synchronize_buffers_in_pad(SinkPad *pad, unsigned int allowed_buffers)
Synchronize the buffers in queue for provided pad.
virtual ~BatchBufferWrapper()=default
unsigned int batch_size
number of surfaces in the batch this will be one NvDsFrameMeta (one frame) in the batch meta
void update_with_source(Batch *batch, unsigned int source_id)
NanoSecondsType calculate_wait()
void set_batch_push_timeout(unsigned int)
unsigned int source_min_fps_n
unsigned int max_same_source_frames
BatchPolicyConfig get_config()
Batch * form_batch(Batch *b, unsigned int batch_size)
NvStreammuxBatchMethod type
NanoSecondsType get_max_duration_delay()
std::chrono::duration< double, std::nano > NanoSecondsType
void set_num_surfaces(unsigned int)
Set num_surfaces_per_frame.
void check_source(unsigned int source_id)
void set_synch_buffer_iface(ISynchronizeBuffer *synch_buffer_iface)
void update_idle_sources(unsigned int idle_count)
bool is_max_fps_control_enabled()
unsigned int get_eos_sources()
unsigned int overall_min_fps_n
unsigned int num_surfaces_in_batch
struct BatchPolicyConfig BatchPolicyConfig
NanoSecondsType get_min_fps_duration()
unsigned int overall_max_fps_d
unsigned int source_min_fps_d
@ BATCH_METHOD_ROUND_ROBIN
NvDsBatchBufferWrapper(unsigned int size)
std::list< unsigned int >::iterator get_max_pos()
NanoSecondsType calculate_delay()
void check_and_update_defaults(unsigned int source_id)
unsigned int acc_batch
number of buffers already accumulated in this batch Still not copied; yet info available in @num_sour...
unsigned int source_max_fps_n
bool enable_source_rate_control
std::chrono::time_point< std::chrono::steady_clock, NanoSecondsType > TimePoint