VisioForge (c) 2025

Search Results for

    Class LiveSourceSwitchBlock

    Live Source Switch. Allows to switch between multiple video and audio sources. Implements the IDisposable. Implements the IAsyncDisposable.

    Inheritance
    object
    MediaBlock
    LiveSourceSwitchBlock
    Implements
    IMediaBlock
    IDisposable
    IMediaBlockInternals
    Inherited Members
    MediaBlock._isBuilt
    MediaBlock._pipeline
    MediaBlock._pipelineCtx
    MediaBlock.GetPipelineContext()
    MediaBlock.SetPipeline(MediaBlocksPipeline)
    MediaBlock.Context
    MediaBlock.Name
    MediaBlock.IsBuilt
    MediaBlock.GetInputPadByType(MediaBlockPadMediaType)
    MediaBlock.GetOutputPadByType(MediaBlockPadMediaType)
    MediaBlock.GetFreeOutputPadByType(MediaBlockPadMediaType)
    MediaBlock.ToYAMLBlock()
    MediaBlock.ClearPads()
    MediaBlock.disposedValue
    MediaBlock.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: VisioForge.Core.LiveSourceSwitch
    Assembly: VisioForge.Core.dll
    Syntax
    public class LiveSourceSwitchBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

    Constructors

    LiveSourceSwitchBlock(MediaBlocksPipeline, LiveSourceSwitchSettings)

    Initializes a new instance of the LiveSourceSwitchBlock class.

    Declaration
    public LiveSourceSwitchBlock(MediaBlocksPipeline pipeline, LiveSourceSwitchSettings settings)
    Parameters
    Type Name Description
    MediaBlocksPipeline pipeline

    The pipeline.

    LiveSourceSwitchSettings settings

    The settings.

    Properties

    AudioOutput

    Gets the audio output.

    Declaration
    public MediaBlockPad AudioOutput { get; }
    Property Value
    Type Description
    MediaBlockPad

    The audio output.

    Input

    Gets the input.

    Declaration
    public override MediaBlockPad Input { get; }
    Property Value
    Type Description
    MediaBlockPad

    The input.

    Overrides
    MediaBlock.Input

    Inputs

    Gets the inputs.

    Declaration
    public override MediaBlockPad[] Inputs { get; }
    Property Value
    Type Description
    MediaBlockPad[]

    The inputs.

    Overrides
    MediaBlock.Inputs

    Output

    Gets the output.

    Declaration
    public override MediaBlockPad Output { get; }
    Property Value
    Type Description
    MediaBlockPad

    The output.

    Overrides
    MediaBlock.Output

    Outputs

    Gets the outputs.

    Declaration
    public override MediaBlockPad[] Outputs { get; }
    Property Value
    Type Description
    MediaBlockPad[]

    The outputs.

    Overrides
    MediaBlock.Outputs

    Settings

    Gets the settings.

    Declaration
    public LiveSourceSwitchSettings Settings { get; }
    Property Value
    Type Description
    LiveSourceSwitchSettings

    Type

    Gets the type.

    Declaration
    public override MediaBlockType Type { get; }
    Property Value
    Type Description
    MediaBlockType

    The type.

    Overrides
    MediaBlock.Type

    VideoOutput

    Gets the video output.

    Declaration
    public MediaBlockPad VideoOutput { get; }
    Property Value
    Type Description
    MediaBlockPad

    The video output.

    Methods

    Build()

    Builds this instance.

    Declaration
    public override bool Build()
    Returns
    Type Description
    bool

    true if successfull, false otherwise.

    Overrides
    MediaBlock.Build()

    CleanUp()

    Cleans up.

    Declaration
    public void CleanUp()

    Dispose(bool)

    Releases unmanaged and - optionally - managed resources.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

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

    Overrides
    MediaBlock.Dispose(bool)

    DurationAsync()

    Gets the duration.

    Declaration
    public Task<TimeSpan> DurationAsync()
    Returns
    Type Description
    Task<TimeSpan>

    A Task<TimeSpan> representing the asynchronous operation.

    GetContext()

    Gets the context.

    Declaration
    public ContextX GetContext()
    Returns
    Type Description
    ContextX

    ContextX.

    GetCore()

    Gets core.

    Declaration
    public BaseElement GetCore()
    Returns
    Type Description
    BaseElement

    VisioForge.Core.GStreamer.Base.BaseElement.

    GetElement()

    Gets the element.

    Declaration
    public Element GetElement()
    Returns
    Type Description
    Element

    Gst.Element.

    GetPipeline()

    Gets the pipeline.

    Declaration
    public MediaBlocksPipeline GetPipeline()
    Returns
    Type Description
    MediaBlocksPipeline

    MediaBlocksPipeline.

    Input_AddAsync(LVCAudioInput)

    Adds the audio input.

    Declaration
    public Task<bool> Input_AddAsync(LVCAudioInput input)
    Parameters
    Type Name Description
    LVCAudioInput input

    The input.

    Returns
    Type Description
    Task<bool>

    A Task<System.Boolean> representing the asynchronous operation.

    Input_AddAsync(LVCFileVideoAudioInput, bool)

    Adds the file video/audio input.

    Declaration
    public Task<bool> Input_AddAsync(LVCFileVideoAudioInput input, bool start = false)
    Parameters
    Type Name Description
    LVCFileVideoAudioInput input

    The input.

    bool start

    if set to true start after adding.

    Returns
    Type Description
    Task<bool>

    A Task<System.Boolean> representing the asynchronous operation.

    Input_AddAsync(LVCVideoAudioInput, bool)

    Adds the video/audio input.

    Declaration
    public Task<bool> Input_AddAsync(LVCVideoAudioInput input, bool start = false)
    Parameters
    Type Name Description
    LVCVideoAudioInput input

    The input.

    bool start

    if set to true start after adding.

    Returns
    Type Description
    Task<bool>

    A Task<System.Boolean> representing the asynchronous operation.

    Input_AddAsync(LVCVideoInput)

    Adds the video input.

    Declaration
    public Task<bool> Input_AddAsync(LVCVideoInput input)
    Parameters
    Type Name Description
    LVCVideoInput input

    The input.

    Returns
    Type Description
    Task<bool>

    A Task<System.Boolean> representing the asynchronous operation.

    Input_FileVideoAudio_Get(int)

    Gets the file video/audio input.

    Declaration
    public LVCFileVideoAudioInput Input_FileVideoAudio_Get(int index)
    Parameters
    Type Name Description
    int index

    The index.

    Returns
    Type Description
    LVCFileVideoAudioInput

    LVCFileVideoAudioInput.

    Input_Get(int)

    Gets the input.

    Declaration
    public LVCInput Input_Get(int index)
    Parameters
    Type Name Description
    int index

    The index.

    Returns
    Type Description
    LVCInput

    LVCInput.

    Input_RemoveAtAsync(int)

    Removes the input.

    Declaration
    public Task<bool> Input_RemoveAtAsync(int index)
    Parameters
    Type Name Description
    int index

    The index.

    Returns
    Type Description
    Task<bool>

    A Task<System.Boolean> representing the asynchronous operation.

    Input_VideoAudio_Get(int)

    Gets the video/audio input.

    Declaration
    public LVCVideoAudioInput Input_VideoAudio_Get(int index)
    Parameters
    Type Name Description
    int index

    The index.

    Returns
    Type Description
    LVCVideoAudioInput

    LVCVideoAudioInput.

    StartAsync()

    Starts.

    Declaration
    public Task<bool> StartAsync()
    Returns
    Type Description
    Task<bool>

    A Task<System.Boolean> representing the asynchronous operation.

    StopAsync()

    Stops.

    Declaration
    public Task StopAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Switch(int)

    Switches the specified index.

    Declaration
    public void Switch(int index)
    Parameters
    Type Name Description
    int index

    The index.

    Implements

    IMediaBlock
    IDisposable
    IMediaBlockInternals

    Extension Methods

    MediaBlockHelper.SendEndOfStream(MediaBlock)
    MediaBlockHelper.SendEvent(MediaBlock, Event)
    MediaBlockHelper.SetState(MediaBlock, State)

    See Also

    IDisposable
    IAsyncDisposable