Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
russelltg committed Oct 13, 2024
1 parent 92286f0 commit dc44b05
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
5 changes: 4 additions & 1 deletion src/cap_ext_image_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ impl Dispatch<ExtImageCopyCaptureSessionV1, ()> for State<CapExtImageCopy> {
ext_image_copy_capture_session_v1::Event::DmabufDevice { device } => {
let dev = dev_t::from_ne_bytes(device.try_into().unwrap());
let node = DrmNode::from_dev_id(dev).unwrap();
let node = node.node_with_type(drm::node::NodeType::Render).unwrap().unwrap();
let node = node
.node_with_type(drm::node::NodeType::Render)
.unwrap()
.unwrap();
let path = node.dev_path().unwrap();
if let ExtImageCopyState::Probing(_, _, dev) = &mut state.enc.unwrap_cap().state {
*dev = Some(path);
Expand Down
27 changes: 15 additions & 12 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ impl EncState {
}
let selected_format = match selected_format {
Some(sf) => sf,
None =>
None =>
bail!("failed to select a viable capture format. This is probably a bug. Availabe capture formats are {:?}", capture_formats),
};
let capture_pixfmt = dmabuf_to_av(selected_format.fourcc);
Expand Down Expand Up @@ -1695,17 +1695,20 @@ impl EncState {
None => HistoryState::Recording(0), // recording since the beginnging, no PTS offset
};

Ok((EncState {
video_filter,
enc_video,
filter_output_timebase: filter_timebase,
octx,
vid_stream_idx,
frames_rgb,
history_state,
sigusr1_flag,
audio,
}, selected_format))
Ok((
EncState {
video_filter,
enc_video,
filter_output_timebase: filter_timebase,
octx,
vid_stream_idx,
frames_rgb,
history_state,
sigusr1_flag,
audio,
},
selected_format,
))
}

fn process_ready(&mut self) {
Expand Down

0 comments on commit dc44b05

Please sign in to comment.