|
| | SubtitleFrame (SubtitleFrame &&other) noexcept |
| | Move the frame.
|
| SubtitleFrame & | operator= (SubtitleFrame &&other) noexcept |
| | Move assignment: frees the current content and takes the other frame's.
|
|
| SubtitleFrame (const SubtitleFrame &)=delete |
|
SubtitleFrame & | operator= (const SubtitleFrame &)=delete |
| SubtitleFrame | clone (OptionalErrorCode ec=throws()) const |
| | Deep copy: strings, bitmap (linesize(0) * height) and palette are copied.
|
| AVSubtitle * | raw () noexcept |
| | The underlying FFmpeg subtitle.
|
| const AVSubtitle * | raw () const noexcept |
| | The underlying FFmpeg subtitle, read-only.
|
| bool | isValid () const noexcept |
| | True when the frame contains rectangles or is a decoded empty subtitle (for example, a bitmap subtitle that clears the screen).
|
| | operator bool () const noexcept |
| | Whether the frame holds a subtitle.
|
| uint16_t | format () const noexcept |
| | 0 for graphics, non-zero for text.
|
| void | setFormat (uint16_t format) noexcept |
| | Set the subtitle kind.
|
| bool | isText () const noexcept |
| | Whether the subtitle is textual.
|
| uint32_t | startDisplayTime () const noexcept |
| | Start of the display interval, relative to pts().
|
| uint32_t | endDisplayTime () const noexcept |
| | End of the display interval, relative to pts().
|
| void | setStartDisplayTime (uint32_t ms) noexcept |
| | Set the start of the display interval.
|
| void | setEndDisplayTime (uint32_t ms) noexcept |
| | Set the end of the display interval.
|
| Timestamp | pts () const noexcept |
| | Presentation timestamp of the subtitle.
|
| void | setPts (const Timestamp &ts) |
| | Set the presentation timestamp.
|
| const Rational & | timeBase () const noexcept |
| | Time base of pts().
|
| void | setTimeBase (const Rational &value) noexcept |
| | Set the time base, rescaling the stored timestamp.
|
| Timestamp | startTime () const noexcept |
| | pts + startDisplayTime(), in the frame time base.
|
| Timestamp | endTime () const noexcept |
| | pts + endDisplayTime(), in the frame time base.
|
| int | streamIndex () const noexcept |
| | Index of the stream the subtitle came from.
|
| void | setStreamIndex (int index) noexcept |
| | Set the stream index.
|
| bool | isComplete () const noexcept |
| | True when a decoder produced this frame, including empty subtitles.
|
| void | setComplete (bool complete) noexcept |
| | Mark the frame as produced by a decoder.
|
| size_t | numRects () const noexcept |
| | Number of rectangles in the frame.
|
| SubtitleRect | rect (size_t index) const |
| | Rectangle by index.
|
| std::vector< SubtitleRect > | rects () const |
| | All rectangles as a vector of views.
|
| SubtitleRect | addRect (AVSubtitleType type=SUBTITLE_NONE, OptionalErrorCode ec=throws()) |
| | Appends a new empty rectangle owned by this frame.
|
| void | clear () noexcept |
| | Releases all rectangles and resets the frame state.
|
| std::string_view | text () const noexcept |
| | Text of the subtitle: the payload of the first text rectangle.
|
| std::string_view | ass () const noexcept |
| | ASS line of the subtitle: the payload of the first ASS rectangle.
|
Wraps AVSubtitle. AVSubtitle has no reference counting API in FFmpeg, so copies are disabled; use clone() for an explicit deep copy.
The pts value is interpreted in AV_TIME_BASE units, as required by FFmpeg. The default time base is 1/AV_TIME_BASE; setTimeBase() rescales the stored pts value.