-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a new builtin module that allows the creation of a custom MediaStream #8
Conversation
…ream that can accept frames from discord_voice directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally seems 👍 . minor comments
gpu_memory_buffer_support_->CreateGpuMemoryBufferImplFromHandle( | ||
std::move(buffer_handle), size, gfx::BufferFormat::RGBA_8888, | ||
gfx::BufferUsage::GPU_READ, base::DoNothing()); | ||
auto mailbox = sii->CreateSharedImage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we're not using the shared texture path atm but it's surprising to me that we'd do this bit per-frame. Is it cheap?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the cost. The shared texture path was very much in the "try to get it to work at all" phase when I paused work on it. Definitely would be better to avoid this setup for textures we've already seen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh i'd prefer if this was a chromium patch and exposed by default (it certainly feels "off" to be reaching in to and extending blink like this from electron), however, in the end i don't think it matters much either way. (i.e. so we'd just new DiscordVideoStream(streamId)
)
keeping a strictly C interface is a good call either way, i'd say 👍
This is the electron/chromium half of the new video pipeline. The integration is a little funny due to the way electron handles customizing chromium. Essentially there are patches to the chromium tree which are very flexible, but difficult to maintain and there are builtin node modules. The latter is easier to maintain, but our need to output real MediaStream objects means we can't use the normal context bridge which means we need to handle installing the function into the main context ourselves.
A couple other notes on this: