Add method to get source/sink type.

Also provide convenience method to enumerate all sinks connected to a source.
This commit is contained in:
Peter Johnson
2016-11-15 22:18:32 -08:00
parent 6446b9ef10
commit 3381340eb5
17 changed files with 253 additions and 34 deletions

View File

@@ -696,7 +696,7 @@ CS_Sink CreateMJPEGServer(llvm::StringRef name, llvm::StringRef listenAddress,
name, desc.str(),
std::unique_ptr<wpi::NetworkAcceptor>(
new wpi::TCPAcceptor(port, str.c_str(), Logger::GetInstance())));
return Sinks::GetInstance().Allocate(SinkData::kHTTP, sink);
return Sinks::GetInstance().Allocate(CS_SINK_MJPEG, sink);
}
} // namespace cs