mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Added audio codec profile to AudioStream
Added the audio codec profile and accompanying test.
This commit is contained in:
parent
2320217315
commit
24f79fe3c8
3 changed files with 3 additions and 0 deletions
|
@ -26,6 +26,7 @@ public void Probe_Success()
|
||||||
Assert.AreEqual(6, info.PrimaryAudioStream.Channels);
|
Assert.AreEqual(6, info.PrimaryAudioStream.Channels);
|
||||||
Assert.AreEqual("AAC (Advanced Audio Coding)", info.PrimaryAudioStream.CodecLongName);
|
Assert.AreEqual("AAC (Advanced Audio Coding)", info.PrimaryAudioStream.CodecLongName);
|
||||||
Assert.AreEqual("aac", info.PrimaryAudioStream.CodecName);
|
Assert.AreEqual("aac", info.PrimaryAudioStream.CodecName);
|
||||||
|
Assert.AreEqual("LC", info.PrimaryAudioStream.Profile);
|
||||||
Assert.AreEqual(381988, info.PrimaryAudioStream.BitRate);
|
Assert.AreEqual(381988, info.PrimaryAudioStream.BitRate);
|
||||||
Assert.AreEqual(48000, info.PrimaryAudioStream.SampleRateHz);
|
Assert.AreEqual(48000, info.PrimaryAudioStream.SampleRateHz);
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,6 @@ public class AudioStream : MediaStream
|
||||||
public int Channels { get; internal set; }
|
public int Channels { get; internal set; }
|
||||||
public string ChannelLayout { get; internal set; } = null!;
|
public string ChannelLayout { get; internal set; } = null!;
|
||||||
public int SampleRateHz { get; internal set; }
|
public int SampleRateHz { get; internal set; }
|
||||||
|
public string Profile { get; internal set; } = null!;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -94,6 +94,7 @@ private AudioStream ParseAudioStream(FFProbeStream stream)
|
||||||
ChannelLayout = stream.ChannelLayout,
|
ChannelLayout = stream.ChannelLayout,
|
||||||
Duration = ParseDuration(stream),
|
Duration = ParseDuration(stream),
|
||||||
SampleRateHz = !string.IsNullOrEmpty(stream.SampleRate) ? ParseIntInvariant(stream.SampleRate) : default,
|
SampleRateHz = !string.IsNullOrEmpty(stream.SampleRate) ? ParseIntInvariant(stream.SampleRate) : default,
|
||||||
|
Profile = stream.Profile,
|
||||||
Language = stream.Tags?.Language
|
Language = stream.Tags?.Language
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue