static void
finalize (GObject * obj)
{
  GstOmxBaseSink *self;

  self = GST_OMX_BASE_SINK (obj);

  g_omx_core_free (self->gomx);

  G_OBJECT_CLASS (parent_class)->finalize (obj);
}
static void
dispose (GObject *obj)
{
    GstOmxBaseSink *self;

    self = GST_OMX_BASE_SINK (obj);

    g_omx_core_free (self->gomx);

    g_free (self->omx_component);
    g_free (self->omx_library);

    G_OBJECT_CLASS (parent_class)->dispose (obj);
}
static void
finalize (GObject *obj)
{
    GstOmxBaseSrc *self;

    self = GST_OMX_BASE_SRC (obj);

    g_omx_core_free (self->gomx);

    g_free (self->omx_role);
    g_free (self->omx_component);
    g_free (self->omx_library);

    G_OBJECT_CLASS (parent_class)->finalize (obj);
}
static void
type_instance_init (GTypeInstance *instance,
                    gpointer g_class)
{
    GstOmxBaseFilter2 *omx_base;
    GstOmxBaseVfpc2 *self;
	char srcname[10];
	int i;

    omx_base = GST_OMX_BASE_FILTER2 (instance);
    self = GST_OMX_BASE_VFPC2 (instance);

    omx_base->omx_setup = omx_setup;
    self->g_class = g_class;

    gst_pad_set_setcaps_function (omx_base->sinkpad,
            GST_DEBUG_FUNCPTR (sink_setcaps));
	for (i=0; i<NUM_OUTPUTS; i++) 
    	gst_pad_set_setcaps_function (omx_base->srcpad[i],
            GST_DEBUG_FUNCPTR (src_setcaps));
	
    /* free the existing core and ports */
    g_omx_core_free (omx_base->gomx);
    g_omx_port_free (omx_base->in_port);

    /* create new core and ports */
    omx_base->gomx = g_omx_core_new (omx_base, self->g_class);
    omx_base->in_port = g_omx_core_get_port (omx_base->gomx, "in", OMX_VFPC_INPUT_PORT_START_INDEX);

    omx_base->in_port->omx_allocate = TRUE;
    omx_base->in_port->share_buffer = FALSE;
    omx_base->in_port->always_copy  = FALSE;
	omx_base->in_port->port_index = OMX_VFPC_INPUT_PORT_START_INDEX;

	for (i=0; i<NUM_OUTPUTS; i++) {
    	g_omx_port_free (omx_base->out_port[i]);
		sprintf(srcname, "out_%02x", i);
    	omx_base->out_port[i] = g_omx_core_get_port (omx_base->gomx, srcname, 
		   OMX_VFPC_OUTPUT_PORT_START_INDEX + i);
		omx_base->out_port[i]->port_index = OMX_VFPC_OUTPUT_PORT_START_INDEX + i;
		omx_base->out_port[i]->omx_allocate = TRUE;
		omx_base->out_port[i]->share_buffer = FALSE;
		omx_base->out_port[i]->always_copy = FALSE;
	}
}
static void
finalize (GObject * obj)
{
  GstOmxBaseFilter *self;

  self = GST_OMX_BASE_FILTER (obj);

  if (self->codec_data) {
    gst_buffer_unref (self->codec_data);
    self->codec_data = NULL;
  }

  g_omx_core_free (self->gomx);

  g_mutex_free (self->ready_lock);

  G_OBJECT_CLASS (parent_class)->finalize (obj);
}
示例#6
0
static void
dispose (GObject *obj)
{
    GstOmxBaseFilter *self;

    self = GST_OMX_BASE_FILTER (obj);

    if (self->codec_data)
    {
        gst_buffer_unref (self->codec_data);
        self->codec_data = NULL;
    }

    g_omx_core_free (self->gomx);

    g_free (self->omx_component);
    g_free (self->omx_library);

    G_OBJECT_CLASS (parent_class)->dispose (obj);
}