pub struct GStreamingCompiled { /* private fields */ }
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 [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
Implementations§
Source§impl GStreamingCompiled
impl GStreamingCompiled
pub fn default() -> Result<GStreamingCompiled>
Trait Implementations§
Source§impl Boxed for GStreamingCompiled
impl Boxed for GStreamingCompiled
Source§unsafe fn from_raw(
ptr: <GStreamingCompiled as OpenCVFromExtern>::ExternReceive,
) -> Self
unsafe fn from_raw( ptr: <GStreamingCompiled as OpenCVFromExtern>::ExternReceive, ) -> Self
Source§fn into_raw(
self,
) -> <GStreamingCompiled as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw( self, ) -> <GStreamingCompiled as OpenCVTypeExternContainer>::ExternSendMut
Source§fn as_raw(
&self,
) -> <GStreamingCompiled as OpenCVTypeExternContainer>::ExternSend
fn as_raw( &self, ) -> <GStreamingCompiled as OpenCVTypeExternContainer>::ExternSend
Source§fn as_raw_mut(
&mut self,
) -> <GStreamingCompiled as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self, ) -> <GStreamingCompiled as OpenCVTypeExternContainer>::ExternSendMut
Source§impl Clone for GStreamingCompiled
impl Clone for GStreamingCompiled
Source§impl Debug for GStreamingCompiled
impl Debug for GStreamingCompiled
Source§impl Drop for GStreamingCompiled
impl Drop for GStreamingCompiled
Source§impl GStreamingCompiledTrait for GStreamingCompiled
impl GStreamingCompiledTrait for GStreamingCompiled
fn as_raw_mut_GStreamingCompiled(&mut self) -> *mut c_void
Source§fn set_source(&mut self, ins: GRunArgs) -> Result<()>
fn set_source(&mut self, ins: GRunArgs) -> Result<()>
Source§fn set_source_1(
&mut self,
callback: &impl Detail_ExtractArgsCallbackTraitConst,
) -> Result<()>
fn set_source_1( &mut self, callback: &impl Detail_ExtractArgsCallbackTraitConst, ) -> Result<()>
impl Send for GStreamingCompiled
Auto Trait Implementations§
impl Freeze for GStreamingCompiled
impl RefUnwindSafe for GStreamingCompiled
impl !Sync for GStreamingCompiled
impl Unpin for GStreamingCompiled
impl UnwindSafe for GStreamingCompiled
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
Source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res,
) -> Res
unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res
Mat
or another similar object. By passing
a mutable reference to the Mat
to this function your closure will get called with the read reference and a write references
to the same Mat
. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data,
but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place
modification is imgproc::threshold
. Read more