# GESExtractable Interface

A GObject that implements the GESExtractable interface can be extracted from a GESAsset using ges_asset_extract.

Each extractable type will have its own way of interpreting the id of an asset (or, if it is associated with a specific subclass of GESAsset, the asset subclass may handle the interpretation of the id). By default, the requested asset id will be ignored by a GESExtractable and will be set to the type name of the extractable instead. Also by default, when the requested asset is extracted, the returned object will simply be a newly created default object of that extractable type. You should check the documentation for each extractable type to see if they differ from the default.

After the object is extracted, it will have a reference to the asset it came from, which you can retrieve using ges_extractable_get_asset.

## GESExtractable

## GES.Extractable

### Methods

#### ges_extractable_get_asset

    GESAsset *
    ges_extractable_get_asset (GESExtractable * self)

Get the asset that has been set on the extractable object.

Parameters:

`self` –

A GESExtractable

Returns ( [transfer: none][nullable]) –

The asset set on self, or NULL if no asset has been set.

deprecated : 1.30: Use ges_extractable_get_asset_full() instead for MT-safety.

#### GES.Extractable.prototype.get_asset

    function GES.Extractable.prototype.get_asset(): {
        // javascript wrapper for 'ges_extractable_get_asset'
    }

Get the asset that has been set on the extractable object.

Parameters:

`self` (GES.Extractable) –

A GES.Extractable

Returns (GES.Asset) –

The asset set on self, or null if no asset has been set.

deprecated : 1.30: Use ges_extractable_get_asset_full() instead for MT-safety.

#### GES.Extractable.get_asset

    def GES.Extractable.get_asset (self):
        #python wrapper for 'ges_extractable_get_asset'

Get the asset that has been set on the extractable object.

Parameters:

`self` (GES.Extractable) –

A GES.Extractable

Returns (GES.Asset) –

The asset set on self, or None if no asset has been set.

deprecated : 1.30: Use ges_extractable_get_asset_full() instead for MT-safety.

#### ges_extractable_get_asset_full

    GESAsset *
    ges_extractable_get_asset_full (GESExtractable * self)

Get the asset that has been set on the extractable object.

Parameters:

`self` –

A GESExtractable

Returns ( [transfer: full][nullable]) –

The asset set on self, or NULL if no asset has been set.

Since : 1.30

#### GES.Extractable.prototype.get_asset_full

    function GES.Extractable.prototype.get_asset_full(): {
        // javascript wrapper for 'ges_extractable_get_asset_full'
    }

Get the asset that has been set on the extractable object.

Parameters:

`self` (GES.Extractable) –

A GES.Extractable

Returns (GES.Asset) –

The asset set on self, or null if no asset has been set.

Since : 1.30

#### GES.Extractable.get_asset_full

    def GES.Extractable.get_asset_full (self):
        #python wrapper for 'ges_extractable_get_asset_full'

Get the asset that has been set on the extractable object.

Parameters:

`self` (GES.Extractable) –

A GES.Extractable

Returns (GES.Asset) –

The asset set on self, or None if no asset has been set.

Since : 1.30

#### ges_extractable_get_id

    gchar *
    ges_extractable_get_id (GESExtractable * self)

Gets the id of some associated asset. It may be the case that the object has no set asset, or even that such an asset does not yet exist in the GES cache. Instead, this will return the asset id that is compatible with the current state of the object, as determined by the GESExtractable implementer. If it was indeed extracted from an asset, this should return the same as its corresponding asset id.

Parameters:

`self` –

A GESExtractable

Returns ( [transfer: full]) –

The id of some associated GESAsset that is compatible with self's current state.

#### GES.Extractable.prototype.get_id

    function GES.Extractable.prototype.get_id(): {
        // javascript wrapper for 'ges_extractable_get_id'
    }

Gets the id of some associated asset. It may be the case that the object has no set asset, or even that such an asset does not yet exist in the GES cache. Instead, this will return the asset id that is compatible with the current state of the object, as determined by the GES.Extractable implementer. If it was indeed extracted from an asset, this should return the same as its corresponding asset id.

Parameters:

`self` (GES.Extractable) –

A GES.Extractable

Returns (String) –

The id of some associated GES.Asset that is compatible with self's current state.

#### GES.Extractable.get_id

    def GES.Extractable.get_id (self):
        #python wrapper for 'ges_extractable_get_id'

