anx_write.h File Reference


Detailed Description

Writer specific functions.

#include <annodex/anx_types.h>

Go to the source code of this file.

Functions

void anx_init_importers (char *content_type_pattern)
 Initialise system importers matching a given content type pattern.
long anx_write_get_next_page_size (ANNODEX *annodex)
 Query the size of the next page to be written.
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.
int anx_write_set_anno_callbacks (ANNODEX *annodex, AnxImportHead import_head_callback, AnxImportClip import_clip_callback, AnxImportCMML import_cmml_callback, void *user_data)
 Override the callbacks that importers should call when they wish to handle annotation elements.
void * anx_write_get_anno_user_data (ANNODEX *annodex)
 Retrieve the user_data associated with attached annotation import callbacks.
int anx_write_set_ii_callback (ANNODEX *annodex, AnxImportImport import_import_callback, void *user_data)
 Override the Import Import callback, used when an importer wishes to initiate further importing.
void * anx_write_get_ii_user_data (ANNODEX *annodex)
 Retrieve the user_data associated with attached recursive import callbacks.
int anx_insert_clip (ANNODEX *annodex, double at_time, AnxClip *clip)
 Insert a clip into an ANNODEX* writer.
int anx_insert_cmml (ANNODEX *annodex, double at_time, const char *cmml, long n)
 Insert a CMML element into an ANNODEX* writer.
double anx_get_clip_time_by_id (ANNODEX *annodex, const char *id)
 Query the onset time of a clip.
double anx_writer_get_end (ANNODEX *annodex)
int anx_writer_set_end (ANNODEX *annodex, double end_time)
long anx_write (ANNODEX *annodex, long n)
 Write to an annodex opened with anx_open() or anx_open_stdio().
long anx_write_output (ANNODEX *annodex, unsigned char *buf, long n)
 Output data from an annodex into a memory buffer.
int anx_request_header (ANNODEX *annodex)
int anx_request_media_sync (ANNODEX *annodex)


Function Documentation

double anx_get_clip_time_by_id ( ANNODEX annodex,
const char *  id 
)

Query the onset time of a clip.

Parameters:
annodex An ANNNODEX* writer
id The id of the clip
Returns:
The time of the clip
Return values:
-1.0 Not found

void anx_init_importers ( char *  content_type_pattern  ) 

Initialise system importers matching a given content type pattern.

Parameters:
content_type_pattern A content type or range of content types

int anx_insert_clip ( ANNODEX annodex,
double  at_time,
AnxClip *  clip 
)

Insert a clip into an ANNODEX* writer.

Parameters:
annodex An ANNODEX* writer
at_time Time in seconds to schedule the clip
clip a clip

int anx_insert_cmml ( ANNODEX annodex,
double  at_time,
const char *  cmml,
long  n 
)

Insert a CMML element into an ANNODEX* writer.

Parameters:
annodex An ANNODEX* writer
at_time Time in seconds to schedule the clip
cmml cmml
n An upper bound on the number of characters to read
Returns:
0 on success

long anx_write ( ANNODEX annodex,
long  n 
)

Write to an annodex opened with anx_open() or anx_open_stdio().

Parameters:
annodex An ANNODEX* writer
n count of bytes to write
Returns:
the count of bytes actually written

void* anx_write_get_anno_user_data ( ANNODEX annodex  ) 

Retrieve the user_data associated with attached annotation import callbacks.

Parameters:
annodex an ANNODEX* handle
Returns:
the associated user_data

void* anx_write_get_ii_user_data ( ANNODEX annodex  ) 

Retrieve the user_data associated with attached recursive import callbacks.

Parameters:
annodex an ANNODEX* handle
Returns:
the associated user_data

long anx_write_get_next_page_size ( ANNODEX annodex  ) 

Query the size of the next page to be written.

Returns:
the size in bytes of the next page to be written

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.

Parameters:
annodex An ANNODEX* writer
filename the file to import
id the id of the file
content_type the content-type of the whole import file.
seek_offset a time in seconds to begin importing data from
seek_end a time in seconds to finish importing data
flags writer import flags (RECURSIVE etc.)

long anx_write_output ( ANNODEX annodex,
unsigned char *  buf,
long  n 
)

Output data from an annodex into a memory buffer.

Usually the annodex would have been created with anx_new().

Parameters:
annodex an ANNODEX* writer
buf a memory buffer of size at least n bytes in which to output
n a count of bytes to output
Returns:
the count of bytes actually output

int anx_write_set_anno_callbacks ( ANNODEX annodex,
AnxImportHead  import_head_callback,
AnxImportClip  import_clip_callback,
AnxImportCMML  import_cmml_callback,
void *  user_data 
)

Override the callbacks that importers should call when they wish to handle annotation elements.

The default head callback overwrites the head and the default clip callback inserts an clip into the scheduling of the ANNODEX* writer.

int anx_write_set_ii_callback ( ANNODEX annodex,
AnxImportImport  import_import_callback,
void *  user_data 
)

Override the Import Import callback, used when an importer wishes to initiate further importing.

Parameters:
annodex An ANNODEX* writer
import_import_callbcak The new Import Import callback
user_data User-defined data to pass to the callback


Generated on Mon Jul 10 21:23:07 2006 for libannodex by  doxygen 1.4.7