mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-01-18 20:46:43 +00:00
Added errordata to analysis
This commit is contained in:
parent
07470ec153
commit
3324cbb528
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,7 +46,8 @@ 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)
|
||||
{
|
||||
return new VideoStream
|
||||
|
|
Loading…
Reference in a new issue