Skip to content

Commit

Permalink
Merge branch 'rerun-io-emilk/pin-version'
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanbabcock committed Nov 4, 2024
2 parents b180240 + ec0679e commit 31f93bd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "ffmpeg-sidecar"
version = "2.0.0"
edition = "2021"
rust-version = "1.79"
description = "Wrap a standalone FFmpeg binary in an intuitive Iterator interface."
authors = ["Nathan Babcock <nathan.r.babcock@gmail.com>"]
categories = ["multimedia"]
Expand Down
10 changes: 5 additions & 5 deletions examples/named_pipes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ fn main() -> anyhow::Result<()> {
use std::sync::mpsc;
use std::thread;

const VIDEO_PIPE_NAME: &'static str = pipe_name!("ffmpeg_video");
const AUDIO_PIPE_NAME: &'static str = pipe_name!("ffmpeg_audio");
const SUBTITLES_PIPE_NAME: &'static str = pipe_name!("ffmpeg_subtitles");
const VIDEO_PIPE_NAME: &str = pipe_name!("ffmpeg_video");
const AUDIO_PIPE_NAME: &str = pipe_name!("ffmpeg_audio");
const SUBTITLES_PIPE_NAME: &str = pipe_name!("ffmpeg_subtitles");

// Prepare an FFmpeg command with separate outputs for video, audio, and subtitles.
let mut command = FfmpegCommand::new();
Expand All @@ -31,7 +31,7 @@ fn main() -> anyhow::Result<()> {
.overwrite() // <- overwrite required on windows
// Generate test video
.format("lavfi")
.input(format!("testsrc=size=1920x1080:rate=60:duration=10"))
.input("testsrc=size=1920x1080:rate=60:duration=10")
// Generate test audio
.format("lavfi")
.input("sine=frequency=1000:duration=10")
Expand Down Expand Up @@ -127,7 +127,7 @@ fn main() -> anyhow::Result<()> {
Ok(())
});

return Ok((thread, ready_sender));
Ok((thread, ready_sender))
})
.collect::<Result<Vec<_>>>()?;

Expand Down
4 changes: 2 additions & 2 deletions examples/sockets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn main() -> Result<()> {
.overwrite() // <- overwrite required on windows
// Generate test video
.format("lavfi")
.input(format!("testsrc=size=1920x1080:rate=60:duration=10"))
.input("testsrc=size=1920x1080:rate=60:duration=10")
// Generate test audio
.format("lavfi")
.input("sine=frequency=1000:duration=10")
Expand Down Expand Up @@ -76,7 +76,7 @@ fn listen_for_connections(tcp_port: u32, exit_receiver: Receiver<()>) -> Result<

let mut handler_threads = Vec::new();
loop {
if let Ok(_) = exit_receiver.try_recv() {
if exit_receiver.try_recv().is_ok() {
break;
}
match listener.accept() {
Expand Down
9 changes: 9 additions & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# If you see this, run "rustup self update" to get rustup 1.23 or newer.

# NOTE: above comment is for older `rustup` (before TOML support was added),
# which will treat the first line as the toolchain name, and therefore show it
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".

[toolchain]
channel = "1.79" # Avoid specifying a patch version here; see https://github.com/emilk/eframe_template/issues/145
components = ["rustfmt", "clippy"]
2 changes: 1 addition & 1 deletion src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ impl FfmpegCommand {
.get_args()
.filter_map(|s| {
s.to_str().map(|s| {
if s.starts_with("-") {
if s.starts_with('-') {
format!("\\\n {s}")
} else {
s.to_owned()
Expand Down

0 comments on commit 31f93bd

Please sign in to comment.