00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __GST_SH_VIDEO_MIXER_H__
00024 #define __GST_SH_VIDEO_MIXER_H__
00025
00026 #include <gst/gst.h>
00027 #include <gst/video/video.h>
00028 #include <uiomux/uiomux.h>
00029 #include <shbeu/shbeu.h>
00030 #include "shvideomixerpad.h"
00031
00032 G_BEGIN_DECLS
00033
00034 #define GST_TYPE_SH_VIDEO_MIXER (gst_sh_videomixer_get_type())
00035 #define GST_SH_VIDEO_MIXER(obj) \
00036 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SH_VIDEO_MIXER, GstSHVideoMixer))
00037 #define GST_SH_VIDEO_MIXER_CLASS(klass) \
00038 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SH_VIDEO_MIXER, GstSHVideoMixerClass))
00039 #define GST_IS_VIDEO_MIXER(obj) \
00040 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SH_VIDEO_MIXER))
00041 #define GST_IS_VIDEO_MIXER_CLASS(klass) \
00042 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SH_VIDEO_MIXER))
00043
00044 typedef struct _GstSHVideoMixer GstSHVideoMixer;
00045 typedef struct _GstSHVideoMixerClass GstSHVideoMixerClass;
00046
00052 struct _GstSHVideoMixer
00053 {
00054 GstElement element;
00055
00056
00057 GstPad *srcpad;
00058
00059
00060 GMutex *state_lock;
00061
00062 GstCollectPads *collect;
00063
00064 GSList *sinkpads;
00065
00066 gint numpads;
00067
00068 GstClockTime last_ts;
00069
00070
00071 GstSHVideoMixerPad *master;
00072
00073 gint in_width, in_height;
00074 gint out_width, out_height;
00075 gint out_format;
00076 gboolean setcaps;
00077 gboolean sendseg;
00078
00079 gint fps_n;
00080 gint fps_d;
00081
00082
00083 gint next_sinkpad;
00084
00085
00086 GstPadEventFunction collect_event;
00087 guint64 segment_position;
00088 gdouble segment_rate;
00089
00090 UIOMux *uiomux;
00091 SHBEU *beu;
00092 };
00093
00094 struct _GstSHVideoMixerClass
00095 {
00096 GstElementClass parent_class;
00097 };
00098
00099 GType gst_sh_videomixer_get_type (void);
00100
00101 G_END_DECLS
00102 #endif