mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
FromStream method to Video Info & added comments to FFprobe methods with stream
This commit is contained in:
parent
cfda0fc9ae
commit
f56ea098a5
2 changed files with 20 additions and 0 deletions
|
@ -67,6 +67,11 @@ public async Task<VideoInfo> ParseVideoInfoAsync(VideoInfo info)
|
||||||
return ParseVideoInfoInternal(info, output);
|
return ParseVideoInfoInternal(info, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Probes the targeted video stream and retrieves all available details.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="stream">Encoded video stream.</param>
|
||||||
|
/// <returns>A video info object containing all details necessary.</returns>
|
||||||
public VideoInfo ParseVideoInfo(System.IO.Stream stream)
|
public VideoInfo ParseVideoInfo(System.IO.Stream stream)
|
||||||
{
|
{
|
||||||
var info = new VideoInfo();
|
var info = new VideoInfo();
|
||||||
|
@ -92,6 +97,11 @@ public VideoInfo ParseVideoInfo(System.IO.Stream stream)
|
||||||
return ParseVideoInfoInternal(info, output);
|
return ParseVideoInfoInternal(info, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Probes the targeted video stream asynchronously and retrieves all available details.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="stream">Encoded video stream.</param>
|
||||||
|
/// <returns>A video info object containing all details necessary.</returns>
|
||||||
public async Task<VideoInfo> ParseVideoInfoAsync(System.IO.Stream stream)
|
public async Task<VideoInfo> ParseVideoInfoAsync(System.IO.Stream stream)
|
||||||
{
|
{
|
||||||
var info = new VideoInfo();
|
var info = new VideoInfo();
|
||||||
|
|
|
@ -132,6 +132,16 @@ public static VideoInfo FromPath(string path)
|
||||||
return new VideoInfo(path);
|
return new VideoInfo(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create a video information object from a encoded stream.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="stream">Encoded video stream.</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static VideoInfo FromStream(System.IO.Stream stream)
|
||||||
|
{
|
||||||
|
return new FFProbe().ParseVideoInfo(stream);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pretty prints the video information.
|
/// Pretty prints the video information.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in a new issue