comparison include/edl.h @ 8:0c98b46eaf73 v2.0

*: update API to 2.0, big changes all APIs now use pointers to an EDL object. it is up to the user to make sure that the pointer is valid. additionally, many things have been separated into new files to make it easier to digest
author Paper <paper@paper.us.eu.org>
date Sun, 03 Mar 2024 17:56:58 -0500
parents fee08fa622e1
children 0cc2555db371
comparison
equal deleted inserted replaced
7:fee08fa622e1 8:0c98b46eaf73
10 10
11 typedef enum { 11 typedef enum {
12 MEDIATYPE_VIDEO, 12 MEDIATYPE_VIDEO,
13 MEDIATYPE_AUDIO, 13 MEDIATYPE_AUDIO,
14 MEDIATYPE_UNKNOWN 14 MEDIATYPE_UNKNOWN
15 } MediaType; 15 } EDL_media_type_t;
16
17 typedef enum {
18 EDL_PARSE_ERROR_SUCCESS = 0,
19 EDL_PARSE_ERROR_OUT_OF_MEMORY
20 } EDL_parse_error_t;
16 21
17 typedef struct { 22 typedef struct {
18 int id; 23 int id;
19 int track; 24 int track;
20 double start_time; 25 double start_time;
23 bool locked; 28 bool locked;
24 bool normalized; 29 bool normalized;
25 int stretch_method; 30 int stretch_method;
26 bool looped; 31 bool looped;
27 bool on_ruler; 32 bool on_ruler;
28 MediaType media_type; 33 EDL_media_type_t media_type;
29 char* filename; 34 char* filename;
30 int stream; 35 int stream;
31 double stream_start; 36 double stream_start;
32 double stream_length; 37 double stream_length;
33 double fade_time_in; 38 double fade_time_in;
51 EDL_line* arr; 56 EDL_line* arr;
52 size_t capacity; 57 size_t capacity;
53 size_t size; 58 size_t size;
54 } EDL; 59 } EDL;
55 60
56 EDL EDL_parse(const char* text, size_t length); 61 EDL_parse_error_t EDL_parse(EDL* edl, const char* text, size_t length);
57 int EDL_reallocate(EDL* edl, size_t new_capacity); 62 int EDL_reallocate(EDL* edl, size_t new_capacity);
58 char* EDL_dump(EDL edl); 63 char* EDL_dump(const EDL* edl);
59 void EDL_free(EDL edl); 64 void EDL_free(EDL* edl);
60 65
61 #ifdef __cplusplus 66 #ifdef __cplusplus
62 } 67 }
63 #endif 68 #endif
64 69