static void gst_gl_stereosplit_init (GstGLStereoSplit * self) { GstPad *pad; pad = self->sink_pad = gst_pad_new_from_static_template (&sink_template, "sink"); gst_pad_set_chain_function (pad, (GstPadChainFunction) (stereosplit_chain)); gst_pad_set_query_function (pad, stereosplit_sink_query); gst_pad_set_event_function (pad, stereosplit_sink_event); gst_element_add_pad (GST_ELEMENT (self), self->sink_pad); pad = self->left_pad = gst_pad_new_from_static_template (&src_left_template, "left"); gst_pad_set_query_function (pad, stereosplit_src_query); gst_pad_set_event_function (pad, stereosplit_src_event); gst_element_add_pad (GST_ELEMENT (self), self->left_pad); pad = self->right_pad = gst_pad_new_from_static_template (&src_right_template, "right"); gst_pad_set_query_function (pad, stereosplit_src_query); gst_pad_set_event_function (pad, stereosplit_src_event); gst_element_add_pad (GST_ELEMENT (self), self->right_pad); self->viewconvert = gst_gl_view_convert_new (); }
static gboolean gst_gl_stereo_mix_start (GstAggregator * agg) { guint i; GstGLStereoMix *mix = GST_GL_STEREO_MIX (agg); GstElement *element = GST_ELEMENT (agg); if (!GST_AGGREGATOR_CLASS (parent_class)->start (agg)) return FALSE; GST_OBJECT_LOCK (mix); mix->array_buffers = g_ptr_array_new_full (element->numsinkpads, (GDestroyNotify) _free_glmixer_frame_data); mix->frames = g_ptr_array_new_full (element->numsinkpads, NULL); g_ptr_array_set_size (mix->array_buffers, element->numsinkpads); g_ptr_array_set_size (mix->frames, element->numsinkpads); for (i = 0; i < element->numsinkpads; i++) mix->frames->pdata[i] = g_slice_new0 (GstGLStereoMixFrameData); mix->viewconvert = gst_gl_view_convert_new (); g_object_set (G_OBJECT (mix->viewconvert), "downmix-mode", mix->downmix_mode, NULL); GST_OBJECT_UNLOCK (mix); return TRUE; }
static gboolean gst_gl_stereo_mix_start (GstAggregator * agg) { GstGLStereoMix *mix = GST_GL_STEREO_MIX (agg); if (!GST_AGGREGATOR_CLASS (parent_class)->start (agg)) return FALSE; GST_OBJECT_LOCK (mix); mix->viewconvert = gst_gl_view_convert_new (); g_object_set (G_OBJECT (mix->viewconvert), "downmix-mode", mix->downmix_mode, NULL); GST_OBJECT_UNLOCK (mix); return TRUE; }
static void gst_gl_view_convert_element_init (GstGLViewConvertElement * convert) { convert->viewconvert = gst_gl_view_convert_new (); }