| GStreamer Editing Services 0.10.0.2 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#include <ges/ges.h>
GESFormatter;
GESFormatterClass;
gboolean (*GESFormatterLoadFromURIMethod) (GESFormatter *formatter,
GESTimeline *timeline,
gchar *uri);
gboolean (*GESFormatterSaveToURIMethod) (GESFormatter *formatter,
GESTimeline *timeline,
gchar *uri);
GESFormatter * ges_default_formatter_new (void);
gboolean ges_formatter_load_from_uri (GESFormatter *formatter,
GESTimeline *timeline,
gchar *uri);
gboolean ges_formatter_save_to_uri (GESFormatter *formatter,
GESTimeline *timeline,
gchar *uri);
GESFormatter * ges_formatter_new_for_uri (gchar *uri);
gboolean ges_formatter_can_load_uri (gchar *uri);
gboolean ges_formatter_can_save_uri (gchar *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.
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.
GObjectClass |
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 |
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.
|
a GESFormatter |
|
a GESTimeline |
|
the URI to load from |
Returns : |
TRUE if the timeline was properly loaded from the given uri,
else FALSE.
|
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.
|
a GESFormatter |
|
a GESTimeline |
|
the URI to save to |
Returns : |
TRUE if the timeline was properly stored to the given uri,
else FALSE.
|
GESFormatter * ges_default_formatter_new (void);
Creates a new instance of the default GESFormatter type on this system (currently GESKeyfileFormatter).
Returns : |
a GESFormatter instance or NULL |
gboolean ges_formatter_load_from_uri (GESFormatter *formatter,GESTimeline *timeline,gchar *uri);
Load data from the given URI into timeline.
|
a GESFormatter |
|
a GESTimeline |
|
a gchar * pointing to a URI |
Returns : |
TRUE if the timeline data was successfully loaded from the URI, else FALSE. |
gboolean ges_formatter_save_to_uri (GESFormatter *formatter,GESTimeline *timeline,gchar *uri);
Save data from timeline to the given URI.
|
a GESFormatter |
|
a GESTimeline |
|
a gchar * pointing to a URI |
Returns : |
TRUE if the timeline data was successfully saved to the URI else FALSE. |
GESFormatter * ges_formatter_new_for_uri (gchar *uri);
Creates a GESFormatter that can handle the given URI.
|
a gchar * pointing to the uri |
Returns : |
A GESFormatter that can load the given uri, or NULL if the uri is not supported. |
gboolean ges_formatter_can_load_uri (gchar *uri);
Checks if there is a GESFormatter available which can load a GESTimeline from the given URI.
|
a gchar * pointing to the URI |
Returns : |
TRUE if there is a GESFormatter that can support the given uri or FALSE if not. |
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.
|
a gchar * pointing to a URI |
Returns : |
TRUE if the given uri is supported, else FALSE.
|