1 /* 2 * Copyright (C) 2013 Sebastian Dröge <slomo@circular-chaos.org> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 * 19 */ 20 21 #ifndef __GST_OPENJPEG_H__ 22 #define __GST_OPENJPEG_H__ 23 24 #include <openjpeg.h> 25 26 typedef enum 27 { 28 OPENJPEG_ERROR_NONE = 0, 29 OPENJPEG_ERROR_INIT, 30 OPENJPEG_ERROR_ENCODE, 31 OPENJPEG_ERROR_DECODE, 32 OPENJPEG_ERROR_OPEN, 33 OPENJPEG_ERROR_MAP_READ, 34 OPENJPEG_ERROR_MAP_WRITE, 35 OPENJPEG_ERROR_FILL_IMAGE, 36 OPENJPEG_ERROR_NEGOCIATE, 37 OPENJPEG_ERROR_ALLOCATE, 38 } OpenJPEGErrorCode; 39 40 typedef struct 41 { 42 GstVideoCodecFrame *frame; 43 GstBuffer *output_buffer; 44 GstBuffer *input_buffer; 45 gint stripe; 46 OpenJPEGErrorCode last_error; 47 gboolean direct; 48 gboolean last_subframe; 49 } GstOpenJPEGCodecMessage; 50 51 #endif /* __GST_OPENJPEG_H__ */ 52