feat(calls): add Android LAN peer calls using Podcast capture
Share the LibVLC SRTP engine with Linux and feed Android MediaRecorder output through its native pipe without transcoding or HLS files. Reuse front-camera capture, preview, remote rendering and foreground service with consent-based controls and background cleanup. Use separate RTP/RTCP ports to avoid the diagnosed Android VLC SDP crash. Add physical-device media checks and lifecycle regressions; document LAN/VPN scope and remaining separate-device validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
cc28ee8b29
commit
a676ef3575
19 changed files with 718 additions and 105 deletions
|
|
@ -8,19 +8,9 @@ using Yavsc.Abstract.Chat.Calls;
|
|||
|
||||
namespace PostIt.Services;
|
||||
|
||||
public interface ILanCallMedia : IAsyncDisposable
|
||||
{
|
||||
Control LocalVideo { get; }
|
||||
Control RemoteVideo { get; }
|
||||
LanCallEndpoint Endpoint { get; }
|
||||
Task Completion { get; }
|
||||
bool HasRemoteMedia { get; }
|
||||
Task StartSendingAsync(LanCallEndpoint remote, string camera, string microphone, CancellationToken ct);
|
||||
}
|
||||
|
||||
public sealed class LinuxLanCallVideo : ILanCallMedia
|
||||
{
|
||||
private readonly LinuxLanCallMedia _media;
|
||||
private readonly LibVlcLanCallMedia _media;
|
||||
private readonly VideoView _local;
|
||||
private readonly VideoView _remote;
|
||||
private readonly TaskCompletionSource _localReady = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
|
|
@ -38,7 +28,7 @@ public sealed class LinuxLanCallVideo : ILanCallMedia
|
|||
|
||||
public LinuxLanCallVideo(string localAddress, int port)
|
||||
{
|
||||
_media = new LinuxLanCallMedia(localAddress, port);
|
||||
_media = new LibVlcLanCallMedia(localAddress, port);
|
||||
_local = new VideoView { MediaPlayer = _media.Sender, MinHeight = 140 };
|
||||
_remote = new VideoView { MediaPlayer = _media.Receiver, MinHeight = 260 };
|
||||
_local.LayoutUpdated += OnLocalLayout;
|
||||
|
|
|
|||
Loading…
Reference in a new issue