Skip to content

Commit

Permalink
Rename AVFrame to FrameRef
Browse files Browse the repository at this point in the history
  • Loading branch information
lookback-hugotunius authored and lolgesten committed May 1, 2024
1 parent f9124e3 commit 045e2f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::ptr;
use tracing::Level;


use super::{sys, av_log_set_callback, set_log_level, log_callback, Codec, Error, CodecKind, err_code_to_string, AvFrame, Packet};
use super::{sys, av_log_set_callback, set_log_level, log_callback, Codec, Error, CodecKind, err_code_to_string, EncodedFrame, Packet};
use super::sys::AVPixelFormat as PixelFormat;
use super::{RawFrame, RawPacket};

Expand Down Expand Up @@ -141,7 +141,7 @@ impl Encoder {

pub fn encode(
&mut self,
frame: &dyn AvFrame,
frame: &dyn EncodedFrame,
) -> Result<impl Iterator<Item = Result<Packet, Error>>, Error> {
let pts = self.pts_counter;
self.pts_counter += 1;
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub use error::Error;
use tracing::Level;
use tracing::{debug, error, info, trace, warn};

pub trait AvFrame {
pub trait FrameRef {
fn width(&self) -> usize;
fn height(&self) -> usize;
fn plane_count(&self) -> usize;
Expand Down Expand Up @@ -78,7 +78,7 @@ impl RawFrame {
}
}

fn fill(&mut self, frame: &dyn AvFrame, pts: i64) {
fn fill(&mut self, frame: &dyn FrameRef, pts: i64) {
unsafe {
let width = (*self.0).width as usize;
let height = (*self.0).height as usize;
Expand Down

0 comments on commit 045e2f7

Please sign in to comment.