|
| | SubtitleRect (AVSubtitleRect *rect) |
| | Wrap a rectangle.
|
| bool | isValid () const noexcept |
| | Whether the view refers to a rectangle.
|
| | operator bool () const noexcept |
| | Whether the view refers to a rectangle.
|
| AVSubtitleType | type () const noexcept |
| | Kind of payload the rectangle carries.
|
| void | setType (AVSubtitleType type) noexcept |
| | Set the payload kind.
|
| int | x () const noexcept |
| | Horizontal position of the rectangle.
|
| int | y () const noexcept |
| | Vertical position of the rectangle.
|
| int | width () const noexcept |
| | Width of the bitmap.
|
| int | height () const noexcept |
| | Height of the bitmap.
|
| void | setArea (int x, int y, int width, int height) noexcept |
| | Set the position and the size at once.
|
| int | nbColors () const noexcept |
| | Number of palette entries of a bitmap rectangle.
|
| std::string_view | text () const noexcept |
| | Plain UTF-8 text.
|
| std::string_view | ass () const noexcept |
| | ASS/SSA event line.
|
| void | setText (std::string_view text, OptionalErrorCode ec=throws()) |
| | Store plain UTF-8 text in the rectangle.
|
| void | setAss (std::string_view ass, OptionalErrorCode ec=throws()) |
| | Store an ASS/SSA event line in the rectangle.
|
|
void | clearText () noexcept |
| | Free the text payload and clear the pointer.
|
|
void | clearAss () noexcept |
| | Free the ASS payload and clear the pointer.
|
| bool | isForced () const noexcept |
| | Whether the rectangle is flagged as forced.
|
| void | setForced (bool forced) noexcept |
| | Mark the rectangle as forced.
|
| uint8_t * | data (size_t plane=0) noexcept |
| | Pointer to one image plane.
|
| const uint8_t * | data (size_t plane=0) const noexcept |
| | Pointer to one image plane, read-only.
|
| int | linesize (size_t plane=0) const noexcept |
| | Distance between two rows of a plane.
|
| void | setBitmap (const uint8_t *data, int stride, int width, int height, OptionalErrorCode ec=throws()) |
| | Sets plane 0 to an index bitmap and updates width, height and linesize.
|
| void | setPalette (const uint32_t *palette, int count, OptionalErrorCode ec=throws()) |
| | Sets plane 1 to a palette and updates nb_colors.
|
| std::span< const uint8_t > | bitmap () const noexcept |
| | Plane 0 as an index bitmap: linesize(0) * height() bytes.
|
| std::span< const uint32_t > | palette () const noexcept |
| | Plane 1 as a palette: nbColors() entries.
|
| void | setBitmap (std::span< const uint8_t > data, int stride, int width, int height, OptionalErrorCode ec=throws()) |
| | Sets plane 0 to an index bitmap and updates width, height and linesize.
|
| void | setPalette (std::span< const uint32_t > palette, OptionalErrorCode ec=throws()) |
| | Sets plane 1 to a palette and updates nb_colors.
|
|
| FFWrapperPtr ()=default |
| | Create an empty wrapper; isNull() is true.
|
| const AVSubtitleRect * | raw () const |
| | Read access to the wrapped object.
|
| void | reset (AVSubtitleRect *raw=nullptr) |
| | Replace the stored pointer.
|
| bool | isNull () const |
| | Whether the wrapper is empty.
|
| void | _log (int level, const char *fmt) const |
| | Log through the FFmpeg log system, using this wrapper as the context.
|
The view is valid while the owning SubtitleFrame is alive. Setters are meant for rectangles owned by a SubtitleFrame; they allocate memory compatible with avsubtitle_free().
- Examples
- api2-subtitles.cpp.