Seeking to a utc time offset into a CMML file
Sometimes you'll need to seek to a temporal offset in utc into a CMML file. Note: The utc offset is calculated with respect to the utc and basetime attributes of the stream tag. libcmml provides an API for this functionality through the cmml_skip_to_utc() function.
The procedure is illustrated in cmml-seek-utc.c, which seeks to an offset given in utc and prints out the descriptions of all the following clips:
#include <stdio.h>
#define BUFSIZE 100000
static int
return 0;
}
int main(
int argc,
char *argv[])
{
char *filename = NULL;
char *utc = NULL;
long n = 0;
if (argc < 2) {
fprintf (stderr, "Usage: %s <CMMLfile> <utc>\n", argv[0]);
exit (1);
}
filename = argv[1];
utc = argv[2];
return 0;
}
int cmml_set_read_callbacks(CMML *cmml, CMMLReadStream read_stream, CMMLReadHead read_head, CMMLReadClip read_clip, void *user_data)
static int read_clip(CMML *cmml, const CMML_Clip *clip, void *user_data)
Definition: cmml-validate.c:189