-
Notifications
You must be signed in to change notification settings - Fork 4
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
rkmpp encoder example #203
base: main
Are you sure you want to change the base?
Conversation
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.
Minor issues, none of these are blocking.
// yuck. | ||
let frame_len = u64::try_from(Frame::new(args.width, args.height, args.pixel_format).data.len()).unwrap(); |
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.
Can we explain better what is "yuck" and how we can make it less "yuck"?
while let Ok(frame) = raw_frame_rx.recv() { | ||
let pre = Instant::now(); | ||
let output = encoder.encode(frame, frame_type).unwrap(); | ||
encoding += Instant::now().duration_since(pre); |
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.
encoding += Instant::now().duration_since(pre); | |
encoding += pre.elapsed(); |
loop { | ||
let pre = Instant::now(); | ||
let output = encoder.flush().unwrap(); | ||
encoding += Instant::now().duration_since(pre); |
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.
encoding += Instant::now().duration_since(pre); | |
encoding += pre.elapsed(); |
frames_out += 1; | ||
} | ||
drop(encoded_frame_tx); | ||
let total = Instant::now().duration_since(before); |
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.
let total = Instant::now().duration_since(before); | |
let total = before.elapsed(); |
No description provided.