mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
ges: Expose ges mixer to be used as effects
This commit is contained in:
parent
99c44bdb34
commit
dcae483bca
2 changed files with 14 additions and 0 deletions
|
@ -22,6 +22,10 @@
|
||||||
* @title: GESEffect
|
* @title: GESEffect
|
||||||
* @short_description: adds an effect build from a parse-launch style
|
* @short_description: adds an effect build from a parse-launch style
|
||||||
* bin description to a stream in a GESSourceClip or a GESLayer
|
* 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
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -291,6 +295,10 @@ ges_effect_create_element (GESTrackElement * object)
|
||||||
|
|
||||||
GESTrackType type = ges_track_element_get_track_type (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) {
|
if (type == GES_TRACK_TYPE_VIDEO) {
|
||||||
bin_desc = g_strconcat ("videoconvert name=pre_video_convert ! ",
|
bin_desc = g_strconcat ("videoconvert name=pre_video_convert ! ",
|
||||||
self->priv->bin_description, " ! videoconvert name=post_video_convert",
|
self->priv->bin_description, " ! videoconvert name=post_video_convert",
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include "ges/gstframepositioner.h"
|
#include "ges/gstframepositioner.h"
|
||||||
|
#include "ges/ges-smart-adder.h"
|
||||||
|
#include "ges/ges-smart-video-mixer.h"
|
||||||
#include "ges-internal.h"
|
#include "ges-internal.h"
|
||||||
|
|
||||||
#ifndef DISABLE_XPTV
|
#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_TRANSITION_CLIP);
|
||||||
g_type_class_ref (GES_TYPE_OVERLAY_CLIP);
|
g_type_class_ref (GES_TYPE_OVERLAY_CLIP);
|
||||||
g_type_class_ref (GES_TYPE_OVERLAY_TEXT_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);
|
g_type_class_ref (GES_TYPE_GROUP);
|
||||||
|
|
||||||
|
@ -123,6 +126,8 @@ ges_init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
|
||||||
|
|
||||||
ges_asset_cache_init ();
|
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, "framepositioner", 0, GST_TYPE_FRAME_POSITIONNER);
|
||||||
gst_element_register (NULL, "gespipeline", 0, GES_TYPE_PIPELINE);
|
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_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_CLIP));
|
||||||
g_type_class_unref (g_type_class_peek (GES_TYPE_OVERLAY_TEXT_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));
|
g_type_class_unref (g_type_class_peek (GES_TYPE_GROUP));
|
||||||
/* Register track elements */
|
/* Register track elements */
|
||||||
|
|
Loading…
Reference in a new issue