Skip to content

Commit

Permalink
misc: set PathBuf directly
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaDve committed Feb 26, 2024
1 parent 5b77eed commit c23f194
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions src/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ use gst::prelude::*;
use gtk::graphene::Rect;
use num_rational::Rational32;

use std::{
os::unix::io::RawFd,
path::{Path, PathBuf},
};
use std::{os::unix::io::RawFd, path::PathBuf};

use crate::{
area_selector::SelectAreaData,
Expand Down Expand Up @@ -35,14 +32,14 @@ pub struct PipelineBuilder {

impl PipelineBuilder {
pub fn new(
file_path: &Path,
file_path: PathBuf,
framerate: Framerate,
profile: Profile,
fd: RawFd,
streams: Vec<Stream>,
) -> Self {
Self {
file_path: file_path.to_path_buf(),
file_path,
framerate,
profile,
fd,
Expand Down
2 changes: 1 addition & 1 deletion src/recording.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ impl Recording {
imp.file.set(gio::File::for_path(&file_path)).unwrap();

let mut pipeline_builder = PipelineBuilder::new(
&file_path,
file_path,
settings.framerate(),
profile.clone(),
fd,
Expand Down

0 comments on commit c23f194

Please sign in to comment.