Gets the id of some associated asset. It may be the case that the object has no set asset, or even that such an asset does not yet exist in the GES cache. Instead, this will return the asset id that is compatible with the current state of the object, as determined by the GES.Extractable implementer. If it was indeed extracted from an asset, this should return the same as its corresponding asset id.

Parameters:

`self` (GES.Extractable) –

A GES.Extractable

Returns (str) –

The id of some associated GES.Asset that is compatible with self's current state.

#### ges_extractable_set_asset

    gboolean
    ges_extractable_set_asset (GESExtractable * self,
                               GESAsset * asset)

Sets the asset for this extractable object.

When an object is extracted from an asset using ges_asset_extract its asset will be automatically set. Note that many classes that implement GESExtractable will automatically create their objects using assets when you call their new methods. However, you can use this method to associate an object with a compatible asset if it was created by other means and does not yet have an asset. Or, for some implementations of GESExtractable, you can use this to change the asset of the given extractable object, which will lead to a change in its state to match the new asset id.

Parameters:

`self` –

A GESExtractable

`asset` ( [transfer: none]) –

The asset to set

Returns –

TRUE if asset could be successfully set on self.

#### GES.Extractable.prototype.set_asset

    function GES.Extractable.prototype.set_asset(asset: GES.Asset): {
        // javascript wrapper for 'ges_extractable_set_asset'
    }

Sets the asset for this extractable object.

When an object is extracted from an asset using GES.Asset.prototype.extract its asset will be automatically set. Note that many classes that implement GES.Extractable will automatically create their objects using assets when you call their new methods. However, you can use this method to associate an object with a compatible asset if it was created by other means and does not yet have an asset. Or, for some implementations of GES.Extractable, you can use this to change the asset of the given extractable object, which will lead to a change in its state to match the new asset id.

Parameters:

`self` (GES.Extractable) –

A GES.Extractable

`asset` (GES.Asset) –

The asset to set

Returns (Number) –

true if asset could be successfully set on self.

#### GES.Extractable.set_asset

    def GES.Extractable.set_asset (self, asset):
        #python wrapper for 'ges_extractable_set_asset'

Sets the asset for this extractable object.

When an object is extracted from an asset using GES.Asset.extract its asset will be automatically set. Note that many classes that implement GES.Extractable will automatically create their objects using assets when you call their new methods. However, you can use this method to associate an object with a compatible asset if it was created by other means and does not yet have an asset. Or, for some implementations of GES.Extractable, you can use this to change the asset of the given extractable object, which will lead to a change in its state to match the new asset id.

Parameters:

`self` (GES.Extractable) –

A GES.Extractable

`asset` (GES.Asset) –

The asset to set

Returns (bool) –

True if asset could be successfully set on self.

### Virtual Methods

#### get_id

    gchar *
    get_id (GESExtractable * self)

The method to fetch the id of some associated asset. Note that it may be the case that the object does not have its asset set, or even that an asset with such an id does not exist in the GES cache. Instead, this should return the id that is compatible with the current state of the object. The default implementation simply returns the currently set asset ID, or the type name of the object, which is what is used as the id by default, if no asset is set.

Parameters:

`self` –
No description available
Returns –
No description available

#### vfunc_get_id

    function vfunc_get_id(self: GES.Extractable): {
        // javascript implementation of the 'get_id' virtual method
    }

The method to fetch the id of some associated asset. Note that it may be the case that the object does not have its asset set, or even that an asset with such an id does not exist in the GES cache. Instead, this should return the id that is compatible with the current state of the object. The default implementation simply returns the currently set asset ID, or the type name of the object, which is what is used as the id by default, if no asset is set.

Parameters:

`self` (GES.Extractable) –
No description available
Returns (String) –
No description available

#### do_get_id

    def do_get_id (self):
        #python implementation of the 'get_id' virtual method

The method to fetch the id of some associated asset. Note that it may be the case that the object does not have its asset set, or even that an asset with such an id does not exist in the GES cache. Instead, this should return the id that is compatible with the current state of the object. The default implementation simply returns the currently set asset ID, or the type name of the object, which is what is used as the id by default, if no asset is set.

Parameters:

`self` (GES.Extractable) –
No description available
Returns (str) –
No description available

#### set_asset

    set_asset (GESExtractable * self,
               GESAsset * asset)

