Show / Hide Table of Contents

Class Subtitle

Represents a collection of subtitle rectangles and manages subtitle display timings. This class wraps an FFmpeg FFmpeg.AutoGen._AVSubtitle structure and provides access to subtitle properties and rectangles.

Inheritance
object
Subtitle
Implements
IReadOnlyList<SubtitleRect>
IReadOnlyCollection<SubtitleRect>
IEnumerable<SubtitleRect>
IEnumerable
IDisposable
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: FFmpeg.Subtitles
Assembly: FFmpeg.dll
Syntax
public class Subtitle : IReadOnlyList<SubtitleRect>, IReadOnlyCollection<SubtitleRect>, IEnumerable<SubtitleRect>, IEnumerable, IDisposable

Constructors

View Source

Subtitle()

Declaration
public Subtitle()

Properties

View Source

Count

Gets the number of subtitle rectangles contained in this subtitle.

Declaration
public int Count { get; }
Property Value
Type Description
int
View Source

EndDisplayTime

Gets the time (in milliseconds) when the subtitle should stop being displayed.

Declaration
public uint EndDisplayTime { get; }
Property Value
Type Description
uint
View Source

this[int]

Gets the SubtitleRect at the specified index.

Declaration
public SubtitleRect this[int index] { get; }
Parameters
Type Name Description
int index

The index of the subtitle rectangle to retrieve.

Property Value
Type Description
SubtitleRect

The SubtitleRect at the specified index.

Exceptions
Type Condition
IndexOutOfRangeException

Thrown if the index is less than 0 or greater than or equal to the number of rectangles in the subtitle.

View Source

PresentationTime

Gets or sets the presentation timestamp (PTS) for the subtitle. This indicates the time when the subtitle should be presented.

Declaration
public long PresentationTime { get; set; }
Property Value
Type Description
long
View Source

StartDisplayTime

Gets the time (in milliseconds) when the subtitle should start being displayed.

Declaration
public uint StartDisplayTime { get; }
Property Value
Type Description
uint

Methods

View Source

Dispose()

Releases the resources used by the Subtitle instance.

Declaration
public void Dispose()
View Source

Dispose(bool)

Releases the resources used by the Subtitle instance.

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

Indicates whether the method was called from the Dispose() method (true) or from a finalizer (false).

View Source

Free()

Releases the resources used by the Subtitle instance.

Declaration
public void Free()
View Source

GetEnumerator()

Returns an enumerator that iterates through the subtitle rectangles.

Declaration
public IEnumerator<SubtitleRect> GetEnumerator()
Returns
Type Description
IEnumerator<SubtitleRect>

An enumerator for the collection of subtitle rectangles.

Implements

IReadOnlyList<T>
IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable
IDisposable
  • View Source
In this article
Back to top Generated by DocFX