Mercurial > libedl
annotate include/edl.h @ 14:2d7c810a1ac2 default tip
*: misc. cleanup
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Fri, 03 May 2024 22:40:28 -0400 |
| parents | 41b74137e201 |
| children |
| rev | line source |
|---|---|
|
13
41b74137e201
include: make header guards sane
Paper <paper@paper.us.eu.org>
parents:
12
diff
changeset
|
1 #ifndef EDL_EDL_H_ |
|
41b74137e201
include: make header guards sane
Paper <paper@paper.us.eu.org>
parents:
12
diff
changeset
|
2 #define EDL_EDL_H_ |
|
2
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 |
|
8
0c98b46eaf73
*: update API to 2.0, big changes
Paper <paper@paper.us.eu.org>
parents:
7
diff
changeset
|
15 } EDL_media_type_t; |
|
0c98b46eaf73
*: update API to 2.0, big changes
Paper <paper@paper.us.eu.org>
parents:
7
diff
changeset
|
16 |
|
0c98b46eaf73
*: update API to 2.0, big changes
Paper <paper@paper.us.eu.org>
parents:
7
diff
changeset
|
17 typedef enum { |
|
0c98b46eaf73
*: update API to 2.0, big changes
Paper <paper@paper.us.eu.org>
parents:
7
diff
changeset
|
18 EDL_PARSE_ERROR_SUCCESS = 0, |
|
12
0cc2555db371
*: make our string functions not stupid
Paper <paper@paper.us.eu.org>
parents:
8
diff
changeset
|
19 EDL_PARSE_ERROR_OUT_OF_MEMORY, |
|
0cc2555db371
*: make our string functions not stupid
Paper <paper@paper.us.eu.org>
parents:
8
diff
changeset
|
20 EDL_PARSE_ERROR_HEADER |
|
8
0c98b46eaf73
*: update API to 2.0, big changes
Paper <paper@paper.us.eu.org>
parents:
7
diff
changeset
|
21 } EDL_parse_error_t; |
| 0 | 22 |
| 23 typedef struct { | |
| 24 int id; | |
| 25 int track; | |
| 26 double start_time; | |
| 27 double length; | |
| 28 double play_rate; | |
| 29 bool locked; | |
| 30 bool normalized; | |
| 31 int stretch_method; | |
| 32 bool looped; | |
| 33 bool on_ruler; | |
|
8
0c98b46eaf73
*: update API to 2.0, big changes
Paper <paper@paper.us.eu.org>
parents:
7
diff
changeset
|
34 EDL_media_type_t media_type; |
|
2
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
35 char* filename; |
| 0 | 36 int stream; |
| 37 double stream_start; | |
| 38 double stream_length; | |
| 39 double fade_time_in; | |
| 40 double fade_time_out; | |
| 41 double sustain_gain; | |
| 42 int curve_in; | |
| 43 double gain_in; | |
| 44 int curve_out; | |
| 45 double gain_out; | |
| 46 int layer; | |
| 47 int color; | |
| 48 int curve_in_r; | |
| 49 int curve_out_r; | |
| 50 double play_pitch; | |
| 51 bool lock_pitch; | |
| 52 int first_channel; | |
| 53 int channels; | |
| 54 } EDL_line; | |
| 55 | |
| 56 typedef struct { | |
|
2
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
57 EDL_line* arr; |
|
7
fee08fa622e1
automake: don't expose private strings API
Paper <mrpapersonic@gmail.com>
parents:
6
diff
changeset
|
58 size_t capacity; |
|
fee08fa622e1
automake: don't expose private strings API
Paper <mrpapersonic@gmail.com>
parents:
6
diff
changeset
|
59 size_t size; |
|
4
c2408abb258a
*: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents:
2
diff
changeset
|
60 } EDL; |
|
2
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
61 |
|
8
0c98b46eaf73
*: update API to 2.0, big changes
Paper <paper@paper.us.eu.org>
parents:
7
diff
changeset
|
62 EDL_parse_error_t EDL_parse(EDL* edl, 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
|
63 int EDL_reallocate(EDL* edl, size_t new_capacity); |
|
8
0c98b46eaf73
*: update API to 2.0, big changes
Paper <paper@paper.us.eu.org>
parents:
7
diff
changeset
|
64 char* EDL_dump(const EDL* edl); |
|
0c98b46eaf73
*: update API to 2.0, big changes
Paper <paper@paper.us.eu.org>
parents:
7
diff
changeset
|
65 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
|
66 |
|
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
67 #ifdef __cplusplus |
|
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
68 } |
|
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
69 #endif |
|
d00bc412900e
*: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents:
0
diff
changeset
|
70 |
|
13
41b74137e201
include: make header guards sane
Paper <paper@paper.us.eu.org>
parents:
12
diff
changeset
|
71 #endif /* EDL_EDL_H_ */ |
