1 /**
2  * MltService.h - MLT Wrapper
3  * Copyright (C) 2004-2019 Meltytech, LLC
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18  */
19 
20 #ifndef MLTPP_SERVICE_H
21 #define MLTPP_SERVICE_H
22 
23 #include "MltConfig.h"
24 
25 #include <framework/mlt.h>
26 
27 #include "MltProperties.h"
28 #include "MltFrame.h"
29 
30 namespace Mlt
31 {
32 	class Properties;
33 	class Filter;
34 	class Frame;
35 	class Profile;
36 
37 	class MLTPP_DECLSPEC Service : public Properties
38 	{
39 		private:
40 			mlt_service instance;
41 		public:
42 			Service( );
43 			Service( Service &service );
44 			Service( const Service &service );
45 			Service( mlt_service service );
46 			virtual ~Service( );
47 			Service& operator=( const Service &service );
48 			virtual mlt_service get_service( );
49 			void lock( );
50 			void unlock( );
51 			virtual mlt_properties get_properties( );
52 			int connect_producer( Service &producer, int index = 0 );
53 			int insert_producer( Service &producer, int index = 0 );
54 			int disconnect_producer( int index = 0 );
55 			int disconnect_all_producers( );
56 			Service *consumer( );
57 			Service *producer( );
58 			Profile *profile( );
59 			mlt_profile get_profile( );
60 			Frame *get_frame( int index = 0 );
61 			mlt_service_type type( );
62 			int attach( Filter &filter );
63 			int detach( Filter &filter );
64 			int filter_count( );
65 			int move_filter( int from, int to );
66 			Filter *filter( int index );
67 			void set_profile( mlt_profile profile );
68 			void set_profile( Profile &profile );
69 	};
70 }
71 
72 #endif
73