If you wish to write Annodex media to a file or file descriptor (such as a network socket), it can be directly written as follows:
This procedure is illustrated in src/examples/write-clip-file.c:
#include <stdio.h>
#include <string.h>
int
main (int argc, char *argv[])
{
char * infilename, * outfilename;
long n;
if (argc != 3) {
fprintf (stderr, "Usage: %s infile outfile.anx\n", argv[0]);
exit (1);
}
infilename = argv[1];
outfilename = argv[2];
anx =
anx_open (outfilename, ANX_WRITE);
NULL ,
0 , -1 , 0 );
memset (&my_clip, 0,
sizeof (
AnxClip));
exit (0);
}
int anx_write_import(ANNODEX *annodex, char *filename, char *id, char *content_type, double seek_offset, double seek_end, int flags)
Import a file into the current ANNODEX* writer.
long anx_write(ANNODEX *annodex, long n)
Write to an annodex opened with anx_open() or anx_open_stdio().
int anx_insert_clip(ANNODEX *annodex, double at_time, AnxClip *clip)
Insert a clip into an ANNODEX* writer.