private static FFmpegDemuxer CreateFFmpegDemuxer(IFFmpegGlue glue = null) { if (glue == null) { glue = Substitute.For <IFFmpegGlue>(); } return(new FFmpegDemuxer(glue)); }
private Task <ReadPacket> RetrieveReadPacket(IFFmpegGlue glue) { var tcs = new TaskCompletionSource <ReadPacket>(); glue.When(stub => stub.AllocIOContext(Arg.Any <ulong>(), Arg.Any <ReadPacket>())) .Do(args => { tcs.SetResult(args.ArgAt <ReadPacket>(1)); }); return(tcs.Task); }
public FFmpegDemuxer(IFFmpegGlue ffmpegGlue) { this.ffmpegGlue = ffmpegGlue; }