Satisfying the compiler
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
parent
bd7cc019cf
commit
e9238660d8
@ -10,7 +10,6 @@ use ffmpeg::media::Type;
|
|||||||
use ffmpeg::software::scaling::{context::Context, flag::Flags};
|
use ffmpeg::software::scaling::{context::Context, flag::Flags};
|
||||||
use ffmpeg::util::frame::video::Video;
|
use ffmpeg::util::frame::video::Video;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::time::Instant;
|
|
||||||
mod out;
|
mod out;
|
||||||
|
|
||||||
fn main() -> Result<(), Error> {
|
fn main() -> Result<(), Error> {
|
||||||
@ -26,7 +25,6 @@ fn main() -> Result<(), Error> {
|
|||||||
.best(Type::Video)
|
.best(Type::Video)
|
||||||
.ok_or(ffmpeg::Error::StreamNotFound)?;
|
.ok_or(ffmpeg::Error::StreamNotFound)?;
|
||||||
let video_stream_index = input.index();
|
let video_stream_index = input.index();
|
||||||
let fps = input.avg_frame_rate();
|
|
||||||
|
|
||||||
let context_decoder = ffmpeg::codec::context::Context::from_parameters(input.parameters())?;
|
let context_decoder = ffmpeg::codec::context::Context::from_parameters(input.parameters())?;
|
||||||
// Ctx's video decoder
|
// Ctx's video decoder
|
||||||
@ -54,7 +52,7 @@ fn main() -> Result<(), Error> {
|
|||||||
|
|
||||||
// test::print_raw(&rgb_frame.data(0));
|
// test::print_raw(&rgb_frame.data(0));
|
||||||
// test::print_square(&rgb_frame.data(0), rgb_frame.width() as usize);
|
// test::print_square(&rgb_frame.data(0), rgb_frame.width() as usize);
|
||||||
out::print_square(&rgb_frame, out::LinesFormat::RightLeft, video_stream_index);
|
out::print_square(&rgb_frame, out::LinesFormat::RightLeft, video_stream_index).unwrap();
|
||||||
// test::small_matrix();
|
// test::small_matrix();
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
@ -65,9 +63,6 @@ fn main() -> Result<(), Error> {
|
|||||||
// Is this for multiple video streams?
|
// Is this for multiple video streams?
|
||||||
if stream.index() == video_stream_index {
|
if stream.index() == video_stream_index {
|
||||||
decoder.send_packet(&packet)?;
|
decoder.send_packet(&packet)?;
|
||||||
|
|
||||||
let now = Instant::now();
|
|
||||||
|
|
||||||
receive_and_process_decoded_frames(&mut decoder)?;
|
receive_and_process_decoded_frames(&mut decoder)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user