Table of Contents

Class SRTPDecryptorBlock

Namespace
VisioForge.Core.MediaBlocks.Special
Assembly
VisioForge.Core.dll

A specialized media block that decrypts SRTP (Secure Real-time Transport Protocol) streams in real-time. This block processes encrypted SRTP packets and outputs decrypted RTP packets, enabling secure media reception and playback of protected content.

Key features:

  • SRTP decryption per RFC 3711 with configurable cipher suites
  • Support for AES-128-ICM and AES-256-ICM decryption
  • HMAC-SHA1 authentication verification with 80-bit or 32-bit tags
  • Real-time SRTP stream decryption with minimal latency
  • Transparent passthrough design for RTP/RTCP packets
  • Compatible with standard SRTP implementations
  • Separate decryption contexts for RTP and RTCP
  • Replay attack protection

Common use cases:

  • Receiving secure VoIP and video conferencing streams
  • Decrypting real-time media broadcasts
  • Building secure streaming client applications with WebRTC
  • Implementing SIP/RTP security (SIPS/SRTP) receivers
  • Compliance with security regulations for real-time communications
  • Decrypting encrypted live video feeds and IP camera streams

Technical details:

  • Uses AES decryption in Counter Mode (ICM/CTR) for low latency
  • Verifies message authentication and detects tampering
  • Maintains RTP timing and sequence numbers
  • Zero-copy operation where possible
  • Thread-safe decryption processing
  • Compatible with standard SRTP key exchange mechanisms (SDES, DTLS-SRTP)
  • Supports streaming and file-based media

Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class SRTPDecryptorBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

SRTPDecryptorBlock(SRTPSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Special.SRTPDecryptorBlock class with specified decryption settings.

public SRTPDecryptorBlock(SRTPSettings settings)

Parameters

settings SRTPSettings

The SRTP decryption configuration including master key, cipher, and auth parameters.

Properties

Input

Gets the input pad for receiving encrypted SRTP streams.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets the array of input pads. This block has a single input for encrypted SRTP data.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the output pad that provides the decrypted RTP stream.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets the array of output pads. This block has a single output for decrypted RTP data.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Settings

Gets or sets the SRTP decryption settings including key, cipher, and authentication method. These settings must match the encryption settings used to encrypt the stream.

public SRTPSettings Settings { get; set; }

Property Value

SRTPSettings

Type

Gets the media block type identifier for this SRTP decryptor.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the SRTP decryptor block within the media pipeline. Configures the decryption parameters and establishes pad connections. This method is called automatically during pipeline construction.

public override bool Build()

Returns

bool

true if the decryptor was successfully initialized; false if setup failed.

CleanUp()

Performs cleanup of the SRTP decryptor resources. Releases the GStreamer element and clears sensitive key material.

public void CleanUp()

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

GetCore()

Gets the core GStreamer element wrapper for the SRTP decryptor.

public BaseElement GetCore()

Returns

BaseElement

The BaseElement instance wrapping the SRTP decryptor element.

GetElement()

Gets the underlying GStreamer SRTP decryptor element.

public Element GetElement()

Returns

Element

The native GStreamer element performing SRTP decryption.

IsAvailable()

Determines whether the SRTP decryption functionality is available in the current environment. This checks if the required GStreamer SRTP decryption plugins are installed. The appropriate VisioForge SDK redistribution package must be included in your project.

public static bool IsAvailable()

Returns

bool

true if SRTP decryption is available; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the media pipeline context for this SRTP decryptor block. This internal method establishes the connection to the parent pipeline.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The parent MediaBlocksPipeline that contains this block.

See Also