NVIDIA DeepStream SDK API Reference

6.4 Release
NvStreamMux Class Reference

Detailed Description

Definition at line 45 of file nvstreammux.h.

Collaboration diagram for NvStreamMux:

Public Member Functions

 NvStreamMux (SourcePad *srcpad, INvStreammuxDebug *a_debug_iface=nullptr)
 
void set_policy (BatchPolicyConfig cfg)
 
void set_frame_num_reset_on_eos (bool reset)
 
void set_frame_num_reset_on_stream_reset (bool reset)
 
virtual void lock ()
 
virtual void unlock ()
 
virtual void wait ()
 
virtual void notify_all ()
 
SinkPadget_pad (unsigned int pad_id)
 
void add_pad (unsigned int id, SinkPad *pad)
 
void update_pad_mimetype (unsigned int id, PAD_MIME_TYPE mime_type)
 
PAD_MIME_TYPE get_pad_mimetype (unsigned int id)
 
void remove_pad (unsigned int id)
 
virtual bool handle_eos (SINK_EVENT et, unsigned int source_id, EventWrapper *event)
 
virtual bool handle_eos_cascaded (SINK_EVENT et, unsigned int source_id, EventWrapper *event)
 
virtual bool handle_segment (SINK_EVENT et, unsigned int source_id, EventWrapper *event)
 
virtual bool handle_stream_reset (SINK_EVENT et, unsigned int source_id, EventWrapper *event)
 
virtual bool handle_flush_stop (SINK_EVENT et, unsigned int source_id, EventWrapper *event)
 
virtual void add_sink (SinkPad *pad)
 
virtual void remove_sink (SinkPad pad)
 
virtual void add_buffer (unsigned int pad_id, BufferWrapper *buffer)
 
bool push_loop (NvDsBatchBufferWrapper *out_buf, NvDsBatchMeta *)
 
bool push_batch (NvDsBatchBufferWrapper *out_buf, SourcePad *src_pad)
 
void push_events ()
 
unsigned int copy_batch (NvDsBatchBufferWrapper *out_buf, NvDsBatchMeta *)
 
void handle_pause_play ()
 
void handle_play_pause ()
 
void handle_ready_pause ()
 
void handle_stop ()
 
void reset_stop ()
 
void set_frame_duration (unsigned long)
 
void set_pts_offset (gulong offset)
 
SOURCE_STATE get_pad_state (SinkPad *sinkPad)
 
void set_batch_size (unsigned int size)
 set batch_policy.set_batch_size() More...
 
void set_batch_push_timeout (unsigned int timeout)
 set batch_policy.set_batch_push_timeout() More...
 
unsigned int get_batch_size ()
 return batch_policy.get_batch_size() More...
 
unsigned int get_config_batch_size ()
 return batch_policy.get_config_batch_size() More...
 
void set_num_surfaces_per_frame (unsigned int num)
 Set the class var num_surfaces_per_frame and batch_policy.set_num_surfaces() More...
 
unsigned int get_num_surfaces_per_frame ()
 Get the class var num_surfaces_per_frame. More...
 
void set_all_pads_eos (bool eos)
 Set all_pads_eos. More...
 
void reset_pad (SinkPad *pad)
 Reset a pad for streaming. More...
 
bool get_all_pads_eos ()
 Get all_pads_eos. More...
 
void set_synch_buffer_iface (ISynchronizeBuffer *synch_buffer_iface)
 Set the user interface for buffer synchronization Note: This API shall be called before set_policy() More...
 
NanoSecondsType get_min_fps_duration ()
 Get the Batch Policy minimum fps duration calculated from min overall fps config. More...
 
unsigned int get_source_id_with_earliest_buffer ()
 
unsigned int get_remaining_unbatched_buffers_from_all_sources ()
 Get the remaining unbatched ready buffers from all sources. More...
 
