26 lines
567 B
C#
26 lines
567 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.SignalR;
|
|
using squirrowse.web.Data;
|
|
|
|
namespace squirrowse.web
|
|
{
|
|
public class ClientHub : Hub
|
|
{
|
|
private readonly VideoQ q;
|
|
|
|
public ClientHub(VideoQ q)
|
|
{
|
|
this.q = q;
|
|
}
|
|
public async Task UploadStream(IAsyncEnumerable<byte[]> stream)
|
|
{
|
|
await foreach (var frame in stream)
|
|
{
|
|
q._framebuffer.Enqueue(frame);
|
|
}
|
|
}
|
|
}
|
|
} |