Project import generated by Copybara.
GitOrigin-RevId: 6e4aff1cc351be3ae4537b677f36d139ee50ce09
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "mediapipe/framework/graph_service_manager.h"
|
||||
#include "mediapipe/framework/packet_generator.pb.h"
|
||||
#include "mediapipe/framework/port.h"
|
||||
#include "mediapipe/framework/port/core_proto_inc.h"
|
||||
@@ -273,7 +274,8 @@ absl::Status ConnectSubgraphStreams(
|
||||
}
|
||||
|
||||
absl::Status ExpandSubgraphs(CalculatorGraphConfig* config,
|
||||
const GraphRegistry* graph_registry) {
|
||||
const GraphRegistry* graph_registry,
|
||||
const GraphServiceManager* service_manager) {
|
||||
graph_registry =
|
||||
graph_registry ? graph_registry : &GraphRegistry::global_graph_registry;
|
||||
RET_CHECK(config);
|
||||
@@ -292,9 +294,10 @@ absl::Status ExpandSubgraphs(CalculatorGraphConfig* config,
|
||||
int node_id = it - nodes->begin();
|
||||
std::string node_name = CanonicalNodeName(*config, node_id);
|
||||
MP_RETURN_IF_ERROR(ValidateSubgraphFields(node));
|
||||
ASSIGN_OR_RETURN(auto subgraph,
|
||||
graph_registry->CreateByName(config->package(),
|
||||
node.calculator(), &node));
|
||||
SubgraphContext subgraph_context(&node, service_manager);
|
||||
ASSIGN_OR_RETURN(auto subgraph, graph_registry->CreateByName(
|
||||
config->package(), node.calculator(),
|
||||
&subgraph_context));
|
||||
MP_RETURN_IF_ERROR(PrefixNames(node_name, &subgraph));
|
||||
MP_RETURN_IF_ERROR(ConnectSubgraphStreams(node, &subgraph));
|
||||
subgraphs.push_back(subgraph);
|
||||
|
||||
Reference in New Issue
Block a user