Commit dcae483b authored by Thibault Saunier's avatar Thibault Saunier 🌵 Committed by Thibault Saunier
Browse files

ges: Expose ges mixer to be used as effects

parent 99c44bdb
......@@ -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",
......
......@@ -34,6 +34,8 @@
#include <stdlib.h>
#include <ges/ges.h>
#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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment