43 #if defined _WIN32 && !defined(__LITTLE_ENDIAN__) 44 #define __LITTLE_ENDIAN__ 48 # define LTC_BIG_ENDIAN 49 #elif defined _BIG_ENDIAN 50 # define LTC_BIG_ENDIAN 51 #elif defined __BYTE_ORDER__ 52 # if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ 53 # define LTC_BIG_ENDIAN 55 #elif !defined __LITTLE_ENDIAN__ 57 # if (defined __BYTE_ORDER__ && defined __ORDER_BIG_ENDIAN__ && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) 58 # define LTC_BIG_ENDIAN 64 #ifndef DOXYGEN_IGNORE 66 #define LIBLTC_VERSION "1.2.0" 67 #define LIBLTC_VERSION_MAJOR 1 68 #define LIBLTC_VERSION_MINOR 2 69 #define LIBLTC_VERSION_MICRO 0 89 #define LTC_FRAME_BIT_COUNT 80 181 #if (defined LTC_BIG_ENDIAN && !defined DOXYGEN_IGNORE) 184 unsigned int user1:4;
187 unsigned int user2:4;
189 unsigned int dfbit:1;
192 unsigned int user3:4;
195 unsigned int user4:4;
199 unsigned int user5:4;
202 unsigned int user6:4;
206 unsigned int user7:4;
209 unsigned int user8:4;
437 ltcsnd_sample_t *buf,
size_t size,
ltc_off_t ltc_frame_alignment(double samples_per_frame, enum LTC_TV_STANDARD standard)
unsigned char secs
second 0..60
Definition: ltc.h:320
void ltc_encoder_buffer_flush(LTCEncoder *e)
int ltc_encoder_inc_timecode(LTCEncoder *e)
void ltc_frame_to_time(SMPTETimecode *stime, LTCFrame *frame, int flags)
unsigned char ltcsnd_sample_t
Definition: ltc.h:82
void ltc_encoder_set_timecode(LTCEncoder *e, SMPTETimecode *t)
int ltc_encoder_dec_timecode(LTCEncoder *e)
int reverse
if non-zero, a reverse played LTC frame was detected. Since the frame was reversed, it started at off_end and finishes as off_start (off_end > off_start). (Note: in reverse playback the (reversed) sync-word of the next/previous frame is detected, this offset is corrected).
Definition: ltc.h:297
int ltc_decoder_free(LTCDecoder *d)
int ltc_decoder_queue_length(LTCDecoder *d)
unsigned int sync_word
Definition: ltc.h:249
LTCEncoder * ltc_encoder_create(double sample_rate, double fps, enum LTC_TV_STANDARD standard, int flags)
unsigned int user8
Definition: ltc.h:247
struct LTCEncoder LTCEncoder
Definition: ltc.h:340
unsigned char months
valid months are 1..12
Definition: ltc.h:315
ltcsnd_sample_t * ltc_encoder_get_bufptr(LTCEncoder *e, int *size, int flush)
unsigned int user3
Definition: ltc.h:228
void ltc_encoder_get_timecode(LTCEncoder *e, SMPTETimecode *t)
unsigned char days
day of month 1..31
Definition: ltc.h:316
void ltc_encoder_set_filter(LTCEncoder *e, double rise_time)
LTC_BG_FLAGS
Definition: ltc.h:265
25fps
Definition: ltc.h:259
the Timecode is wall-clock aka freerun. This also sets BGF1 (unless LTC_BGF_DONT_TOUCH is given) ...
Definition: ltc.h:267
unsigned int frame_tens
SMPTE framenumber BCD tens 0..3.
Definition: ltc.h:222
unsigned int mins_tens
SMPTE minutes BCD tens 0..6.
Definition: ltc.h:237
int ltc_encoder_set_volume(LTCEncoder *e, double dBFS)
int ltc_frame_decrement(LTCFrame *frame, int fps, enum LTC_TV_STANDARD standard, int flags)
unsigned int binary_group_flag_bit1
indicate timecode is local time wall-clock, see table above - bit 58
Definition: ltc.h:245
unsigned int user4
Definition: ltc.h:232
unsigned int frame_units
SMPTE framenumber BCD unit 0..9.
Definition: ltc.h:219
#define LTC_FRAME_BIT_COUNT
Definition: ltc.h:89
unsigned int user2
Definition: ltc.h:225
void ltc_frame_reset(LTCFrame *frame)
void ltc_encoder_reset(LTCEncoder *e)
24fps
Definition: ltc.h:261
void ltc_decoder_write_s16(LTCDecoder *d, short *buf, size_t size, ltc_off_t posinfo)
unsigned char frame
sub-second frame 0..(FPS - 1)
Definition: ltc.h:321
ltc_off_t off_end
Definition: ltc.h:296
void ltc_decoder_write_u16(LTCDecoder *d, unsigned short *buf, size_t size, ltc_off_t posinfo)
30fps
Definition: ltc.h:260
void ltc_decoder_queue_flush(LTCDecoder *d)
unsigned int biphase_mark_phase_correction
see note on Bit 27 in description and ltc_frame_set_parity .
Definition: ltc.h:231
int parse_bcg_flags(LTCFrame *f, enum LTC_TV_STANDARD standard)
unsigned int col_frame
colour-frame: timecode intentionally synchronized to a colour TV field sequence
Definition: ltc.h:224
int ltc_encoder_get_buffer(LTCEncoder *e, ltcsnd_sample_t *buf)
int ltc_encoder_set_bufsize(LTCEncoder *e, double sample_rate, double fps)
int ltc_encoder_reinit(LTCEncoder *e, double sample_rate, double fps, enum LTC_TV_STANDARD standard, int flags)
unsigned int binary_group_flag_bit2
indicate user-data char encoding (or parity with 25fps), see table above - bit 59 ...
Definition: ltc.h:246
void ltc_decoder_write(LTCDecoder *d, ltcsnd_sample_t *buf, size_t size, ltc_off_t posinfo)
parity bit is left untouched when setting or in/decrementing the encoder frame-number ...
Definition: ltc.h:269
LTCFrame ltc
the actual LTC frame. see LTCFrame
Definition: ltc.h:294
void ltc_encoder_get_frame(LTCEncoder *e, LTCFrame *f)
void ltc_time_to_frame(LTCFrame *frame, SMPTETimecode *stime, enum LTC_TV_STANDARD standard, int flags)
void ltc_encoder_encode_frame(LTCEncoder *e)
void ltc_frame_set_parity(LTCFrame *frame, enum LTC_TV_STANDARD standard)
unsigned int user6
Definition: ltc.h:239
ltc_off_t off_start
Definition: ltc.h:295
unsigned char mins
minute 0..60
Definition: ltc.h:319
unsigned int dfbit
indicated drop-frame timecode
Definition: ltc.h:223
unsigned int hours_tens
SMPTE hours BCD tens 0..2.
Definition: ltc.h:244
unsigned int binary_group_flag_bit0
indicate user-data char encoding, see table above - bit 43
Definition: ltc.h:238
int ltc_frame_increment(LTCFrame *frame, int fps, enum LTC_TV_STANDARD standard, int flags)
encoder init or re-init does not touch the BGF bits (initial values after initialization is zero) ...
Definition: ltc.h:268
struct LTCDecoder LTCDecoder
Definition: ltc.h:334
int ltc_encoder_encode_byte(LTCEncoder *e, int byte, double speed)
ltcsnd_sample_t sample_max
the maximum input sample signal for this frame (0..255)
Definition: ltc.h:300
unsigned int mins_units
SMPTE minutes BCD unit 0..9.
Definition: ltc.h:234
double volume
the volume of the input signal in dbFS
Definition: ltc.h:301
unsigned char years
LTC-date uses 2-digit year 00.99.
Definition: ltc.h:314
void ltc_decoder_write_float(LTCDecoder *d, float *buf, size_t size, ltc_off_t posinfo)
unsigned int user1
Definition: ltc.h:220
void ltc_encoder_free(LTCEncoder *e)
unsigned int secs_units
SMPTE seconds BCD unit 0..9.
Definition: ltc.h:227
LTCFrame <> SMPTETimecode converter and LTCFrame increment/decrement use date, also set BGF2 to '1' w...
Definition: ltc.h:266
unsigned int hours_units
SMPTE hours BCD unit 0..9.
Definition: ltc.h:241
unsigned int secs_tens
SMPTE seconds BCD tens 0..6.
Definition: ltc.h:230
LTCDecoder * ltc_decoder_create(int apv, int queue_size)
30fps
Definition: ltc.h:258
unsigned char hours
hour 0..23
Definition: ltc.h:318
void ltc_encoder_set_frame(LTCEncoder *e, LTCFrame *f)
ltcsnd_sample_t sample_min
the minimum input sample signal for this frame (0..255)
Definition: ltc.h:299
LTC_TV_STANDARD
Definition: ltc.h:257
unsigned int user5
Definition: ltc.h:235
int ltc_decoder_read(LTCDecoder *d, LTCFrameExt *frame)
long long int ltc_off_t
Definition: ltc.h:87
size_t ltc_encoder_get_buffersize(LTCEncoder *e)
unsigned int user7
Definition: ltc.h:242