fplayer
C99 Falcon Sequence (fseq) file player for Light-O-Rama hardware (like xLights)
Loading...
Searching...
No Matches
writer.h
Go to the documentation of this file.
1
3#ifndef FPLAYER_WRITER_H
4#define FPLAYER_WRITER_H
5
6#include <stdint.h>
7
8struct FC;
9
10struct tf_header_t;
11struct tf_compression_block_t;
12
17int fseqWriteHeader(struct FC* fc, const struct tf_header_t* header);
18
25int fseqWriteCompressionBlocks(struct FC* fc,
26 const struct tf_header_t* header,
27 const struct tf_compression_block_t* blocks);
28
31struct fseq_var_s {
32 unsigned char id[2];
33 uint16_t size;
34 char* value;
35};
36
44int fseqWriteVars(struct FC* fc,
45 const struct tf_header_t* header,
46 const struct fseq_var_s* vars,
47 int count);
48
55int fseqRealignHeaderOffsets(struct tf_header_t* header,
56 const struct fseq_var_s* vars,
57 int count);
58
59#endif//FPLAYER_WRITER_H
File controller that wraps a stdlib file pointer and provides additional functionality for reading fi...
Definition fc.c:10
Represents a variable that can be encoded in the FSEQ format.
Definition writer.h:31
char * value
Binary variable data.
Definition writer.h:34
uint16_t size
Size of the variable data value.
Definition writer.h:33
int fseqRealignHeaderOffsets(struct tf_header_t *header, const struct fseq_var_s *vars, int count)
Re-aligns the offsets in the given header to account for the length of the variable data that will be...
Definition writer.c:155
int fseqWriteVars(struct FC *fc, const struct tf_header_t *header, const struct fseq_var_s *vars, int count)
Encodes the given variables and writes them to the file after the compression block and channel range...
Definition writer.c:118
int fseqWriteHeader(struct FC *fc, const struct tf_header_t *header)
Encodes the given header and writes it at the beginning of the file.
Definition writer.c:42
int fseqWriteCompressionBlocks(struct FC *fc, const struct tf_header_t *header, const struct tf_compression_block_t *blocks)
Encodes the given compression blocks writes them to the file at the at the end of the format header.
Definition writer.c:65