annotate include/edl.h @ 4:c2408abb258a

*: add dumping to string, rename EDL_file to EDL
author Paper <mrpapersonic@gmail.com>
date Mon, 25 Dec 2023 16:24:16 -0500
parents d00bc412900e
children 7137fbac0b85
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
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
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
15 } MediaType;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
16
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
17 typedef struct {
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
18 int id;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
19 int track;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
20 double start_time;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
21 double length;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
22 double play_rate;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
23 bool locked;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
24 bool normalized;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
25 int stretch_method;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
26 bool looped;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
27 bool on_ruler;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
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
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
30 int stream;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
31 double stream_start;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
32 double stream_length;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
33 double fade_time_in;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
34 double fade_time_out;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
35 double sustain_gain;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
36 int curve_in;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
37 double gain_in;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
38 int curve_out;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
39 double gain_out;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
40 int layer;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
41 int color;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
42 int curve_in_r;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
43 int curve_out_r;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
44 double play_pitch;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
45 bool lock_pitch;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
46 int first_channel;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
47 int channels;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
48 } EDL_line;
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
49
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
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;
d00bc412900e *: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
52 int capacity;
0
0ea1ec2da443 *: initial commit
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
53 int 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);
c2408abb258a *: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
57 char* EDL_dump(EDL edl);
c2408abb258a *: add dumping to string, rename EDL_file to EDL
Paper <mrpapersonic@gmail.com>
parents: 2
diff changeset
58 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
59
d00bc412900e *: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
60 #ifdef __cplusplus
d00bc412900e *: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
61 }
d00bc412900e *: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
62 #endif
d00bc412900e *: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
63
d00bc412900e *: fix up lots of stuff and make the thing actually usable
Paper <mrpapersonic@gmail.com>
parents: 0
diff changeset
64 #endif