TouchSocketPro.Dmtp.PixStream 4.2.0-beta.22

Prefix Reserved
This is a prerelease version of TouchSocketPro.Dmtp.PixStream.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package TouchSocketPro.Dmtp.PixStream --version 4.2.0-beta.22
                    
NuGet\Install-Package TouchSocketPro.Dmtp.PixStream -Version 4.2.0-beta.22
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TouchSocketPro.Dmtp.PixStream" Version="4.2.0-beta.22" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TouchSocketPro.Dmtp.PixStream" Version="4.2.0-beta.22" />
                    
Directory.Packages.props
<PackageReference Include="TouchSocketPro.Dmtp.PixStream" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TouchSocketPro.Dmtp.PixStream --version 4.2.0-beta.22
                    
#r "nuget: TouchSocketPro.Dmtp.PixStream, 4.2.0-beta.22"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TouchSocketPro.Dmtp.PixStream@4.2.0-beta.22
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TouchSocketPro.Dmtp.PixStream&version=4.2.0-beta.22&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TouchSocketPro.Dmtp.PixStream&version=4.2.0-beta.22&prerelease
                    
Install as a Cake Tool

TouchSocketPro.Dmtp.PixStream

基于DMTP协议的像素流图像传输扩展(专业版)。

功能特性

  • 支持服务端持续采集相机画面或BMP图像
  • 客户端主动拉取图像帧
  • 首次请求:传输完整帧(Full Frame)
  • 后续请求:仅传输变化块的增量差异(Delta Frame),由客户端本地合成完整帧
  • 支持路由转发,可跨DMTP节点获取图像

像素格式

BGR24,每像素3字节,行优先存储。

使用方式

服务端(图像提供方)

// 实现 IPixStreamProvider 接口
class MyCameraProvider : IPixStreamProvider
{
    public bool TryGetCurrentFrame(out int width, out int height, out byte[] pixelData)
    {
        // 返回最新捕获的帧数据(BGR24格式)
        ...
    }
}

// 注册功能并设置提供者
pluginManager.UseDmtpPixStream().SetProvider(new MyCameraProvider());

客户端(图像消费方)

// 直连获取
var frame = await client.GetDmtpPixStreamActor().GetPixFrameAsync(cancellationToken);

// 路由获取
var frame = await client.GetDmtpPixStreamActor().GetPixFrameAsync(targetId, cancellationToken);

if (frame != null)
{
    // frame.Width, frame.Height, frame.PixelData (BGR24)
    // frame.FrameType 指示本次是完整帧还是增量合成帧
}

说明文档

https://touchsocket.net/

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.2.0-beta.23 0 3/26/2026
4.2.0-beta.22 27 3/25/2026