1 /*
2  * common.h
3  * Copyright (C) 2018 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 COMMON_H
21 #define COMMON_H
22 
23 #include <framework/mlt.h>
24 #include <libswscale/swscale.h>
25 
26 int mlt_to_av_sample_format( mlt_audio_format format );
27 int64_t mlt_to_av_channel_layout( mlt_channel_layout layout );
28 mlt_channel_layout av_channel_layout_to_mlt( int64_t layout );
29 mlt_channel_layout mlt_get_channel_layout_or_default( const char* name, int channels );
30 int mlt_set_luma_transfer( struct SwsContext *context, int src_colorspace,
31 	int dst_colorspace, int src_full_range, int dst_full_range );
32 int mlt_get_sws_flags(int srcwidth, int srcheight, int srcformat, int dstwidth, int dstheight, int dstformat);
33 
34 #endif // COMMON_H
35