]> git.sesse.net Git - x264/blob - input/input.h
Mark cli_input/output_t variables as const when possible
[x264] / input / input.h
1 /*****************************************************************************
2  * input.h: x264 file input modules
3  *****************************************************************************
4  * Copyright (C) 2003-2009 x264 project
5  *
6  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
7  *          Loren Merritt <lorenm@u.washington.edu>
8  *          Steven Walters <kemuri9@gmail.com>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111, USA.
23  *****************************************************************************/
24
25 #ifndef X264_INPUT_H
26 #define X264_INPUT_H
27
28 /* options that are used by only some demuxers */
29 typedef struct
30 {
31     char *index;
32     char *resolution; /* resolution string parsed by raw yuv input */
33     int seek;
34 } cli_input_opt_t;
35
36 /* properties of the source given by the demuxer */
37 typedef struct
38 {
39     int csp; /* X264_CSP_YV12 or X264_CSP_I420 */
40     int fps_num;
41     int fps_den;
42     int height;
43     int interlaced;
44     int sar_width;
45     int sar_height;
46     int timebase_num;
47     int timebase_den;
48     int vfr;
49     int width;
50 } video_info_t;
51
52 typedef struct
53 {
54     int (*open_file)( char *psz_filename, hnd_t *p_handle, video_info_t *info, cli_input_opt_t *opt );
55     int (*get_frame_total)( hnd_t handle );
56     int (*picture_alloc)( x264_picture_t *pic, int i_csp, int i_width, int i_height );
57     int (*read_frame)( x264_picture_t *p_pic, hnd_t handle, int i_frame );
58     int (*release_frame)( x264_picture_t *pic, hnd_t handle );
59     void (*picture_clean)( x264_picture_t *pic );
60     int (*close_file)( hnd_t handle );
61 } cli_input_t;
62
63 extern const cli_input_t yuv_input;
64 extern const cli_input_t y4m_input;
65 extern const cli_input_t avs_input;
66 extern cli_input_t thread_input;
67 extern const cli_input_t lavf_input;
68 extern const cli_input_t ffms_input;
69
70 #endif