Table of Contents

Class StreamSourceSettings

Namespace
VisioForge.Core.Types.X.Sources
Assembly
VisioForge.Core.dll

Stream source settings. Implements the VisioForge.Core.Types.X.MediaPlayer.IMediaPlayerBaseSourceSettings.

public class StreamSourceSettings : IMediaPlayerBaseSourceSettings, IVideoSourceSettings, IMediaBlockSettings

Inheritance

Implements

Inherited Members

Constructors

StreamSourceSettings(Stream)

Initializes a new instance of the VisioForge.Core.Types.X.Sources.StreamSourceSettings class.

public StreamSourceSettings(Stream stream)

Parameters

stream Stream

The stream. Must not be null — the pipeline factory would otherwise construct a VisioForge.Core.MediaBlocks.Sources.StreamSourceBlock on a null handle and fail deep inside the GStreamer binding with a less useful error.

Exceptions

ArgumentNullException

Thrown when stream is null.

Properties

RenderAudio

Gets or sets a value indicating whether to decode and expose an audio output pad.

public bool RenderAudio { get; set; }

Property Value

bool

RenderSubtitle

Gets or sets a value indicating whether to decode and expose a subtitle output pad.

public bool RenderSubtitle { get; set; }

Property Value

bool

RenderVideo

Gets or sets a value indicating whether to decode and expose a video output pad.

public bool RenderVideo { get; set; }

Property Value

bool

Stream

Gets the stream.

public Stream Stream { get; }

Property Value

Stream

Methods

CreateBlock()

Creates the block.

public MediaBlock CreateBlock()

Returns

MediaBlock

A VisioForge.Core.MediaBlocks.Sources.StreamSourceBlockWithDecoder wrapping a VisioForge.Core.MediaBlocks.Sources.StreamSourceBlock feeding a decoder bin, matching the way MediaPlayerX.Core.Pipeline routes these settings.

Remarks

Previously returned a bare VisioForge.Core.MediaBlocks.Sources.StreamSourceBlock, which produced an encoded-elementary-stream output pad rather than the decoded video/audio pads the rest of the media-player wiring expects. The pipeline factory was patched to route VisioForge.Core.Types.X.Sources.StreamSourceSettings through VisioForge.Core.MediaBlocks.Sources.StreamSourceBlockWithDecoder; this factory method is updated to match so callers that build blocks directly (outside MediaPlayerX) get the same shape.

ReadInfoAsync()

Reads the information asynchronous.

public Task<MediaFileInfo> ReadInfoAsync()

Returns

Task<MediaFileInfo>

Task<MediaFileInfo>.

Remarks

Previously returned null, which silently broke MediaPlayerCoreX's audio path: AddAudioBlocks gates on _info?.AudioStreams.Count > 0, so a null or zero-stream VisioForge.Core.Types.MediaInfo.MediaFileInfo disables the audio renderer entirely — no audio ever played from a stream source even when the stream contained audio.

Stream-based probing is not currently available via VisioForge.Core.MediaInfoReaderX (which needs a URI or file path), so this method returns a placeholderVisioForge.Core.Types.MediaInfo.MediaFileInfo whose stream counts reflect the user's Render* intent rather than measured stream presence. Adding a stub VisioForge.Core.Types.MediaInfo.AudioStreamInfo / VisioForge.Core.Types.MediaInfo.VideoStreamInfo / VisioForge.Core.Types.MediaInfo.SubtitleStreamInfo per enabled flag is enough to keep the downstream > 0 gates passing; the actual codec/sample-rate details are discovered by decodebin during pipeline construction and surface through the pad caps.

TODO: add a stream-based probing overload to VisioForge.Core.MediaInfoReaderX so we can return genuine stream metadata here without consuming bytes the pipeline later needs.

See Also