]> git.sesse.net Git - mlt/blob - src/framework/mlt_transition.h
A little debugging.
[mlt] / src / framework / mlt_transition.h
1 /**
2  * \file mlt_transition.h
3  * \brief abstraction for all transition services
4  * \see mlt_transition_s
5  *
6  * Copyright (C) 2003-2009 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_TRANSITION_H_
25 #define _MLT_TRANSITION_H_
26
27 #include "mlt_service.h"
28
29 /** \brief Transition abstract service class
30  *
31  * A transition may modify the output of a producer based on the output of a second producer.
32  *
33  * \extends mlt_service_s
34  * \properties \em a_track the track index (0-based) of a multitrack of the first producer
35  * \properties \em b_track the track index (0-based) of a multitrack of the second producer
36  * \properties \em accepts_blanks a flag to indicate if the transition should accept blank frames
37  * \properties \em always_active a flag to indicate that the in and out points do not apply
38  * \properties \em _transition_type 1 for video, 2 for audio
39  * \properties \em disable Set this to disable the transition while keeping it in the object model.
40  */
41
42 struct mlt_transition_s
43 {
44         /** We're implementing service here */
45         struct mlt_service_s parent;
46
47         /** public virtual */
48         void ( *close )( mlt_transition );
49
50         /** protected transition method */
51         mlt_frame ( *process )( mlt_transition, mlt_frame, mlt_frame );
52
53         /** Protected */
54         void *child;
55
56         /** track and in/out points */
57         mlt_service producer;
58
59         /** Private */
60         mlt_frame *frames;
61         int held;
62 };
63
64 #define MLT_TRANSITION_SERVICE( transition )            ( &( transition )->parent )
65 #define MLT_TRANSITION_PROPERTIES( transition )         MLT_SERVICE_PROPERTIES( MLT_TRANSITION_SERVICE( transition ) )
66
67 extern int mlt_transition_init( mlt_transition self, void *child );
68 extern mlt_transition mlt_transition_new( );
69 extern mlt_service mlt_transition_service( mlt_transition self );
70 extern mlt_properties mlt_transition_properties( mlt_transition self );
71 extern int mlt_transition_connect( mlt_transition self, mlt_service producer, int a_track, int b_track );
72 extern void mlt_transition_set_in_and_out( mlt_transition self, mlt_position in, mlt_position out );
73 extern int mlt_transition_get_a_track( mlt_transition self );
74 extern int mlt_transition_get_b_track( mlt_transition self );
75 extern mlt_position mlt_transition_get_in( mlt_transition self );
76 extern mlt_position mlt_transition_get_out( mlt_transition self );
77 extern mlt_position mlt_transition_get_length( mlt_transition self );
78 extern mlt_position mlt_transition_get_position( mlt_transition self, mlt_frame frame );
79 extern double mlt_transition_get_progress( mlt_transition self, mlt_frame frame );
80 extern double mlt_transition_get_progress_delta( mlt_transition self, mlt_frame frame );
81 extern mlt_frame mlt_transition_process( mlt_transition self, mlt_frame a_frame, mlt_frame b_frame );
82 extern void mlt_transition_close( mlt_transition self );
83
84 #endif