mlt 0.7.6

mlt_geometry.h

Go to the documentation of this file.
00001 /*
00002  * mlt_geometry.h -- provides the geometry API
00003  * Copyright (C) 2004-2005 Ushodaya Enterprises Limited
00004  * Author: Charles Yates <charles.yates@pandora.be>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 #ifndef _MLT_GEOMETRY_H
00022 #define _MLT_GEOMETRY_H
00023 
00024 #include "mlt_types.h"
00025 
00026 struct mlt_geometry_item_s
00027 {
00028     /* Will be 1 when this is a key frame */
00029     int key;
00030     /* The actual frame this corresponds to */
00031     int frame;
00032     /* Distort */
00033     int distort;
00034     /* x,y are upper left */
00035     float x, y, w, h, mix;
00036     /* Indicates which values are fixed */
00037     int f[ 5 ];
00038 };
00039 
00040 struct mlt_geometry_s
00041 {
00042     void *local;
00043 };
00044 
00045 /* Create a new geometry structure */
00046 extern mlt_geometry mlt_geometry_init( );
00047 /* Parse the geometry specification for a given length and normalised width/height (-1 for default) */
00048 extern int mlt_geometry_parse( mlt_geometry self, char *data, int length, int nw, int nh );
00049 /* Conditionally refresh the geometry if it's modified */
00050 extern int mlt_geometry_refresh( mlt_geometry self, char *data, int length, int nw, int nh );
00051 /* Get and set the length */
00052 extern int mlt_geometry_get_length( mlt_geometry self );
00053 extern void mlt_geometry_set_length( mlt_geometry self, int length );
00054 /* Parse an item - doesn't affect the geometry itself but uses current information for evaluation */
00055 /* (item->frame should be specified if not included in the data itself) */
00056 extern int mlt_geometry_parse_item( mlt_geometry self, mlt_geometry_item item, char *data );
00057 /* Fetch a geometry item for an absolute position */
00058 extern int mlt_geometry_fetch( mlt_geometry self, mlt_geometry_item item, float position );
00059 /* Specify a geometry item at an absolute position */
00060 extern int mlt_geometry_insert( mlt_geometry self, mlt_geometry_item item );
00061 /* Remove the key at the specified position */
00062 extern int mlt_geometry_remove( mlt_geometry self, int position );
00063 /* Typically, re-interpolate after a series of insertions or removals. */
00064 extern void mlt_geometry_interpolate( mlt_geometry self );
00065 /* Get the key at the position or the next following */
00066 extern int mlt_geometry_next_key( mlt_geometry self, mlt_geometry_item item, int position );
00067 extern int mlt_geometry_prev_key( mlt_geometry self, mlt_geometry_item item, int position );
00068 /* Serialise the current geometry */
00069 extern char *mlt_geometry_serialise_cut( mlt_geometry self, int in, int out );
00070 extern char *mlt_geometry_serialise( mlt_geometry self );
00071 /* Close the geometry */
00072 extern void mlt_geometry_close( mlt_geometry self );
00073 
00074 #endif
00075 
TWiki Appliance - Powered by TurnKey Linux