1 /* 2 * GStreamer HEVC/H.265 video codec. 3 * 4 * Copyright (c) 2014 struktur AG, Joachim Bauch <bauch@struktur.de> 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Library General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Library General Public License for more details. 15 * 16 * You should have received a copy of the GNU Library General Public 17 * License along with this library; if not, write to the 18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef __GST_LIBDE265_DEC_H__ 23 #define __GST_LIBDE265_DEC_H__ 24 25 #include <gst/gst.h> 26 #include <gst/video/gstvideodecoder.h> 27 28 #include <libde265/de265.h> 29 30 G_BEGIN_DECLS 31 #define GST_TYPE_LIBDE265_DEC \ 32 (gst_libde265_dec_get_type()) 33 #define GST_LIBDE265_DEC(obj) \ 34 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_LIBDE265_DEC,GstLibde265Dec)) 35 #define GST_LIBDE265_DEC_CLASS(klass) \ 36 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_LIBDE265_DEC,GstLibde265DecClass)) 37 38 typedef enum 39 { 40 GST_TYPE_LIBDE265_FORMAT_PACKETIZED, 41 GST_TYPE_LIBDE265_FORMAT_BYTESTREAM 42 } GstLibde265DecFormat; 43 44 typedef struct _GstLibde265Dec 45 { 46 GstVideoDecoder parent; 47 48 /* private */ 49 de265_decoder_context *ctx; 50 GstLibde265DecFormat format; 51 int length_size; 52 int max_threads; 53 int buffer_full; 54 void *codec_data; 55 int codec_data_size; 56 GstVideoCodecState *input_state; 57 GstVideoCodecState *output_state; 58 } GstLibde265Dec; 59 60 typedef struct _GstLibde265DecClass 61 { 62 GstVideoDecoderClass parent; 63 } GstLibde265DecClass; 64 65 GType gst_libde265_dec_get_type (void); 66 67 GST_ELEMENT_REGISTER_DECLARE (libde265dec) 68 69 G_END_DECLS 70 71 #endif /* __GST_LIBDE265_DEC_H__ */ 72