Table of Contents

Class ParsingParameters

Namespace
VAST.File.ISO
Assembly
VAST.File.ISO.dll

Contains configuration and state parameters for ISO media file parsing and writing.

public class ParsingParameters
Inheritance
ParsingParameters
Inherited Members

Constructors

ParsingParameters()

public ParsingParameters()

Properties

AacForceAdtsHeader

Gets or sets whether to insert ADTS header to AAC stream if it's missing. Default value is false, i.e. this mode is disabled. Makes sense for file source only.

public bool AacForceAdtsHeader { get; set; }

Property Value

bool

AllowWriteMediaDataLast

Gets or sets whether to allow writing media data last for any new IsoSink instance. By default it's true, i.e. writing of media data last allowed. Can be set to false to prevent setting of WriteMediaDataLast to true.

public static bool AllowWriteMediaDataLast { get; set; }

Property Value

bool

AutoCompleteState

Gets or sets whether to write completion state automatically as soon as user stops file recording. Default value is false, i.e. this mode is disabled. Only makes sense for file sink and when WriteState is true.

public bool AutoCompleteState { get; set; }

Property Value

bool

ExpectedFileDuration

Gets or sets expected file duration. This parameter makes sense only if WriteMediaDataLast or PrefillHeaders is true. It defines how much space will be allocated for metadata. By default, the allocated space is enough for 1 hour record. If user expects longer recording time, it should be set accordingly. If the allocated space is not enough, the writing switches into the normal mode, without the fail-safe feature.

public TimeSpan ExpectedFileDuration { get; set; }

Property Value

TimeSpan

HeadersUpdateIntervalInFrames

Gets or sets headers update interval, the unit is frame. This parameter makes sense only if WriteMediaDataLast is true. Default value is 30 frames, i.e. 1 second when a framerate is 30 fps. Shorter interval reduces number of lost frames in case of application crash but increases disk I/O and CPU load while recording. Accordingly, longer interval increases number of lost frames in case of application crash but reduces disk I/O and CPU load while recording.

public long HeadersUpdateIntervalInFrames { get; set; }

Property Value

long

IsLive

Gets or sets whether the file is actually an endless live stream.

public bool IsLive { get; set; }

Property Value

bool

IsNetwork

Gets or sets whether source stream is a network source instead of a local file. Default value is false. It's used to adjust some timeouts to better match network latencies.

public bool IsNetwork { get; set; }

Property Value

bool

MediaStartupMode

Gets or sets a mode to start file writing for multiple stream files, eg video and audio. Default value is WaitForAnchorKeyframe, i.e. delivery starts as soon as the first keyframe of anchor stream is received. Makes sense for file sink only.

public MediaStartupMode MediaStartupMode { get; set; }

Property Value

MediaStartupMode

MinimalFreeDiskSpace

Gets or sets minimal disk space necessary to keep recording. Once disk space becomes equal to or lower than specified value then writing stops automatically. Default value is 0, i.e. this mode is disabled. Makes sense for file sink only.

public long MinimalFreeDiskSpace { get; set; }

Property Value

long

PrefillHeaders

Gets or sets whether to prefill headers with samples based on specified expected duration. Default value is false, i.e. this mode is disabled. This is a highly experimental feature and should not be set by user.

public bool PrefillHeaders { get; set; }

Property Value

bool

PreserveNals

Gets or sets whether to preserve all NALs of the original stream and write them to a file as is. Default value is false, i.e. this mode is disabled. According to the ISO standard, any delimiters and parameter sets should be removed from a bitstream. However, it's possible to override this logic by setting this parameter it to true. It could be useful when, for example, stream parameter sets are changed on the fly during recording. For file source setting this parameter to true means re-insert parameter sets to bitstream if they are missing.

public bool PreserveNals { get; set; }

Property Value

bool

UniqueId

Gets or sets unique id of the object. Equals to UniqueId of related IsoSource or IsoSink.

public Guid UniqueId { get; }

Property Value

Guid

UseSegments

Gets or sets whether MP4 fragment should be written instead of a standalone MP4 file. Default value is false, i.e. this mode is disabled.

public bool UseSegments { get; set; }

Property Value

bool

WriteMediaDataLast

Gets or sets whether to write media data in an mp4 file appending it to the end of the file. Default value is false, i.e. this mode is disabled. When enabled, the file metadata is written into the beginning of the file and being updated while writing. Therefore, upon the end of writing, the file can be immediately used for progressive downloading. But the most important is that such way of writing provides a user with additional failure protection. Since we are updating the data regularly while writing, even if the app using VASTreaming library crashes, the file remains readable/playable by any media player, and only several second of the written data can be lost in the worst case. As an interesting side effect, there is a possibility of opening/playing the file by a media player while writing is still in progress.

public bool WriteMediaDataLast { get; set; }

Property Value

bool

WriteState

Gets or sets whether to write VASTreaming specific metadata to a file. Default value is false, i.e. this mode is disabled. Can be used for faster detection by IsoSource whether a file is still being written or already written completely. Also can be used to save NTP timestamp of the first file frame to be able to synchronize file with accuracy of tens of milliseconds later.

public bool WriteState { get; set; }

Property Value

bool