This method is called after the GESAsset of an object is set. If your class supports the asset of an object changing, then you can use this method to change the parameters of the object to match the new asset id. If setting the asset should be able to fail, you should implement set_asset_full instead.

Parameters:

`self` –
No description available
`asset` –
No description available

#### vfunc_set_asset

    function vfunc_set_asset(self: GES.Extractable, asset: GES.Asset): {
        // javascript implementation of the 'set_asset' virtual method
    }

This method is called after the GES.Asset of an object is set. If your class supports the asset of an object changing, then you can use this method to change the parameters of the object to match the new asset id. If setting the asset should be able to fail, you should implement set_asset_full instead.

Parameters:

`self` (GES.Extractable) –
No description available
`asset` (GES.Asset) –
No description available

#### do_set_asset

    def do_set_asset (self, asset):
        #python implementation of the 'set_asset' virtual method

This method is called after the GES.Asset of an object is set. If your class supports the asset of an object changing, then you can use this method to change the parameters of the object to match the new asset id. If setting the asset should be able to fail, you should implement set_asset_full instead.

Parameters:

`self` (GES.Extractable) –
No description available
`asset` (GES.Asset) –
No description available

#### set_asset_full

    gboolean
    set_asset_full (GESExtractable * self,
                    GESAsset * asset)

Like set_asset, but also allows you to return FALSE to indicate a failure to change the object in response to a change in its asset.

Parameters:

`self` –
No description available
`asset` –
No description available
Returns –
No description available

#### vfunc_set_asset_full

    function vfunc_set_asset_full(self: GES.Extractable, asset: GES.Asset): {
        // javascript implementation of the 'set_asset_full' virtual method
    }

Like set_asset, but also allows you to return false to indicate a failure to change the object in response to a change in its asset.

Parameters:

`self` (GES.Extractable) –
No description available
`asset` (GES.Asset) –
No description available
Returns (Number) –
No description available

#### do_set_asset_full

    def do_set_asset_full (self, asset):
        #python implementation of the 'set_asset_full' virtual method

Like set_asset, but also allows you to return False to indicate a failure to change the object in response to a change in its asset.

Parameters:

`self` (GES.Extractable) –
No description available
`asset` (GES.Asset) –
No description available
Returns (bool) –
No description available

## Function Macros

### GES_EXTRACTABLE_GET_INTERFACE

    #define GES_EXTRACTABLE_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GES_TYPE_EXTRACTABLE, GESExtractableInterface))

## Callbacks

### GESExtractableCheckId

    gchar *
    (*GESExtractableCheckId) (GType type,
                              const gchar * id,
                              GError ** error)

Method for checking that an ID is valid for the given GESExtractable type. If the given ID is considered valid, it can be adjusted into some standard and returned to prevent the creation of separate GESAsset-s, with different id, that would otherwise act the same.

Returns (transfer full) (nullable): The actual id to set on any corresponding assets, based on id, or NULL if id is not valid.

Parameters:

`type` –

The GESExtractable type to check id for

`id` –

The ID to check

`error` –

An error that can be set if needed

Returns –
No description available

### GES.ExtractableCheckId

    function GES.ExtractableCheckId(type: GObject.Type, id: String): {
        // javascript wrapper for 'GESExtractableCheckId'
    }

Method for checking that an ID is valid for the given GES.Extractable type. If the given ID is considered valid, it can be adjusted into some standard and returned to prevent the creation of separate GES.Asset-s, with different id, that would otherwise act the same.

Returns (transfer full) (nullable): The actual id to set on any corresponding assets, based on id, or null if id is not valid.

Parameters:

`type` (GObject.Type) –

The GES.Extractable type to check id for

`id` (String) –

The ID to check

Returns (String) –
No description available

### GES.ExtractableCheckId

    def GES.ExtractableCheckId (type, id):
        #python wrapper for 'GESExtractableCheckId'

Method for checking that an ID is valid for the given GES.Extractable type. If the given ID is considered valid, it can be adjusted into some standard and returned to prevent the creation of separate GES.Asset-s, with different id, that would otherwise act the same.

Returns (transfer full) (nullable): The actual id to set on any corresponding assets, based on id, or None if id is not valid.

Parameters:

`type` (GObject.Type) –

The GES.Extractable type to check id for

`id` (str) –

The ID to check

Returns (str) –
No description available

The results of the search are