[][src]Crate x42ltc_sys

bindgen commandline

The following commandline was used to create the initial bindings:

bindgen vendor/src/ltc.h -o src/bindings.rs --with-derive-defaults

Structs

LTCDecoder
LTCEncoder
LTCFrame
LTCFrameExt

Extended LTC frame - includes audio-sample position offsets, volume, etc

SMPTETimecode

Human readable time representation, decimal values.

__BindgenBitfieldUnit
max_align_t

Constants

LIBLTC_AGE
LIBLTC_CUR
LIBLTC_REV
LIBLTC_VERSION
LIBLTC_VERSION_MAJOR
LIBLTC_VERSION_MICRO
LIBLTC_VERSION_MINOR
LTC_BG_FLAGS_LTC_BGF_DONT_TOUCH

< encoder init or re-init does not touch the BGF bits (initial values after initialization is zero)

LTC_BG_FLAGS_LTC_NO_PARITY

< parity bit is left untouched when setting or in/decrementing the encoder frame-number

LTC_BG_FLAGS_LTC_TC_CLOCK

< the Timecode is wall-clock aka freerun. This also sets BGF1 (unless LTC_BGF_DONT_TOUCH is given)

LTC_BG_FLAGS_LTC_USE_DATE

< LTCFrame <> SMPTETimecode converter and LTCFrame increment/decrement use date, also set BGF2 to '1' when encoder is initialized or re-initialized (unless LTC_BGF_DONT_TOUCH is given)

LTC_FRAME_BIT_COUNT
LTC_H
LTC_TV_STANDARD_LTC_TV_525_60

< 30fps

LTC_TV_STANDARD_LTC_TV_625_50

< 25fps

LTC_TV_STANDARD_LTC_TV_1125_60

< 30fps

LTC_TV_STANDARD_LTC_TV_FILM_24

< 24fps

Functions

ltc_decoder_create

Create a new LTC decoder.

ltc_decoder_free

Release memory of decoder. @param d decoder handle

ltc_decoder_queue_flush

Remove all LTC frames from the internal queue. @param d decoder handle

ltc_decoder_queue_length

Count number of LTC frames currently in the queue. @param d decoder handle @return number of queued frames

ltc_decoder_read

Decoded LTC frames are placed in a queue. This function retrieves a frame from the queue, and stores it at LTCFrameExt*

ltc_decoder_write

Feed the LTC decoder with new audio samples.

ltc_decoder_write_float

Wrapper around \ref ltc_decoder_write that accepts floating point audio samples. Note: internally libltc uses 8 bit only.

ltc_decoder_write_s16

Wrapper around \ref ltc_decoder_write that accepts signed 16 bit audio samples. Note: internally libltc uses 8 bit only.

ltc_decoder_write_u16

Wrapper around \ref ltc_decoder_write that accepts unsigned 16 bit audio samples. Note: internally libltc uses 8 bit only.

ltc_encoder_buffer_flush

reset the write-pointer of the encoder-buffer @param e encoder handle

ltc_encoder_create

Allocate and initialize LTC audio encoder.

ltc_encoder_dec_timecode

Move the encoder to the previous timecode frame. This is useful for encoding reverse LTC. uses \ref ltc_frame_decrement() internally.

ltc_encoder_encode_byte

Generate LTC audio for given byte of the LTC-frame and place it into the internal buffer.

ltc_encoder_encode_frame

Encode a full LTC frame at fixed speed. This is equivalent to calling \ref ltc_encoder_encode_byte 10 times for bytes 0..9 with speed 1.0.

ltc_encoder_free

Release memory of the encoder. @param e encoder handle

ltc_encoder_get_buffer

Copy the accumulated encoded audio to the given sample-buffer and flush the internal buffer.

ltc_encoder_get_buffersize

Query the length of the internal buffer. It is allocated to hold audio-frames for exactly one LTC frame for the given sample-rate and frame-rate. ie. (1 + sample-rate / fps) bytes

ltc_encoder_get_bufptr

Retrieve a pointer to the accumulated encoded audio-data.

ltc_encoder_get_frame

Low-level access to the encoder internal LTCFrame data

ltc_encoder_get_timecode

Query the current encoder timecode.

ltc_encoder_inc_timecode

Move the encoder to the next timecode frame. uses \ref ltc_frame_increment() internally.

ltc_encoder_reinit

Change the encoder settings without re-allocating any library internal data structure (realtime safe). changing the fps and or sample-rate implies a buffer flush, and biphase state reset.

ltc_encoder_reset

reset ecoder state. flushes buffer, reset biphase state

ltc_encoder_set_bufsize

Configure a custom size for the internal buffer.

ltc_encoder_set_filter

Set encoder signal rise-time / signal filtering

ltc_encoder_set_frame

Low-level access to the internal LTCFrame data.

ltc_encoder_set_timecode

Set the encoder LTC-frame to the given SMPTETimecode. The next call to \ref ltc_encoder_encode_byte or \ref ltc_encoder_encode_frame will encode this time to LTC audio-samples.

ltc_encoder_set_user_bits

Set the user-bits of the frame to the given data.

ltc_encoder_set_volume

Set the volume of the generated LTC signal

ltc_frame_alignment

LTCFrame sample alignment offset.

ltc_frame_decrement

Decrement the timecode by one Frame (1/framerate seconds) and set the Frame's parity bit accordingly (see \ref ltc_frame_set_parity)

ltc_frame_get_user_bits

Get a 32-bits unsigned integer from the user-data bits. The data should be written LSB first in the frame

ltc_frame_increment

Increment the timecode by one Frame (1/framerate seconds) and set the Frame's parity bit accordingly (see \ref ltc_frame_set_parity)

ltc_frame_reset

Reset all values of a LTC FRAME to zero, except for the sync-word (0x3FFD) at the end. The sync word is set according to architecture (big/little endian). Also set the Frame's parity bit accordingly (see \ref ltc_frame_set_parity) @param frame the LTCFrame to reset

ltc_frame_set_parity

Set the parity of the LTC frame.

ltc_frame_to_time

Convert binary LTCFrame into SMPTETimecode struct

ltc_time_to_frame

Translate SMPTETimecode struct into its binary LTC representation and set the LTC frame's parity bit accordingly (see \ref ltc_frame_set_parity)

parse_bcg_flags

Parse Binary Group Flags into standard independent format: bit 0 (1) - BGF 0, bit 1 (2) - BGF 1, bit 2 (4) - BGF 2

Type Definitions

LTC_BG_FLAGS

encoder and LTCframe <> timecode operation flags

LTC_TV_STANDARD

the standard defines the assignment of the binary-group-flag bits basically only 25fps is different, but other standards defined in the SMPTE spec have been included for completeness.

ltc_off_t

sample-count offset - 64bit wide

ltcsnd_sample_t

default audio sample type: 8bit unsigned (mono)

wchar_t