1 /**
2  * \file mlt_profile.h
3  * \brief video output definition
4  * \see mlt_profile_s
5  *
6  * Copyright (C) 2007-2018 Meltytech, LLC
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21  */
22 
23 #ifndef MLT_PROFILE_H
24 #define MLT_PROFILE_H
25 
26 #include "mlt_types.h"
27 
28 /** \brief Profile class
29  *
30  * \envvar \em MLT_PROFILES_PATH overrides the default full path to the profile preset files, defaults to \p MLT_DATA/profiles
31  * \envvar \em MLT_PROFILE the profile preset to use, defaults to "dv_pal"
32  */
33 
34 struct mlt_profile_s
35 {
36 	char* description;      /**< a brief description suitable as a label in UI menu */
37 	int frame_rate_num;     /**< the numerator of the video frame rate */
38 	int frame_rate_den;     /**< the denominator of the video frame rate */
39 	int width;              /**< the horizontal resolution of the video */
40 	int height;             /**< the vertical resolution of the video */
41 	int progressive;        /**< a flag to indicate if the video is progressive scan, interlace if not set */
42 	int sample_aspect_num;  /**< the numerator of the pixel aspect ratio */
43 	int sample_aspect_den;  /**< the denominator of the pixel aspect ratio */
44 	int display_aspect_num; /**< the numerator of the image aspect ratio in case it can not be simply derived (e.g. ITU-R 601) */
45 	int display_aspect_den; /**< the denominator of the image aspect ratio in case it can not be simply derived (e.g. ITU-R 601) */
46 	int colorspace;         /**< the Y'CbCr colorspace standard: =601 for ITU-R 601, =709 for ITU-R 709, or =240 for SMPTE240M */
47 	int is_explicit;        /**< used internally to indicate if the profile was requested explicitly or computed or defaulted */
48 };
49 
50 extern mlt_profile mlt_profile_init( const char *name );
51 extern mlt_profile mlt_profile_load_file( const char *file );
52 extern mlt_profile mlt_profile_load_properties( mlt_properties properties );
53 extern mlt_profile mlt_profile_load_string( const char *string );
54 extern double mlt_profile_fps( mlt_profile profile );
55 extern double mlt_profile_sar( mlt_profile profile );
56 extern double mlt_profile_dar( mlt_profile profile );
57 extern void mlt_profile_close( mlt_profile profile );
58 extern mlt_profile mlt_profile_clone( mlt_profile profile );
59 extern mlt_properties mlt_profile_list( );
60 extern void mlt_profile_from_producer( mlt_profile profile, mlt_producer producer );
61 extern char *mlt_profile_lumas_dir( mlt_profile profile );
62 extern double mlt_profile_scale_width( mlt_profile profile, int width );
63 extern double mlt_profile_scale_height( mlt_profile profile, int height );
64 #endif
65