mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-14 02:04:14 +01:00
Merge pull request #86 from vongrippen/Add-audio-profile
Added audio codec profile to AudioStream
Former-commit-id: 5828a35469
This commit is contained in:
commit
9fc6177e61
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