mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
effects: Make TrackEffect implementation corresponding to the new effect API description
Make the effects testsuite correspond to the new API Fixe a few compilation issues due to TrackEffect
This commit is contained in:
parent
6991d9f33d
commit
647f7c34d9
5 changed files with 19 additions and 21 deletions
|
@ -703,8 +703,7 @@ ges_keyfile_formatter_get_type
|
||||||
<TITLE>GESTrackEffect</TITLE>
|
<TITLE>GESTrackEffect</TITLE>
|
||||||
GESTrackEffect
|
GESTrackEffect
|
||||||
GESTrackEffectClass
|
GESTrackEffectClass
|
||||||
ges_track_effect_new
|
ges_track_effect_new_from_bin_desc
|
||||||
ges_track_effect_new_with_name
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GES_IS_TRACK_EFFECT
|
GES_IS_TRACK_EFFECT
|
||||||
GES_IS_TRACK_EFFECT_CLASS
|
GES_IS_TRACK_EFFECT_CLASS
|
||||||
|
|
|
@ -81,8 +81,6 @@ ges_track_effect_class_init (GESTrackEffectClass * klass)
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (GESTrackEffectPrivate));
|
g_type_class_add_private (klass, sizeof (GESTrackEffectPrivate));
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (GESTrackEffectPrivate));
|
|
||||||
|
|
||||||
object_class->get_property = ges_track_effect_get_property;
|
object_class->get_property = ges_track_effect_get_property;
|
||||||
object_class->set_property = ges_track_effect_set_property;
|
object_class->set_property = ges_track_effect_set_property;
|
||||||
object_class->dispose = ges_track_effect_dispose;
|
object_class->dispose = ges_track_effect_dispose;
|
||||||
|
@ -102,7 +100,6 @@ ges_track_effect_class_init (GESTrackEffectClass * klass)
|
||||||
"bin description",
|
"bin description",
|
||||||
"Bin description of the effect",
|
"Bin description of the effect",
|
||||||
NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -158,8 +155,8 @@ ges_track_effect_create_element (GESTrackOperation * object)
|
||||||
src = gst_ghost_pad_new ("src", src_target);
|
src = gst_ghost_pad_new ("src", src_target);
|
||||||
sink = gst_ghost_pad_new ("video_sink", sink_target);
|
sink = gst_ghost_pad_new ("video_sink", sink_target);
|
||||||
|
|
||||||
g_object_unref (src_target);
|
gst_object_unref (src_target);
|
||||||
g_object_unref (sink_target);
|
gst_object_unref (sink_target);
|
||||||
|
|
||||||
gst_element_add_pad (ret, src);
|
gst_element_add_pad (ret, src);
|
||||||
gst_element_add_pad (ret, sink);
|
gst_element_add_pad (ret, sink);
|
||||||
|
@ -170,7 +167,7 @@ ges_track_effect_create_element (GESTrackOperation * object)
|
||||||
}
|
}
|
||||||
|
|
||||||
GESTrackEffect *
|
GESTrackEffect *
|
||||||
ges_track_effect_new (const gchar * bin_description)
|
ges_track_effect_new_from_bin_desc (const gchar * bin_description)
|
||||||
{
|
{
|
||||||
return g_object_new (GES_TYPE_TRACK_EFFECT, "bin-description",
|
return g_object_new (GES_TYPE_TRACK_EFFECT, "bin-description",
|
||||||
bin_description, NULL);
|
bin_description, NULL);
|
||||||
|
|
|
@ -66,7 +66,7 @@ struct _GESTrackEffectClass
|
||||||
|
|
||||||
GType ges_track_effect_get_type (void);
|
GType ges_track_effect_get_type (void);
|
||||||
|
|
||||||
GESTrackEffect *ges_track_effect_new (const gchar * bin_description);
|
GESTrackEffect *ges_track_effect_new_from_bin_desc (const gchar * bin_description);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* _GES_TRACK_EFFECT */
|
#endif /* _GES_TRACK_EFFECT */
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
#include <ges/ges-track-transition.h>
|
#include <ges/ges-track-transition.h>
|
||||||
#include <ges/ges-track-video-transition.h>
|
#include <ges/ges-track-video-transition.h>
|
||||||
#include <ges/ges-track-audio-transition.h>
|
#include <ges/ges-track-audio-transition.h>
|
||||||
|
#include <ges/ges-track-effect.h>
|
||||||
|
|
||||||
#include <ges/ges-formatter.h>
|
#include <ges/ges-formatter.h>
|
||||||
#include <ges/ges-keyfile-formatter.h>
|
#include <ges/ges-keyfile-formatter.h>
|
||||||
|
|
|
@ -27,7 +27,7 @@ GST_START_TEST (test_effect_basic)
|
||||||
|
|
||||||
ges_init ();
|
ges_init ();
|
||||||
|
|
||||||
effect = ges_track_effect_new ("identity");
|
effect = ges_track_effect_new_from_bin_desc ("identity");
|
||||||
fail_unless (effect != NULL);
|
fail_unless (effect != NULL);
|
||||||
g_object_unref (effect);
|
g_object_unref (effect);
|
||||||
}
|
}
|
||||||
|
@ -39,9 +39,8 @@ GST_START_TEST (test_add_effect_to_tl_object)
|
||||||
GESTimeline *timeline;
|
GESTimeline *timeline;
|
||||||
GESTimelineLayer *layer;
|
GESTimelineLayer *layer;
|
||||||
GESTrack *track_audio, *track_video;
|
GESTrack *track_audio, *track_video;
|
||||||
GESTrackEffect *effect_track;
|
GESTrackEffect *track_effect;
|
||||||
GESTimelineTestSource *source;
|
GESTimelineTestSource *source;
|
||||||
gboolean effect_added = FALSE;
|
|
||||||
|
|
||||||
ges_init ();
|
ges_init ();
|
||||||
|
|
||||||
|
@ -61,20 +60,22 @@ GST_START_TEST (test_add_effect_to_tl_object)
|
||||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) (layer),
|
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) (layer),
|
||||||
(GESTimelineObject *) source, 0);
|
(GESTimelineObject *) source, 0);
|
||||||
|
|
||||||
GST_DEBUG ("Adding effect");
|
|
||||||
ges_timeline_object_add_effect (GES_TIMELINE_OBJECT (source),
|
|
||||||
"identity", track_video);
|
|
||||||
|
|
||||||
effect_track =
|
GST_DEBUG ("Create effect");
|
||||||
GES_TRACK_EFFECT (ges_timeline_object_find_track_object
|
track_effect = ges_track_effect_new_from_bin_desc ("identity");
|
||||||
(GES_TIMELINE_OBJECT (source), track_video, GES_TYPE_TRACK_EFFECT));
|
|
||||||
|
|
||||||
assert_equals_int (GES_TRACK_OBJECT (effect_track)->active, TRUE);
|
fail_unless (GES_IS_TRACK_EFFECT (track_effect));
|
||||||
fail_unless (GES_IS_TRACK_EFFECT (effect_track));
|
|
||||||
|
|
||||||
|
fail_unless (ges_timeline_object_add_track_object (GES_TIMELINE_OBJECT
|
||||||
|
(source), GES_TRACK_OBJECT (track_effect)));
|
||||||
|
fail_unless (ges_track_add_object (track_video,
|
||||||
|
GES_TRACK_OBJECT (track_effect)));
|
||||||
|
|
||||||
|
assert_equals_int (GES_TRACK_OBJECT (track_effect)->active, TRUE);
|
||||||
|
|
||||||
ges_timeline_layer_remove_object (layer, (GESTimelineObject *) source);
|
ges_timeline_layer_remove_object (layer, (GESTimelineObject *) source);
|
||||||
|
|
||||||
g_object_unref (effect_track);
|
|
||||||
g_object_unref (timeline);
|
g_object_unref (timeline);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue