Clarify deprecated GraphStatus usage in Close documentation
PiperOrigin-RevId: 556963967
This commit is contained in:
parent
dd940707ca
commit
9c5bdd2eb9
|
@ -182,8 +182,8 @@ cc_library(
|
|||
":timestamp",
|
||||
"//mediapipe/framework/deps:registration",
|
||||
"//mediapipe/framework/port:logging",
|
||||
"//mediapipe/framework/port:status",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@com_google_absl//absl/status",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -17,14 +17,16 @@
|
|||
#ifndef MEDIAPIPE_FRAMEWORK_CALCULATOR_BASE_H_
|
||||
#define MEDIAPIPE_FRAMEWORK_CALCULATOR_BASE_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "mediapipe/framework/calculator_context.h"
|
||||
#include "mediapipe/framework/calculator_contract.h"
|
||||
#include "mediapipe/framework/deps/registration.h"
|
||||
#include "mediapipe/framework/port.h"
|
||||
#include "mediapipe/framework/port/status.h"
|
||||
#include "mediapipe/framework/timestamp.h"
|
||||
|
||||
namespace mediapipe {
|
||||
|
@ -150,8 +152,9 @@ class CalculatorBase {
|
|||
// Packets may be output during a call to Close(). However, output packets
|
||||
// are silently discarded if Close() is called after a graph run has ended.
|
||||
//
|
||||
// NOTE: If Close() needs to perform an action only when processing is
|
||||
// complete, Close() must check if cc->GraphStatus() is OK.
|
||||
// NOTE: Do not call cc->GraphStatus() in Close() if you need to check if the
|
||||
// processing is complete. Please, see CalculatorContext::GraphStatus
|
||||
// documentation for the suggested solution.
|
||||
virtual absl::Status Close(CalculatorContext* cc) { return absl::OkStatus(); }
|
||||
|
||||
// Returns a value according to which the framework selects
|
||||
|
|
Loading…
Reference in New Issue
Block a user