Mercurial > libedl
comparison include/edl.h @ 2:d00bc412900e
*: fix up lots of stuff and make the thing actually usable
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Sun, 24 Dec 2023 20:01:30 -0500 |
| parents | 0ea1ec2da443 |
| children | c2408abb258a |
comparison
equal
deleted
inserted
replaced
| 1:db8b7e45ee55 | 2:d00bc412900e |
|---|---|
| 1 #include <stdbool.h> | 1 #ifndef __edl__edl_h |
| 2 #define __edl__edl_h | |
| 3 | |
| 4 #ifdef __cplusplus | |
| 5 extern "C" { | |
| 6 #endif | |
| 7 | |
| 8 #include <stdbool.h> /* C99 required */ | |
| 9 #include <stddef.h> | |
| 2 | 10 |
| 3 typedef enum { | 11 typedef enum { |
| 4 video, | 12 MEDIATYPE_VIDEO, |
| 5 audio | 13 MEDIATYPE_AUDIO |
| 6 } MediaType; | 14 } MediaType; |
| 7 | 15 |
| 8 typedef struct { | 16 typedef struct { |
| 9 int id; | 17 int id; |
| 10 int track; | 18 int track; |
| 15 bool normalized; | 23 bool normalized; |
| 16 int stretch_method; | 24 int stretch_method; |
| 17 bool looped; | 25 bool looped; |
| 18 bool on_ruler; | 26 bool on_ruler; |
| 19 MediaType media_type; | 27 MediaType media_type; |
| 20 char* file_name; | 28 char* filename; |
| 21 int stream; | 29 int stream; |
| 22 double stream_start; | 30 double stream_start; |
| 23 double stream_length; | 31 double stream_length; |
| 24 double fade_time_in; | 32 double fade_time_in; |
| 25 double fade_time_out; | 33 double fade_time_out; |
| 37 int first_channel; | 45 int first_channel; |
| 38 int channels; | 46 int channels; |
| 39 } EDL_line; | 47 } EDL_line; |
| 40 | 48 |
| 41 typedef struct { | 49 typedef struct { |
| 42 EDL_line* edl; | 50 EDL_line* arr; |
| 51 int capacity; | |
| 43 int size; | 52 int size; |
| 44 int current; | |
| 45 } EDL_file; | 53 } EDL_file; |
| 54 | |
| 55 EDL_file EDL_parse(const char* text, size_t length); | |
| 56 void EDL_free(EDL_file file); | |
| 57 | |
| 58 #ifdef __cplusplus | |
| 59 } | |
| 60 #endif | |
| 61 | |
| 62 #endif |
