Table of Contents

Class FacebookLiveOutputBlock

Namespace
VisioForge.Core.MediaBlocks.Sinks
Assembly
VisioForge.Core.dll

Facebook Live streaming output block for real-time broadcast to Facebook Live platform with integrated encoding capabilities. Provides professional live streaming functionality with H.264 video and AAC audio encoding optimized for Facebook's RTMP streaming requirements, enabling content creators to broadcast high-quality live video content directly to Facebook audiences with low-latency streaming protocols. Implements the VisioForge.Core.MediaBlocks.MediaBlock. Implements the VisioForge.Core.MediaBlocks.IMediaBlockInternals. Implements the IDisposable.

public class FacebookLiveOutputBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals, IMediaBlockDynamicInputs

Inheritance

Implements

Inherited Members

Extension Methods

Constructors

FacebookLiveOutputBlock(FacebookLiveSinkSettings, IH264EncoderSettings, IAACEncoderSettings)

Initializes a new instance of the VisioForge.Core.MediaBlocks.Sinks.FacebookLiveOutputBlock class with custom encoder settings. Provides full control over video and audio compression parameters for professional Facebook Live streaming.

public FacebookLiveOutputBlock(FacebookLiveSinkSettings sinkSettings, IH264EncoderSettings h264settings, IAACEncoderSettings aacSettings)

Parameters

sinkSettings FacebookLiveSinkSettings

The Facebook Live streaming settings including RTMP URL, stream key, and connection parameters.

h264settings IH264EncoderSettings

The H.264 video encoder settings optimized for Facebook Live streaming quality and bandwidth.

aacSettings IAACEncoderSettings

The AAC audio encoder settings optimized for Facebook Live streaming quality and bandwidth.

Properties

Input

Gets the primary input pad (first in the collection of dynamic inputs).

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads available on this block (dynamic collection for video and audio).

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary output pad (none for streaming blocks that broadcast to services).

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads available on this block (none for streaming blocks).

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Type

Gets the media block type identifier for Facebook Live streaming operations.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the Facebook Live streaming block within the pipeline context. Creates the RTMP streaming sink, H.264 and AAC encoders, and establishes all necessary connections for encoding and streaming multimedia content to Facebook Live platform.

public override bool Build()

Returns

bool

true if the Facebook Live streaming block was successfully built and configured; otherwise, false.

CleanUp()

Cleans up all resources associated with the Facebook Live streaming operations, including encoders, sink, and network connections.

public void CleanUp()

CreateNewInput(MediaBlockPadMediaType)

Creates a new input pad for the specified media type, enabling dynamic addition of video and audio streams for live streaming.

public MediaBlockPad CreateNewInput(MediaBlockPadMediaType mediaType)

Parameters

mediaType MediaBlockPadMediaType

The type of media (Video or Audio) for the new input pad.

Returns

MediaBlockPad

A new MediaBlockPad configured for the specified media type.

Dispose(bool)

Releases unmanaged and managed resources used by the Facebook Live streaming block. Properly disposes of GStreamer elements, encoders, and network streaming 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 advanced configuration and monitoring.

public BaseElement GetCore()

Returns

BaseElement

Always null for composite streaming blocks with multiple internal elements.

GetElement()

Gets the native GStreamer element for direct GStreamer pipeline integration.

public Element GetElement()

Returns

Element

Always null for composite streaming blocks with multiple internal elements.

GetInput(MediaBlockPadMediaType)

Retrieves an existing input pad for the specified media type from the current collection.

public MediaBlockPad GetInput(MediaBlockPadMediaType mediaType)

Parameters

mediaType MediaBlockPadMediaType

The type of media (Video or Audio) to search for.

Returns

MediaBlockPad

The first matching MediaBlockPad for the specified media type, or null if not found.

IsAvailable()

Determines whether Facebook Live streaming functionality is available on the current system. Requires GStreamer RTMP streaming plugins and network connectivity for Facebook Live platform access.

public static bool IsAvailable()

Returns

bool

true if Facebook Live streaming is supported; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the pipeline context for this Facebook Live streaming block, providing access to the parent pipeline and logging context.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The parent MediaBlocks pipeline containing this Facebook Live streaming block.

See Also