Class VideoTestPatternSource
Inheritance
System.Object
VideoTestPatternSource
Implements
SIPSorceryMedia.Abstractions.IVideoSource
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: SIPSorcery.dll
public class VideoTestPatternSource : IVideoSource, IDisposable
Constructors
|
Improve this Doc
View Source
Declaration
public VideoTestPatternSource(IVideoEncoder encoder = null)
Parameters
Type |
Name |
Description |
SIPSorceryMedia.Abstractions.IVideoEncoder |
encoder |
|
Fields
|
Improve this Doc
View Source
Declaration
public static ILogger logger
Field Value
Type |
Description |
Microsoft.Extensions.Logging.ILogger |
|
|
Improve this Doc
View Source
Declaration
public static readonly List<VideoFormat> SupportedFormats
Field Value
Type |
Description |
System.Collections.Generic.List<SIPSorceryMedia.Abstractions.VideoFormat> |
|
|
Improve this Doc
View Source
Declaration
public const int TEST_PATTERN_HEIGHT = 480
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Declaration
public const string TEST_PATTERN_RESOURCE_PATH = "SIPSorcery.media.testpattern.i420"
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public const int TEST_PATTERN_WIDTH = 640
Field Value
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
Declaration
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
Declaration
|
Improve this Doc
View Source
Declaration
public void ExternalVideoSourceRawSample(uint durationMilliseconds, int width, int height, byte[] sample, VideoPixelFormatsEnum pixelFormat)
Parameters
Type |
Name |
Description |
System.UInt32 |
durationMilliseconds |
|
System.Int32 |
width |
|
System.Int32 |
height |
|
System.Byte[] |
sample |
|
SIPSorceryMedia.Abstractions.VideoPixelFormatsEnum |
pixelFormat |
|
|
Improve this Doc
View Source
Declaration
public void ExternalVideoSourceRawSampleFaster(uint durationMilliseconds, RawImage rawImage)
Parameters
Type |
Name |
Description |
System.UInt32 |
durationMilliseconds |
|
SIPSorceryMedia.Abstractions.RawImage |
rawImage |
|
|
Improve this Doc
View Source
Declaration
public void ForceKeyFrame()
|
Improve this Doc
View Source
Declaration
public List<VideoFormat> GetVideoSinkFormats()
Returns
Type |
Description |
System.Collections.Generic.List<SIPSorceryMedia.Abstractions.VideoFormat> |
|
|
Improve this Doc
View Source
Declaration
public List<VideoFormat> GetVideoSourceFormats()
Returns
Type |
Description |
System.Collections.Generic.List<SIPSorceryMedia.Abstractions.VideoFormat> |
|
|
Improve this Doc
View Source
Declaration
public bool HasEncodedVideoSubscribers()
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public Task<bool> InitialiseVideoSourceDevice()
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
|
Improve this Doc
View Source
Declaration
public bool IsVideoSourcePaused()
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
Declaration
public void RestrictFormats(Func<VideoFormat, bool> filter)
Parameters
Type |
Name |
Description |
System.Func<SIPSorceryMedia.Abstractions.VideoFormat, System.Boolean> |
filter |
|
|
Improve this Doc
View Source
Declaration
public Task ResumeVideo()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
Declaration
public void SetFrameRate(int framesPerSecond)
Parameters
Type |
Name |
Description |
System.Int32 |
framesPerSecond |
|
|
Improve this Doc
View Source
If this gets set the frames will be generated in a loop with no pause. Ideally this would
only ever be done in load test scenarios.
Declaration
public void SetMaxFrameRate(bool isMaxFrameRate)
Parameters
Type |
Name |
Description |
System.Boolean |
isMaxFrameRate |
|
|
Improve this Doc
View Source
Declaration
public void SetVideoSinkFormat(VideoFormat videoFormat)
Parameters
Type |
Name |
Description |
SIPSorceryMedia.Abstractions.VideoFormat |
videoFormat |
|
|
Improve this Doc
View Source
Declaration
public void SetVideoSourceFormat(VideoFormat videoFormat)
Parameters
Type |
Name |
Description |
SIPSorceryMedia.Abstractions.VideoFormat |
videoFormat |
|
|
Improve this Doc
View Source
TODO: Add something better for a dynamic stamp on an I420 buffer. This is useful to provide
a visual indication to the receiver that the video stream has not stalled.
Declaration
public static void StampI420Buffer(byte[] i420Buffer, int width, int height, int frameNumber)
Parameters
Type |
Name |
Description |
System.Byte[] |
i420Buffer |
|
System.Int32 |
width |
|
System.Int32 |
height |
|
System.Int32 |
frameNumber |
|
|
Improve this Doc
View Source
Declaration
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Events
|
Improve this Doc
View Source
If a video encoder has been set then this event contains the encoded video
samples.
Declaration
public event EncodedSampleDelegate OnVideoSourceEncodedSample
Event Type
Type |
Description |
SIPSorceryMedia.Abstractions.EncodedSampleDelegate |
|
|
Improve this Doc
View Source
Declaration
public event SourceErrorDelegate OnVideoSourceError
Event Type
Type |
Description |
SIPSorceryMedia.Abstractions.SourceErrorDelegate |
|
|
Improve this Doc
View Source
Unencoded test pattern samples.
Declaration
public event RawVideoSampleDelegate OnVideoSourceRawSample
Event Type
Type |
Description |
SIPSorceryMedia.Abstractions.RawVideoSampleDelegate |
|
|
Improve this Doc
View Source
Declaration
public event RawVideoSampleFasterDelegate OnVideoSourceRawSampleFaster
Event Type
Type |
Description |
SIPSorceryMedia.Abstractions.RawVideoSampleFasterDelegate |
|
Implements
SIPSorceryMedia.Abstractions.IVideoSource
System.IDisposable
Extension Methods