mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 10:03:23 +09:00
[MG_Remote, MG_Test] (P7): the server binds its deferred stream link through the Transport factory
This commit is contained in:
@@ -399,6 +399,18 @@ namespace MobileGL::MG_Remote::Transport {
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
MobileGLResult CreateDeferredStreamLink(const SessionSegmentSizes& sizes, TransportRoleTag role,
|
||||
std::unique_ptr<ILink>& out) {
|
||||
auto link = std::make_unique<StreamLink>();
|
||||
const auto result = link->AttachOwnedDeferred(sizes, role);
|
||||
if (result == MOBILEGL_OK) out = std::move(link);
|
||||
return result;
|
||||
}
|
||||
MobileGLResult BindStreamLinkDataFd(ILink& link, int fd) {
|
||||
auto* stream = dynamic_cast<StreamLink*>(&link);
|
||||
if (stream == nullptr) return MOBILEGL_ERR_INVALID_ARGUMENT;
|
||||
return stream->BindDataFd(fd);
|
||||
}
|
||||
void StreamLink::InitializeEndpoints() {
|
||||
m_impl->owned->SetRole(m_impl->role);
|
||||
m_impl->owned->InitializeEndpoints();
|
||||
|
||||
Reference in New Issue
Block a user