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 #define BITS_AUTO 0 23 #define BITS_8 8 24 #define BITS_16 16 25 26 typedef struct 27 { 28 png_structp png_ptr; 29 png_infop info_ptr; 30 int transform_flags; 31 FILE * output; 32 int bit_mode; 33 int compression_level; 34 gavl_video_format_t format; 35 36 png_text * text; 37 int num_text; 38 int dont_force_extension; 39 40 } bg_pngwriter_t; 41 42 int bg_pngwriter_write_header(void * priv, const char * filename, 43 gavl_video_format_t * format, 44 const gavl_metadata_t * metadata); 45 46 int bg_pngwriter_write_image(void * priv, gavl_video_frame_t * frame); 47 48 void bg_pngwriter_set_parameter(void * p, const char * name, 49 const bg_parameter_value_t * val); 50 51 52