effect: Add support for time effects
[platform/upstream/gst-editing-services.git] / ges / ges-internal.h
1 /* GStreamer Editing Services
2  * Copyright (C) 2009 Edward Hervey <edward.hervey@collabora.co.uk>
3  *               2009 Nokia Corporation
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20
21 #pragma once
22
23 #include <gst/gst.h>
24 #include <gst/pbutils/encoding-profile.h>
25 #include <gio/gio.h>
26
27 G_BEGIN_DECLS
28
29 #ifndef GST_CAT_DEFAULT
30 #define GST_CAT_DEFAULT (_ges_debug ())
31 #endif
32
33 #include "ges-timeline.h"
34 #include "ges-track-element.h"
35 #include "ges-timeline-element.h"
36
37 #include "ges-asset.h"
38 #include "ges-base-xml-formatter.h"
39 #include "ges-timeline-tree.h"
40
41 G_GNUC_INTERNAL
42 GstDebugCategory * _ges_debug (void);
43
44 /*  The first 2 NLE priorities are used for:
45  *    0- The Mixing element
46  *    1- The Gaps
47  */
48 #define MIN_NLE_PRIO 2
49 #define LAYER_HEIGHT 1000
50
51 #define _START(obj) GES_TIMELINE_ELEMENT_START (obj)
52 #define _INPOINT(obj) GES_TIMELINE_ELEMENT_INPOINT (obj)
53 #define _DURATION(obj) GES_TIMELINE_ELEMENT_DURATION (obj)
54 #define _MAXDURATION(obj) GES_TIMELINE_ELEMENT_MAX_DURATION (obj)
55 #define _PRIORITY(obj) GES_TIMELINE_ELEMENT_PRIORITY (obj)
56 #ifndef _END
57 #define _END(obj) (_START (obj) + _DURATION (obj))
58 #endif
59 #define _set_start0 ges_timeline_element_set_start
60 #define _set_inpoint0 ges_timeline_element_set_inpoint
61 #define _set_duration0 ges_timeline_element_set_duration
62 #define _set_priority0 ges_timeline_element_set_priority
63
64 #define GES_CLOCK_TIME_IS_LESS(first, second) \
65   (GST_CLOCK_TIME_IS_VALID (first) && (!GST_CLOCK_TIME_IS_VALID (second) \
66   || (first) < (second)))
67
68 #define DEFAULT_FRAMERATE_N 30
69 #define DEFAULT_FRAMERATE_D 1
70 #define DEFAULT_WIDTH 1280
71 #define DEFAULT_HEIGHT 720
72
73 #define GES_TIMELINE_ELEMENT_FORMAT \
74     "s<%p>" \
75     " [ %" GST_TIME_FORMAT \
76     " (%" GST_TIME_FORMAT \
77     ") - %" GST_TIME_FORMAT "(%" GST_TIME_FORMAT") layer: %" G_GINT32_FORMAT "] "
78
79 #define GES_TIMELINE_ELEMENT_ARGS(element) \
80     GES_TIMELINE_ELEMENT_NAME(element), element, \
81     GST_TIME_ARGS(GES_TIMELINE_ELEMENT_START(element)), \
82     GST_TIME_ARGS(GES_TIMELINE_ELEMENT_INPOINT(element)), \
83     GST_TIME_ARGS(GES_TIMELINE_ELEMENT_DURATION(element)), \
84     GST_TIME_ARGS(GES_TIMELINE_ELEMENT_MAX_DURATION(element)), \
85     GES_TIMELINE_ELEMENT_LAYER_PRIORITY(element)
86
87 #define GES_FORMAT GES_TIMELINE_ELEMENT_FORMAT
88 #define GES_ARGS GES_TIMELINE_ELEMENT_ARGS
89
90 #define GES_IS_TIME_EFFECT(element) \
91   (GES_IS_BASE_EFFECT (element) \
92   && ges_base_effect_is_time_effect (GES_BASE_EFFECT (element)))
93
94 #define GES_TIMELINE_ELEMENT_SET_BEING_EDITED(element) \
95   ELEMENT_SET_FLAG ( \
96       ges_timeline_element_peak_toplevel (GES_TIMELINE_ELEMENT (element)), \
97       GES_TIMELINE_ELEMENT_SET_SIMPLE)
98
99 #define GES_TIMELINE_ELEMENT_UNSET_BEING_EDITED(element) \
100   ELEMENT_UNSET_FLAG ( \
101       ges_timeline_element_peak_toplevel (GES_TIMELINE_ELEMENT (element)), \
102       GES_TIMELINE_ELEMENT_SET_SIMPLE)
103
104 #define GES_TIMELINE_ELEMENT_BEING_EDITED(element) \
105   ELEMENT_FLAG_IS_SET ( \
106       ges_timeline_element_peak_toplevel (GES_TIMELINE_ELEMENT (element)), \
107       GES_TIMELINE_ELEMENT_SET_SIMPLE)
108
109 #define SUPRESS_UNUSED_WARNING(a) (void)a
110
111 G_GNUC_INTERNAL void
112 ges_timeline_freeze_auto_transitions (GESTimeline * timeline, gboolean freeze);
113
114 G_GNUC_INTERNAL GESAutoTransition *
115 ges_timeline_get_auto_transition_at_end (GESTimeline * timeline, GESTrackElement * source);
116
117 G_GNUC_INTERNAL gboolean ges_timeline_is_disposed (GESTimeline* timeline);
118
119 G_GNUC_INTERNAL gboolean
120 ges_timeline_edit (GESTimeline * timeline, GESTimelineElement * element,
121     gint64 new_layer_priority, GESEditMode mode, GESEdge edge,
122     guint64 position, GError ** error);
123
124 G_GNUC_INTERNAL void
125 timeline_add_group             (GESTimeline *timeline,
126                                 GESGroup *group);
127 G_GNUC_INTERNAL void
128 timeline_remove_group          (GESTimeline *timeline,
129                                 GESGroup *group);
130 G_GNUC_INTERNAL void
131 timeline_emit_group_added      (GESTimeline *timeline,
132                                 GESGroup *group);
133 G_GNUC_INTERNAL void
134 timeline_emit_group_removed    (GESTimeline * timeline,
135                                 GESGroup * group, GPtrArray * array);
136
137 G_GNUC_INTERNAL
138 gboolean
139 timeline_add_element           (GESTimeline *timeline,
140                                 GESTimelineElement *element);
141 G_GNUC_INTERNAL
142 gboolean
143 timeline_remove_element       (GESTimeline *timeline,
144                                GESTimelineElement *element);
145
146 G_GNUC_INTERNAL
147 GNode *
148 timeline_get_tree           (GESTimeline *timeline);
149
150 G_GNUC_INTERNAL
151 void
152 timeline_fill_gaps            (GESTimeline *timeline);
153
154 G_GNUC_INTERNAL void
155 timeline_create_transitions (GESTimeline * timeline, GESTrackElement * track_element);
156
157 G_GNUC_INTERNAL void timeline_get_framerate(GESTimeline *self, gint *fps_n,
158                                             gint *fps_d);
159 G_GNUC_INTERNAL void
160 ges_timeline_set_moving_track_elements (GESTimeline * timeline, gboolean moving);
161
162 G_GNUC_INTERNAL gboolean
163 ges_timeline_add_clip (GESTimeline * timeline, GESClip * clip, GError ** error);
164
165 G_GNUC_INTERNAL void
166 ges_timeline_remove_clip (GESTimeline * timeline, GESClip * clip);
167
168 G_GNUC_INTERNAL void
169 ges_auto_transition_set_previous_source (GESAutoTransition * self, GESTrackElement * source);
170
171
172
173 G_GNUC_INTERNAL
174 void
175 track_resort_and_fill_gaps    (GESTrack *track);
176
177 G_GNUC_INTERNAL
178 void
179 track_disable_last_gap        (GESTrack *track, gboolean disabled);
180
181 G_GNUC_INTERNAL void
182 ges_asset_cache_init (void);
183
184 G_GNUC_INTERNAL void
185 ges_asset_cache_deinit (void);
186
187 G_GNUC_INTERNAL void
188 ges_asset_set_id (GESAsset *asset, const gchar *id);
189
190 G_GNUC_INTERNAL void
191 ges_asset_cache_put (GESAsset * asset, GTask *task);
192
193 G_GNUC_INTERNAL gboolean
194 ges_asset_cache_set_loaded(GType extractable_type, const gchar * id, GError *error);
195
196 /* FIXME: marked as GES_API just so they can be used in tests! */
197
198 GES_API GESAsset*
199 ges_asset_cache_lookup(GType extractable_type, const gchar * id);
200
201 GES_API gboolean
202 ges_asset_try_proxy (GESAsset *asset, const gchar *new_id);
203
204 G_GNUC_INTERNAL gboolean
205 ges_asset_finish_proxy (GESAsset * proxy);
206
207 G_GNUC_INTERNAL gboolean
208 ges_asset_request_id_update (GESAsset *asset, gchar **proposed_id,
209     GError *error);
210 G_GNUC_INTERNAL gchar *
211 ges_effect_assect_id_get_type_and_bindesc (const char    *id,
212                                            GESTrackType  *track_type,
213                                            GError       **error);
214
215 G_GNUC_INTERNAL void _ges_uri_asset_cleanup (void);
216
217 G_GNUC_INTERNAL gboolean _ges_uri_asset_ensure_setup (gpointer uriasset_class);
218
219 /* GESExtractable internall methods
220  *
221  * FIXME Check if that should be public later
222  */
223 G_GNUC_INTERNAL GType
224 ges_extractable_type_get_asset_type              (GType type);
225
226 G_GNUC_INTERNAL gchar *
227 ges_extractable_type_check_id                    (GType type, const gchar *id, GError **error);
228
229 G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
230 G_GNUC_INTERNAL GParameter *
231 ges_extractable_type_get_parameters_from_id      (GType type, const gchar *id,
232                                                   guint *n_params);
233 G_GNUC_END_IGNORE_DEPRECATIONS;
234
235 G_GNUC_INTERNAL GType
236 ges_extractable_get_real_extractable_type_for_id (GType type, const gchar * id);
237
238 G_GNUC_INTERNAL gboolean
239 ges_extractable_register_metas                   (GType extractable_type, GESAsset *asset);
240
241 /************************************************
242  *                                              *
243  *        GESFormatter internal methods         *
244  *                                              *
245  ************************************************/
246 G_GNUC_INTERNAL void
247 ges_formatter_set_project                        (GESFormatter *formatter,
248                                                   GESProject *project);
249 G_GNUC_INTERNAL GESProject *
250 ges_formatter_get_project                        (GESFormatter *formatter);
251 G_GNUC_INTERNAL  GESAsset *
252 _find_formatter_asset_for_id                     (const gchar *id);
253
254
255
256 /************************************************
257  *                                              *
258  *        GESProject internal methods           *
259  *                                              *
260  ************************************************/
261
262 /* FIXME This should probably become public, but we need to make sure it
263  * is the right API before doing so */
264 G_GNUC_INTERNAL  gboolean ges_project_set_loaded                  (GESProject * project,
265                                                                    GESFormatter *formatter,
266                                                                    GError *error);
267 G_GNUC_INTERNAL  gchar * ges_project_try_updating_id              (GESProject *self,
268                                                                    GESAsset *asset,
269                                                                    GError *error);
270 G_GNUC_INTERNAL  void ges_project_add_loading_asset               (GESProject *project,
271                                                                    GType extractable_type,
272                                                                    const gchar *id);
273 G_GNUC_INTERNAL  gchar* ges_uri_asset_try_update_id               (GError *error, GESAsset *wrong_asset);
274 /************************************************
275  *                                              *
276  *   GESBaseXmlFormatter internal methods       *
277  *                                              *
278  ************************************************/
279
280 /* FIXME GESBaseXmlFormatter is all internal for now, the API is not stable
281  * fo now, so do not expose it */
282 G_GNUC_INTERNAL void ges_base_xml_formatter_add_clip (GESBaseXmlFormatter * self,
283                                                                  const gchar *id,
284                                                                  const char *asset_id,
285                                                                  GType type,
286                                                                  GstClockTime start,
287                                                                  GstClockTime inpoint,
288                                                                  GstClockTime duration,
289                                                                  guint layer_prio,
290                                                                  GESTrackType track_types,
291                                                                  GstStructure *properties,
292                                                                  GstStructure * children_properties,
293                                                                  const gchar *metadatas,
294                                                                  GError **error);
295 G_GNUC_INTERNAL void ges_base_xml_formatter_add_asset        (GESBaseXmlFormatter * self,
296                                                                  const gchar * id,
297                                                                  GType extractable_type,
298                                                                  GstStructure *properties,
299                                                                  const gchar *metadatas,
300                                                                  const gchar *proxy_id,
301                                                                  GError **error);
302 G_GNUC_INTERNAL void ges_base_xml_formatter_add_layer           (GESBaseXmlFormatter *self,
303                                                                  GType extractable_type,
304                                                                  guint priority,
305                                                                  GstStructure *properties,
306                                                                  const gchar *metadatas,
307                                                                  gchar **deactivated_tracks,
308                                                                  GError **error);
309 G_GNUC_INTERNAL void ges_base_xml_formatter_add_track           (GESBaseXmlFormatter *self,
310                                                                  GESTrackType track_type,
311                                                                  GstCaps *caps,
312                                                                  const gchar *id,
313                                                                  GstStructure *properties,
314                                                                  const gchar *metadatas,
315                                                                  GError **error);
316 G_GNUC_INTERNAL void ges_base_xml_formatter_add_encoding_profile(GESBaseXmlFormatter * self,
317                                                                  const gchar *type,
318                                                                  const gchar *parent,
319                                                                  const gchar * name,
320                                                                  const gchar * description,
321                                                                  GstCaps * format,
322                                                                  const gchar * preset,
323                                                                  GstStructure * preset_properties,
324                                                                  const gchar * preset_name,
325                                                                  guint id,
326                                                                  guint presence,
327                                                                  GstCaps * restriction,
328                                                                  guint pass,
329                                                                  gboolean variableframerate,
330                                                                  GstStructure * properties,
331                                                                  gboolean enabled,
332                                                                  GError ** error);
333 G_GNUC_INTERNAL void ges_base_xml_formatter_add_track_element   (GESBaseXmlFormatter *self,
334                                                                  GType effect_type,
335                                                                  const gchar *asset_id,
336                                                                  const gchar * track_id,
337                                                                  const gchar *timeline_obj_id,
338                                                                  GstStructure *children_properties,
339                                                                  GstStructure *properties,
340                                                                  const gchar *metadatas,
341                                                                  GError **error);
342
343 G_GNUC_INTERNAL void ges_base_xml_formatter_add_source          (GESBaseXmlFormatter *self,
344                                                                  const gchar * track_id,
345                                                                  GstStructure *children_properties,
346                                                                  GstStructure *properties);
347
348 G_GNUC_INTERNAL void ges_base_xml_formatter_add_group           (GESBaseXmlFormatter *self,
349                                                                  const gchar *name,
350                                                                  const gchar *properties,
351                                                                  const gchar *metadatas);
352
353 G_GNUC_INTERNAL void ges_base_xml_formatter_last_group_add_child(GESBaseXmlFormatter *self,
354                                                                  const gchar * id,
355                                                                  const gchar * name);
356
357 G_GNUC_INTERNAL void ges_base_xml_formatter_add_control_binding (GESBaseXmlFormatter * self,
358                                                                   const gchar * binding_type,
359                                                                   const gchar * source_type,
360                                                                   const gchar * property_name,
361                                                                   gint mode,
362                                                                   const gchar *track_id,
363                                                                   GSList * timed_values);
364
365 G_GNUC_INTERNAL void ges_base_xml_formatter_set_timeline_properties(GESBaseXmlFormatter * self,
366                                                                     GESTimeline *timeline,
367                                                                     const gchar *properties,
368                                                                     const gchar *metadatas);
369 G_GNUC_INTERNAL void ges_xml_formatter_deinit                       (void);
370
371 G_GNUC_INTERNAL gboolean set_property_foreach                   (GQuark field_id,
372                                                                  const GValue * value,
373                                                                  GObject * object);
374
375 G_GNUC_INTERNAL GstElement * get_element_for_encoding_profile   (GstEncodingProfile *prof,
376                                                                  GstElementFactoryListType type);
377
378 /* Function to initialise GES */
379 G_GNUC_INTERNAL void _init_standard_transition_assets        (void);
380 G_GNUC_INTERNAL void _init_formatter_assets                  (void);
381 G_GNUC_INTERNAL void _deinit_formatter_assets                (void);
382
383 /* Utilities */
384 G_GNUC_INTERNAL gint element_start_compare                (GESTimelineElement * a,
385                                                            GESTimelineElement * b);
386 G_GNUC_INTERNAL gint element_end_compare                  (GESTimelineElement * a,
387                                                            GESTimelineElement * b);
388 G_GNUC_INTERNAL GstElementFactory *
389 ges_get_compositor_factory                                (void);
390
391 G_GNUC_INTERNAL void
392 ges_idle_add (GSourceFunc func, gpointer udata, GDestroyNotify notify);
393
394 G_GNUC_INTERNAL gboolean
395 ges_util_structure_get_clocktime (GstStructure *structure, const gchar *name,
396                                   GstClockTime *val, GESFrameNumber *frames);
397
398
399 /****************************************************
400  *              GESContainer                        *
401  ****************************************************/
402 G_GNUC_INTERNAL void _ges_container_sort_children         (GESContainer *container);
403 G_GNUC_INTERNAL void _ges_container_set_height            (GESContainer * container,
404                                                            guint32 height);
405
406 /****************************************************
407  *                  GESClip                         *
408  ****************************************************/
409 G_GNUC_INTERNAL void              ges_clip_set_layer              (GESClip *clip, GESLayer  *layer);
410 G_GNUC_INTERNAL gboolean          ges_clip_is_moving_from_layer   (GESClip *clip);
411 G_GNUC_INTERNAL void              ges_clip_set_moving_from_layer  (GESClip *clip, gboolean is_moving);
412 G_GNUC_INTERNAL GESTrackElement*  ges_clip_create_track_element   (GESClip *clip, GESTrackType type);
413 G_GNUC_INTERNAL GList*            ges_clip_create_track_elements  (GESClip *clip, GESTrackType type);
414 G_GNUC_INTERNAL gboolean          ges_clip_can_set_inpoint_of_child (GESClip * clip, GESTrackElement * child, GstClockTime inpoint, GError ** error);
415 G_GNUC_INTERNAL gboolean          ges_clip_can_set_max_duration_of_child (GESClip * clip, GESTrackElement * child, GstClockTime max_duration, GError ** error);
416 G_GNUC_INTERNAL gboolean          ges_clip_can_set_active_of_child (GESClip * clip, GESTrackElement * child, gboolean active, GError ** error);
417 G_GNUC_INTERNAL gboolean          ges_clip_can_set_priority_of_child (GESClip * clip, GESTrackElement * child, guint32 priority, GError ** error);
418 G_GNUC_INTERNAL gboolean          ges_clip_can_set_track_of_child (GESClip * clip, GESTrackElement * child, GESTrack * tack, GError ** error);
419 G_GNUC_INTERNAL gboolean          ges_clip_can_set_time_property_of_child (GESClip * clip, GESTrackElement * child, GObject * prop_object, GParamSpec * pspec, const GValue * value, GError ** error);
420 G_GNUC_INTERNAL void              ges_clip_empty_from_track       (GESClip * clip, GESTrack * track);
421
422 /****************************************************
423  *              GESLayer                            *
424  ****************************************************/
425 G_GNUC_INTERNAL gboolean ges_layer_resync_priorities (GESLayer * layer);
426 G_GNUC_INTERNAL void layer_set_priority               (GESLayer * layer, guint priority, gboolean emit);
427
428 /****************************************************
429  *              GESTrackElement                     *
430  ****************************************************/
431 #define         NLE_OBJECT_TRACK_ELEMENT_QUARK                  (g_quark_from_string ("nle_object_track_element_quark"))
432 G_GNUC_INTERNAL gboolean  ges_track_element_set_track           (GESTrackElement * object, GESTrack * track, GError ** error);
433 G_GNUC_INTERNAL void ges_track_element_copy_properties          (GESTimelineElement * element,
434                                                                  GESTimelineElement * elementcopy);
435 G_GNUC_INTERNAL void ges_track_element_set_layer_active         (GESTrackElement *element, gboolean active);
436
437 G_GNUC_INTERNAL void ges_track_element_copy_bindings (GESTrackElement *element,
438                                                       GESTrackElement *new_element,
439                                                       guint64 position);
440
441 G_GNUC_INTERNAL void
442 ges_track_element_set_creator_asset                    (GESTrackElement * self,
443                                                        GESAsset *creator_asset);
444 G_GNUC_INTERNAL GESAsset *
445 ges_track_element_get_creator_asset                    (GESTrackElement * self);
446
447 G_GNUC_INTERNAL void
448 ges_track_element_set_has_internal_source_is_forbidden (GESTrackElement * element);
449
450 G_GNUC_INTERNAL GstElement* ges_source_create_topbin(const gchar* bin_name, GstElement* sub_element, GPtrArray* elements);
451 G_GNUC_INTERNAL void ges_track_set_caps(GESTrack* track,
452     const GstCaps* caps);
453 G_GNUC_INTERNAL GstElement * ges_track_get_composition (GESTrack *track);
454
455
456 /*********************************************
457  *  GESTrackElement subclasses contructores  *
458  ********************************************/
459 G_GNUC_INTERNAL GESAudioTestSource * ges_audio_test_source_new (void);
460 G_GNUC_INTERNAL GESAudioUriSource  * ges_audio_uri_source_new  (gchar *uri);
461 G_GNUC_INTERNAL GESVideoUriSource  * ges_video_uri_source_new  (gchar *uri);
462 G_GNUC_INTERNAL GESImageSource     * ges_image_source_new      (gchar *uri);
463 G_GNUC_INTERNAL GESTitleSource     * ges_title_source_new      (void);
464 G_GNUC_INTERNAL GESVideoTestSource * ges_video_test_source_new (void);
465
466 /****************************************************
467  *                GESBaseEffect                     *
468  ****************************************************/
469 G_GNUC_INTERNAL gchar *
470 ges_base_effect_get_time_property_name        (GESBaseEffect * effect,
471                                                GObject * child,
472                                                GParamSpec * pspec);
473 G_GNUC_INTERNAL GHashTable *
474 ges_base_effect_get_time_property_values      (GESBaseEffect * effect);
475 G_GNUC_INTERNAL GstClockTime
476 ges_base_effect_translate_source_to_sink_time (GESBaseEffect * effect,
477                                                GstClockTime time,
478                                                GHashTable * time_property_values);
479 G_GNUC_INTERNAL GstClockTime
480 ges_base_effect_translate_sink_to_source_time (GESBaseEffect * effect,
481                                                GstClockTime time,
482                                                GHashTable * time_property_values);
483
484 /****************************************************
485  *              GESTimelineElement                  *
486  ****************************************************/
487 typedef enum
488 {
489   GES_CLIP_IS_MOVING = (1 << 0),
490   GES_TIMELINE_ELEMENT_SET_SIMPLE = (1 << 1),
491 } GESTimelineElementFlags;
492
493 G_GNUC_INTERNAL GESTimelineElement * ges_timeline_element_peak_toplevel (GESTimelineElement * self);
494 G_GNUC_INTERNAL gdouble ges_timeline_element_get_media_duration_factor(GESTimelineElement *self);
495 G_GNUC_INTERNAL GESTimelineElement * ges_timeline_element_get_copied_from (GESTimelineElement *self);
496 G_GNUC_INTERNAL GESTimelineElementFlags ges_timeline_element_flags (GESTimelineElement *self);
497 G_GNUC_INTERNAL void                ges_timeline_element_set_flags (GESTimelineElement *self, GESTimelineElementFlags flags);
498 G_GNUC_INTERNAL gboolean            ges_timeline_element_add_child_property_full (GESTimelineElement *self,
499                                                                                   GESTimelineElement *owner,
500                                                                                   GParamSpec *pspec,
501                                                                                   GObject *child);
502
503 G_GNUC_INTERNAL GObject *           ges_timeline_element_get_child_from_child_property (GESTimelineElement * self,
504                                                                                         GParamSpec * pspec);
505 G_GNUC_INTERNAL GParamSpec **       ges_timeline_element_get_children_properties (GESTimelineElement * self,
506                                                                                   guint * n_properties);
507
508 #define ELEMENT_FLAGS(obj)             (ges_timeline_element_flags (GES_TIMELINE_ELEMENT(obj)))
509 #define ELEMENT_SET_FLAG(obj,flag)     (ges_timeline_element_set_flags(GES_TIMELINE_ELEMENT(obj), (ELEMENT_FLAGS(obj) | (flag))))
510 #define ELEMENT_UNSET_FLAG(obj,flag)   (ges_timeline_element_set_flags(GES_TIMELINE_ELEMENT(obj), (ELEMENT_FLAGS(obj) & ~(flag))))
511 #define ELEMENT_FLAG_IS_SET(obj,flag)  ((ELEMENT_FLAGS (obj) & (flag)) == (flag))
512
513 /******************************
514  *  GESMultiFile internal API *
515  ******************************/
516 typedef struct GESMultiFileURI
517 {
518   gchar *location;
519   gint start;
520   gint end;
521 } GESMultiFileURI;
522
523 G_GNUC_INTERNAL GESMultiFileURI * ges_multi_file_uri_new (const gchar * uri);
524
525 /******************************
526  *  GESUriSource internal API *
527  ******************************/
528 G_GNUC_INTERNAL gboolean
529 ges_video_uri_source_get_natural_size(GESVideoSource* source, gint* width, gint* height);
530
531 /**********************************
532  *  GESTestClipAsset internal API *
533  **********************************/
534 G_GNUC_INTERNAL gboolean ges_test_clip_asset_get_natural_size (GESAsset *self,
535                                                                gint *width,
536                                                                gint *height);
537 G_GNUC_INTERNAL gchar *ges_test_source_asset_check_id         (GType type, const gchar *id,
538                                                                GError **error);
539
540 /************************
541  * Our property masks   *
542  ************************/
543 #define GES_PARAM_NO_SERIALIZATION (1 << (G_PARAM_USER_SHIFT + 1))
544
545 /*******************************
546  * GESMarkerList serialization *
547  *******************************/
548
549
550 G_GNUC_INTERNAL gchar * ges_marker_list_serialize (const GValue * v);
551 G_GNUC_INTERNAL gboolean ges_marker_list_deserialize (GValue *dest, const gchar *s);
552
553 /********************
554  *  Gnonlin helpers *
555  ********************/
556
557 G_GNUC_INTERNAL gboolean ges_nle_composition_add_object (GstElement *comp, GstElement *object);
558 G_GNUC_INTERNAL gboolean ges_nle_composition_remove_object (GstElement *comp, GstElement *object);
559 G_GNUC_INTERNAL gboolean ges_nle_object_commit (GstElement * nlesource, gboolean recurse);
560
561 G_END_DECLS