-
Notifications
You must be signed in to change notification settings - Fork 259
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
Channel API #2451
Channel API #2451
Conversation
6f3abec
to
dbe4217
Compare
54975b0
to
98fd0ea
Compare
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 have a couple of questions and suggestions 😄
if self.limit < self.count { | ||
Err(TrySendError::Full(data)) | ||
} else { | ||
let r = self.sender.try_send(data); |
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.
Maybe use match
?
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.
it makes the code more verbose.
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 actually think it makes it easier to read. But maybe just a preference.
src/bin/rav1e-ch.rs
Outdated
}); | ||
|
||
// Receive Packets | ||
let d = s.spawn(move |_| -> Result<(), CliError> { |
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.
Maybe not use d
as variable name?
|
||
info!( | ||
"Using y4m decoder: {}x{}p @ {}/{} fps, {}, {}-bit", | ||
video_info.width, |
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.
Maybe also move these attributes out to make it less verbose?
let width = video_info.width;
// ...
d37ffcf
to
73225b7
Compare
The internal version will be used by the channel API.
It will be used by the Channel API.
Now with the commits collapsed without the interims :) |
This set provides a channel-based API that should make much simpler the normal usage.
TODO:
Open questions:
last-error
inside the ReceiverPacket abstraction and a mean to retrieve itSolves: #689
(apparently github got some consistency issue with #2118 so I ended up opening this)