static void goo_ti_clock_get_property (GObject* object, guint prop_id, GValue* value, GParamSpec* spec) { g_assert (GOO_IS_TI_CLOCK (object)); GooTiClock* self = GOO_TI_CLOCK (object); switch (prop_id) { case PROP_TIMESTAMP: { gint64 ts; ts = goo_ti_clock_get_timestamp (self); g_value_set_int64 (value, ts); break; } default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, spec); break; } return; }
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; }