Expand description
§bindgen commandline
The following commandline was used to create the initial bindings:
bindgen vendor/src/ltc.h -o src/bindings.rs --with-derive-defaultsStructs§
- LTCDecoder
- LTCEncoder
- LTCFrame
- LTCFrame
Ext - Extended LTC frame - includes audio-sample position offsets, volume, etc
- SMPTE
Timecode - Human readable time representation, decimal values.
- __
Bindgen Bitfield Unit - 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_ double - Wrapper around \ref ltc_decoder_write that accepts 64-bit floating point audio samples. Note: internally libltc uses 8 bit only.
- ltc_
decoder_ ⚠write_ float - Wrapper around \ref ltc_decoder_write that accepts 32-bit 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_ ⚠copy_ buffer - Copy the accumulated encoded audio to the given sample-buffer and flush the internal buffer.
- 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_ ⚠encode_ reversed_ frame - Encode a full LTC frame at fixed speed -1. This is equivalent to calling \ref ltc_encoder_encode_byte 10 times for bytes 9..0, rolling in reverse at speed 1.
- ltc_
encoder_ ⚠end_ encode - Terminate encoding and add final transition
- 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_ bufferptr - Retrieve a pointer to the accumulated encoded audio-data.
- 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_ filter - Get encoder signal rise-time / signal filtering
- ltc_
encoder_ ⚠get_ frame - Low-level access to the encoder internal LTCFrame data
- ltc_
encoder_ ⚠get_ timecode - Query the current encoder timecode.
- ltc_
encoder_ ⚠get_ volume - Query the volume of the generated LTC signal
- 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_ buffersize - Configure a custom size for the internal buffer.
- 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 the 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_ ⚠parse_ bcg_ flags - Parse Binary Coded Group Flags into standard independent format: bit 0 (1) - BGF 0, bit 1 (2) - BGF 1, bit 2 (4) - BGF 2
- 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)
Type Aliases§
- 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