class dlstreamer::Source#

Overview#

Abstract interface for source elements. Source element has one output and no input. Source element is responsible for allocating output frame/tensor. More…

#include <source.h>

class Source: public dlstreamer::Element {
public:
    // methods

    virtual FrameInfo get_output_info() = 0;
    virtual void set_output_info(const FrameInfo& info) = 0;
    virtual FramePtr read() = 0;
};

// direct descendants

template <class T>
class BaseElement;

Inherited Members#

public:
    // methods

    virtual bool init() = 0;
    virtual ContextPtr get_context(MemoryType memory_type) = 0;

Detailed Documentation#

Abstract interface for source elements. Source element has one output and no input. Source element is responsible for allocating output frame/tensor.

Methods#

virtual FrameInfo get_output_info() = 0

Returns output information of the source.

virtual void set_output_info(const FrameInfo& info) = 0

Enables post-processing (ex, resize, color-conversion) to specified format and tensor shape.

Parameters:

info

Output frames information

virtual FramePtr read() = 0

Read one frame from the source.

Parameters:

dst

Output frame