command-line-formatter: Stop uselessly looping over options
[platform/upstream/gstreamer.git] / ges / ges-uri-asset.h
1 /* GStreamer Editing Services
2  *
3  * Copyright (C) 2012 Thibault Saunier <thibault.saunier@collabora.com>
4  * Copyright (C) 2012 Volodymyr Rudyi <vladimir.rudoy@gmail.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #pragma once
23
24 #include <glib-object.h>
25 #include <gio/gio.h>
26 #include <ges/ges-types.h>
27 #include <ges/ges-asset.h>
28 #include <ges/ges-source-clip-asset.h>
29 #include <ges/ges-track-element-asset.h>
30
31 G_BEGIN_DECLS
32 #define GES_TYPE_URI_CLIP_ASSET ges_uri_clip_asset_get_type()
33 GES_DECLARE_TYPE(UriClipAsset, uri_clip_asset, URI_CLIP_ASSET);
34
35 struct _GESUriClipAsset
36 {
37   GESSourceClipAsset parent;
38
39   /* <private> */
40   GESUriClipAssetPrivate *priv;
41
42   /* Padding for API extension */
43   gpointer __ges_reserved[GES_PADDING];
44 };
45
46 struct _GESUriClipAssetClass
47 {
48   GESSourceClipAssetClass parent_class;
49
50   /* <private> */
51   GstDiscoverer *discoverer; /* Unused */
52   GstDiscoverer *sync_discoverer; /* Unused */
53
54   void (*discovered) (GstDiscoverer * discoverer, /* Unused */
55                       GstDiscovererInfo * info,
56                       GError * err,
57                       gpointer user_data);
58
59   gpointer _ges_reserved[GES_PADDING -1];
60 };
61
62 GES_API
63 GstDiscovererInfo *ges_uri_clip_asset_get_info      (const GESUriClipAsset * self);
64 GES_API
65 GstClockTime ges_uri_clip_asset_get_duration        (GESUriClipAsset *self);
66 GES_API
67 GstClockTime ges_uri_clip_asset_get_max_duration    (GESUriClipAsset *self);
68 GES_API
69 gboolean ges_uri_clip_asset_is_image                (GESUriClipAsset *self);
70 GES_API
71 void ges_uri_clip_asset_new                         (const gchar *uri,
72                                                      GCancellable *cancellable,
73                                                      GAsyncReadyCallback callback,
74                                                      gpointer user_data);
75 GES_API
76 GESUriClipAsset * ges_uri_clip_asset_finish (GAsyncResult * res, GError ** error);
77 GES_API
78 GESUriClipAsset* ges_uri_clip_asset_request_sync    (const gchar *uri, GError **error);
79 GES_API
80 void ges_uri_clip_asset_class_set_timeout           (GESUriClipAssetClass *klass,
81                                                      GstClockTime timeout);
82 GES_API
83 const GList * ges_uri_clip_asset_get_stream_assets  (GESUriClipAsset *self);
84
85 #define GES_TYPE_URI_SOURCE_ASSET ges_uri_source_asset_get_type()
86 GES_DECLARE_TYPE(UriSourceAsset, uri_source_asset, URI_SOURCE_ASSET);
87
88 /**
89  * GESUriSourceAsset:
90  *
91  * Asset to create a stream specific #GESSource for a media file.
92  *
93  * NOTE: You should never request such a #GESAsset as they will be created automatically
94  * by #GESUriClipAsset-s.
95  */
96 struct _GESUriSourceAsset
97 {
98   GESTrackElementAsset parent;
99
100   /* <private> */
101   GESUriSourceAssetPrivate *priv;
102
103   /* Padding for API extension */
104   gpointer __ges_reserved[GES_PADDING];
105 };
106
107 struct _GESUriSourceAssetClass
108 {
109   GESTrackElementAssetClass parent_class;
110
111   gpointer _ges_reserved[GES_PADDING];
112 };
113 GES_API
114 GstDiscovererStreamInfo * ges_uri_source_asset_get_stream_info     (GESUriSourceAsset *asset);
115 GES_API
116 const gchar * ges_uri_source_asset_get_stream_uri                  (GESUriSourceAsset *asset);
117 GES_API
118 const GESUriClipAsset *ges_uri_source_asset_get_filesource_asset   (GESUriSourceAsset *asset);
119 GES_API
120 gboolean ges_uri_source_asset_is_image                             (GESUriSourceAsset *asset);
121
122 G_END_DECLS