GESFormatter

GESFormatter

GObject
    ╰──GInitiallyUnowned
        ╰──GESFormatter
            ╰──GESBaseXmlFormatter
            ╰──GESCommandLineFormatter
            ╰──GESPitiviFormatter

Base class for timeline data serialization and deserialization.

Members

parent (GInitiallyUnowned) –
No description available

Class structure

GESFormatterClass

GES Formatter class. Override the vmethods to implement the formatter functionnality.

Fields
parent_class (GInitiallyUnownedClass) –

the parent class structure

can_load_uri (GESFormatterCanLoadURIMethod) –

Whether the URI can be loaded

load_from_uri (GESFormatterLoadFromURIMethod) –

class method to deserialize data from a URI

save_to_uri (GESFormatterSaveToURIMethod) –

class method to serialize data to a URI


Class Methods

ges_formatter_class_register_metas

ges_formatter_class_register_metas (GESFormatterClass * klass,
                                    const gchar * name,
                                    const gchar * description,
                                    const gchar * extensions,
                                    const gchar * caps,
                                    gdouble version,
                                    GstRank rank)

Parameters:

klass

The class to register metas on

name

The name of the formatter

description

The formatter description

extensions

A list of coma separated file extensions handled by the formatter. The order of the extensions should match the list of the structures inside caps

caps

The caps the formatter handled, they should match what gstreamer typefind mechanism will report for the files the formatter handles.

version

The version of the formatter

rank

The rank of the formatter


Functions

ges_formatter_can_load_uri

gboolean
ges_formatter_can_load_uri (const gchar * uri,
                            GError ** error)

Checks if there is a GESFormatter available which can load a GESTimeline from the given URI.

Parameters:

uri

a gchar * pointing to the URI

error

A GError that will be set in case of error

Returns

TRUE if there is a GESFormatter that can support the given uri or FALSE if not.


ges_formatter_can_save_uri

gboolean
ges_formatter_can_save_uri (const gchar * uri,
                            GError ** error)

Returns TRUE if there is a GESFormatter available which can save a GESTimeline to the given URI.

Parameters:

uri

a gchar * pointing to a URI

error

A GError that will be set in case of error

Returns

TRUE if the given uri is supported, else FALSE.


ges_formatter_get_default

GESAsset *
ges_formatter_get_default ()

Get the default GESAsset to use as formatter. It will return the asset for the GESFormatter that has the highest rank

Returns ( [transfer: none])

The GESAsset for the formatter with highest rank


Virtual Methods

can_load_uri

gboolean
can_load_uri (GESFormatter * dummy_instance,
              const gchar * uri,
              GError ** error)

Whether the URI can be loaded

Parameters:

dummy_instance
No description available
uri
No description available
error
No description available
Returns
No description available

load_from_uri

gboolean
load_from_uri (GESFormatter * formatter,
               GESTimeline * timeline,
               const gchar * uri,
               GError ** error)

class method to deserialize data from a URI

Parameters:

formatter
No description available
timeline
No description available
uri
No description available
error
No description available
Returns
No description available

save_to_uri

gboolean
save_to_uri (GESFormatter * formatter,
             GESTimeline * timeline,
             const gchar * uri,
             gboolean overwrite,
             GError ** error)

class method to serialize data to a URI

Parameters:

formatter
No description available
timeline
No description available
uri
No description available
overwrite
No description available
error
No description available
Returns
No description available

Functions

ges_find_formatter_for_uri

GESAsset *
ges_find_formatter_for_uri (const gchar * uri)

Get the best formatter for uri. It tries to find a formatter compatible with uri extension, if none is found, it returns the default formatter asset.

Parameters:

uri
No description available
Returns ( [transfer: none])

The GESAsset for the best formatter to save to uri

Since : 1.18


Constants

GES_TYPE_FORMATTER

#define GES_TYPE_FORMATTER ges_formatter_get_type()

Callbacks

GESFormatterCanLoadURIMethod

gboolean
(*GESFormatterCanLoadURIMethod) (GESFormatter * dummy_instance,
                                 const gchar * uri,
                                 GError ** error)

Parameters:

dummy_instance
No description available
uri
No description available
error
No description available
Returns
No description available

GESFormatterLoadFromURIMethod

gboolean
(*GESFormatterLoadFromURIMethod) (GESFormatter * formatter,
                                  GESTimeline * timeline,
                                  const gchar * uri,
                                  GError ** error)

Virtual method for loading a timeline from a given URI.

Every GESFormatter subclass needs to implement this method.

Parameters:

formatter

a GESFormatter

timeline

a GESTimeline

uri

the URI to load from

error

An error to be set in case something wrong happens or NULL

Returns

TRUE if the timeline was properly loaded from the given uri, else FALSE.


GESFormatterSaveToURIMethod

gboolean
(*GESFormatterSaveToURIMethod) (GESFormatter * formatter,
                                GESTimeline * timeline,
                                const gchar * uri,
                                gboolean overwrite,
                                GError ** error)

Virtual method for saving a timeline to a uri.

Every GESFormatter subclass needs to implement this method.

Parameters:

formatter

a GESFormatter

timeline

a GESTimeline

uri

the URI to save to

overwrite

Whether the file should be overwritten in case it exists

error

An error to be set in case something wrong happens or NULL

Returns

TRUE if the timeline was properly stored to the given uri, else FALSE.


Subpages:

ges xml formatter

The results of the search are