GESUriClipAsset: GStreamer Editing Services 1.10.4 Reference Manual

## GESUriClipAsset GESUriClipAsset — A GESAsset subclass specialized in GESUriClip extraction |

## Functions

GType | ges_uri_clip_asset_get_type ()
GstClockTime | ges_uri_clip_asset_get_duration ()
gboolean | ges_uri_clip_asset_is_image ()
GstDiscovererInfo * | ges_uri_clip_asset_get_info ()
void | ges_uri_clip_asset_new ()
GESUriClipAsset * | ges_uri_clip_asset_request_sync ()
const GList * | ges_uri_clip_asset_get_stream_assets ()
void | ges_uri_clip_asset_class_set_timeout ()

## Types and Values

| GESUriClipAsset

## Object Hierarchy

        GObject
        ╰── GESAsset
            ╰── GESClipAsset
                ╰── GESUriClipAsset

## Implemented Interfaces

GESUriClipAsset implements GAsyncInitable, GInitable and GESMetaContainer.

## Includes

    #include <ges/ges.h>

## Description

The GESUriClipAsset is a special GESAsset that lets you handle the media file to use inside the GStreamer Editing Services. It has APIs that let you get information about the medias. Also, the tags found in the media file are set as Metadatas of the Asser.

## Functions

### ges_uri_clip_asset_get_type ()

    GType
    ges_uri_clip_asset_get_type (void);

### ges_uri_clip_asset_get_duration ()

    GstClockTime
    ges_uri_clip_asset_get_duration (GESUriClipAsset *self);

Gets duration of the file represented by `self`

#### Parameters

self | a GESUriClipAsset |

#### Returns

The duration of `self`

### ges_uri_clip_asset_is_image ()

    gboolean
    ges_uri_clip_asset_is_image (GESUriClipAsset *self);

Gets Whether the file represented by `self` is an image or not

#### Parameters

self | a indent: Standard input:311: Error:Unexpected end of file GESUriClipAsset |

#### Returns

Whether the file represented by `self` is an image or not

### ges_uri_clip_asset_get_info ()

    GstDiscovererInfo *
    ges_uri_clip_asset_get_info (const GESUriClipAsset *self);

Gets GstDiscovererInfo about the file

#### Parameters

self | Target asset |

#### Returns

GstDiscovererInfo of specified asset.

[transfer none]

### ges_uri_clip_asset_new ()

    void
    ges_uri_clip_asset_new (const gchar *uri,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

Creates a GESUriClipAsset for `uri`

Example of request of a GESUriClipAsset:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    // The request callback
    static void
    filesource_asset_loaded_cb (GESAsset * source, GAsyncResult * res, gpointer user_data)
    {
      GError *error = NULL;
      GESUriClipAsset *filesource_asset;

      filesource_asset = GES_URI_CLIP_ASSET (ges_asset_request_finish (res, &error));
      if (filesource_asset) {
       g_print ("The file: %s is usable as a FileSource, it is%s an image and lasts %" GST_TIME_FORMAT,
           ges_asset_get_id (GES_ASSET (filesource_asset))
           ges_uri_clip_asset_is_image (filesource_asset) ? "" : " not",
           GST_TIME_ARGS (ges_uri_clip_asset_get_duration (filesource_asset));
      } else {
       g_print ("The file: %s is *not* usable as a FileSource because: %s",
           ges_asset_get_id (source), error->message);
      }

      gst_object_unref (mfs);
    }

    // The request:
    ges_uri_clip_asset_new (uri, (GAsyncReadyCallback) filesource_asset_loaded_cb, user_data);

#### Parameters

uri | The URI of the file for which to create a GESUriClipAsset |
cancellable | optional `GCancellable` object, `NULL` to ignore. |
callback | a GAsyncReadyCallback to call when the initialization is finished. | [scope async]
user_data | The user data to pass when `callback` is called |

### ges_uri_clip_asset_request_sync ()

    GESUriClipAsset *
    ges_uri_clip_asset_request_sync (const gchar *uri,
                                     GError **error);

Creates a GESUriClipAsset for `uri` syncronously. You should avoid to use it in application, and rather create GESUriClipAsset asynchronously

#### Parameters

uri | The URI of the file for which to create a GESUriClipAsset. You can also use multi file uris for GESMultiFileSource. |
error | An error to be set in case something wrong happens or `NULL`. | [allow-none]

#### Returns

A reference to the requested asset or `NULL` if an error happened.

[transfer none][nullable]

### ges_uri_clip_asset_get_stream_assets ()

    const GList *
    ges_uri_clip_asset_get_stream_assets (GESUriClipAsset *self);

Get the GESUriSourceAsset `self` containes

#### Parameters

self | A GESUriClipAsset |

#### Returns

a GList of GESUriSourceAsset.

[transfer none][element-type GESUriSourceAsset]

### ges_uri_clip_asset_class_set_timeout ()

    void
    ges_uri_clip_asset_class_set_timeout (GESUriClipAssetClass *klass,
                                          GstClockTime timeout);

Sets the timeout of GESUriClipAsset loading

#### Parameters

klass | The GESUriClipAssetClass on which to set the discoverer timeout |
timeout | The timeout to set |

## Types and Values

### GESUriClipAsset

    typedef struct _GESUriClipAsset GESUriClipAsset;