[][src]Crate alass

Statics

ALASS_FILE_DOES_NOT_EXIST
ALASS_INTERNAL_ERROR
ALASS_INVALID_PARAMS
ALASS_LOG_ALREADY_CONFIGURED
ALASS_PARSE_ERROR
ALASS_PERMISSION_DENIED
ALASS_READ_ERROR
ALASS_SERIALIZE_ERROR
ALASS_SINK_CLOSED
ALASS_SUCCESS
ALASS_UNSUPPORTED_FORMAT
ALASS_WRITE_ERROR

Functions

alass_audiosink_close

Closes a AudioSink instance. Once a sink is closed it can no longer receive additional samples.

alass_audiosink_free

Deallocates AudioSink instance.

alass_audiosink_new

Allocates a new AudioSink instance ready to receive audio samples.

alass_audiosink_send

Send audio samples to AudioSink instance. Samples should be 8kHz 16-bit signed little-endian mono.

alass_format_is_supported

Determines whether the given subtitle is able to be synced

alass_log_config

Configure logging

alass_options_free

Deallocates SyncOptions instance

alass_options_log

Logs the values of the given SyncOptions instance (useful for debugging)

alass_options_new

Creates a new SyncOptions instance initialized to default values

alass_options_set_framerate_correction

Whether attempt correction of mismatched framerates

alass_options_set_interval

Sets the alass "interval" parameter

alass_options_set_speed_optimization

Sets the alass "speed_optimization" parameter

alass_options_set_split_mode

Sets the alass "split_mode" parameter

alass_options_set_split_penalty

The alass "split_penalty" parameter

alass_sync

Performs alass subtitle synchronization.

alass_timespans_compute

Computes timespans given detected voice-activity.

alass_timespans_free

Deallocates TimeSpans instance.

alass_timespans_load_raw

Loads cached timespans from disk (see alass_timespans_save_raw()). Returns null if no file exists at the given path.

alass_timespans_load_subtitle

Loads timespans from subtitle file. Returns null if no file exists at the given path.

alass_timespans_new

Creates a new TimeSpans buffer ready to accept data (see alass_timespans_push()).

alass_timespans_push

Appends timespan to TimeSpans buffer. Start and end times are in milliseconds.

alass_timespans_save_raw

Saves timespans to disk with the given filename (see alass_timespans_load_raw()).

alass_voice_activity_clean

[EXPERIMENTAL] Cleans voice-activity data

alass_voice_activity_compute

Computes voice activity given an AudioSink containing sample data.

alass_voice_activity_free

Deallocates VoiceActivity instance.

from_cstring

Copies the contents of a char buffer into an owned String instance. Will return None if the pointer is null, or if the C string is not a valid UTF-8 sequence.

from_ptr

Dereferences a heap pointer and returns a mutable reference, ensuring the value will not be dropped when it goes out of scope. Useful for working with heap values recieved from accross an ffi boundary without dropping them when finished. Panics if pointer is null.

from_ptr_owned

Dereferences a heap pointer and returns a boxed instance. Because the returned value is owned, it will be dropped when it goes out of scope. Useful for deallocating heap values received from accross an ffi boundary. Panics if pointer is null.

from_ptr_safe

Safe version of from_ptr which, if pointer is null, will return None instead of panicking.

to_ptr

Moves an instance to the heap and returns it's pointer. Value will not be dropped when the return value leaves scope. Useful for leaking values to be sent across an ffi boundary.

Type Definitions

ResultCode