mirror of
https://github.com/encounter/rust-ffmpeg-zmwangx.git
synced 2026-07-10 21:18:40 -07:00
Merge pull request #66 from zmwangx/fix-linting-errors
Fix linting errors
This commit is contained in:
@@ -11,7 +11,7 @@ jobs:
|
||||
container: jrottenberg/ffmpeg:${{ matrix.ffmpeg_version }}-ubuntu
|
||||
strategy:
|
||||
matrix:
|
||||
ffmpeg_version: ["3.4", "4.0", "4.1", "4.2", "4.3"]
|
||||
ffmpeg_version: ["3.4", "4.0", "4.1", "4.2", "4.3", "4.4"]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -87,6 +87,7 @@ jobs:
|
||||
mkdir ffmpeg
|
||||
mv ffmpeg-*/* ffmpeg/
|
||||
Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\ffmpeg`n"
|
||||
Add-Content $env:GITHUB_PATH "${pwd}\ffmpeg\bin`n"
|
||||
- name: Set up Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
|
||||
@@ -31,9 +31,9 @@ impl From<AVAudioServiceType> for AudioService {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<AVAudioServiceType> for AudioService {
|
||||
fn into(self) -> AVAudioServiceType {
|
||||
match self {
|
||||
impl From<AudioService> for AVAudioServiceType {
|
||||
fn from(value: AudioService) -> AVAudioServiceType {
|
||||
match value {
|
||||
AudioService::Main => AV_AUDIO_SERVICE_TYPE_MAIN,
|
||||
AudioService::Effects => AV_AUDIO_SERVICE_TYPE_EFFECTS,
|
||||
AudioService::VisuallyImpaired => AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED,
|
||||
|
||||
@@ -24,9 +24,9 @@ impl From<c_int> for Compliance {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<c_int> for Compliance {
|
||||
fn into(self) -> c_int {
|
||||
match self {
|
||||
impl From<Compliance> for c_int {
|
||||
fn from(value: Compliance) -> c_int {
|
||||
match value {
|
||||
Compliance::VeryStrict => FF_COMPLIANCE_VERY_STRICT,
|
||||
Compliance::Strict => FF_COMPLIANCE_STRICT,
|
||||
Compliance::Normal => FF_COMPLIANCE_NORMAL,
|
||||
|
||||
@@ -26,9 +26,9 @@ impl From<AVDiscard> for Discard {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<AVDiscard> for Discard {
|
||||
fn into(self) -> AVDiscard {
|
||||
match self {
|
||||
impl From<Discard> for AVDiscard {
|
||||
fn from(value: Discard) -> AVDiscard {
|
||||
match value {
|
||||
Discard::None => AVDISCARD_NONE,
|
||||
Discard::Default => AVDISCARD_DEFAULT,
|
||||
Discard::NonReference => AVDISCARD_NONREF,
|
||||
|
||||
@@ -46,9 +46,9 @@ impl From<c_int> for Comparison {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<c_int> for Comparison {
|
||||
fn into(self) -> c_int {
|
||||
match self {
|
||||
impl From<Comparison> for c_int {
|
||||
fn from(value: Comparison) -> c_int {
|
||||
match value {
|
||||
Comparison::SAD => FF_CMP_SAD,
|
||||
Comparison::SSE => FF_CMP_SSE,
|
||||
Comparison::SATD => FF_CMP_SATD,
|
||||
|
||||
@@ -20,9 +20,9 @@ impl From<c_int> for Decision {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<c_int> for Decision {
|
||||
fn into(self) -> c_int {
|
||||
match self {
|
||||
impl From<Decision> for c_int {
|
||||
fn from(value: Decision) -> c_int {
|
||||
match value {
|
||||
Decision::Simple => FF_MB_DECISION_SIMPLE,
|
||||
Decision::Bits => FF_MB_DECISION_BITS,
|
||||
Decision::RateDistortion => FF_MB_DECISION_RD,
|
||||
|
||||
@@ -33,9 +33,9 @@ impl From<c_int> for MotionEstimation {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<c_int> for MotionEstimation {
|
||||
fn into(self) -> c_int {
|
||||
match self {
|
||||
impl From<MotionEstimation> for c_int {
|
||||
fn from(value: MotionEstimation) -> c_int {
|
||||
match value {
|
||||
MotionEstimation::Zero => 1,
|
||||
MotionEstimation::Full => 2,
|
||||
MotionEstimation::Log => 3,
|
||||
|
||||
@@ -20,9 +20,9 @@ impl From<c_int> for Prediction {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<c_int> for Prediction {
|
||||
fn into(self) -> c_int {
|
||||
match self {
|
||||
impl From<Prediction> for c_int {
|
||||
fn from(value: Prediction) -> c_int {
|
||||
match value {
|
||||
Prediction::Left => FF_PRED_LEFT,
|
||||
Prediction::Plane => FF_PRED_PLANE,
|
||||
Prediction::Median => FF_PRED_MEDIAN,
|
||||
|
||||
@@ -24,9 +24,9 @@ impl From<AVFieldOrder> for FieldOrder {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<AVFieldOrder> for FieldOrder {
|
||||
fn into(self) -> AVFieldOrder {
|
||||
match self {
|
||||
impl From<FieldOrder> for AVFieldOrder {
|
||||
fn from(value: FieldOrder) -> AVFieldOrder {
|
||||
match value {
|
||||
FieldOrder::Unknown => AV_FIELD_UNKNOWN,
|
||||
FieldOrder::Progressive => AV_FIELD_PROGRESSIVE,
|
||||
FieldOrder::TT => AV_FIELD_TT,
|
||||
|
||||
+6
-6
@@ -594,7 +594,7 @@ pub enum Id {
|
||||
#[cfg(feature = "ffmpeg_4_4")]
|
||||
ADPCM_IMA_MOFLEX,
|
||||
#[cfg(feature = "ffmpeg_4_4")]
|
||||
FASTAUDIO
|
||||
FASTAUDIO,
|
||||
}
|
||||
|
||||
impl Id {
|
||||
@@ -1196,14 +1196,14 @@ impl From<AVCodecID> for Id {
|
||||
#[cfg(feature = "ffmpeg_4_4")]
|
||||
AV_CODEC_ID_ADPCM_IMA_MOFLEX => Id::ADPCM_IMA_MOFLEX,
|
||||
#[cfg(feature = "ffmpeg_4_4")]
|
||||
AV_CODEC_ID_FASTAUDIO => Id::FASTAUDIO
|
||||
AV_CODEC_ID_FASTAUDIO => Id::FASTAUDIO,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<AVCodecID> for Id {
|
||||
fn into(self) -> AVCodecID {
|
||||
match self {
|
||||
impl From<Id> for AVCodecID {
|
||||
fn from(value: Id) -> AVCodecID {
|
||||
match value {
|
||||
Id::None => AV_CODEC_ID_NONE,
|
||||
|
||||
/* video codecs */
|
||||
@@ -1790,7 +1790,7 @@ impl Into<AVCodecID> for Id {
|
||||
#[cfg(feature = "ffmpeg_4_4")]
|
||||
Id::ADPCM_IMA_MOFLEX => AV_CODEC_ID_ADPCM_IMA_MOFLEX,
|
||||
#[cfg(feature = "ffmpeg_4_4")]
|
||||
Id::FASTAUDIO => AV_CODEC_ID_FASTAUDIO
|
||||
Id::FASTAUDIO => AV_CODEC_ID_FASTAUDIO,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ pub enum Type {
|
||||
DOVI_CONF,
|
||||
|
||||
#[cfg(feature = "ffmpeg_4_4")]
|
||||
S12M_TIMECODE
|
||||
S12M_TIMECODE,
|
||||
}
|
||||
|
||||
impl From<AVPacketSideDataType> for Type {
|
||||
@@ -99,14 +99,14 @@ impl From<AVPacketSideDataType> for Type {
|
||||
AV_PKT_DATA_DOVI_CONF => Type::DOVI_CONF,
|
||||
|
||||
#[cfg(feature = "ffmpeg_4_4")]
|
||||
AV_PKT_DATA_S12M_TIMECODE => Type::S12M_TIMECODE
|
||||
AV_PKT_DATA_S12M_TIMECODE => Type::S12M_TIMECODE,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<AVPacketSideDataType> for Type {
|
||||
fn into(self) -> AVPacketSideDataType {
|
||||
match self {
|
||||
impl From<Type> for AVPacketSideDataType {
|
||||
fn from(value: Type) -> AVPacketSideDataType {
|
||||
match value {
|
||||
Type::Palette => AV_PKT_DATA_PALETTE,
|
||||
Type::NewExtraData => AV_PKT_DATA_NEW_EXTRADATA,
|
||||
Type::ParamChange => AV_PKT_DATA_PARAM_CHANGE,
|
||||
@@ -150,7 +150,7 @@ impl Into<AVPacketSideDataType> for Type {
|
||||
Type::DOVI_CONF => AV_PKT_DATA_DOVI_CONF,
|
||||
|
||||
#[cfg(feature = "ffmpeg_4_4")]
|
||||
Type::S12M_TIMECODE => AV_PKT_DATA_S12M_TIMECODE
|
||||
Type::S12M_TIMECODE => AV_PKT_DATA_S12M_TIMECODE,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,9 +279,9 @@ impl From<(Id, c_int)> for Profile {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<c_int> for Profile {
|
||||
fn into(self) -> c_int {
|
||||
match self {
|
||||
impl From<Profile> for c_int {
|
||||
fn from(value: Profile) -> c_int {
|
||||
match value {
|
||||
Profile::Unknown => FF_PROFILE_UNKNOWN,
|
||||
Profile::Reserved => FF_PROFILE_RESERVED,
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ impl From<AVSubtitleType> for Type {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<AVSubtitleType> for Type {
|
||||
fn into(self) -> AVSubtitleType {
|
||||
match self {
|
||||
impl From<Type> for AVSubtitleType {
|
||||
fn from(value: Type) -> AVSubtitleType {
|
||||
match value {
|
||||
Type::None => SUBTITLE_NONE,
|
||||
Type::Bitmap => SUBTITLE_BITMAP,
|
||||
Type::Text => SUBTITLE_TEXT,
|
||||
|
||||
@@ -59,9 +59,9 @@ impl From<c_int> for Type {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<c_int> for Type {
|
||||
fn into(self) -> c_int {
|
||||
match self {
|
||||
impl From<Type> for c_int {
|
||||
fn from(value: Type) -> c_int {
|
||||
match value {
|
||||
Type::None => 0,
|
||||
Type::Frame => FF_THREAD_FRAME,
|
||||
Type::Slice => FF_THREAD_SLICE,
|
||||
|
||||
@@ -38,9 +38,9 @@ impl From<SwrDitherType> for Dither {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<SwrDitherType> for Dither {
|
||||
fn into(self) -> SwrDitherType {
|
||||
match self {
|
||||
impl From<Dither> for SwrDitherType {
|
||||
fn from(value: Dither) -> SwrDitherType {
|
||||
match value {
|
||||
Dither::None => SWR_DITHER_NONE,
|
||||
Dither::Rectangular => SWR_DITHER_RECTANGULAR,
|
||||
Dither::Triangular => SWR_DITHER_TRIANGULAR,
|
||||
|
||||
@@ -17,9 +17,9 @@ impl From<SwrEngine> for Engine {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<SwrEngine> for Engine {
|
||||
fn into(self) -> SwrEngine {
|
||||
match self {
|
||||
impl From<Engine> for SwrEngine {
|
||||
fn from(value: Engine) -> SwrEngine {
|
||||
match value {
|
||||
Engine::Software => SWR_ENGINE_SWR,
|
||||
Engine::SoundExchange => SWR_ENGINE_SOXR,
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ impl From<SwrFilterType> for Filter {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<SwrFilterType> for Filter {
|
||||
fn into(self) -> SwrFilterType {
|
||||
match self {
|
||||
impl From<Filter> for SwrFilterType {
|
||||
fn from(value: Filter) -> SwrFilterType {
|
||||
match value {
|
||||
Filter::Cubic => SWR_FILTER_TYPE_CUBIC,
|
||||
Filter::BlackmanNuttall => SWR_FILTER_TYPE_BLACKMAN_NUTTALL,
|
||||
Filter::Kaiser => SWR_FILTER_TYPE_KAISER,
|
||||
|
||||
@@ -26,9 +26,9 @@ impl From<c_int> for ColorSpace {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<c_int> for ColorSpace {
|
||||
fn into(self) -> c_int {
|
||||
match self {
|
||||
impl From<ColorSpace> for c_int {
|
||||
fn from(value: ColorSpace) -> c_int {
|
||||
match value {
|
||||
ColorSpace::Default => SWS_CS_DEFAULT,
|
||||
ColorSpace::ITU709 => SWS_CS_ITU709,
|
||||
ColorSpace::FCC => SWS_CS_FCC,
|
||||
|
||||
@@ -27,9 +27,9 @@ impl From<AVChromaLocation> for Location {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<AVChromaLocation> for Location {
|
||||
fn into(self) -> AVChromaLocation {
|
||||
match self {
|
||||
impl From<Location> for AVChromaLocation {
|
||||
fn from(value: Location) -> AVChromaLocation {
|
||||
match value {
|
||||
Location::Unspecified => AVCHROMA_LOC_UNSPECIFIED,
|
||||
Location::Left => AVCHROMA_LOC_LEFT,
|
||||
Location::Center => AVCHROMA_LOC_CENTER,
|
||||
|
||||
@@ -70,9 +70,9 @@ impl From<AVColorPrimaries> for Primaries {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<AVColorPrimaries> for Primaries {
|
||||
fn into(self) -> AVColorPrimaries {
|
||||
match self {
|
||||
impl From<Primaries> for AVColorPrimaries {
|
||||
fn from(value: Primaries) -> AVColorPrimaries {
|
||||
match value {
|
||||
Primaries::Reserved0 => AVCOL_PRI_RESERVED0,
|
||||
Primaries::BT709 => AVCOL_PRI_BT709,
|
||||
Primaries::Unspecified => AVCOL_PRI_UNSPECIFIED,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user