void apply_throttle (bool stop_when_input_buffer=false)
 Apply the throttle delay and wait for the time (max-fps cfg) or until a new buffer come in. More...
 

Data Fields

ISynchronizeBuffersynch_buffer
 

Constructor & Destructor Documentation

◆ NvStreamMux()

NvStreamMux::NvStreamMux ( SourcePad srcpad,
INvStreammuxDebug a_debug_iface = nullptr 
)
inline

Definition at line 51 of file nvstreammux.h.

References SOURCE_STATE_IDLE, and synch_buffer.

Member Function Documentation

◆ add_buffer()

virtual void NvStreamMux::add_buffer ( unsigned int  pad_id,
BufferWrapper buffer 
)
virtual

◆ add_pad()

void NvStreamMux::add_pad ( unsigned int  id,
SinkPad pad 
)

◆ add_sink()

virtual void NvStreamMux::add_sink ( SinkPad pad)
inlinevirtual

Definition at line 215 of file nvstreammux.h.

◆ apply_throttle()

void NvStreamMux::apply_throttle ( bool  stop_when_input_buffer = false)

Apply the throttle delay and wait for the time (max-fps cfg) or until a new buffer come in.

Parameters
stop_when_input_buffer;if true, the API wait for the time (max-fps cfg) or until a new buffer come in; if false, the API wait for the time (max-fps cfg)

◆ copy_batch()

unsigned int NvStreamMux::copy_batch ( NvDsBatchBufferWrapper out_buf,
NvDsBatchMeta  
)

◆ get_all_pads_eos()

bool NvStreamMux::get_all_pads_eos ( )

Get all_pads_eos.

Returns
current all_pads_eos

◆ get_batch_size()

unsigned int NvStreamMux::get_batch_size ( )

return batch_policy.get_batch_size()

Returns
the batch-size

◆ get_config_batch_size()

unsigned int NvStreamMux::get_config_batch_size ( )

return batch_policy.get_config_batch_size()

Returns
the batch-size

◆ get_min_fps_duration()

NanoSecondsType NvStreamMux::get_min_fps_duration ( )

Get the Batch Policy minimum fps duration calculated from min overall fps config.

◆ get_num_surfaces_per_frame()

unsigned int NvStreamMux::get_num_surfaces_per_frame ( )

Get the class var num_surfaces_per_frame.

Returns
the class var num_surfaces_per_frame

◆ get_pad()

SinkPad* NvStreamMux::get_pad ( unsigned int  pad_id)

◆ get_pad_mimetype()

PAD_MIME_TYPE NvStreamMux::get_pad_mimetype ( unsigned int  id)

◆ get_pad_state()

SOURCE_STATE NvStreamMux::get_pad_state ( SinkPad sinkPad)

◆ get_remaining_unbatched_buffers_from_all_sources()

unsigned int NvStreamMux::get_remaining_unbatched_buffers_from_all_sources ( )

Get the remaining unbatched ready buffers from all sources.

Shall be called after calling Batch::form_batch

◆ get_source_id_with_earliest_buffer()

unsigned int NvStreamMux::get_source_id_with_earliest_buffer ( )

◆ handle_eos()

virtual bool NvStreamMux::handle_eos ( SINK_EVENT  et,
unsigned int  source_id,
EventWrapper event 
)
virtual

◆ handle_eos_cascaded()

virtual bool NvStreamMux::handle_eos_cascaded ( SINK_EVENT  et,
unsigned int  source_id,
EventWrapper event 
)
virtual

◆ handle_flush_stop()

virtual bool NvStreamMux::handle_flush_stop ( SINK_EVENT  et,
unsigned int  source_id,
EventWrapper event 
)
virtual

◆ handle_pause_play()

void NvStreamMux::handle_pause_play ( )

◆ handle_play_pause()

void NvStreamMux::handle_play_pause ( )

◆ handle_ready_pause()

void NvStreamMux::handle_ready_pause ( )

◆ handle_segment()

