static void _fill_track_type (GESAsset * asset) { GESTrackType ttype; gchar *bin_desc; const gchar *id = ges_asset_get_id (asset); bin_desc = ges_effect_assect_id_get_type_and_bindesc (id, &ttype, NULL); if (bin_desc) { ges_track_element_asset_set_track_type (GES_TRACK_ELEMENT_ASSET (asset), ttype); } else { GST_WARNING_OBJECT (asset, "No track type set, you should" " specify one in [audio, video] as first component" " in the asset id"); } }
static gchar * extractable_check_id (GType type, const gchar * id, GError ** error) { gchar *bin_desc, *real_id; GESTrackType ttype; bin_desc = ges_effect_assect_id_get_type_and_bindesc (id, &ttype, error); if (bin_desc == NULL) return NULL; if (ttype == GES_TRACK_TYPE_AUDIO) real_id = g_strdup_printf ("audio %s", bin_desc); else if (ttype == GES_TRACK_TYPE_VIDEO) real_id = g_strdup_printf ("video %s", bin_desc); else g_assert_not_reached (); return real_id; }
static GParameter * extractable_get_parameters_from_id (const gchar * id, guint * n_params) { GParameter *params = g_new0 (GParameter, 3); gchar *bin_desc; GESTrackType ttype; bin_desc = ges_effect_assect_id_get_type_and_bindesc (id, &ttype, NULL); params[0].name = "bin-description"; g_value_init (¶ms[0].value, G_TYPE_STRING); g_value_set_string (¶ms[0].value, bin_desc); params[1].name = "track-type"; g_value_init (¶ms[1].value, GES_TYPE_TRACK_TYPE); g_value_set_flags (¶ms[1].value, ttype); *n_params = 2; g_free (bin_desc); return params; }