1 /* GStreamer 2 * Copyright (C) <2021> Collabora Ltd. 3 * Author: Daniel Almeida <daniel.almeida@collabora.com> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public 16 * License along with this library; if not, write to the 17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef __GST_V4L2_CODEC_ALPHA_DECODE_BIN_H__ 22 #define __GST_V4L2_CODEC_ALPHA_DECODE_BIN_H__ 23 24 #include <gst/gst.h> 25 #include <gstv4l2decoder.h> 26 27 /* When wrapping, use the original rank plus this offset. The ad-hoc rules is 28 * that hardware implementation will use PRIMARY+1 or +2 to override the 29 * software decoder, so the offset must be large enough to jump over those. 30 * This should also be small enough so that a marginal (64) or secondary 31 * wrapper does not cross the PRIMARY line. 32 */ 33 #define GST_V4L2_CODEC_ALPHA_DECODE_BIN_RANK_OFFSET 10 34 35 G_BEGIN_DECLS 36 37 #define GST_TYPE_V4L2_CODEC_ALPHA_DECODE_BIN (gst_v4l2_codec_alpha_decode_bin_get_type()) 38 G_DECLARE_DERIVABLE_TYPE (GstV4l2CodecAlphaDecodeBin, 39 gst_v4l2_codec_alpha_decode_bin, GST, V4L2_CODEC_ALPHA_DECODE_BIN, GstBin); 40 41 struct _GstV4l2CodecAlphaDecodeBinClass 42 { 43 GstBinClass parent_class; 44 gchar *decoder_name; 45 }; 46 47 void gst_v4l2_codec_alpha_decode_bin_register (GstPlugin * plugin, 48 GClassInitFunc class_init, 49 gconstpointer class_data, 50 const gchar * element_name_tmpl, 51 GstV4l2CodecDevice * device, 52 guint rank); 53 54 55 56 G_END_DECLS 57 #endif /* __GST_V4L2_CODEC_ALPHA_DECODE_BIN_H__ */ 58