virtual bool NvStreamMux::handle_segment ( SINK_EVENT  et,
unsigned int  source_id,
EventWrapper event 
)
virtual

◆ handle_stop()

void NvStreamMux::handle_stop ( )

◆ handle_stream_reset()

virtual bool NvStreamMux::handle_stream_reset ( SINK_EVENT  et,
unsigned int  source_id,
EventWrapper event 
)
virtual

◆ lock()

virtual void NvStreamMux::lock ( )
inlinevirtual

Definition at line 91 of file nvstreammux.h.

◆ notify_all()

virtual void NvStreamMux::notify_all ( )
virtual

◆ push_batch()

bool NvStreamMux::push_batch ( NvDsBatchBufferWrapper out_buf,
SourcePad src_pad 
)

◆ push_events()

void NvStreamMux::push_events ( )

◆ push_loop()

bool NvStreamMux::push_loop ( NvDsBatchBufferWrapper out_buf,
NvDsBatchMeta  
)

◆ remove_pad()

void NvStreamMux::remove_pad ( unsigned int  id)

◆ remove_sink()

virtual void NvStreamMux::remove_sink ( SinkPad  pad)
inlinevirtual

Definition at line 221 of file nvstreammux.h.

◆ reset_pad()

void NvStreamMux::reset_pad ( SinkPad pad)

Reset a pad for streaming.

Parameters
sinkPadto reset for streaming-restart after EOS

◆ reset_stop()

void NvStreamMux::reset_stop ( )

◆ set_all_pads_eos()

void NvStreamMux::set_all_pads_eos ( bool  eos)

Set all_pads_eos.

Parameters
eos[IN]

◆ set_batch_push_timeout()

void NvStreamMux::set_batch_push_timeout ( unsigned int  timeout)

set batch_policy.set_batch_push_timeout()

Parameters
batch-size[IN]

◆ set_batch_size()

void NvStreamMux::set_batch_size ( unsigned int  size)

set batch_policy.set_batch_size()

Parameters
batch-size[IN]

◆ set_frame_duration()

void NvStreamMux::set_frame_duration ( unsigned long  )

◆ set_frame_num_reset_on_eos()

void NvStreamMux::set_frame_num_reset_on_eos ( bool  reset)
inline

Definition at line 79 of file nvstreammux.h.

◆ set_frame_num_reset_on_stream_reset()

void NvStreamMux::set_frame_num_reset_on_stream_reset ( bool  reset)
inline

Definition at line 83 of file nvstreammux.h.

◆ set_num_surfaces_per_frame()

void NvStreamMux::set_num_surfaces_per_frame ( unsigned int  num)

Set the class var num_surfaces_per_frame and batch_policy.set_num_surfaces()

Parameters
num[IN] Number of surfaces per frame

◆ set_policy()

void NvStreamMux::set_policy ( BatchPolicyConfig  cfg)
inline

◆ set_pts_offset()

void NvStreamMux::set_pts_offset ( gulong  offset)

◆ set_synch_buffer_iface()

void NvStreamMux::set_synch_buffer_iface ( ISynchronizeBuffer synch_buffer_iface)

Set the user interface for buffer synchronization Note: This API shall be called before set_policy()

Parameters
synch_buffer_iface[IN]

◆ unlock()

virtual void NvStreamMux::unlock ( )
inlinevirtual

Definition at line 99 of file nvstreammux.h.

◆ update_pad_mimetype()

void NvStreamMux::update_pad_mimetype ( unsigned int  id,
PAD_MIME_TYPE  mime_type 
)

◆ wait()

virtual void NvStreamMux::wait ( )
inlinevirtual

Definition at line 107 of file nvstreammux.h.

Field Documentation

◆ synch_buffer

ISynchronizeBuffer* NvStreamMux::synch_buffer

Definition at line 424 of file nvstreammux.h.

Referenced by NvStreamMux(), and set_policy().


The documentation for this class was generated from the following file: