Update bitflags to 1.2 and fix namespacing

This commit is contained in:
Zhiming Wang 2020-06-01 13:06:34 +08:00
parent 3a8f366f60
commit 6644a91da4
No known key found for this signature in database
GPG Key ID: 5B58F95EC95965D8
6 changed files with 11 additions and 11 deletions

View File

@ -94,7 +94,7 @@ software-scaling = ["ffmpeg-sys/swscale", "codec"]
[dependencies]
libc = "0.2"
bitflags = "0.9"
bitflags = "1.2"
[dependencies.image]
version = "0.12"

View File

@ -121,7 +121,7 @@ impl ChannelLayoutIter {
}
pub fn best(self, max: i32) -> ChannelLayout {
self.fold(::channel_layout::MONO, |acc, cur| {
self.fold(ChannelLayout::MONO, |acc, cur| {
if cur.channels() > acc.channels() && cur.channels() <= max {
cur
} else {

View File

@ -2,7 +2,7 @@ use std::marker::PhantomData;
use std::mem;
use std::slice;
use super::{flag, Borrow, Flags, Mut, Ref, SideData};
use super::{Borrow, Flags, Mut, Ref, SideData};
use ffi::*;
use libc::c_int;
use {format, Error, Rational};
@ -99,12 +99,12 @@ impl Packet {
#[inline]
pub fn is_key(&self) -> bool {
self.flags().contains(flag::KEY)
self.flags().contains(Flags::KEY)
}
#[inline]
pub fn is_corrupt(&self) -> bool {
self.flags().contains(flag::CORRUPT)
self.flags().contains(Flags::CORRUPT)
}
#[inline]

View File

@ -28,7 +28,7 @@ pub fn converter(
output,
width,
height,
scaling::flag::FAST_BILINEAR,
scaling::flag::Flags::FAST_BILINEAR,
)
}

View File

@ -1,4 +1,4 @@
use super::{flag, Context, Flags};
use super::{Context, Flags};
use util::format;
use {decoder, frame, Error, Picture};
@ -25,7 +25,7 @@ impl<'a> Picture<'a> {
format,
self.width(),
self.height(),
flag::FAST_BILINEAR,
Flags::FAST_BILINEAR,
)
}
}
@ -53,7 +53,7 @@ impl frame::Video {
format,
self.width(),
self.height(),
flag::FAST_BILINEAR,
Flags::FAST_BILINEAR,
)
}
}
@ -81,7 +81,7 @@ impl decoder::Video {
format,
self.width(),
self.height(),
flag::FAST_BILINEAR,
Flags::FAST_BILINEAR,
)
}
}

View File

@ -75,7 +75,7 @@ impl Frame {
#[inline]
pub fn is_corrupt(&self) -> bool {
self.flags().contains(flag::CORRUPT)
self.flags().contains(Flags::CORRUPT)
}
#[inline]