Move LAYER_HEIGHT definition from -timeline-layer.c c to -internal.h
[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 #ifndef __GES_INTERNAL_H__
22 #define __GES_INTERNAL_H__
23
24 #include <gst/gst.h>
25 #include <gio/gio.h>
26
27 #include "ges-timeline.h"
28 #include "ges-track-object.h"
29
30 #include "ges-asset.h"
31 #include "ges-base-xml-formatter.h"
32
33 GST_DEBUG_CATEGORY_EXTERN (_ges_debug);
34 #define GST_CAT_DEFAULT _ges_debug
35
36 #define LAYER_HEIGHT 1000
37
38 G_GNUC_INTERNAL gboolean
39 timeline_ripple_object         (GESTimeline *timeline, GESTrackObject *obj,
40                                     GList * layers, GESEdge edge,
41                                     guint64 position);
42
43 G_GNUC_INTERNAL gboolean
44 timeline_slide_object          (GESTimeline *timeline, GESTrackObject *obj,
45                                     GList * layers, GESEdge edge, guint64 position);
46
47 G_GNUC_INTERNAL gboolean
48 timeline_roll_object           (GESTimeline *timeline, GESTrackObject *obj,
49                                     GList * layers, GESEdge edge, guint64 position);
50
51 G_GNUC_INTERNAL gboolean
52 timeline_trim_object           (GESTimeline *timeline, GESTrackObject * object,
53                                     GList * layers, GESEdge edge, guint64 position);
54 G_GNUC_INTERNAL gboolean
55 ges_timeline_trim_object_simple (GESTimeline * timeline, GESTrackObject * obj,
56                                  GList * layers, GESEdge edge, guint64 position, gboolean snapping);
57
58 G_GNUC_INTERNAL gboolean
59 ges_timeline_move_object_simple (GESTimeline * timeline, GESTrackObject * object,
60                                  GList * layers, GESEdge edge, guint64 position);
61
62 G_GNUC_INTERNAL gboolean
63 timeline_move_object           (GESTimeline *timeline, GESTrackObject * object,
64                                     GList * layers, GESEdge edge, guint64 position);
65
66 G_GNUC_INTERNAL gboolean
67 timeline_context_to_layer      (GESTimeline *timeline, gint offset);
68
69 G_GNUC_INTERNAL void
70 ges_asset_cache_init (void);
71
72 G_GNUC_INTERNAL void
73 ges_asset_set_id (GESAsset *asset, const gchar *id);
74
75 G_GNUC_INTERNAL void
76 ges_asset_cache_put (GESAsset * asset, GSimpleAsyncResult *res);
77
78 G_GNUC_INTERNAL gboolean
79 ges_asset_cache_set_loaded(GType extractable_type, const gchar * id, GError *error);
80
81 GESAsset*
82 ges_asset_cache_lookup(GType extractable_type, const gchar * id);
83
84 gboolean
85 ges_asset_set_proxy (GESAsset *asset, const gchar *new_id);
86
87 G_GNUC_INTERNAL gboolean
88 ges_asset_request_id_update (GESAsset *asset, gchar **proposed_id,
89     GError *error);
90
91 /* GESExtractable internall methods
92  *
93  * FIXME Check if that should be public later
94  */
95 G_GNUC_INTERNAL GType
96 ges_extractable_type_get_asset_type              (GType type);
97
98 G_GNUC_INTERNAL gchar *
99 ges_extractable_type_check_id                    (GType type, const gchar *id, GError **error);
100
101 G_GNUC_INTERNAL GParameter *
102 ges_extractable_type_get_parameters_from_id      (GType type, const gchar *id,
103                                                   guint *n_params);
104 G_GNUC_INTERNAL GType
105 ges_extractable_get_real_extractable_type_for_id (GType type, const gchar * id);
106
107 G_GNUC_INTERNAL gboolean
108 ges_extractable_register_metas                   (GType extractable_type, GESAsset *asset);
109
110 /************************************************
111  *                                              *
112  *        GESFormatter internal methods         *
113  *                                              *
114  ************************************************/
115 G_GNUC_INTERNAL void
116 ges_formatter_set_project                        (GESFormatter *formatter,
117                                                   GESProject *project);
118 G_GNUC_INTERNAL GESProject *
119 ges_formatter_get_project                        (GESFormatter *formatter);
120 G_GNUC_INTERNAL  GESAsset *
121 _find_formatter_asset_for_uri                    (const gchar *uri);
122
123
124
125 /************************************************
126  *                                              *
127  *        GESProject internal methods           *
128  *                                              *
129  ************************************************/
130
131 /* FIXME This should probably become public, but we need to make sure it
132  * is the right API before doing so */
133 G_GNUC_INTERNAL  gboolean ges_project_set_loaded                  (GESProject * project,
134                                                                    GESFormatter *formatter);
135 G_GNUC_INTERNAL  gchar * ges_project_try_updating_id              (GESProject *self,
136                                                                    GESAsset *asset,
137                                                                    GError *error);
138
139 /************************************************
140  *                                              *
141  *   GESBaseXmlFormatter internal methods       *
142  *                                              *
143  ************************************************/
144
145 /* FIXME GESBaseXmlFormatter is all internal for now, the API is not stable
146  * fo now, so do not expose it */
147 G_GNUC_INTERNAL void ges_base_xml_formatter_add_timeline_object (GESBaseXmlFormatter * self,
148                                                                  const gchar *id,
149                                                                  const char *asset_id,
150                                                                  GType type,
151                                                                  GstClockTime start,
152                                                                  GstClockTime inpoint,
153                                                                  GstClockTime duration,
154                                                                  gdouble rate,
155                                                                  guint layer_prio,
156                                                                  GESTrackType track_types,
157                                                                  GstStructure *properties,
158                                                                  const gchar *metadatas,
159                                                                  GError **error);
160 G_GNUC_INTERNAL void ges_base_xml_formatter_add_asset        (GESBaseXmlFormatter * self,
161                                                                  const gchar * id,
162                                                                  GType extractable_type,
163                                                                  GstStructure *properties,
164                                                                  const gchar *metadatas,
165                                                                  GError **error);
166 G_GNUC_INTERNAL void ges_base_xml_formatter_add_layer           (GESBaseXmlFormatter *self,
167                                                                  GType extractable_type,
168                                                                  guint priority,
169                                                                  GstStructure *properties,
170                                                                  const gchar *metadatas,
171                                                                  GError **error);
172 G_GNUC_INTERNAL void ges_base_xml_formatter_add_track           (GESBaseXmlFormatter *self,
173                                                                  GESTrackType track_type,
174                                                                  GstCaps *caps,
175                                                                  const gchar *id,
176                                                                  GstStructure *properties,
177                                                                  const gchar *metadatas,
178                                                                  GError **error);
179 void ges_base_xml_formatter_add_encoding_profile               (GESBaseXmlFormatter * self,
180                                                                  const gchar *type,
181                                                                  const gchar *parent,
182                                                                  const gchar * name,
183                                                                  const gchar * description,
184                                                                  GstCaps * format,
185                                                                  const gchar * preset,
186                                                                  const gchar * preset_name,
187                                                                  guint id,
188                                                                  guint presence,
189                                                                  GstCaps * restriction,
190                                                                  guint pass,
191                                                                  gboolean variableframerate,
192                                                                  GstStructure * properties,
193                                                                  GError ** error);
194 G_GNUC_INTERNAL void ges_base_xml_formatter_add_track_object    (GESBaseXmlFormatter *self,
195                                                                  GType effect_type,
196                                                                  const gchar *asset_id,
197                                                                  const gchar * track_id,
198                                                                  const gchar *timeline_obj_id,
199                                                                  GstStructure *children_properties,
200                                                                  GstStructure *properties,
201                                                                  const gchar *metadatas,
202                                                                  GError **error);
203 G_GNUC_INTERNAL void set_property_foreach                       (GQuark field_id,
204                                                                  const GValue * value,
205                                                                  GObject * object);;
206
207 /* Function to initialise GES */
208 G_GNUC_INTERNAL void _init_standard_transition_assets        (void);
209 G_GNUC_INTERNAL void _init_formatter_assets                  (void);
210
211 #endif /* __GES_INTERNAL_H__ */