Mercurial > libedl
annotate include/edl.h @ 7:fee08fa622e1
automake: don't expose private strings API
also use size_t rather than int for array sizes for... obvious reasons
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 15 Jan 2024 06:42:30 -0500 |
parents | 7137fbac0b85 |
children | 0c98b46eaf73 |
rev | line source |
---|---|
2
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
1 #ifndef __edl__edl_h |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
2 #define __edl__edl_h |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
3 |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
4 #ifdef __cplusplus |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
5 extern "C" { |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
6 #endif |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
7 |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
8 #include <stdbool.h> /* C99 required */ |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
9 #include <stddef.h> |
0 | 10 |
11 typedef enum { | |
2
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
12 MEDIATYPE_VIDEO, |
4
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
13 MEDIATYPE_AUDIO, |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
14 MEDIATYPE_UNKNOWN |
0 | 15 } MediaType; |
16 | |
17 typedef struct { | |
18 int id; | |
19 int track; | |
20 double start_time; | |
21 double length; | |
22 double play_rate; | |
23 bool locked; | |
24 bool normalized; | |
25 int stretch_method; | |
26 bool looped; | |
27 bool on_ruler; | |
28 MediaType media_type; | |
2
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
29 char* filename; |
0 | 30 int stream; |
31 double stream_start; | |
32 double stream_length; | |
33 double fade_time_in; | |
34 double fade_time_out; | |
35 double sustain_gain; | |
36 int curve_in; | |
37 double gain_in; | |
38 int curve_out; | |
39 double gain_out; | |
40 int layer; | |
41 int color; | |
42 int curve_in_r; | |
43 int curve_out_r; | |
44 double play_pitch; | |
45 bool lock_pitch; | |
46 int first_channel; | |
47 int channels; | |
48 } EDL_line; | |
49 | |
50 typedef struct { | |
2
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
51 EDL_line* arr; |
7
fee08fa622e1
automake: don't expose private strings API
Paper <mrpapersonic@gmail.com>
parents:
6
diff
changeset
|
52 size_t capacity; |
fee08fa622e1
automake: don't expose private strings API
Paper <mrpapersonic@gmail.com>
parents:
6
diff
changeset
|
53 size_t size; |
4
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
54 } EDL; |
2
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
55 |
4
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
56 EDL EDL_parse(const char* text, size_t length); |
6
7137fbac0b85
edl: expose EDL_reallocate() API to allow resizing the array
Paper <mrpapersonic@gmail.com>
parents:
4
diff
changeset
|
57 int EDL_reallocate(EDL* edl, size_t new_capacity); |
4
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
58 char* EDL_dump(EDL edl); |
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
59 void EDL_free(EDL edl); |
2
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
60 |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
61 #ifdef __cplusplus |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
62 } |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
63 #endif |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
64 |
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
65 #endif |