Mercurial > libedl
view include/edl.h @ 13:41b74137e201
include: make header guards sane
double underscores are reserved to the implementation by
the C standard
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 03 Apr 2024 20:48:51 -0400 |
parents | 0cc2555db371 |
children |
line wrap: on
line source
#ifndef EDL_EDL_H_ #define EDL_EDL_H_ #ifdef __cplusplus extern "C" { #endif #include <stdbool.h> /* C99 required */ #include <stddef.h> typedef enum { MEDIATYPE_VIDEO, MEDIATYPE_AUDIO, MEDIATYPE_UNKNOWN } EDL_media_type_t; typedef enum { EDL_PARSE_ERROR_SUCCESS = 0, EDL_PARSE_ERROR_OUT_OF_MEMORY, EDL_PARSE_ERROR_HEADER } EDL_parse_error_t; typedef struct { int id; int track; double start_time; double length; double play_rate; bool locked; bool normalized; int stretch_method; bool looped; bool on_ruler; EDL_media_type_t media_type; char* filename; int stream; double stream_start; double stream_length; double fade_time_in; double fade_time_out; double sustain_gain; int curve_in; double gain_in; int curve_out; double gain_out; int layer; int color; int curve_in_r; int curve_out_r; double play_pitch; bool lock_pitch; int first_channel; int channels; } EDL_line; typedef struct { EDL_line* arr; size_t capacity; size_t size; } EDL; EDL_parse_error_t EDL_parse(EDL* edl, const char* text, size_t length); int EDL_reallocate(EDL* edl, size_t new_capacity); char* EDL_dump(const EDL* edl); void EDL_free(EDL* edl); #ifdef __cplusplus } #endif #endif /* EDL_EDL_H_ */