mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
ges: Implement GESAsset
+ Generate the documentation Note: Do not compile (add to Makefile.am) for now as we are missing pieces at that point Co-Authored-By: Thibault Saunier <thibault.saunier@collabora.com>
This commit is contained in:
parent
9209b3f69d
commit
55ddfebb64
9 changed files with 1202 additions and 26 deletions
|
@ -47,6 +47,7 @@ platform as well as Windows. It is released under the GNU Library General Public
|
|||
<xi:include href="xml/ges-track-effect.xml"/>
|
||||
<xi:include href="xml/ges-track-operation.xml"/>
|
||||
<xi:include href="xml/ges-timeline-transition.xml"/>
|
||||
<xi:include href="xml/ges-asset.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
|
|
|
@ -297,6 +297,7 @@ GES_TYPE_TIMELINE
|
|||
GESTimelineLayer
|
||||
GESTimelineLayerClass
|
||||
ges_timeline_layer_add_object
|
||||
ges_timeline_layer_add_asset
|
||||
ges_timeline_layer_new
|
||||
ges_timeline_layer_remove_object
|
||||
ges_timeline_layer_set_priority
|
||||
|
@ -796,19 +797,10 @@ GESFormatterLoadedMethod
|
|||
ges_default_formatter_new
|
||||
ges_formatter_load_from_uri
|
||||
ges_formatter_save_to_uri
|
||||
ges_formatter_new_for_uri
|
||||
ges_formatter_can_load_uri
|
||||
ges_formatter_can_save_uri
|
||||
ges_formatter_update_source_uri
|
||||
ges_formatter_load
|
||||
ges_formatter_save
|
||||
ges_formatter_set_data
|
||||
ges_formatter_clear_data
|
||||
ges_formatter_get_data
|
||||
GESFormatterCanLoadURIMethod
|
||||
GESFormatterCanSaveURIMethod
|
||||
GESFormatterLoadMethod
|
||||
GESFormatterSaveMethod
|
||||
<SUBSECTION>
|
||||
ges_formatter_emit_loaded
|
||||
<SUBSECTION Standard>
|
||||
|
@ -823,22 +815,6 @@ ges_formatter_get_type
|
|||
GESFormatterPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>ges-keyfile-formatter</FILE>
|
||||
<TITLE>GESKeyFileFormatter</TITLE>
|
||||
GESKeyfileFormatter
|
||||
ges_keyfile_formatter_new
|
||||
<SUBSECTION Standard>
|
||||
GESKeyfileFormatterClass
|
||||
GES_IS_KEYFILE_FORMATTER
|
||||
GES_IS_KEYFILE_FORMATTER_CLASS
|
||||
GES_KEYFILE_FORMATTER
|
||||
GES_KEYFILE_FORMATTER_CLASS
|
||||
GES_KEYFILE_FORMATTER_GET_CLASS
|
||||
GES_TYPE_KEYFILE_FORMATTER
|
||||
ges_keyfile_formatter_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>ges-pitivi-formatter</FILE>
|
||||
<TITLE>GESPitiviFormatter</TITLE>
|
||||
|
@ -951,3 +927,25 @@ GES_META_CONTAINER_GET_INTERFACE
|
|||
GES_TYPE_META_CONTAINER
|
||||
ges_meta_container_get_ype
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>ges-asset</FILE>
|
||||
<TITLE>GESAsset</TITLE>
|
||||
GESAsset
|
||||
ges_asset_get_extractable_type
|
||||
ges_asset_get_id
|
||||
ges_asset_request
|
||||
ges_asset_request_async
|
||||
ges_asset_request_finish
|
||||
ges_asset_extract
|
||||
ges_list_assets
|
||||
<SUBSECTION Standard>
|
||||
GESAssetPrivate
|
||||
GES_ASSET
|
||||
GES_TYPE_ASSET
|
||||
GES_ASSET_CLASS
|
||||
GES_IS_ASSET
|
||||
GES_IS_ASSET_CLASS
|
||||
GES_ASSET_GET_CLASS
|
||||
ges_asset_get_type
|
||||
</SECTION>
|
||||
|
|
|
@ -94,7 +94,8 @@ libges_@GST_API_VERSION@include_HEADERS = \
|
|||
ges-utils.h
|
||||
|
||||
noinst_HEADERS = \
|
||||
ges-internal.h
|
||||
ges-internal.h \
|
||||
ges-internal-enums.h
|
||||
|
||||
libges_@GST_API_VERSION@_la_CFLAGS = -I$(top_srcdir) $(GST_PBUTILS_CFLAGS) \
|
||||
$(GST_VIDEO_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
|
||||
|
|
1008
ges/ges-asset.c
Normal file
1008
ges/ges-asset.c
Normal file
File diff suppressed because it is too large
Load diff
98
ges/ges-asset.h
Normal file
98
ges/ges-asset.h
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* GStreamer Editing Services
|
||||
*
|
||||
* Copyright (C) 2012 Thibault Saunier <thibault.saunier@collabora.com>
|
||||
* Copyright (C) 2012 Volodymyr Rudyi <vladimir.rudoy@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GES_ASSET_
|
||||
#define _GES_ASSET_
|
||||
|
||||
#include "ges-internal-enums.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-types.h>
|
||||
#include <ges/ges-enums.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
#define GES_TYPE_ASSET ges_asset_get_type()
|
||||
#define GES_ASSET(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_ASSET, GESAsset))
|
||||
#define GES_ASSET_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_ASSET, GESAssetClass))
|
||||
#define GES_IS_ASSET(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_ASSET))
|
||||
#define GES_IS_ASSET_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_ASSET))
|
||||
#define GES_ASSET_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_ASSET, GESAssetClass))
|
||||
|
||||
typedef struct _GESAssetPrivate GESAssetPrivate;
|
||||
|
||||
GType ges_asset_get_type (void);
|
||||
|
||||
struct _GESAsset
|
||||
{
|
||||
GObject parent;
|
||||
|
||||
/* <private> */
|
||||
GESAssetPrivate *priv;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
struct _GESAssetClass
|
||||
{
|
||||
GObjectClass parent;
|
||||
|
||||
GESAssetLoadingReturn (*start_loading) (GESAsset *self,
|
||||
GError **error);
|
||||
GESExtractable* (*extract) (GESAsset *self,
|
||||
GError **error);
|
||||
/* Let subclasses know that we proxied an asset */
|
||||
void (*inform_proxy) (GESAsset *self,
|
||||
const gchar *proxy_id);
|
||||
/* Ask subclasses for a new ID for @self when the asset failed loading
|
||||
* This function returns %FALSE when the ID could be updated or %TRUE
|
||||
* otherwize */
|
||||
gboolean (*request_id_update) (GESAsset *self,
|
||||
gchar **proposed_new_id,
|
||||
GError *error) ;
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
GType ges_asset_get_extractable_type (GESAsset * self);
|
||||
void ges_asset_request_async (GType extractable_type,
|
||||
const gchar * id,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
GESAsset * ges_asset_request (GType extractable_type,
|
||||
const gchar * id,
|
||||
GError **error);
|
||||
const gchar * ges_asset_get_id (GESAsset* self);
|
||||
GESAsset * ges_asset_request_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
GESExtractable * ges_asset_extract (GESAsset * self,
|
||||
GError **error);
|
||||
GList * ges_list_assets (GType filter);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* _GES_ASSET */
|
31
ges/ges-internal-enums.h
Normal file
31
ges/ges-internal-enums.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/* GStreamer Editing Services
|
||||
*
|
||||
* Copyright (C) 2012 Thibault Saunier <thibault.saunier@collabora.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GES_INTERNAL_ENUMS_H__
|
||||
#define __GES_INTERNAL_ENUMS_H__
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GES_ASSET_LOADING_ERROR,
|
||||
GES_ASSET_LOADING_ASYNC,
|
||||
GES_ASSET_LOADING_OK
|
||||
} GESAssetLoadingReturn;
|
||||
|
||||
#endif /* __GES_INTERNAL_ENUMS_H__ */
|
|
@ -22,9 +22,15 @@
|
|||
#define __GES_INTERNAL_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "ges-timeline.h"
|
||||
#include "ges-track-object.h"
|
||||
|
||||
#if 0
|
||||
#include "ges-asset.h"
|
||||
#endif
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (_ges_debug);
|
||||
#define GST_CAT_DEFAULT _ges_debug
|
||||
|
||||
|
@ -59,4 +65,27 @@ timeline_move_object (GESTimeline *timeline, GESTrackObject * object,
|
|||
gboolean
|
||||
timeline_context_to_layer (GESTimeline *timeline, gint offset);
|
||||
|
||||
#if 0
|
||||
G_GNUC_INTERNAL void
|
||||
ges_asset_cache_init (void);
|
||||
|
||||
G_GNUC_INTERNAL void
|
||||
ges_asset_set_id (GESAsset *asset, const gchar *id);
|
||||
|
||||
G_GNUC_INTERNAL void
|
||||
ges_asset_cache_put (GESAsset * asset, GSimpleAsyncResult *res);
|
||||
|
||||
G_GNUC_INTERNAL gboolean
|
||||
ges_asset_cache_set_loaded(GType extractable_type, const gchar * id, GError *error);
|
||||
|
||||
GESAsset*
|
||||
ges_asset_cache_lookup(GType extractable_type, const gchar * id);
|
||||
|
||||
gboolean
|
||||
ges_asset_set_proxy (GESAsset *asset, const gchar *new_id);
|
||||
|
||||
G_GNUC_INTERNAL gboolean
|
||||
ges_asset_request_id_update (GESAsset *asset, gchar **proposed_id,
|
||||
GError *error);
|
||||
#endif
|
||||
#endif /* __GES_INTERNAL_H__ */
|
||||
|
|
|
@ -140,4 +140,9 @@ typedef struct _GESKeyfileFormatterClass GESKeyfileFormatterClass;
|
|||
typedef struct _GESPitiviFormatter GESPitiviFormatter;
|
||||
typedef struct _GESPitiviFormatterClass GESPitiviFormatterClass;
|
||||
|
||||
#if 0
|
||||
typedef struct _GESAsset GESAsset;
|
||||
typedef struct _GESAssetClass GESAssetClass;
|
||||
#endif
|
||||
|
||||
#endif /* __GES_TYPES_H__ */
|
||||
|
|
|
@ -45,6 +45,9 @@
|
|||
#include <ges/ges-timeline-effect.h>
|
||||
#include <ges/ges-timeline-file-source.h>
|
||||
#include <ges/ges-screenshot.h>
|
||||
#if 0
|
||||
#include <ges/ges-asset.h>
|
||||
#endif
|
||||
|
||||
#include <ges/ges-track.h>
|
||||
#include <ges/ges-track-object.h>
|
||||
|
@ -79,6 +82,8 @@ gboolean ges_init (void);
|
|||
void ges_version (guint * major, guint * minor, guint * micro,
|
||||
guint * nano);
|
||||
|
||||
#define GES_ERROR_DOMAIN g_quark_from_static_string("GES")
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GES_H__ */
|
||||
|
|
Loading…
Reference in a new issue