1 /* GStreamer 2 * Copyright (C) <2009> Jan Schmidt <thaytan@noraisin.net> 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 #ifndef __RSNDEC_H__ 21 #define __RSNDEC_H__ 22 23 #include <gst/gst.h> 24 25 G_BEGIN_DECLS 26 27 #define RSN_TYPE_DEC (rsn_dec_get_type()) 28 #define RSN_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),RSN_TYPE_DEC,RsnDec)) 29 #define RSN_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),RSN_TYPE_DEC,RsnDecClass)) 30 #define RSN_IS_DEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),RSN_TYPE_DEC)) 31 #define RSN_IS_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),RSN_TYPE_DEC)) 32 #define RSN_DEC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RSN_TYPE_DEC, RsnDecClass)) 33 34 #define RSN_TYPE_AUDIODEC (rsn_audiodec_get_type()) 35 #define RSN_AUDIODEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),RSN_TYPE_AUDIODEC,RsnAudioDec)) 36 #define RSN_AUDIODEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),RSN_TYPE_AUDIODEC,RsnAudioDecClass)) 37 #define RSN_IS_AUDIODEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),RSN_TYPE_AUDIODEC)) 38 #define RSN_IS_AUDIODEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),RSN_TYPE_AUDIODEC)) 39 40 #define RSN_TYPE_VIDEODEC (rsn_videodec_get_type()) 41 #define RSN_VIDEODEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),RSN_TYPE_VIDEODEC,RsnVideoDec)) 42 #define RSN_VIDEODEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),RSN_TYPE_VIDEODEC,RsnVideoDecClass)) 43 #define RSN_IS_VIDEODEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),RSN_TYPE_VIDEODEC)) 44 #define RSN_IS_VIDEODEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),RSN_TYPE_VIDEODEC)) 45 46 GType rsn_dec_get_type (void) G_GNUC_CONST; 47 GType rsn_audiodec_get_type (void) G_GNUC_CONST; 48 GType rsn_videodec_get_type (void) G_GNUC_CONST; 49 50 typedef struct _RsnDec RsnDec; 51 typedef struct _RsnDecClass RsnDecClass; 52 53 typedef struct _RsnDec RsnAudioDec; 54 typedef struct _RsnDecClass RsnAudioDecClass; 55 56 typedef struct _RsnDec RsnVideoDec; 57 typedef struct _RsnDecClass RsnVideoDecClass; 58 59 struct _RsnDec { 60 GstBin element; 61 62 /* Our sink and source pads */ 63 GstGhostPad *sinkpad; 64 GstGhostPad *srcpad; 65 66 GstPadEventFunction sink_event_func; 67 68 GstElement *current_decoder; 69 }; 70 71 struct _RsnDecClass { 72 GstBinClass parent_class; 73 74 const GList * (*get_decoder_factories) (RsnDecClass *klass); 75 }; 76 77 G_END_DECLS 78 79 #endif /* __RSNDEC_H__ */ 80