Skip to content

Create platform-specific VideoRenderer projects for WPF, Windows Forms, and WinUI #36

@General-Fault

Description

@General-Fault

Summary

The \VideoRenderer\ interface in \WebRtcNet.Api\ is currently a stub. As the interop layer matures, platform-specific renderer implementations will be needed to display video frames in .NET UI applications on Windows.

Proposed projects

Create one or more projects that provide platform-specific \VideoRenderer\ implementations using each platform's native rendering surface:

  • WPF — \WriteableBitmap-backed \Image\ control (
    et10.0-windows\ +
    et48)
  • Windows Forms — \Bitmap/\PictureBox\ or Direct2D interop (
    et10.0-windows\ +
    et48)
  • WinUI 3 — \SoftwareBitmap/\CanvasBitmap\ via Win2D (
    et10.0-windows)

Considerations

  • WPF and Windows Forms may be combinable into a single \WebRtcNet.Desktop\ project since they share the same TFMs (
    et10.0-windows\ +
    et48) and similar frame copy patterns.
  • WinUI 3 has different rendering APIs and packaging requirements; evaluate whether it warrants a separate project or can share abstractions with WPF/WinForms.
  • A \WpfVideoRenderer\ prototype currently lives in \�xamples/BasicVideoChat\ — migrate it to the appropriate renderer project when created.
  • The \VideoRenderer\ interface in \WebRtcNet.Api\ will need to be expanded (e.g. a frame-delivery method) before any renderer can do real work. Coordinate with the interop implementation work.

Related

  • \�xamples/BasicVideoChat\ — first example using \WpfVideoRenderer\ as a prototype
  • \WebRtcNet.Api/Media/VideoRenderer.cs\ — current stub interface

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions