summaryrefslogtreecommitdiff
path: root/ges/ges-formatter.h
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@collabora.com>2012-12-17 19:26:23 -0300
committerThibault Saunier <thibault.saunier@collabora.com>2012-12-19 18:59:50 -0300
commit66abaa40d4beaa018b3f2ad69c8a6b7c2ce90cf0 (patch)
tree6f7961b01475459406f0d05f160431050c0714d6 /ges/ges-formatter.h
parenta89683f06ab7cb1febe7b436f4895e2949a54f5f (diff)
formatter: Make it work with GESProject
+ Compile new GESProject code The formatter and projects should work together, and the user will in the end not need the GESFormatter API in most cases. Start making that happening Update the GESPitiviFormatter to the new behaviour and remove APIs that became obselete API: + Adds: * Pass the GESFormatterClass to can_load/save_uri vmethods * Add an @overwrite argumenent to ges_formatter_save_to_uri and the corresponding vmethod * Add name, description, extension, mimetype, version, rank metadatas to GESFormatterClass + Removes: * ges_pitivi_formatter_set_sources: * ges_pitivi_formatter_get_sources:
Diffstat (limited to 'ges/ges-formatter.h')
-rw-r--r--ges/ges-formatter.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/ges/ges-formatter.h b/ges/ges-formatter.h
index b4159f58..da649274 100644
--- a/ges/ges-formatter.h
+++ b/ges/ges-formatter.h
@@ -56,14 +56,15 @@ struct _GESFormatter {
GESFormatterPrivate *priv;
/*< protected >*/
+ GESProject *project;
GESTimeline *timeline;
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];
};
-typedef gboolean (*GESFormatterCanLoadURIMethod) (const gchar * uri, GError **error);
-typedef gboolean (*GESFormatterCanSaveURIMethod) (const gchar * uri, GError **error);
+typedef gboolean (*GESFormatterCanLoadURIMethod) (GESFormatterClass *class, const gchar * uri, GError **error);
+typedef gboolean (*GESFormatterCanSaveURIMethod) (GESFormatterClass *class, const gchar * uri, GError **error);
/**
* GESFormatterLoadFromURIMethod:
@@ -88,6 +89,7 @@ typedef gboolean (*GESFormatterLoadFromURIMethod) (GESFormatter *formatter,
* @formatter: a #GESFormatter
* @timeline: a #GESTimeline
* @uri: the URI to save to
+ * @overwrite: Whether the file should be overwritten in case it exists
*
* Virtual method for saving a timeline to a uri.
*
@@ -97,8 +99,8 @@ typedef gboolean (*GESFormatterLoadFromURIMethod) (GESFormatter *formatter,
* else FALSE.
*/
typedef gboolean (*GESFormatterSaveToURIMethod) (GESFormatter *formatter,
- GESTimeline *timeline,
- const gchar * uri, GError **error);
+ GESTimeline *timeline, const gchar * uri, gboolean overwrite,
+ GError **error);
/**
* GESFormatterClass:
@@ -121,10 +123,14 @@ struct _GESFormatterClass {
GESFormatterLoadFromURIMethod load_from_uri;
GESFormatterSaveToURIMethod save_to_uri;
- /*< private >*/
- /* FIXME : formatter name */
- /* FIXME : formatter description */
- /* FIXME : format name/mime-type */
+ /* < private > */
+ const gchar *name;
+ const gchar *description;
+ const gchar *extension;
+ const gchar *mimetype;
+ gdouble version;
+ GstRank rank;
+
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];
@@ -132,7 +138,14 @@ struct _GESFormatterClass {
GType ges_formatter_get_type (void);
-/* Main Formatter methods */
+void ges_formatter_class_register_metas (GESFormatterClass * class,
+ const gchar *name,
+ const gchar *description,
+ const gchar *extension,
+ const gchar *mimetype,
+ gdouble version,
+ GstRank rank);
+
gboolean ges_formatter_can_load_uri (const gchar * uri, GError **error);
gboolean ges_formatter_can_save_uri (const gchar * uri, GError **error);
@@ -144,6 +157,9 @@ gboolean ges_formatter_load_from_uri (GESFormatter * formatter,
gboolean ges_formatter_save_to_uri (GESFormatter * formatter,
GESTimeline *timeline,
const gchar *uri,
+ gboolean overwrite,
GError **error);
+GESAsset *ges_formatter_get_default (void);
+
#endif /* _GES_FORMATTER */