mirror of
https://github.com/encounter/rust-ffmpeg-zmwangx.git
synced 2026-07-10 21:18:40 -07:00
software/scaling/extensions: add inline attributes
This commit is contained in:
@@ -3,12 +3,14 @@ use ::{Picture, decoder, Error, frame};
|
||||
use super::{Context, Flags, flag};
|
||||
|
||||
impl<'a> Picture<'a> {
|
||||
#[inline]
|
||||
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
|
||||
Context::get(self.format(), self.width(), self.height(),
|
||||
self.format(), width, height,
|
||||
flags)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
|
||||
Context::get(self.format(), self.width(), self.height(),
|
||||
format, self.width(), self.height(),
|
||||
@@ -17,12 +19,14 @@ impl<'a> Picture<'a> {
|
||||
}
|
||||
|
||||
impl frame::Video {
|
||||
#[inline]
|
||||
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
|
||||
Context::get(self.format(), self.width(), self.height(),
|
||||
self.format(), width, height,
|
||||
flags)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
|
||||
Context::get(self.format(), self.width(), self.height(),
|
||||
format, self.width(), self.height(),
|
||||
@@ -32,12 +36,14 @@ impl frame::Video {
|
||||
|
||||
|
||||
impl decoder::Video {
|
||||
#[inline]
|
||||
pub fn scaler(&self, width: u32, height: u32, flags: Flags) -> Result<Context, Error> {
|
||||
Context::get(self.format(), self.width(), self.height(),
|
||||
self.format(), width, height,
|
||||
flags)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn converter(&self, format: format::Pixel) -> Result<Context, Error> {
|
||||
Context::get(self.format(), self.width(), self.height(),
|
||||
format, self.width(), self.height(),
|
||||
|
||||
Reference in New Issue
Block a user