Main Page | Modules | Data Structures | File List | Globals | Related Pages

anx_write.h

Go to the documentation of this file.
00001 /*
00002    Copyright (C) 2003 Commonwealth Scientific and Industrial Research
00003    Organisation (CSIRO) Australia
00004 
00005    Redistribution and use in source and binary forms, with or without
00006    modification, are permitted provided that the following conditions
00007    are met:
00008 
00009    - Redistributions of source code must retain the above copyright
00010    notice, this list of conditions and the following disclaimer.
00011 
00012    - Redistributions in binary form must reproduce the above copyright
00013    notice, this list of conditions and the following disclaimer in the
00014    documentation and/or other materials provided with the distribution.
00015 
00016    - Neither the name of CSIRO Australia nor the names of its
00017    contributors may be used to endorse or promote products derived from
00018    this software without specific prior written permission.
00019 
00020    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00021    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00022    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00023    PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
00024    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00027    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00028    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00029    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00030    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031 */
00032 
00033 #ifndef __ANX_WRITE_H__
00034 #define __ANX_WRITE_H__
00035 
00061 #include <annodex/anx_types.h>
00062 
00063 #ifdef __cplusplus
00064 extern "C" {
00065 #endif
00066 
00071 void anx_init_importers (char * content_type_pattern);
00072 
00077 long anx_write_get_next_page_size (ANNODEX * annodex);
00078 
00089 int
00090 anx_write_import (ANNODEX * annodex, char * filename,
00091                   char * id, char * content_type,
00092                   double seek_offset, double seek_end, int flags);
00093 
00100 int
00101 anx_write_set_anno_callbacks (ANNODEX * annodex,
00102                               AnxImportHead import_head_callback,
00103                               AnxImportClip import_clip_callback,
00104                               void * user_data);
00105 
00111 void *
00112 anx_write_get_anno_user_data (ANNODEX * annodex);
00113 
00121 int
00122 anx_write_set_ii_callback (ANNODEX * annodex,
00123                            AnxImportImport import_import_callback,
00124                            void * user_data);
00125 
00131 void *
00132 anx_write_get_ii_user_data (ANNODEX * annodex);
00133 
00140 int
00141 anx_insert_clip (ANNODEX * annodex, double at_time, AnxClip * clip);
00142 
00143 double anx_writer_get_end (ANNODEX * annodex);
00144 int anx_writer_set_end (ANNODEX * annodex, double end_time);
00145 
00152 long anx_write (ANNODEX * annodex, long n);
00153 
00162 long anx_write_output (ANNODEX * annodex, unsigned char * buf, long n);
00163 
00164 int anx_request_header (ANNODEX * annodex);
00165 int anx_request_media_sync (ANNODEX * annodex);
00166 
00167 #ifdef _UNIMPLEMENTED_  
00168   
00169 /* Scheduled commands to control the Annodex writer */
00170 
00171 typedef struct _AnxSchedule AnxSchedule;
00172 typedef struct _AnxImport AnxImport;
00173 
00174 typedef enum _AnxSchedType {
00175   ANX_SCHED_CLIP,
00176   ANX_SCHED_IMPORT
00177 } AnxSchedType;
00178                                        
00179 struct _AnxImport {
00180   char * location;     /* URI to media document */
00181   char * content_type;
00182   int flags;
00183 };
00184 
00185 struct _AnxSchedule {
00186   double start_time;
00187   AnxSchedType type;
00188   union {
00189     AnxClip * clip;
00190     AnxImport * import;
00191   } data;
00192 };
00193 
00194 AnxSchedule *
00195 anx_schedule_query (ANNODEX * annodex, double at_time, AnxSchedType type);
00196 
00197 int
00198 anx_schedule_remove (ANNODEX * annodex, double at_time, AnxSchedType type);
00199 
00200 AnxSchedule *
00201 anx_schedule_first (ANNODEX * annodex);
00202 
00203 AnxSchedule *
00204 anx_schedule_next (ANNODEX * annodex, AnxSchedule * schedule);
00205 
00206 AnxSchedule *
00207 anx_schedule_prev (ANNODEX * annodex, AnxSchedule * schedule);
00208 
00209 #endif /* _UNIMPLEMENTED_ */
00210 
00211 #ifdef __cplusplus
00212 }
00213 #endif
00214 
00215 #endif /* __ANX_WRITE_H__ */

Generated on Sat May 22 19:44:48 2004 for libannodex by doxygen 1.3.5