Shared interfaces, enums, and helper types that connect the SIPSorcery real-time communications library to media-device and codec implementations.
This package is a small dependency-free abstraction layer. You normally don't reference it directly -- it comes in transitively via the main SIPSorcery package and via media end-point implementations such as SIPSorceryMedia.Windows or SIPSorceryMedia.FFmpeg. You only reference it explicitly when you're writing your own media end-point or codec wrapper.
dotnet add package SIPSorceryMedia.AbstractionsThe package defines the contracts that every audio / video source, sink and codec implements so the SIPSorcery library can interoperate with them generically.
| Interface | Implement when... | Reference implementation |
|---|---|---|
IAudioEncoder |
You provide audio encoding / decoding (G711, G722, G729, Opus, ...) | AudioEncoder in the main SIPSorcery package |
IVideoEncoder |
You provide video encoding / decoding (VP8, H.264, ...) | Vp8NetVideoEncoder (pure C#); FFmpeg wrappers in SIPSorceryMedia.FFmpeg |
| Interface | Implement when... | Reference implementation |
|---|---|---|
IAudioSource |
Your class is a source of raw audio samples (microphone, file player, signal generator) | WindowsAudioEndPoint |
IAudioSink |
Your class consumes raw audio samples (speaker, recorder, RTP transmit) | WindowsAudioEndPoint |
IAudioEndPoint |
Your class is both a source and a sink (full-duplex device) | WindowsAudioEndPoint, FFmpegAudioEndPoint |
| Interface | Implement when... | Reference implementation |
|---|---|---|
IVideoSource |
Your class is a source of raw video frames (webcam, file player, test pattern) | WindowsVideoEndPoint; VideoTestPatternSource in the main SIPSorcery package |
IVideoSink |
Your class consumes raw video frames (display, recorder) | WindowsVideoEndPoint, FFmpegVideoEndPoint |
IVideoEndPoint |
Both a source and a sink for video | various |
The package also contains shared types referenced from across the ecosystem:
AudioFormat,VideoFormat-- describe a codec / sample-rate / channel-layout combination negotiated over SDP.AudioSamplingRatesEnum,VideoPixelFormatsEnum,VideoCodecsEnum,AudioCodecsEnum.RawImage-- header + pinned byte buffer wrapper used to pass decoded video frames between encoders and sinks without copying.PixelConverter-- conversion helpers between common pixel formats (I420, NV12, BGR, RGB, YUV).
SIPSorceryMedia.Abstractions shares a major version line with the
main SIPSorcery package. A binary-incompatible change to any of the
interfaces would land as a major version bump on both packages
together; minor versions add new interfaces or new types but never
modify existing ones in breaking ways.
- SIPSorcery -- the main real-time communications library that consumes these abstractions.
- SIPSorceryMedia.Windows -- Windows-specific implementations of the audio / video end-point interfaces.
- SIPSorceryMedia.FFmpeg -- cross-platform implementations using FFmpeg native libraries.
- SIPSorcery.VP8 --
pure C#
IVideoEncoderimplementation for VP8.
BSD 3-Clause License. See LICENSE at the repo root.