Skip to content

Instantly share code, notes, and snippets.

@kenoma
kenoma / NetCoreMJPEGCapture.cs
Last active May 28, 2020 08:30
MJPEG stream capture with .Net Core 3.0 System.IO.Pipelines features
using System;
using System.Buffers;
using System.IO;
using System.IO.Pipelines;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using CvLab.Framework.IO.Camera;
using CvLab.Framework.Standard.Extensions;
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="m" xsi:type="MethodCall" className="CitaBot.UI.Model.NlogMethodTarget, CitaBot.UI" methodName="LogMethod">
<parameter layout="${level}" />
<parameter layout="${longdate}| ${message}" />
</target>
<target name="m2" xsi:type="MethodCall" className="CitaBot.Implementation.TinderBotService, CitaBot" methodName="LogMethod">
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="m" xsi:type="MethodCall" className="CitaBot.UI.Model.NlogMethodTarget, CitaBot.UI" methodName="LogMethod">
<parameter layout="${level}" />
<parameter layout="${longdate}| ${message}" />
</target>
<target name="m2" xsi:type="MethodCall" className="CitaBot.Implementation.TinderBotService, CitaBot" methodName="LogMethod">
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="m" xsi:type="MethodCall" className="CitaBot.UI.Model.NlogMethodTarget, CitaBot.UI" methodName="LogMethod">
<parameter layout="${level}" />
<parameter layout="${longdate}| ${message}" />
</target>
<target name="m2" xsi:type="MethodCall" className="CitaBot.Implementation.TinderBotService, CitaBot" methodName="LogMethod">