Mercurial > libedl
view README.md @ 3:bd99b6549eb4
*: expand in readme and rename src/main to src/edl
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 24 Dec 2023 20:22:54 -0500 |
parents | d00bc412900e |
children | c2408abb258a |
line wrap: on
line source
# libedl libedl is a library for parsing Vegas Pro EDL files and translating them into usable C structures. Currently, writing EDL files is not supported by this library. ## Build ```console $ autoreconf -i $ mkdir build $ cd build $ ../configure $ make $ sudo make install ``` ## Usage ```c #include <stdio.h> #include <stdlib.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\n", edl.arr[i].filename); } /* free our memory */ EDL_free(edl); free(data); return 0; } ```