cmml-fix.c File Reference
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <cmml.h>
Detailed Description
cmml-fix: parses a CMML instance document, validates it against the CMML.dtd ignoring sloppy errors and prints out a valid version of the file if possible.
Usage: cmml-fix [options] filename
Transform a sloppy CMML file to a valid one.
Possible options:
-i clip_id, --id clip_id
Start parsing from the named clip.
-s seconds, --sec seconds
Start parsing from the given seconds offset
-u utc, --utc utc
Start parsing from the given utc time
-o filename, --output filename
Specify the output filename. The file is written
to standard output by default.
-h, --help Display this help information
-v, --version Display version information
Define Documentation
|
the size of the print buffer |
Function Documentation
void PrintUsage |
( |
char * |
prog |
) |
[static] |
|
|
PrintUsage: prints out help on how to use this program
- Parameters:
-
|
int read_stream |
( |
CMML * |
cmml, |
|
|
const CMML_Stream * |
stream, |
|
|
void * |
user_data |
|
) |
[static] |
|
|
read_stream: the callback for a stream element
- Parameters:
-
| cmml | the CMML* handle in use |
| stream | the stream element's content represented in a CMML_Stream* |
| user_data | user defined data |
- Returns:
- 0 on success, 1 on error
- Examples:
-
cmml-validate.c.
|
int read_head |
( |
CMML * |
cmml, |
|
|
const CMML_Head * |
head, |
|
|
void * |
user_data |
|
) |
[static] |
|
|
read_head: the callback for a head element
- Parameters:
-
| cmml | the CMML* handle in use |
| head | the head element's content represented in a CMML_Head* |
| user_data | user defined data |
- Returns:
- 0 on success, 1 on error
- Examples:
-
cmml-parse.c, and cmml-validate.c.
|
int read_clip |
( |
CMML * |
cmml, |
|
|
const CMML_Clip * |
clip, |
|
|
void * |
user_data |
|
) |
[static] |
|
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
|
|
|
main function of cmml-fix, which opens the CMML file, seeks to any given offsets, registers the callbacks, and then steps through the file in chunks of BUFSIZE size, during which the callbacks get activated as the relevant elements get parsed. |
Variable Documentation
|
outfile: defines FILE pointer to print output to |
Generated on Fri Aug 13 21:53:11 2004 for libcmml by
1.3.7