Mercurial > libedl
view README.md @ 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 | bd99b6549eb4 |
line wrap: on
line source
# libedl libedl is a library for parsing Vegas Pro EDL files and translating them into usable C structures. ## Usage ```c #include <stdio.h> #include "edl.h" int main(){ /* open the file */ FILE* file = fopen("MyProject.txt", "rb"); if (!file) return 1; /* get filesize */ fseek(file, 0L, SEEK_END); long fsize = ftell(file); fseek(file, 0L, SEEK_SET); /* grab the contents */ char* data = malloc(fsize + 1); if (!data) return 1; fread(data, fsize, 1, file); fclose(file); /* pass it to libedl */ EDL_file edl = EDL_parse(data, fsize + 1); /* do what we have to do with it */ for (int i = 0; i < edl.size; i++) { printf("%s", edl.arr[i].filename); } /* free our memory */ EDL_free(edl); free(data); return 0; } ```