In this case, all source calculators and graph input streams will be closed (and remaining Packets will propagate through the graph).Ī source node in a graph will continue to have Process() called on it as long as it returns absl::OkStatus(). If a non-source calculator returns tool::StatusStop(), then this signals the graph is being cancelled early.
#Media math calculator code
Process() called on a non-source node must return absl::OkStatus() to indicate that all went well, or any other status code to signal an error The following are code snippets from CalculatorBase.h.Ĭlass CalculatorBase Processing The calculator object is destroyed as soon as the graph finishes running. After Close() returns, the calculator should be considered a dead node. No inputs are available via any input streams during Close(), but it still has access to input side packets and therefore may write outputs. This function is always called if Open() was called and succeeded and even if the graph run terminated because of an error.
#Media math calculator how to
We describe how to create a new calculator, how to initialize a calculator, how to perform its calculations, input and output streams, timestamps, and options. This site uses Just the Docs, a documentation theme for Jekyll.Įach calculator is a node of a graph. YouTube-8M Feature Extraction and Model Inference.KNIFT (Template-based Feature Matching).