]> git.sesse.net Git - mlt/blob - src/framework/mlt_geometry.h
Indicate mlt_geometry is deprecated in API docs.
[mlt] / src / framework / mlt_geometry.h
1 /**
2  * \file mlt_geometry.h
3  * \brief geometry animation API (deprecated)
4  * \deprecated use mlt_animation_s instead
5  *
6  * Copyright (C) 2004-2005 Ushodaya Enterprises Limited
7  * \author Charles Yates <charles.yates@pandora.be>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22  */
23
24 #ifndef _MLT_GEOMETRY_H
25 #define _MLT_GEOMETRY_H
26
27 #include "mlt_types.h"
28
29 /** geometry animation item (deprecated)
30  * \deprecated use mlt_animation_s instead
31  */
32
33 struct mlt_geometry_item_s
34 {
35         /* Will be 1 when this is a key frame */
36         int key;
37         /* The actual frame this corresponds to */
38         int frame;
39         /* Distort */
40         int distort;
41         /* x,y are upper left */
42         float x, y, w, h, mix;
43         /* Indicates which values are fixed */
44         int f[ 5 ];
45 };
46
47 /** geometry object (deprecated)
48  * \deprecated use mlt_animation_s instead
49  */
50
51 struct mlt_geometry_s
52 {
53         void *local;
54 };
55
56 /* Create a new geometry structure */
57 extern mlt_geometry mlt_geometry_init( );
58 /* Parse the geometry specification for a given length and normalised width/height (-1 for default) */
59 extern int mlt_geometry_parse( mlt_geometry self, char *data, int length, int nw, int nh );
60 /* Conditionally refresh the geometry if it's modified */
61 extern int mlt_geometry_refresh( mlt_geometry self, char *data, int length, int nw, int nh );
62 /* Get and set the length */
63 extern int mlt_geometry_get_length( mlt_geometry self );
64 extern void mlt_geometry_set_length( mlt_geometry self, int length );
65 /* Parse an item - doesn't affect the geometry itself but uses current information for evaluation */
66 /* (item->frame should be specified if not included in the data itself) */
67 extern int mlt_geometry_parse_item( mlt_geometry self, mlt_geometry_item item, char *data );
68 /* Fetch a geometry item for an absolute position */
69 extern int mlt_geometry_fetch( mlt_geometry self, mlt_geometry_item item, float position );
70 /* Specify a geometry item at an absolute position */
71 extern int mlt_geometry_insert( mlt_geometry self, mlt_geometry_item item );
72 /* Remove the key at the specified position */
73 extern int mlt_geometry_remove( mlt_geometry self, int position );
74 /* Typically, re-interpolate after a series of insertions or removals. */
75 extern void mlt_geometry_interpolate( mlt_geometry self );
76 /* Get the key at the position or the next following */
77 extern int mlt_geometry_next_key( mlt_geometry self, mlt_geometry_item item, int position );
78 extern int mlt_geometry_prev_key( mlt_geometry self, mlt_geometry_item item, int position );
79 /* Serialise the current geometry */
80 extern char *mlt_geometry_serialise_cut( mlt_geometry self, int in, int out );
81 extern char *mlt_geometry_serialise( mlt_geometry self );
82 /* Close the geometry */
83 extern void mlt_geometry_close( mlt_geometry self );
84
85 #endif
86