*: update to 2.7
This commit is contained in:
parent
e95c55dbf5
commit
1e5d77816a
@ -12,6 +12,7 @@ keywords = ["audio", "video"]
|
||||
[features]
|
||||
default = ["codec", "device", "filter", "format", "resampling", "postprocessing", "software-resampling", "software-scaling"]
|
||||
|
||||
static = ["ffmpeg-sys/static"]
|
||||
codec = ["ffmpeg-sys/avcodec"]
|
||||
device = ["ffmpeg-sys/avdevice", "format"]
|
||||
filter = ["ffmpeg-sys/avfilter"]
|
||||
@ -26,6 +27,6 @@ libc = "0.1"
|
||||
bitflags = "0.1"
|
||||
|
||||
[dependencies.ffmpeg-sys]
|
||||
version = "2.6.2"
|
||||
version = "2.7.0"
|
||||
|
||||
default-features = false
|
||||
|
@ -128,6 +128,12 @@ impl Video {
|
||||
|
||||
// intra_matrix
|
||||
// inter_matrix
|
||||
|
||||
pub fn intra_dc_precision(&self) -> u8 {
|
||||
unsafe {
|
||||
(*self.as_ptr()).intra_dc_precision as u8
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Deref for Video {
|
||||
|
@ -217,6 +217,12 @@ impl Video {
|
||||
(*self.as_mut_ptr()).mb_decision = value.into();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_intra_dc_precision(&mut self, value: u8) {
|
||||
unsafe {
|
||||
(*self.as_mut_ptr()).intra_dc_precision = value as c_int;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Deref for Video {
|
||||
|
@ -196,6 +196,8 @@ pub enum Id {
|
||||
MVC1_DEPRECATED,
|
||||
MVC2_DEPRECATED,
|
||||
HQX,
|
||||
TDSC,
|
||||
HQ_HQA,
|
||||
|
||||
BRENDER_PIX,
|
||||
Y41P,
|
||||
@ -646,6 +648,8 @@ impl From<AVCodecID> for Id {
|
||||
AV_CODEC_ID_MVC1_DEPRECATED => Id::MVC1_DEPRECATED,
|
||||
AV_CODEC_ID_MVC2_DEPRECATED => Id::MVC2_DEPRECATED,
|
||||
AV_CODEC_ID_HQX => Id::HQX,
|
||||
AV_CODEC_ID_TDSC => Id::TDSC,
|
||||
AV_CODEC_ID_HQ_HQA => Id::HQ_HQA,
|
||||
|
||||
AV_CODEC_ID_BRENDER_PIX => Id::BRENDER_PIX,
|
||||
AV_CODEC_ID_Y41P => Id::Y41P,
|
||||
@ -1083,6 +1087,8 @@ impl Into<AVCodecID> for Id {
|
||||
Id::MVC1_DEPRECATED => AV_CODEC_ID_MVC1_DEPRECATED,
|
||||
Id::MVC2_DEPRECATED => AV_CODEC_ID_MVC2_DEPRECATED,
|
||||
Id::HQX => AV_CODEC_ID_HQX,
|
||||
Id::TDSC => AV_CODEC_ID_TDSC,
|
||||
Id::HQ_HQA => AV_CODEC_ID_HQ_HQA,
|
||||
|
||||
Id::BRENDER_PIX => AV_CODEC_ID_BRENDER_PIX,
|
||||
Id::Y41P => AV_CODEC_ID_Y41P,
|
||||
|
@ -16,6 +16,7 @@ pub enum Profile {
|
||||
MPEG4(MPEG4),
|
||||
JPEG2000(JPEG2000),
|
||||
HEVC(HEVC),
|
||||
VP9(VP9),
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
@ -42,6 +43,7 @@ pub enum DTS {
|
||||
_96_24,
|
||||
HD_HRA,
|
||||
HD_MA,
|
||||
Express,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
@ -124,6 +126,15 @@ pub enum HEVC {
|
||||
Rext,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
#[derive(Eq, PartialEq, Clone, Copy, Debug)]
|
||||
pub enum VP9 {
|
||||
_0,
|
||||
_1,
|
||||
_2,
|
||||
_3,
|
||||
}
|
||||
|
||||
impl From<(Id, c_int)> for Profile {
|
||||
fn from((id, value): (Id, c_int)) -> Profile {
|
||||
if value == FF_PROFILE_UNKNOWN {
|
||||
@ -157,6 +168,7 @@ impl From<(Id, c_int)> for Profile {
|
||||
FF_PROFILE_DTS_96_24 => Profile::DTS(DTS::_96_24),
|
||||
FF_PROFILE_DTS_HD_HRA => Profile::DTS(DTS::HD_HRA),
|
||||
FF_PROFILE_DTS_HD_MA => Profile::DTS(DTS::HD_MA),
|
||||
FF_PROFILE_DTS_EXPRESS => Profile::DTS(DTS::Express),
|
||||
|
||||
_ => Profile::Unknown,
|
||||
},
|
||||
@ -241,6 +253,15 @@ impl From<(Id, c_int)> for Profile {
|
||||
_ => Profile::Unknown,
|
||||
},
|
||||
|
||||
Id::VP9 => match value {
|
||||
FF_PROFILE_VP9_0 => Profile::VP9(VP9::_0),
|
||||
FF_PROFILE_VP9_1 => Profile::VP9(VP9::_1),
|
||||
FF_PROFILE_VP9_2 => Profile::VP9(VP9::_2),
|
||||
FF_PROFILE_VP9_3 => Profile::VP9(VP9::_3),
|
||||
|
||||
_ => Profile::Unknown,
|
||||
},
|
||||
|
||||
_ => Profile::Unknown
|
||||
}
|
||||
}
|
||||
@ -269,6 +290,7 @@ impl Into<c_int> for Profile {
|
||||
Profile::DTS(DTS::_96_24) => FF_PROFILE_DTS_96_24,
|
||||
Profile::DTS(DTS::HD_HRA) => FF_PROFILE_DTS_HD_HRA,
|
||||
Profile::DTS(DTS::HD_MA) => FF_PROFILE_DTS_HD_MA,
|
||||
Profile::DTS(DTS::Express) => FF_PROFILE_DTS_EXPRESS,
|
||||
|
||||
Profile::MPEG2(MPEG2::_422) => FF_PROFILE_MPEG2_422,
|
||||
Profile::MPEG2(MPEG2::High) => FF_PROFILE_MPEG2_HIGH,
|
||||
@ -325,6 +347,11 @@ impl Into<c_int> for Profile {
|
||||
Profile::HEVC(HEVC::Main10) => FF_PROFILE_HEVC_MAIN_10,
|
||||
Profile::HEVC(HEVC::MainStillPicture) => FF_PROFILE_HEVC_MAIN_STILL_PICTURE,
|
||||
Profile::HEVC(HEVC::Rext) => FF_PROFILE_HEVC_REXT,
|
||||
|
||||
Profile::VP9(VP9::_0) => FF_PROFILE_VP9_0,
|
||||
Profile::VP9(VP9::_1) => FF_PROFILE_VP9_1,
|
||||
Profile::VP9(VP9::_2) => FF_PROFILE_VP9_2,
|
||||
Profile::VP9(VP9::_3) => FF_PROFILE_VP9_3,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -150,6 +150,9 @@ pub enum Pixel {
|
||||
GBRAP16BE_LIBAV,
|
||||
GBRAP16LE_LIBAV,
|
||||
QSV,
|
||||
MMAL,
|
||||
|
||||
D3D11VA_VLD,
|
||||
|
||||
ZRGB,
|
||||
RGBZ,
|
||||
@ -192,6 +195,11 @@ pub enum Pixel {
|
||||
BAYER_GRBG16LE,
|
||||
BAYER_GRBG16BE,
|
||||
|
||||
YUV440P10LE,
|
||||
YUV440P10BE,
|
||||
YUV440P12LE,
|
||||
YUV440P12BE,
|
||||
|
||||
// --- defaults
|
||||
XVMC,
|
||||
Y400A,
|
||||
@ -221,9 +229,11 @@ pub enum Pixel {
|
||||
YUV444P9,
|
||||
YUV420P10,
|
||||
YUV422P10,
|
||||
YUV440P10,
|
||||
YUV444P10,
|
||||
YUV420P12,
|
||||
YUV422P12,
|
||||
YUV440P12,
|
||||
YUV444P12,
|
||||
YUV420P14,
|
||||
YUV422P14,
|
||||
@ -409,6 +419,9 @@ impl From<AVPixelFormat> for Pixel {
|
||||
AV_PIX_FMT_GBRAP16BE_LIBAV => Pixel::GBRAP16BE_LIBAV,
|
||||
AV_PIX_FMT_GBRAP16LE_LIBAV => Pixel::GBRAP16LE_LIBAV,
|
||||
AV_PIX_FMT_QSV => Pixel::QSV,
|
||||
AV_PIX_FMT_MMAL => Pixel::MMAL,
|
||||
|
||||
AV_PIX_FMT_D3D11VA_VLD => Pixel::D3D11VA_VLD,
|
||||
|
||||
AV_PIX_FMT_0RGB => Pixel::ZRGB,
|
||||
AV_PIX_FMT_RGB0 => Pixel::RGBZ,
|
||||
@ -451,6 +464,11 @@ impl From<AVPixelFormat> for Pixel {
|
||||
AV_PIX_FMT_BAYER_GRBG16LE => Pixel::BAYER_GRBG16LE,
|
||||
AV_PIX_FMT_BAYER_GRBG16BE => Pixel::BAYER_GRBG16BE,
|
||||
|
||||
AV_PIX_FMT_YUV440P10LE => Pixel::YUV440P10LE,
|
||||
AV_PIX_FMT_YUV440P10BE => Pixel::YUV440P10BE,
|
||||
AV_PIX_FMT_YUV440P12LE => Pixel::YUV440P12LE,
|
||||
AV_PIX_FMT_YUV440P12BE => Pixel::YUV440P12BE,
|
||||
|
||||
AV_PIX_FMT_NB => Pixel::None
|
||||
}
|
||||
}
|
||||
@ -607,6 +625,9 @@ impl Into<AVPixelFormat> for Pixel {
|
||||
Pixel::GBRAP16BE_LIBAV => AV_PIX_FMT_GBRAP16BE_LIBAV,
|
||||
Pixel::GBRAP16LE_LIBAV => AV_PIX_FMT_GBRAP16LE_LIBAV,
|
||||
Pixel::QSV => AV_PIX_FMT_QSV,
|
||||
Pixel::MMAL => AV_PIX_FMT_MMAL,
|
||||
|
||||
Pixel::D3D11VA_VLD => AV_PIX_FMT_D3D11VA_VLD,
|
||||
|
||||
Pixel::ZRGB => AV_PIX_FMT_0RGB,
|
||||
Pixel::RGBZ => AV_PIX_FMT_RGB0,
|
||||
@ -649,6 +670,11 @@ impl Into<AVPixelFormat> for Pixel {
|
||||
Pixel::BAYER_GRBG16LE => AV_PIX_FMT_BAYER_GRBG16LE,
|
||||
Pixel::BAYER_GRBG16BE => AV_PIX_FMT_BAYER_GRBG16BE,
|
||||
|
||||
Pixel::YUV440P10LE => AV_PIX_FMT_YUV440P10LE,
|
||||
Pixel::YUV440P10BE => AV_PIX_FMT_YUV440P10BE,
|
||||
Pixel::YUV440P12LE => AV_PIX_FMT_YUV440P12LE,
|
||||
Pixel::YUV440P12BE => AV_PIX_FMT_YUV440P12BE,
|
||||
|
||||
// --- defaults
|
||||
Pixel::XVMC => AV_PIX_FMT_XVMC,
|
||||
Pixel::Y400A => AV_PIX_FMT_Y400A,
|
||||
@ -678,9 +704,11 @@ impl Into<AVPixelFormat> for Pixel {
|
||||
Pixel::YUV444P9 => AV_PIX_FMT_YUV444P9,
|
||||
Pixel::YUV420P10 => AV_PIX_FMT_YUV420P10,
|
||||
Pixel::YUV422P10 => AV_PIX_FMT_YUV422P10,
|
||||
Pixel::YUV440P10 => AV_PIX_FMT_YUV440P10,
|
||||
Pixel::YUV444P10 => AV_PIX_FMT_YUV444P10,
|
||||
Pixel::YUV420P12 => AV_PIX_FMT_YUV420P12,
|
||||
Pixel::YUV422P12 => AV_PIX_FMT_YUV422P12,
|
||||
Pixel::YUV440P12 => AV_PIX_FMT_YUV440P12,
|
||||
Pixel::YUV444P12 => AV_PIX_FMT_YUV444P12,
|
||||
Pixel::YUV420P14 => AV_PIX_FMT_YUV420P14,
|
||||
Pixel::YUV422P14 => AV_PIX_FMT_YUV422P14,
|
||||
|
Loading…
x
Reference in New Issue
Block a user