Skip to content
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

chore: use a context to control the recording process #99

Merged
merged 1 commit into from
Oct 30, 2022

Conversation

muesli
Copy link
Contributor

@muesli muesli commented Oct 30, 2022

This prevents the render goroutine from directly printing to stdout and ensures a controlled tear-down.

This prevents the render goroutine from directly printing to stdout
and ensures a controlled tear-down.
@muesli muesli added the bug Something isn't working label Oct 30, 2022
Copy link
Member

@caarlos0 caarlos0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

as a nitpick: could probably use exec with context when starting ttyd and ffmpeg as well.

@muesli
Copy link
Contributor Author

muesli commented Oct 30, 2022

@caarlos0 coming up in a separate PR!

@maaslalani
Copy link
Contributor

Thanks @muesli!

On a semi-related note, would we be able to make the screenshot capturing stuff faster using goroutines? I tried playing around with it a bit myself but couldn't get it to work, so wondering if you had any thoughts.

I.e. make a separate goroutine each time we capture a frame or write a file.

@maaslalani maaslalani merged commit 1a2716c into main Oct 30, 2022
@maaslalani maaslalani deleted the recorder-context branch October 30, 2022 10:52
@muesli
Copy link
Contributor Author

muesli commented Oct 30, 2022

On a semi-related note, would we be able to make the screenshot capturing stuff faster using goroutines? I tried playing around with it a bit myself but couldn't get it to work, so wondering if you had any thoughts.

Might make the timing easier, but also complicates situations where you can't keep up with the requested interval. I'll take a closer look!

@maaslalani
Copy link
Contributor

On a semi-related note, would we be able to make the screenshot capturing stuff faster using goroutines? I tried playing around with it a bit myself but couldn't get it to work, so wondering if you had any thoughts.

Might make the timing easier, but also complicates situations where you can't keep up with the requested interval. I'll take a closer look!

I believe this is similar to what I was suggesting: #110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants