mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-01-31 10:36:43 +00:00
parent
974c984d6c
commit
f06131a10f
3 changed files with 5 additions and 1 deletions
|
@ -163,6 +163,7 @@ private static IMediaAnalysis ParseOutput(Instance instance)
|
|||
if (ffprobeAnalysis?.Format == null)
|
||||
throw new FormatNullException();
|
||||
|
||||
ffprobeAnalysis.ErrorData = instance.ErrorData;
|
||||
return new MediaAnalysis(ffprobeAnalysis);
|
||||
}
|
||||
private static FFProbeFrames ParseFramesOutput(Instance instance)
|
||||
|
|
|
@ -13,5 +13,6 @@ public interface IMediaAnalysis
|
|||
List<VideoStream> VideoStreams { get; }
|
||||
List<AudioStream> AudioStreams { get; }
|
||||
List<SubtitleStream> SubtitleStreams { get; }
|
||||
IReadOnlyList<string> ErrorData { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ internal MediaAnalysis(FFProbeAnalysis analysis)
|
|||
VideoStreams = analysis.Streams.Where(stream => stream.CodecType == "video").Select(ParseVideoStream).ToList();
|
||||
AudioStreams = analysis.Streams.Where(stream => stream.CodecType == "audio").Select(ParseAudioStream).ToList();
|
||||
SubtitleStreams = analysis.Streams.Where(stream => stream.CodecType == "subtitle").Select(ParseSubtitleStream).ToList();
|
||||
ErrorData = analysis.ErrorData ?? new List<string>().AsReadOnly();
|
||||
}
|
||||
|
||||
private MediaFormat ParseFormat(Format analysisFormat)
|
||||
|
@ -45,6 +46,7 @@ private MediaFormat ParseFormat(Format analysisFormat)
|
|||
public List<VideoStream> VideoStreams { get; }
|
||||
public List<AudioStream> AudioStreams { get; }
|
||||
public List<SubtitleStream> SubtitleStreams { get; }
|
||||
public IReadOnlyList<string> ErrorData { get; }
|
||||
|
||||
private VideoStream ParseVideoStream(FFProbeStream stream)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue