LibassBindings class
Regenerate bindings with flutter pub run ffigen --config ffigen.yaml
.
Constructors
- LibassBindings(DynamicLibrary dynamicLibrary)
-
The symbols are looked up in
dynamicLibrary
. -
LibassBindings.fromLookup(Pointer<
T> lookup<T extends NativeType>(String symbolName) ) -
The symbols are looked up with
lookup
.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
ass_add_font(
Pointer< ASS_Library> library1, Pointer<Char> name, Pointer<Char> data, int data_size) → void - \brief Add a memory font. \param library library handle \param name attachment name \param data binary font data \param data_size data size
-
ass_alloc_event(
Pointer< ASS_Track> track) → int - \brief Allocate new event. \param track track \return newly allocated event id >= 0, or a value < 0 on failure See GENERAL NOTE in ass_types.h.
-
ass_alloc_style(
Pointer< ASS_Track> track) → int - \brief Allocate new style. \param track track \return newly allocated style id >= 0, or a value < 0 on failure See GENERAL NOTE in ass_types.h.
-
ass_clear_fonts(
Pointer< ASS_Library> library1) → void - \brief Remove all fonts stored in an ass_library object. This can only be called safely if all ASS_Track and ASS_Renderer instances associated with the library handle have been released first. \param library library handle
-
ass_flush_events(
Pointer< ASS_Track> track) → void - \brief Flush buffered events. \param track track
-
ass_fonts_update(
Pointer< ASS_Renderer> priv) → int - \brief This is a stub and does nothing. Old documentation: Update/build font cache. This needs to be called if it was disabled when ass_set_fonts was set.
-
ass_free_event(
Pointer< ASS_Track> track, int eid) → void - \brief Delete an event. \param track track \param eid event id Deallocates event data. Does not modify track->n_events. Freeing an event without subsequently setting track->n_events to a value less than or equal to the freed event id before calling any other libass API function on the track is undefined behaviour. See GENERAL NOTE in ass_types.h
-
ass_free_style(
Pointer< ASS_Track> track, int sid) → void - \brief Delete a style. \param track track \param sid style id Deallocates style data. Does not modify track->n_styles. Freeing a style without subsequently setting track->n_styles to a value less than or equal to the freed style id before calling any other libass API function on the track is undefined behaviour. Additionally a freed style style still being referenced by an event in track->events will also result in undefined behaviour. See GENERAL NOTE in ass_types.h.
-
ass_free_track(
Pointer< ASS_Track> track) → void - \brief Deallocate track and all its child objects (styles and events). \param track track to deallocate or NULL
-
ass_get_available_font_providers(
Pointer< ASS_Library> priv, Pointer<Pointer< providers, Pointer<Int32> >Size> size) → void - \brief Get the list of available font providers. The output array is allocated with malloc and can be released with free(). If an allocation error occurs, size is set to (size_t)-1. \param priv library handle \param providers output, list of default providers (malloc'ed array) \param size output, number of providers \return list of available font providers (user owns the returned array)
-
ass_library_done(
Pointer< ASS_Library> priv) → void - \brief Finalize the library \param priv library handle
-
ass_library_init(
) → Pointer< ASS_Library> - \brief Initialize the library. \return library handle or NULL if failed
-
ass_library_version(
) → int - \brief Return the version of library. This returns the value LIBASS_VERSION was set to when the library was compiled. \return library version
-
ass_new_track(
Pointer< ASS_Library> arg0) → Pointer<ASS_Track> - \brief Allocate a new empty track object. \param library handle \return pointer to empty track or NULL on failure
-
ass_process_chunk(
Pointer< ASS_Track> track, Pointer<Char> data, int size, int timecode, int duration) → void - \brief Parse a chunk of subtitle stream data. A chunk contains exactly one event in Matroska format. See the Matroska specification for details. In later libass versions (since LIBASS_VERSION==0x01300001), using this function means you agree not to modify events manually, or using other functions manipulating the event list like ass_process_data(). If you do anyway, the internal duplicate checking might break. Calling ass_flush_events() is still allowed. \param track track \param data string to parse \param size length of data \param timecode starting time of the event (milliseconds) \param duration duration of the event (milliseconds)
-
ass_process_codec_private(
Pointer< ASS_Track> track, Pointer<Char> data, int size) → void - \brief Parse Codec Private section of the subtitle stream, in Matroska format. See the Matroska specification for details. \param track target track \param data string to parse \param size length of data
-
ass_process_data(
Pointer< ASS_Track> track, Pointer<Char> data, int size) → void - \brief Parse a chunk of subtitle stream data. \param track track \param data string to parse \param size length of data
-
ass_process_force_style(
Pointer< ASS_Track> track) → void - \brief Explicitly process style overrides for a track. \param track track handle
-
ass_read_file(
Pointer< ASS_Library> library1, Pointer<Char> fname, Pointer<Char> codepage) → Pointer<ASS_Track> - \brief Read subtitles from file. \param library library handle \param fname file name \param codepage encoding (iconv format) \return newly allocated track or NULL on failure NOTE: On Microsoft Windows, when using WIN32-APIs, fname must be in either UTF-8 mixed with lone or paired UTF-16 surrogates encoded like in CESU-8 or the encoding accepted by fopen with the former taking precedence if both versions are valid and exist. On all other systems there is no need for special considerations like that.
-
ass_read_memory(
Pointer< ASS_Library> library1, Pointer<Char> buf, int bufsize, Pointer<Char> codepage) → Pointer<ASS_Track> - \brief Read subtitles from memory. \param library library handle \param buf pointer to subtitles text \param bufsize size of buffer \param codepage encoding (iconv format) \return newly allocated track or NULL on failure
-
ass_read_styles(
Pointer< ASS_Track> track, Pointer<Char> fname, Pointer<Char> codepage) → int - \brief Read styles from file into already initialized track. \param fname file name \param codepage encoding (iconv format) \return 0 on success NOTE: On Microsoft Windows, when using WIN32-APIs, fname must be in either UTF-8 mixed with lone or paired UTF-16 surrogates encoded like in CESU-8 or the encoding accepted by fopen with the former taking precedence if both versions are valid and exist. On all other systems there is no need for special considerations like that.
-
ass_render_frame(
Pointer< ASS_Renderer> priv, Pointer<ASS_Track> track, int now, Pointer<Int> detect_change) → Pointer<ASS_Image> - \brief Render a frame, producing a list of ASS_Image. \param priv renderer handle \param track subtitle track \param now video timestamp in milliseconds \param detect_change compare to the previous call and set to 1 if positions may have changed, or set to 2 if content may have changed.
-
ass_renderer_done(
Pointer< ASS_Renderer> priv) → void - \brief Finalize the renderer. \param priv renderer handle
-
ass_renderer_init(
Pointer< ASS_Library> arg0) → Pointer<ASS_Renderer> - \brief Initialize the renderer. \param priv library handle \return renderer handle or NULL if failed
-
ass_set_aspect_ratio(
Pointer< ASS_Renderer> priv, double dar, double sar) → void - \brief Set aspect ratio parameters. This calls ass_set_pixel_aspect(priv, dar / sar). @deprecated New code should use ass_set_pixel_aspect(). \param priv renderer handle \param dar display aspect ratio (DAR), prescaled for output PAR \param sar storage aspect ratio (SAR)
-
ass_set_cache_limits(
Pointer< ASS_Renderer> priv, int glyph_max, int bitmap_max_size) → void - \brief Set hard cache limits. Do not set, or set to zero, for reasonable defaults.
-
ass_set_check_readorder(
Pointer< ASS_Track> track, int check_readorder) → void - \brief Set whether the ReadOrder field when processing a packet with ass_process_chunk() should be used for eliminating duplicates. \param check_readorder 0 means do not try to eliminate duplicates; 1 means use the ReadOrder field embedded in the packet as unique identifier, and discard the packet if there was already a packet with the same ReadOrder. Other values are undefined. If this function is not called, the default value is 1.
-
ass_set_extract_fonts(
Pointer< ASS_Library> priv, int extract) → void - \brief Whether fonts should be extracted from track data. \param priv library handle \param extract whether to extract fonts
-
ass_set_font_scale(
Pointer< ASS_Renderer> priv, double font_scale) → void - \brief Set a fixed font scaling factor. \param priv renderer handle \param font_scale scaling factor, default is 1.0
-
ass_set_fonts(
Pointer< ASS_Renderer> priv, Pointer<Char> default_font, Pointer<Char> default_family, int dfp, Pointer<Char> config, int update) → void - \brief Set font lookup defaults. \param default_font path to default font to use. Must be supplied if all system fontproviders are disabled or unavailable. \param default_family fallback font family, or NULL \param dfp which font provider to use (one of ASS_DefaultFontProvider). In older libass version, this could be 0 or 1, where 1 enabled fontconfig. Newer relases also accept 0 (ASS_FONTPROVIDER_NONE) and 1 (ASS_FONTPROVIDER_AUTODETECT), which is almost backward-compatible. If the requested fontprovider does not exist or fails to initialize, the behavior is the same as when ASS_FONTPROVIDER_NONE was passed. \param config path to fontconfig configuration file, or NULL. Only relevant if fontconfig is used. The encoding must match the one accepted by fontconfig. \param update whether fontconfig cache should be built/updated now. Only relevant if fontconfig is used.
-
ass_set_fonts_dir(
Pointer< ASS_Library> priv, Pointer<Char> fonts_dir) → void - \brief Set additional fonts directory. Optional directory that will be scanned for fonts. The fonts found are used for font lookup. NOTE: A valid font directory is not needed to support embedded fonts. On Microsoft Windows, when using WIN32-APIs, fonts_dir must be in either UTF-8 mixed with lone or paired UTF-16 surrogates encoded like in CESU-8 or the encoding accepted by fopen with the former taking precedence if both versions are valid and exist. On all other systems there is no need for special considerations like that.
-
ass_set_frame_size(
Pointer< ASS_Renderer> priv, int w, int h) → void - \brief Set the frame size in pixels, including margins. The renderer will never return images that are outside of the frame area. The value set with this function can influence the pixel aspect ratio used for rendering. If after compensating for configured margins the frame size is not an isotropically scaled version of the video display size, you may have to use ass_set_pixel_aspect(). @see ass_set_pixel_aspect() @see ass_set_margins() \param priv renderer handle \param w width \param h height
-
ass_set_hinting(
Pointer< ASS_Renderer> priv, int ht) → void - \brief Set font hinting method. \param priv renderer handle \param ht hinting method
-
ass_set_line_position(
Pointer< ASS_Renderer> priv, double line_position) → void - \brief Set vertical line position. \param priv renderer handle \param line_position vertical line position of subtitles in percent (0-100: 0 = on the bottom (default), 100 = on top)
-
ass_set_line_spacing(
Pointer< ASS_Renderer> priv, double line_spacing) → void - \brief Set line spacing. Will not be scaled with frame size. \param priv renderer handle \param line_spacing line spacing in pixels
-
ass_set_margins(
Pointer< ASS_Renderer> priv, int t, int b, int l, int r) → void - \brief Set frame margins. These values may be negative if pan-and-scan is used. The margins are in pixels. Each value specifies the distance from the video rectangle to the renderer frame. If a given margin value is positive, there will be free space between renderer frame and video area. If a given margin value is negative, the frame is inside the video, i.e. the video has been cropped.
-
ass_set_message_cb(
Pointer< ASS_Library> priv, Pointer<NativeFunction< msg_cb, Pointer<Void Function(Int, Pointer< >Char> , va_list, Pointer<Void> )>Void> data) → void -
\brief Register a callback for debug/info messages.
If a callback is registered, it is called for every message emitted by
libass. The callback receives a format string and a list of arguments,
to be used for the printf family of functions. Additionally, a log level
from 0 (FATAL errors) to 7 (verbose DEBUG) is passed. Usually, level 5
should be used by applications.
If no callback is set, all messages level < 5 are printed to stderr,
prefixed with
ass
. -
ass_set_pixel_aspect(
Pointer< ASS_Renderer> priv, double par) → void - \brief Set pixel aspect ratio correction. This is the ratio of pixel width to pixel height.
-
ass_set_selective_style_override(
Pointer< ASS_Renderer> priv, Pointer<ASS_Style> style) → void - \brief Set style for selective style override. See ass_set_selective_style_override_enabled(). \param style style settings to use if override is enabled. Applications should initialize it with {0} before setting fields. Strings will be copied by the function.
-
ass_set_selective_style_override_enabled(
Pointer< ASS_Renderer> priv, int bits) → void - \brief Set selective style override mode. If enabled, the renderer attempts to override the ASS script's styling of normal subtitles, without affecting explicitly positioned text. If an event looks like a normal subtitle, parts of the font style are copied from the user style set with ass_set_selective_style_override(). Warning: the heuristic used for deciding when to override the style is rather rough, and enabling this option can lead to incorrectly rendered subtitles. Since the ASS format doesn't have any support for allowing end-users to customize subtitle styling, this feature can only be implemented on "best effort" basis, and has to rely on heuristics that can easily break. \param priv renderer handle \param bits bit mask comprised of ASS_OverrideBits values.
-
ass_set_shaper(
Pointer< ASS_Renderer> priv, int level) → void - \brief Set shaping level. This is merely a hint, the renderer will use whatever is available if the request cannot be fulfilled. \param level shaping level
-
ass_set_storage_size(
Pointer< ASS_Renderer> priv, int w, int h) → void - \brief Set the source image size in pixels. This affects some ASS tags like e.g. 3D transforms and is used to calculate the source aspect ratio and blur scale. The source image size can be reset to default by setting w and h to 0. The value set with this function can influence the pixel aspect ratio used for rendering. The values must be the actual storage size of the video stream, without any anamorphic de-squeeze applied. @see ass_set_pixel_aspect() \param priv renderer handle \param w width \param h height
-
ass_set_style_overrides(
Pointer< ASS_Library> priv, Pointer<Pointer< list) → voidChar> > -
\brief Register style overrides with a library instance.
The overrides should have the form
Style.
Param=Value, e.g. SomeStyle.Font=Arial ScaledBorderAndShadow=yes -
ass_set_use_margins(
Pointer< ASS_Renderer> priv, int use) → void - \brief Whether margins should be used for placing regular events. \param priv renderer handle \param use whether to use the margins
-
ass_step_sub(
Pointer< ASS_Track> track, int now, int movement) → int - \brief Calculates timeshift from now to the start of some other subtitle event, depending on movement parameter. \param track subtitle track \param now current time in milliseconds \param movement how many events to skip from the one currently displayed +2 means "the one after the next", -1 means "previous" \return timeshift in milliseconds
-
ass_track_set_feature(
Pointer< ASS_Track> track, int feature, int enable) → int - \brief Enable or disable certain features This manages flags that control the behavior of the renderer and how certain tags etc. within the track are interpreted. The defaults on a newly created ASS_Track are such that rendering is compatible with traditional renderers like VSFilter, and/or old versions of libass. Calling ass_process_data() or ass_process_codec_private() may change some of these flags according to file headers. (ass_process_chunk() will not change any of the flags.) Additions to ASS_Feature are backward compatible to old libass releases (ABI compatibility). After calling ass_render_frame, changing features is no longer allowed. \param track track \param feature the specific feature to enable or disable \param enable 0 for disable, any non-0 value for enable \return 0 if feature set, -1 if feature is unknown
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited