From: Thibault Saunier Date: Sat, 17 Aug 2019 15:59:38 +0000 (-0400) Subject: ges: Expose ges mixer to be used as effects X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dcae483bca42895910708480f0d91c9064b187f1;p=platform%2Fupstream%2Fgst-editing-services.git ges: Expose ges mixer to be used as effects --- diff --git a/ges/ges-effect.c b/ges/ges-effect.c index cc900b0..3dd08a7 100644 --- a/ges/ges-effect.c +++ b/ges/ges-effect.c @@ -22,6 +22,10 @@ * @title: GESEffect * @short_description: adds an effect build from a parse-launch style * bin description to a stream in a GESSourceClip or a GESLayer + * + * Currently we only support effects with 1 sinkpad and 1 sourcepad + * with the exception of `gesaudiomixer` and `gescompositor` which + * can be used as effects. */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -291,6 +295,10 @@ ges_effect_create_element (GESTrackElement * object) GESTrackType type = ges_track_element_get_track_type (object); + if (!g_strcmp0 (self->priv->bin_description, "gesaudiomixer") || + !g_strcmp0 (self->priv->bin_description, "gescompositor")) + return gst_element_factory_make (self->priv->bin_description, NULL); + if (type == GES_TRACK_TYPE_VIDEO) { bin_desc = g_strconcat ("videoconvert name=pre_video_convert ! ", self->priv->bin_description, " ! videoconvert name=post_video_convert", diff --git a/ges/ges.c b/ges/ges.c index 4e76ba4..a4e98aa 100644 --- a/ges/ges.c +++ b/ges/ges.c @@ -34,6 +34,8 @@ #include #include #include "ges/gstframepositioner.h" +#include "ges/ges-smart-adder.h" +#include "ges/ges-smart-video-mixer.h" #include "ges-internal.h" #ifndef DISABLE_XPTV @@ -115,6 +117,7 @@ ges_init_post (GOptionContext * context, GOptionGroup * group, gpointer data, g_type_class_ref (GES_TYPE_TRANSITION_CLIP); g_type_class_ref (GES_TYPE_OVERLAY_CLIP); g_type_class_ref (GES_TYPE_OVERLAY_TEXT_CLIP); + g_type_class_ref (GES_TYPE_EFFECT_CLIP); g_type_class_ref (GES_TYPE_GROUP); @@ -123,6 +126,8 @@ ges_init_post (GOptionContext * context, GOptionGroup * group, gpointer data, ges_asset_cache_init (); + gst_element_register (NULL, "gesaudiomixer", 0, GES_TYPE_SMART_ADDER); + gst_element_register (NULL, "gescompositor", 0, GES_TYPE_SMART_MIXER); gst_element_register (NULL, "framepositioner", 0, GST_TYPE_FRAME_POSITIONNER); gst_element_register (NULL, "gespipeline", 0, GES_TYPE_PIPELINE); @@ -212,6 +217,7 @@ ges_deinit (void) g_type_class_unref (g_type_class_peek (GES_TYPE_TRANSITION_CLIP)); g_type_class_unref (g_type_class_peek (GES_TYPE_OVERLAY_CLIP)); g_type_class_unref (g_type_class_peek (GES_TYPE_OVERLAY_TEXT_CLIP)); + g_type_class_unref (g_type_class_peek (GES_TYPE_EFFECT_CLIP)); g_type_class_unref (g_type_class_peek (GES_TYPE_GROUP)); /* Register track elements */