Class VideoPipe
A video pipe.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class VideoPipe : MediaPipe<IVideoOutput, IVideoOutputCollection, IVideoInput, IVideoInputCollection, VideoPipe, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IVideoInput, IMediaInput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IInput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IVideoOutput, IMediaOutput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IOutput<IVideoOutput, IVideoInput, VideoFrame, VideoBuffer, VideoBufferCollection, VideoFormat>, IVideoElement, IMediaElement, IElement
Constructors
VideoPipe(VideoFormat)
Initializes a new instance of the VideoPipe class.
Declaration
public VideoPipe(VideoFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
VideoFormat | outputFormat | The output format. |
VideoPipe(VideoFormat, VideoFormat)
Initializes a new instance of the VideoPipe class.
Declaration
public VideoPipe(VideoFormat inputFormat, VideoFormat outputFormat)
Parameters
Type | Name | Description |
---|---|---|
VideoFormat | inputFormat | The input format. |
VideoFormat | outputFormat | The output format. |
Properties
Content
Gets the content descriptor.
Declaration
public override string Content { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
MaxInputEncoding
Gets or sets the maximum allowed input encoding.
Declaration
public override EncodingInfo MaxInputEncoding { get; protected set; }
Property Value
Type | Description |
---|---|
EncodingInfo |
Overrides
MaxInputFrameRate
Gets or sets the maximum allowed input frame-rate, in fps. A value of -1 indicates unset (no maximum).
Declaration
public virtual double MaxInputFrameRate { get; protected set; }
Property Value
Type | Description |
---|---|
System.Double |
MaxInputHeight
Gets the maximum allowed input height. A value of -1 indicates unset (no minimum).
Declaration
public virtual int MaxInputHeight { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MaxInputScale
Gets or sets the maximum allowed input scale. A value of -1 indicates unset (no maximum).
Declaration
public virtual double MaxInputScale { get; protected set; }
Property Value
Type | Description |
---|---|
System.Double |
MaxInputSize
Gets or sets the maximum allowed input size. A value of null indicates unset (no maximum).
Declaration
public virtual Size MaxInputSize { get; protected set; }
Property Value
Type | Description |
---|---|
Size |
MaxInputWidth
Gets the maximum allowed input width. A value of -1 indicates unset (no minimum).
Declaration
public virtual int MaxInputWidth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MaxOutputEncoding
Gets or sets the maximum allowed output encoding.
Declaration
public override EncodingInfo MaxOutputEncoding { get; protected set; }
Property Value
Type | Description |
---|---|
EncodingInfo |
Overrides
MaxOutputFrameRate
Gets or sets the maximum allowed output frame-rate, in fps. A value of -1 indicates unset (no maximum).
Declaration
public virtual double MaxOutputFrameRate { get; protected set; }
Property Value
Type | Description |
---|---|
System.Double |
MaxOutputHeight
Gets the maximum allowed output height. A value of -1 indicates unset (no minimum).
Declaration
public virtual int MaxOutputHeight { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MaxOutputScale
Gets or sets the maximum allowed output scale. A value of -1 indicates unset (no maximum).
Declaration
public virtual double MaxOutputScale { get; protected set; }
Property Value
Type | Description |
---|---|
System.Double |
MaxOutputSize
Gets or sets the maximum allowed output size. A value of null indicates unset (no maximum).
Declaration
public virtual Size MaxOutputSize { get; protected set; }
Property Value
Type | Description |
---|---|
Size |
MaxOutputWidth
Gets the maximum allowed output width. A value of -1 indicates unset (no minimum).
Declaration
public virtual int MaxOutputWidth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MinInputEncoding
Gets or sets the minimum allowed input encoding.
Declaration
public override EncodingInfo MinInputEncoding { get; protected set; }
Property Value
Type | Description |
---|---|
EncodingInfo |
Overrides
MinInputFrameRate
Gets or sets the minimum allowed input frame-rate, in fps. A value of -1 indicates unset (no minimum).
Declaration
public virtual double MinInputFrameRate { get; protected set; }
Property Value
Type | Description |
---|---|
System.Double |
MinInputHeight
Gets the minimum allowed input height. A value of -1 indicates unset (no minimum).
Declaration
public virtual int MinInputHeight { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MinInputScale
Gets or sets the minimum allowed input scale. A value of -1 indicates unset (no minimum).
Declaration
public virtual double MinInputScale { get; protected set; }
Property Value
Type | Description |
---|---|
System.Double |
MinInputSize
Gets or sets the minimum allowed input size. A value of null indicates unset (no minimum).
Declaration
public virtual Size MinInputSize { get; protected set; }
Property Value
Type | Description |
---|---|
Size |
MinInputWidth
Gets the minimum allowed input width. A value of -1 indicates unset (no minimum).
Declaration
public virtual int MinInputWidth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MinOutputEncoding
Gets or sets the minimum allowed output encoding.
Declaration
public override EncodingInfo MinOutputEncoding { get; protected set; }
Property Value
Type | Description |
---|---|
EncodingInfo |
Overrides
MinOutputFrameRate
Gets or sets the minimum allowed output frame-rate, in fps. A value of -1 indicates unset (no minimum).
Declaration
public virtual double MinOutputFrameRate { get; protected set; }
Property Value
Type | Description |
---|---|
System.Double |
MinOutputHeight
Gets the minimum allowed output height. A value of -1 indicates unset (no minimum).
Declaration
public virtual int MinOutputHeight { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MinOutputScale
Gets or sets the minimum allowed output scale. A value of -1 indicates unset (no minimum).
Declaration
public virtual double MinOutputScale { get; protected set; }
Property Value
Type | Description |
---|---|
System.Double |
MinOutputSize
Gets or sets the minimum allowed output size. A value of null indicates unset (no minimum).
Declaration
public virtual Size MinOutputSize { get; protected set; }
Property Value
Type | Description |
---|---|
Size |
MinOutputWidth
Gets the minimum allowed output width. A value of -1 indicates unset (no minimum).
Declaration
public virtual int MinOutputWidth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
OverConstrainedFrameRate
Gets whether the pipe frame-rate is over-constrained. A pipe frame-rate is over-constrained if the input frame-rate or output frame-rate is over-constrained.
Declaration
public bool OverConstrainedFrameRate { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedHeight
Gets whether the pipe height is over-constrained. A pipe height is over-constrained if the input height or output height is over-constrained.
Declaration
public bool OverConstrainedHeight { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedInput
Gets whether the input is over-contrained. An input is over-constrained if it's input bitrate, input scale, input frame-rate, input size is over-contrained.
Declaration
public override bool OverConstrainedInput { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
OverConstrainedInputFrameRate
Gets whether the minimum allowed input frame-rate exceeds the maximum allowed input frame-rate.
Declaration
public bool OverConstrainedInputFrameRate { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedInputHeight
Gets whether the minimum allowed input height exceeds the maximum allowed input height.
Declaration
public bool OverConstrainedInputHeight { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedInputScale
Gets whether the minimum allowed input scale exceeds the maximum allowed input scale.
Declaration
public bool OverConstrainedInputScale { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedInputSize
Gets whether the minimum allowed input size exceeds the maximum allowed input size.
Declaration
public bool OverConstrainedInputSize { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedInputWidth
Gets whether the minimum allowed input width exceeds the maximum allowed input width.
Declaration
public bool OverConstrainedInputWidth { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedOutput
Gets whether the output is over-contrained. An output is over-constrained if it's output bitrate, output scale, output frame-rate, output size is over-contrained.
Declaration
public override bool OverConstrainedOutput { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
OverConstrainedOutputFrameRate
Gets whether the minimum allowed output frame-rate exceeds the maximum allowed output frame-rate.
Declaration
public bool OverConstrainedOutputFrameRate { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedOutputHeight
Gets whether the minimum allowed output height exceeds the maximum allowed output height.
Declaration
public bool OverConstrainedOutputHeight { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedOutputScale
Gets whether the minimum allowed output scale exceeds the maximum allowed output scale.
Declaration
public bool OverConstrainedOutputScale { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedOutputSize
Gets whether the minimum allowed output size exceeds the maximum allowed output size.
Declaration
public bool OverConstrainedOutputSize { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedOutputWidth
Gets whether the minimum allowed output width exceeds the maximum allowed output width.
Declaration
public bool OverConstrainedOutputWidth { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedScale
Gets whether the pipe scale is over-constrained. A pipe scale is over-constrained if the input scale or output scale is over-constrained.
Declaration
public bool OverConstrainedScale { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedSize
Gets whether the pipe size is over-constrained. A pipe size is over-constrained if the input size or output size is over-constrained.
Declaration
public bool OverConstrainedSize { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
OverConstrainedWidth
Gets whether the pipe width is over-constrained. A pipe width is over-constrained if the input width or output width is over-constrained.
Declaration
public bool OverConstrainedWidth { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
TargetOutputEncoding
Gets or sets the target output encoding.
Declaration
public override EncodingInfo TargetOutputEncoding { get; protected set; }
Property Value
Type | Description |
---|---|
EncodingInfo |
Overrides
TargetOutputFrameRate
Gets or sets the target output frame-rate, in fps. A value of -1 indicates unset (no target).
Declaration
public virtual double TargetOutputFrameRate { get; protected set; }
Property Value
Type | Description |
---|---|
System.Double |
TargetOutputHeight
Gets the target output height. A value of -1 indicates unset (no minimum).
Declaration
public virtual int TargetOutputHeight { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
TargetOutputScale
Gets or sets the target output scale. A value of -1 indicates unset (no target).
Declaration
public virtual double TargetOutputScale { get; protected set; }
Property Value
Type | Description |
---|---|
System.Double |
TargetOutputSize
Gets or sets the target output size. A value of null indicates unset (no target).
Declaration
public virtual Size TargetOutputSize { get; protected set; }
Property Value
Type | Description |
---|---|
Size |
TargetOutputWidth
Gets the target output width. A value of -1 indicates unset (no minimum).
Declaration
public virtual int TargetOutputWidth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
VideoType
Gets or sets the video type.
Declaration
public virtual VideoType VideoType { get; protected set; }
Property Value
Type | Description |
---|---|
VideoType |
Methods
CreateFrame(VideoBuffer)
Creates a frame.
Declaration
protected override VideoFrame CreateFrame(VideoBuffer buffer)
Parameters
Type | Name | Description |
---|---|---|
VideoBuffer | buffer | The buffer. |
Returns
Type | Description |
---|---|
VideoFrame |
Overrides
CreateInputCollection(IVideoOutput)
Creates an input collection.
Declaration
protected override IVideoInputCollection CreateInputCollection(IVideoOutput output)
Parameters
Type | Name | Description |
---|---|---|
IVideoOutput | output | The output. |
Returns
Type | Description |
---|---|
IVideoInputCollection |
Overrides
CreateOutputCollection(IVideoInput)
Creates an output collection.
Declaration
protected override IVideoOutputCollection CreateOutputCollection(IVideoInput input)
Parameters
Type | Name | Description |
---|---|---|
IVideoInput | input | The input. |
Returns
Type | Description |
---|---|
IVideoOutputCollection |
Overrides
DoPreProcessFrame(VideoFrame, VideoBuffer)
Pre-processes a frame.
Declaration
protected override void DoPreProcessFrame(VideoFrame frame, VideoBuffer inputBuffer)
Parameters
Type | Name | Description |
---|---|---|
VideoFrame | frame | The frame. |
VideoBuffer | inputBuffer | The input buffer. |
Overrides
OutputCanProcessFrame(IVideoInput)
Determines whether an output can process a frame from this pipe.
Declaration
protected override bool OutputCanProcessFrame(IVideoInput output)
Parameters
Type | Name | Description |
---|---|---|
IVideoInput | output | The output. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
RaiseFrame(VideoFrame)
Raises a frame.
Declaration
protected override void RaiseFrame(VideoFrame frame)
Parameters
Type | Name | Description |
---|---|---|
VideoFrame | frame | The frame. |
Overrides
Events
OnProcessSizeChange
Raised when a frame is about to be processed with a size that does not match the prior frame.
Declaration
public event Action1<Size> OnProcessSizeChange
Event Type
Type | Description |
---|---|
Action1<Size> |
OnRaiseSizeChange
Raised when a frame is about to be raised with a size that does not match the prior frame.
Declaration
public event Action1<Size> OnRaiseSizeChange
Event Type
Type | Description |
---|---|
Action1<Size> |