#include "mediapipe/framework/tool/subgraph_expansion.h"
#include <algorithm>
#include <functional>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <utility>
#include <vector>
#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"
#include "mediapipe/framework/port/logging.h"
#include "mediapipe/framework/port/map_util.h"
#include "mediapipe/framework/port/ret_check.h"
#include "mediapipe/framework/port/status_builder.h"
#include "mediapipe/framework/port/status_macros.h"
#include "mediapipe/framework/status_handler.pb.h"
#include "mediapipe/framework/subgraph.h"
#include "mediapipe/framework/tool/name_util.h"
#include "mediapipe/framework/tool/tag_map.h"
namespace mediapipe {
namespace tool {
absl::Status TransformStreamNames(
proto_ns::RepeatedPtrField<ProtoString>* streams,
const std::function<std::string(absl::string_view)>& transform) { … }
absl::Status FindIgnoredStreams(
const proto_ns::RepeatedPtrField<ProtoString>& src_streams,
const proto_ns::RepeatedPtrField<ProtoString>& dst_streams,
std::set<std::string>* result) { … }
absl::Status RemoveIgnoredStreams(
proto_ns::RepeatedPtrField<ProtoString>* streams,
const std::set<std::string>& missing_streams) { … }
absl::Status TransformNames(
CalculatorGraphConfig* config,
const std::function<std::string(absl::string_view)>& transform) { … }
static absl::Status PrefixNames(std::string prefix,
CalculatorGraphConfig* config) { … }
absl::Status FindCorrespondingStreams(
std::map<std::string, std::string>* stream_map,
const proto_ns::RepeatedPtrField<ProtoString>& src_streams,
const proto_ns::RepeatedPtrField<ProtoString>& dst_streams) { … }
absl::Status ValidateSubgraphFields(
const CalculatorGraphConfig::Node& subgraph_node) { … }
absl::Status ConnectSubgraphStreams(
const CalculatorGraphConfig::Node& subgraph_node,
CalculatorGraphConfig* subgraph_config) { … }
absl::Status ExpandSubgraphs(
CalculatorGraphConfig* config, const GraphRegistry* graph_registry,
const Subgraph::SubgraphOptions* graph_options,
std::shared_ptr<GraphServiceManager> service_manager) { … }
CalculatorGraphConfig MakeSingleNodeGraph(CalculatorGraphConfig::Node node) { … }
}
}