Skip to content

Commit

Permalink
try_pull_sample timeout ZERO
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarriba committed Jan 3, 2025
1 parent 934498d commit fa62fef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/kornia-io/src/stream/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ impl StreamCapture {
///
/// An Option containing the last captured Image or None if no image has been captured yet.
pub fn grab(&self) -> Result<Option<Image<u8, 3>>, StreamCaptureError> {
// NOTE: this is a blocking call with a timeout of 1ns, so it should not block the thread at all
self.appsink
.try_pull_sample(gst::ClockTime::from_nseconds(1))
.try_pull_sample(gst::ClockTime::ZERO)
.map(Self::extract_image_frame)
.transpose()
}
Expand Down

0 comments on commit fa62fef

Please sign in to comment.