void goo_ti_post_processor_set_starttime (GooComponent* component, gint64 time_start) { g_assert (GOO_IS_TI_POST_PROCESSOR (component)); GooTiPostProcessor* self = GOO_TI_POST_PROCESSOR (component); GOO_OBJECT_DEBUG (self, "Set start time by sync AV"); GooTiComponentFactory *factory = GOO_TI_COMPONENT_FACTORY ( goo_object_get_owner (GOO_OBJECT (component)) ); if (factory->clock != NULL) { GooComponent *clock = g_object_ref (factory->clock); goo_ti_clock_set_starttime (clock, time_start); g_object_unref (clock); } g_object_unref (factory); }
static void gst_dasf_enable (GstElement* elem) { GST_INFO (""); GstDasfSink *self = GST_DASF_SINK (elem); GooTiAudioComponent *component = self->component; GstDasfSinkPrivate* priv = GST_DASF_SINK_GET_PRIVATE (self); if (self->component == NULL) { component = GOO_TI_AUDIO_COMPONENT ( gst_goo_util_find_goo_component (GST_ELEMENT(self), GOO_TYPE_TI_AUDIO_COMPONENT) ); if (component == NULL) return; self->component = GOO_TI_AUDIO_COMPONENT (g_object_ref (component)); goo_ti_audio_component_set_dasf_mode (self->component, TRUE); GST_DEBUG_OBJECT (self, "set data path"); goo_ti_audio_component_set_data_path (self->component, 0); } if (self->pp == NULL) { /* we haven't yet found a post-processor component.. it could * be that it hasn't been created yet: */ priv->clock_required = gst_dasf_clock_required (self); if (self->pp == NULL) return; if (priv->clock_source == AUTO_CLOCK) { priv->clock_source = priv->clock_required; } GST_INFO ("clock_required=%d, clock_source=%d", priv->clock_required, priv->clock_source); /* Check if OMX will be the clock source and get a new clock instance if true */ if (priv->clock_source == OMX_CLOCK) { self->clock = goo_component_factory_get_component( self->factory, GOO_TI_CLOCK); GST_DEBUG ("Clock component clock refcount %d", G_OBJECT(self->clock)->ref_count); } if (priv->clock_source == OMX_CLOCK) { goo_component_set_clock (GOO_COMPONENT (component), self->clock); } } if (self->clock) { if (goo_component_get_state(self->clock) == OMX_StateLoaded) { GST_DEBUG_OBJECT (self, "Setting clock to idle"); goo_component_set_state_idle (self->clock); } if (goo_component_get_state(self->clock) == OMX_StateIdle) { GST_DEBUG_OBJECT (self, "Setting clock to executing"); goo_component_set_state_executing(self->clock); goo_ti_clock_set_starttime (GOO_TI_CLOCK (self->clock), 0); } } return; }