class dlstreamer::Element#

Overview#

Base class for all elements (Source, Transform, TransformInplace and Sink) More…

#include <element.h>

class Element {
public:
    // methods

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

// direct descendants

class Sink;
class Source;
class Transform;
class TransformInplace;

Detailed Documentation#

Base class for all elements (Source, Transform, TransformInplace and Sink)

The caller is responsible for thread safety.

Methods#

virtual bool init() = 0

Initialize element according to input/output information. Function returns false in initialization failed.

virtual ContextPtr get_context(MemoryType memory_type) = 0

The function requests element to create context of specified memory type (or return existent one). If context can’t be created, function returns nullptr.

Parameters:

memory_type

Memory type of requested context