pub trait GStreamingCompiledTraitConst {
    fn as_raw_GStreamingCompiled(&self) -> *const c_void;

    fn running(&self) -> Result<bool> { ... }
    fn to_bool(&self) -> Result<bool> { ... }
}
Expand description

\addtogroup gapi_main_classes /

Represents a computation (graph) compiled for streaming.

This class represents a product of graph compilation (calling cv::GComputation::compileStreaming()). Objects of this class actually do stream processing, and the whole pipeline execution complexity is incapsulated into objects of this class. Execution model has two levels: at the very top, the execution of a heterogeneous graph is aggressively pipelined; at the very bottom the execution of every internal block is determined by its associated backend. Backends are selected based on kernel packages passed via compilation arguments ( see @ref gapi_compile_args, GNetworkPackage, GKernelPackage for details).

GStreamingCompiled objects have a “player” semantics – there are methods like start() and stop(). GStreamingCompiled has a full control over a videostream and so is stateful. You need to specify the input stream data using setSource() and then call start() to actually start processing. After that, use pull() or try_pull() to obtain next processed data frame from the graph in a blocking or non-blocking way, respectively.

Currently a single GStreamingCompiled can process only one video streat at time. Produce multiple GStreamingCompiled objects to run the same graph on multiple video streams.

See also

GCompiled

Required Methods§

Provided Methods§

Test if the pipeline is running.

Note: This method is not thread-safe (with respect to the user side) at the moment. Protect the access if start()/stop()/setSource() may be called on the same object in multiple threads in your application.

Returns

true if the current stream is not over yet.

Check if compiled object is valid (non-empty)

Returns

true if the object is runnable (valid), false otherwise

Implementors§