Top | ![]() |
![]() |
![]() |
![]() |
gboolean | (*GESFormatterLoadFromURIMethod) () |
gboolean | (*GESFormatterSaveToURIMethod) () |
GESFormatter * | ges_default_formatter_new () |
gboolean | ges_formatter_load_from_uri () |
gboolean | ges_formatter_save_to_uri () |
GESFormatter * | ges_formatter_new_for_uri () |
gboolean | ges_formatter_can_load_uri () |
gboolean | ges_formatter_can_save_uri () |
The GESFormatter is the object responsible for loading and/or saving the contents of a GESTimeline to/from various formats.
In order to save a GESTimeline, you can either let GES pick a default formatter by
using ges_timeline_save_to_uri()
, or pick your own formatter and use
ges_formatter_save_to_uri()
.
To load a GESTimeline, you might want to be able to track the progress of the loading,
in which case you should create an empty GESTimeline, connect to the relevant signals
and call ges_formatter_load_from_uri()
.
If you do not care about tracking the loading progress, you can use the convenience
ges_timeline_new_from_uri()
method.
Support for saving or loading new formats can be added by creating a subclass of GESFormatter and implement the various vmethods of GESFormatterClass.
gboolean (*GESFormatterLoadFromURIMethod) (GESFormatter *formatter
,GESTimeline *timeline
,gchar *uri
);
Virtual method for loading a timeline from a given URI.
Every GESFormatter subclass needs to implement this method.
gboolean (*GESFormatterSaveToURIMethod) (GESFormatter *formatter
,GESTimeline *timeline
,gchar *uri
);
Virtual method for saving a timeline to a uri.
Every GESFormatter subclass needs to implement this method.
GESFormatter *
ges_default_formatter_new (void
);
Creates a new instance of the default GESFormatter type on this system (currently GESKeyfileFormatter).
gboolean ges_formatter_load_from_uri (GESFormatter *formatter
,GESTimeline *timeline
,gchar *uri
);
Load data from the given URI into timeline.
gboolean ges_formatter_save_to_uri (GESFormatter *formatter
,GESTimeline *timeline
,gchar *uri
);
Save data from timeline to the given URI.
GESFormatter *
ges_formatter_new_for_uri (gchar *uri
);
Creates a GESFormatter that can handle the given URI.
gboolean
ges_formatter_can_load_uri (gchar *uri
);
Checks if there is a GESFormatter available which can load a GESTimeline from the given URI.
gboolean
ges_formatter_can_save_uri (gchar *uri
);
Returns TRUE if there is a GESFormatter available which can save a GESTimeline to the given URI.
typedef struct _GESFormatter GESFormatter;
Base class for timeline data serialization and deserialization.
typedef struct { GObjectClass parent_class; /* FIXME : formatter name */ /* FIXME : formatter description */ /* FIXME : format name/mime-type */ GESFormatterCanLoadURIMethod can_load_uri; GESFormatterCanSaveURIMethod can_save_uri; GESFormatterLoadFromURIMethod load_from_uri; GESFormatterSaveToURIMethod save_to_uri; } GESFormatterClass;
GES Formatter class. Override the vmethods to implement the formatter functionnality.
the parent class structure |
||
Whether the URI can be loaded |
||
Whether the URI can be saved |
||
GESFormatterLoadFromURIMethod |
class method to deserialize data from a URI |
|
GESFormatterSaveToURIMethod |
class method to serialize data to a URI |