1 /* GStreamer Editing Services
2 * Copyright (C) 2009 Edward Hervey <edward.hervey@collabora.co.uk>
3 * 2009 Nokia Corporation
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.
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.
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.
21 #ifndef __GES_INTERNAL_H__
22 #define __GES_INTERNAL_H__
27 #include "ges-timeline.h"
28 #include "ges-track-object.h"
30 #include "ges-asset.h"
31 #include "ges-base-xml-formatter.h"
33 GST_DEBUG_CATEGORY_EXTERN (_ges_debug);
34 #define GST_CAT_DEFAULT _ges_debug
36 #define LAYER_HEIGHT 1000
38 G_GNUC_INTERNAL gboolean
39 timeline_ripple_object (GESTimeline *timeline, GESTrackObject *obj,
40 GList * layers, GESEdge edge,
43 G_GNUC_INTERNAL gboolean
44 timeline_slide_object (GESTimeline *timeline, GESTrackObject *obj,
45 GList * layers, GESEdge edge, guint64 position);
47 G_GNUC_INTERNAL gboolean
48 timeline_roll_object (GESTimeline *timeline, GESTrackObject *obj,
49 GList * layers, GESEdge edge, guint64 position);
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);
58 G_GNUC_INTERNAL gboolean
59 ges_timeline_move_object_simple (GESTimeline * timeline, GESTrackObject * object,
60 GList * layers, GESEdge edge, guint64 position);
62 G_GNUC_INTERNAL gboolean
63 timeline_move_object (GESTimeline *timeline, GESTrackObject * object,
64 GList * layers, GESEdge edge, guint64 position);
66 G_GNUC_INTERNAL gboolean
67 timeline_context_to_layer (GESTimeline *timeline, gint offset);
70 ges_asset_cache_init (void);
73 ges_asset_set_id (GESAsset *asset, const gchar *id);
76 ges_asset_cache_put (GESAsset * asset, GSimpleAsyncResult *res);
78 G_GNUC_INTERNAL gboolean
79 ges_asset_cache_set_loaded(GType extractable_type, const gchar * id, GError *error);
82 ges_asset_cache_lookup(GType extractable_type, const gchar * id);
85 ges_asset_set_proxy (GESAsset *asset, const gchar *new_id);
87 G_GNUC_INTERNAL gboolean
88 ges_asset_request_id_update (GESAsset *asset, gchar **proposed_id,
91 /* GESExtractable internall methods
93 * FIXME Check if that should be public later
96 ges_extractable_type_get_asset_type (GType type);
98 G_GNUC_INTERNAL gchar *
99 ges_extractable_type_check_id (GType type, const gchar *id, GError **error);
101 G_GNUC_INTERNAL GParameter *
102 ges_extractable_type_get_parameters_from_id (GType type, const gchar *id,
104 G_GNUC_INTERNAL GType
105 ges_extractable_get_real_extractable_type_for_id (GType type, const gchar * id);
107 G_GNUC_INTERNAL gboolean
108 ges_extractable_register_metas (GType extractable_type, GESAsset *asset);
110 /************************************************
112 * GESFormatter internal methods *
114 ************************************************/
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);
125 /************************************************
127 * GESProject internal methods *
129 ************************************************/
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,
139 /************************************************
141 * GESBaseXmlFormatter internal methods *
143 ************************************************/
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,
149 const char *asset_id,
152 GstClockTime inpoint,
153 GstClockTime duration,
156 GESTrackType track_types,
157 GstStructure *properties,
158 const gchar *metadatas,
160 G_GNUC_INTERNAL void ges_base_xml_formatter_add_asset (GESBaseXmlFormatter * self,
162 GType extractable_type,
163 GstStructure *properties,
164 const gchar *metadatas,
166 G_GNUC_INTERNAL void ges_base_xml_formatter_add_layer (GESBaseXmlFormatter *self,
167 GType extractable_type,
169 GstStructure *properties,
170 const gchar *metadatas,
172 G_GNUC_INTERNAL void ges_base_xml_formatter_add_track (GESBaseXmlFormatter *self,
173 GESTrackType track_type,
176 GstStructure *properties,
177 const gchar *metadatas,
179 void ges_base_xml_formatter_add_encoding_profile (GESBaseXmlFormatter * self,
183 const gchar * description,
185 const gchar * preset,
186 const gchar * preset_name,
189 GstCaps * restriction,
191 gboolean variableframerate,
192 GstStructure * properties,
194 G_GNUC_INTERNAL void ges_base_xml_formatter_add_track_object (GESBaseXmlFormatter *self,
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,
203 G_GNUC_INTERNAL void set_property_foreach (GQuark field_id,
204 const GValue * value,
207 /* Function to initialise GES */
208 G_GNUC_INTERNAL void _init_standard_transition_assets (void);
209 G_GNUC_INTERNAL void _init_formatter_assets (void);
211 #endif /* __GES_INTERNAL_H__ */