1 /***************************************************************** 2 * gmerlin - a general purpose multimedia framework and applications 3 * 4 * Copyright (c) 2001 - 2011 Members of the Gmerlin project 5 * gmerlin-general@lists.sourceforge.net 6 * http://gmerlin.sourceforge.net 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program 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 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 20 * *****************************************************************/ 21 22 int bg_encoder_cb_create_output_file(bg_encoder_callbacks_t * cb, 23 const char * filename); 24 25 int bg_encoder_cb_create_temp_file(bg_encoder_callbacks_t * cb, 26 const char * filename); 27 28 int bg_iw_cb_create_output_file(bg_iw_callbacks_t * cb, 29 const char * filename); 30 31 typedef struct 32 { 33 int timescale; 34 int frame_duration; 35 } bg_encoder_framerate_t; 36 37 #define BG_ENCODER_FRAMERATE_PARAMS \ 38 { \ 39 .name = "default_timescale", \ 40 .long_name = TRS("Default timescale"), \ 41 .type = BG_PARAMETER_INT, \ 42 .val_default = { .val_i = 25 }, \ 43 .help_string = TRS("For formats, which support only constant framerates, set the default timescale here"), \ 44 }, \ 45 { \ 46 .name = "default_frame_duration", \ 47 .long_name = TRS("Default frame duration"), \ 48 .type = BG_PARAMETER_INT, \ 49 .val_default = { .val_i = 1 }, \ 50 .help_string = TRS("For formats, which support only constant framerates, set the default frame duration here"), \ 51 } 52 53 int bg_encoder_set_framerate_parameter(bg_encoder_framerate_t * f, 54 const char * name, 55 const bg_parameter_value_t * val); 56 57 void bg_encoder_set_framerate(const bg_encoder_framerate_t * f, 58 gavl_video_format_t * format); 59 60 void 61 bg_encoder_set_framerate_nearest(const bg_encoder_framerate_t * rate_default, 62 const bg_encoder_framerate_t * rates_supported, 63 gavl_video_format_t * format); 64