mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 18:35:35 +00:00
Rename GESTimelineFileSource to GESUriClip
Conflicts: ges/ges-pitivi-formatter.c ges/ges-uri-clip.c tests/check/ges/project.c tests/check/ges/uriclip.c
This commit is contained in:
parent
04a3c49ebd
commit
695c381bb1
39 changed files with 363 additions and 372 deletions
|
@ -17,7 +17,7 @@ LOCAL_SRC_FILES := \
|
||||||
ges-clip.c \
|
ges-clip.c \
|
||||||
ges-timeline-pipeline.c \
|
ges-timeline-pipeline.c \
|
||||||
ges-timeline-source.c \
|
ges-timeline-source.c \
|
||||||
ges-timeline-file-source.c \
|
ges-uri-clip.c \
|
||||||
ges-timeline-operation.c \
|
ges-timeline-operation.c \
|
||||||
ges-timeline-transition.c \
|
ges-timeline-transition.c \
|
||||||
ges-timeline-standard-transition.c \
|
ges-timeline-standard-transition.c \
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Simple:
|
||||||
timeline.add_track(trackv)
|
timeline.add_track(trackv)
|
||||||
timeline.add_layer(self.layer)
|
timeline.add_layer(self.layer)
|
||||||
|
|
||||||
GES.Asset.new_async(GES.TimelineFileSource, uri, None, self.discoveredCb, None)
|
GES.Asset.new_async(GES.UriClip, uri, None, self.discoveredCb, None)
|
||||||
self.loop = GLib.MainLoop()
|
self.loop = GLib.MainLoop()
|
||||||
self.loop.run()
|
self.loop.run()
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Simple:
|
||||||
timeline.add_track(trackv)
|
timeline.add_track(trackv)
|
||||||
timeline.add_layer(layer)
|
timeline.add_layer(layer)
|
||||||
|
|
||||||
src = GES.TimelineFileSource.new(uri=uri)
|
src = GES.UriClip.new(uri=uri)
|
||||||
src.set_start(long(0))
|
src.set_start(long(0))
|
||||||
src.set_duration(long(10 * Gst.SECOND))
|
src.set_duration(long(10 * Gst.SECOND))
|
||||||
print src
|
print src
|
||||||
|
|
|
@ -104,7 +104,7 @@ platform as well as Windows. It is released under the GNU Library General Public
|
||||||
<title>Assets</title>
|
<title>Assets</title>
|
||||||
<xi:include href="xml/ges-asset-clip.xml"/>
|
<xi:include href="xml/ges-asset-clip.xml"/>
|
||||||
<xi:include href="xml/ges-asset-track-object.xml"/>
|
<xi:include href="xml/ges-asset-track-object.xml"/>
|
||||||
<xi:include href="xml/ges-asset-file-source.xml"/>
|
<xi:include href="xml/ges-uri-clip-asset.xml"/>
|
||||||
<xi:include href="xml/ges-asset-track-file-source.xml"/>
|
<xi:include href="xml/ges-asset-track-file-source.xml"/>
|
||||||
<xi:include href="xml/ges-project.xml"/>
|
<xi:include href="xml/ges-project.xml"/>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
|
@ -440,26 +440,26 @@ GES_TYPE_TIMELINE_SOURCE
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>ges-timeline-filesource</FILE>
|
<FILE>ges-timeline-filesource</FILE>
|
||||||
<TITLE>GESTimelineFileSource</TITLE>
|
<TITLE>GESUriClip</TITLE>
|
||||||
GESTimelineFileSource
|
GESUriClip
|
||||||
ges_timeline_filesource_new
|
ges_uri_clip_new
|
||||||
ges_timeline_filesource_get_max_duration
|
ges_uri_clip_get_max_duration
|
||||||
ges_timeline_filesource_get_uri
|
ges_uri_clip_get_uri
|
||||||
ges_timeline_filesource_is_image
|
ges_uri_clip_is_image
|
||||||
ges_timeline_filesource_is_muted
|
ges_uri_clip_is_muted
|
||||||
ges_timeline_filesource_set_is_image
|
ges_uri_clip_set_is_image
|
||||||
ges_timeline_filesource_set_max_duration
|
ges_uri_clip_set_max_duration
|
||||||
ges_timeline_filesource_set_mute
|
ges_uri_clip_set_mute
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GESTimelineFileSourceClass
|
GESUriClipClass
|
||||||
GESTimelineFileSourcePrivate
|
GESUriClipPrivate
|
||||||
ges_timeline_filesource_get_type
|
ges_uri_clip_get_type
|
||||||
GES_IS_TIMELINE_FILE_SOURCE
|
GES_IS_URI_CLIP
|
||||||
GES_IS_TIMELINE_FILE_SOURCE_CLASS
|
GES_IS_URI_CLIP_CLASS
|
||||||
GES_TIMELINE_FILE_SOURCE
|
GES_URI_CLIP
|
||||||
GES_TIMELINE_FILE_SOURCE_CLASS
|
GES_URI_CLIP_CLASS
|
||||||
GES_TIMELINE_FILE_SOURCE_GET_CLASS
|
GES_URI_CLIP_GET_CLASS
|
||||||
GES_TYPE_TIMELINE_FILE_SOURCE
|
GES_TYPE_URI_CLIP
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
|
@ -1017,24 +1017,24 @@ GES_ASSET_TRACK_OBJECT_GET_CLASS
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>ges-asset-file-source</FILE>
|
<FILE>ges-uri-clip-asset</FILE>
|
||||||
<TITLE>GESAssetFileSource</TITLE>
|
<TITLE>GESUriClipAsset</TITLE>
|
||||||
GESAssetFileSource
|
GESUriClipAsset
|
||||||
ges_asset_filesource_get_type
|
ges_uri_clip_asset_get_type
|
||||||
ges_asset_filesource_get_duration
|
ges_uri_clip_asset_get_duration
|
||||||
ges_asset_filesource_is_image
|
ges_uri_clip_asset_is_image
|
||||||
ges_asset_filesource_get_info
|
ges_uri_clip_asset_get_info
|
||||||
ges_asset_filesource_new
|
ges_uri_clip_asset_new
|
||||||
ges_asset_filesource_set_timeout
|
ges_uri_clip_asset_set_timeout
|
||||||
ges_asset_filesource_get_stream_assets
|
ges_uri_clip_asset_get_stream_assets
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GESAssetFileSourcePrivate
|
GESUriClipAssetPrivate
|
||||||
GES_ASSET_FILESOURCE
|
GES_URI_CLIP_ASSET
|
||||||
GES_TYPE_ASSET_FILESOURCE
|
GES_TYPE_URI_CLIP_ASSET
|
||||||
GES_ASSET_FILESOURCE_CLASS
|
GES_URI_CLIP_ASSET_CLASS
|
||||||
GES_IS_ASSET_FILESOURCE
|
GES_IS_URI_CLIP_ASSET
|
||||||
GES_IS_ASSET_FILESOURCE_CLASS
|
GES_IS_URI_CLIP_ASSET_CLASS
|
||||||
GES_ASSET_FILESOURCE_GET_CLASS
|
GES_URI_CLIP_ASSET_GET_CLASS
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
|
|
|
@ -18,7 +18,7 @@ ges_timeline_transition_get_type
|
||||||
ges_timeline_standard_transition_get_type
|
ges_timeline_standard_transition_get_type
|
||||||
ges_timeline_effect_get_type
|
ges_timeline_effect_get_type
|
||||||
ges_timeline_parse_launch_effect_get_type
|
ges_timeline_parse_launch_effect_get_type
|
||||||
ges_timeline_filesource_get_type
|
ges_uri_clip_get_type
|
||||||
ges_timeline_text_overlay_get_type
|
ges_timeline_text_overlay_get_type
|
||||||
ges_timeline_title_source_get_type
|
ges_timeline_title_source_get_type
|
||||||
ges_track_audio_test_source_get_type
|
ges_track_audio_test_source_get_type
|
||||||
|
|
|
@ -21,7 +21,7 @@ libges_@GST_API_VERSION@_la_SOURCES = \
|
||||||
ges-timeline-source.c \
|
ges-timeline-source.c \
|
||||||
ges-timeline-effect.c \
|
ges-timeline-effect.c \
|
||||||
ges-timeline-parse-launch-effect.c \
|
ges-timeline-parse-launch-effect.c \
|
||||||
ges-timeline-file-source.c \
|
ges-uri-clip.c \
|
||||||
ges-timeline-operation.c \
|
ges-timeline-operation.c \
|
||||||
ges-timeline-transition.c \
|
ges-timeline-transition.c \
|
||||||
ges-timeline-standard-transition.c \
|
ges-timeline-standard-transition.c \
|
||||||
|
@ -48,7 +48,7 @@ libges_@GST_API_VERSION@_la_SOURCES = \
|
||||||
ges-formatter.c \
|
ges-formatter.c \
|
||||||
ges-pitivi-formatter.c \
|
ges-pitivi-formatter.c \
|
||||||
ges-asset.c \
|
ges-asset.c \
|
||||||
ges-asset-file-source.c \
|
ges-uri-asset.c \
|
||||||
ges-asset-clip.c \
|
ges-asset-clip.c \
|
||||||
ges-asset-track-object.c \
|
ges-asset-track-object.c \
|
||||||
ges-extractable.c \
|
ges-extractable.c \
|
||||||
|
@ -73,7 +73,7 @@ libges_@GST_API_VERSION@include_HEADERS = \
|
||||||
ges-clip.h \
|
ges-clip.h \
|
||||||
ges-timeline-pipeline.h \
|
ges-timeline-pipeline.h \
|
||||||
ges-timeline-source.h \
|
ges-timeline-source.h \
|
||||||
ges-timeline-file-source.h \
|
ges-uri-clip.h \
|
||||||
ges-timeline-effect.h \
|
ges-timeline-effect.h \
|
||||||
ges-timeline-parse-launch-effect.h \
|
ges-timeline-parse-launch-effect.h \
|
||||||
ges-timeline-operation.h \
|
ges-timeline-operation.h \
|
||||||
|
@ -102,7 +102,7 @@ libges_@GST_API_VERSION@include_HEADERS = \
|
||||||
ges-formatter.h \
|
ges-formatter.h \
|
||||||
ges-pitivi-formatter.h \
|
ges-pitivi-formatter.h \
|
||||||
ges-asset.h \
|
ges-asset.h \
|
||||||
ges-asset-file-source.h \
|
ges-uri-asset.h \
|
||||||
ges-asset-clip.h \
|
ges-asset-clip.h \
|
||||||
ges-asset-track-object.h \
|
ges-asset-track-object.h \
|
||||||
ges-extractable.h \
|
ges-extractable.h \
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* SECTION: ges-asset-clip
|
* SECTION: ges-asset-clip
|
||||||
* @short_description: A GESAsset subclass specialized in GESClip extraction
|
* @short_description: A GESAsset subclass specialized in GESClip extraction
|
||||||
*
|
*
|
||||||
* The #GESAssetFileSource is a special #GESAsset specilized in #GESClip.
|
* The #GESUriClipAsset is a special #GESAsset specilized in #GESClip.
|
||||||
* it is mostly used to get information about the #GESTrackType-s the objects extracted
|
* it is mostly used to get information about the #GESTrackType-s the objects extracted
|
||||||
* from it can potentialy create #GESTrackObject for.
|
* from it can potentialy create #GESTrackObject for.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* The Assets in the GStreamer Editing Services represent the ressources
|
* The Assets in the GStreamer Editing Services represent the ressources
|
||||||
* that can be used. You can create assets for any type that implements the #GESExtractable
|
* that can be used. You can create assets for any type that implements the #GESExtractable
|
||||||
* interface, for example #GESClips, #GESFormatter, and #GESTrackObject do implement it.
|
* interface, for example #GESClips, #GESFormatter, and #GESTrackObject do implement it.
|
||||||
* This means that asssets will represent for example a #GESTimelineFileSources, #GESTrackEffect etc,
|
* This means that asssets will represent for example a #GESUriClips, #GESTrackEffect etc,
|
||||||
* and then you can extract objects of those types with the appropriate parameters from the asset
|
* and then you can extract objects of those types with the appropriate parameters from the asset
|
||||||
* using the #ges_asset_extract method:
|
* using the #ges_asset_extract method:
|
||||||
*
|
*
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
* custom effects. Note that #GESAsset management is making easier thanks to the #GESProject class.
|
* custom effects. Note that #GESAsset management is making easier thanks to the #GESProject class.
|
||||||
*
|
*
|
||||||
* Each asset are represented by a pair of @extractable_type and @id (string). Actually the @extractable_type
|
* Each asset are represented by a pair of @extractable_type and @id (string). Actually the @extractable_type
|
||||||
* is the type that implements the #GESExtractable interface, that means that for example for a #GESTimelineFileSource,
|
* is the type that implements the #GESExtractable interface, that means that for example for a #GESUriClip,
|
||||||
* the type that implements the #GESExtractable interface is #GESClip.
|
* the type that implements the #GESExtractable interface is #GESClip.
|
||||||
* The identifier represents different things depending on the @extractable_type and you should check
|
* The identifier represents different things depending on the @extractable_type and you should check
|
||||||
* the documentation of each type to know what the ID of #GESAsset actually represents for that type. By default,
|
* the documentation of each type to know what the ID of #GESAsset actually represents for that type. By default,
|
||||||
|
@ -698,7 +698,7 @@ ges_asset_get_extractable_type (GESAsset * self)
|
||||||
*
|
*
|
||||||
* Note that it won't be possible to instantiate the first %GESAsset with
|
* Note that it won't be possible to instantiate the first %GESAsset with
|
||||||
* @id depending on the @extractable_type. For example instantiate a
|
* @id depending on the @extractable_type. For example instantiate a
|
||||||
* #GESAsset that extract #GESTimelineFileSource needs to be done async
|
* #GESAsset that extract #GESUriClip needs to be done async
|
||||||
* the first time for a specific ID.
|
* the first time for a specific ID.
|
||||||
*
|
*
|
||||||
* Returns: (transfer full) (allow-none): A reference to the wanted #GESAsset or %NULL
|
* Returns: (transfer full) (allow-none): A reference to the wanted #GESAsset or %NULL
|
||||||
|
@ -789,7 +789,7 @@ done:
|
||||||
* new asset. The class must implement the #GESExtractable interface.
|
* new asset. The class must implement the #GESExtractable interface.
|
||||||
* @id: The Identifier of the asset we want to create. This identifier depends of the extractable,
|
* @id: The Identifier of the asset we want to create. This identifier depends of the extractable,
|
||||||
* type you want. By default it is the name of the class itself (or %NULL), but for example for a
|
* type you want. By default it is the name of the class itself (or %NULL), but for example for a
|
||||||
* GESTrackParseLaunchEffect, it will be the pipeline description, for a GESTimelineFileSource it
|
* GESTrackParseLaunchEffect, it will be the pipeline description, for a GESUriClip it
|
||||||
* will be the name of the file, etc... You should refer to the documentation of the #GESExtractable
|
* will be the name of the file, etc... You should refer to the documentation of the #GESExtractable
|
||||||
* type you want to create a #GESAsset for.
|
* type you want to create a #GESAsset for.
|
||||||
* @cancellable: (allow-none): optional %GCancellable object, %NULL to ignore.
|
* @cancellable: (allow-none): optional %GCancellable object, %NULL to ignore.
|
||||||
|
@ -824,7 +824,7 @@ done:
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* // The request:
|
* // The request:
|
||||||
* ges_asset_request_async (GES_TYPE_TIMELINE_FILE_SOURCE, some_uri, NULL,
|
* ges_asset_request_async (GES_TYPE_URI_CLIP, some_uri, NULL,
|
||||||
* (GAsyncReadyCallback) asset_loaded_cb, user_data);
|
* (GAsyncReadyCallback) asset_loaded_cb, user_data);
|
||||||
* ]|
|
* ]|
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "ges-asset.h"
|
#include "ges-asset.h"
|
||||||
#include "ges-internal.h"
|
#include "ges-internal.h"
|
||||||
#include "ges-extractable.h"
|
#include "ges-extractable.h"
|
||||||
#include "ges-timeline-file-source.h"
|
#include "ges-uri-clip.h"
|
||||||
|
|
||||||
static GQuark ges_asset_key;
|
static GQuark ges_asset_key;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@ static GQuark ges_meta_key;
|
||||||
|
|
||||||
G_DEFINE_INTERFACE_WITH_CODE (GESMetaContainer, ges_meta_container,
|
G_DEFINE_INTERFACE_WITH_CODE (GESMetaContainer, ges_meta_container,
|
||||||
G_TYPE_OBJECT, ges_meta_key =
|
G_TYPE_OBJECT, ges_meta_key =
|
||||||
g_quark_from_static_string ("ges-meta-container-data"););
|
g_quark_from_static_string ("ges-meta-container-data");
|
||||||
|
);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -347,7 +347,7 @@ static GList *
|
||||||
save_sources (GESPitiviFormatter * formatter, GList * layers,
|
save_sources (GESPitiviFormatter * formatter, GList * layers,
|
||||||
xmlTextWriterPtr writer)
|
xmlTextWriterPtr writer)
|
||||||
{
|
{
|
||||||
GList *clipects, *tmp, *tmplayer;
|
GList *clips, *tmp, *tmplayer;
|
||||||
GESTimelineLayer *layer;
|
GESTimelineLayer *layer;
|
||||||
GESPitiviFormatterPrivate *priv = formatter->priv;
|
GESPitiviFormatterPrivate *priv = formatter->priv;
|
||||||
|
|
||||||
|
@ -361,17 +361,16 @@ save_sources (GESPitiviFormatter * formatter, GList * layers,
|
||||||
for (tmplayer = layers; tmplayer; tmplayer = tmplayer->next) {
|
for (tmplayer = layers; tmplayer; tmplayer = tmplayer->next) {
|
||||||
layer = GES_TIMELINE_LAYER (tmplayer->data);
|
layer = GES_TIMELINE_LAYER (tmplayer->data);
|
||||||
|
|
||||||
clipects = ges_timeline_layer_get_objects (layer);
|
clips = ges_timeline_layer_get_objects (layer);
|
||||||
for (tmp = clipects; tmp; tmp = tmp->next) {
|
for (tmp = clips; tmp; tmp = tmp->next) {
|
||||||
SrcMapping *srcmap = g_slice_new0 (SrcMapping);
|
SrcMapping *srcmap = g_slice_new0 (SrcMapping);
|
||||||
GESClip *clip;
|
GESClip *clip;
|
||||||
gchar *uriclip_uri;
|
gchar *uriclip_uri;
|
||||||
clip = tmp->data;
|
clip = tmp->data;
|
||||||
|
|
||||||
if (GES_IS_TIMELINE_FILE_SOURCE (clip)) {
|
if (GES_IS_URI_CLIP (clip)) {
|
||||||
|
|
||||||
uriclip_uri = (gchar *) ges_timeline_filesource_get_uri
|
uriclip_uri = (gchar *) ges_uri_clip_get_uri (GES_URI_CLIP (clip));
|
||||||
(GES_TIMELINE_FILE_SOURCE (clip));
|
|
||||||
|
|
||||||
if (!g_hash_table_lookup (priv->saving_source_table, uriclip_uri)) {
|
if (!g_hash_table_lookup (priv->saving_source_table, uriclip_uri)) {
|
||||||
gchar *strid = g_strdup_printf ("%i", priv->nb_sources);
|
gchar *strid = g_strdup_printf ("%i", priv->nb_sources);
|
||||||
|
@ -391,8 +390,8 @@ save_sources (GESPitiviFormatter * formatter, GList * layers,
|
||||||
source_list = g_list_append (source_list, srcmap);
|
source_list = g_list_append (source_list, srcmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_list_foreach (clipects, (GFunc) g_object_unref, NULL);
|
g_list_foreach (clips, (GFunc) g_object_unref, NULL);
|
||||||
g_list_free (clipects);
|
g_list_free (clips);
|
||||||
g_object_unref (G_OBJECT (layer));
|
g_object_unref (G_OBJECT (layer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -579,8 +578,7 @@ list_sources (GESFormatter * self)
|
||||||
g_hash_table_insert (priv->source_uris, g_strdup (filename),
|
g_hash_table_insert (priv->source_uris, g_strdup (filename),
|
||||||
g_strdup (filename));
|
g_strdup (filename));
|
||||||
if (self->project)
|
if (self->project)
|
||||||
ges_project_create_asset (self->project, filename,
|
ges_project_create_asset (self->project, filename, GES_TYPE_URI_CLIP);
|
||||||
GES_TYPE_TIMELINE_FILE_SOURCE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
xmlXPathFreeObject (xpathObj);
|
xmlXPathFreeObject (xpathObj);
|
||||||
|
@ -852,7 +850,7 @@ make_source (GESFormatter * self, GList * reflist, GHashTable * source_table)
|
||||||
|
|
||||||
gchar *fac_ref = NULL, *media_type = NULL, *filename = NULL, *prio_str;
|
gchar *fac_ref = NULL, *media_type = NULL, *filename = NULL, *prio_str;
|
||||||
GList *tmp = NULL, *keys, *tmp_key;
|
GList *tmp = NULL, *keys, *tmp_key;
|
||||||
GESTimelineFileSource *src = NULL;
|
GESUriClip *src = NULL;
|
||||||
gint prio;
|
gint prio;
|
||||||
gboolean a_avail = FALSE, v_avail = FALSE, video;
|
gboolean a_avail = FALSE, v_avail = FALSE, video;
|
||||||
GHashTable *tckobj_table = priv->track_objects_table;
|
GHashTable *tckobj_table = priv->track_objects_table;
|
||||||
|
@ -906,7 +904,7 @@ make_source (GESFormatter * self, GList * reflist, GHashTable * source_table)
|
||||||
|
|
||||||
filename = (gchar *) g_hash_table_lookup (source_table, "filename");
|
filename = (gchar *) g_hash_table_lookup (source_table, "filename");
|
||||||
|
|
||||||
src = ges_timeline_filesource_new (filename);
|
src = ges_uri_clip_new (filename);
|
||||||
|
|
||||||
if (!video) {
|
if (!video) {
|
||||||
v_avail = TRUE;
|
v_avail = TRUE;
|
||||||
|
|
|
@ -1,90 +0,0 @@
|
||||||
/* GStreamer Editing Services
|
|
||||||
* Copyright (C) 2009 Edward Hervey <edward.hervey@collabora.co.uk>
|
|
||||||
* 2009 Nokia Corporation
|
|
||||||
*
|
|
||||||
* 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., 51 Franklin St, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _GES_TIMELINE_FILESOURCE
|
|
||||||
#define _GES_TIMELINE_FILESOURCE
|
|
||||||
|
|
||||||
#include <glib-object.h>
|
|
||||||
#include <ges/ges-types.h>
|
|
||||||
#include <ges/ges-timeline-source.h>
|
|
||||||
#include <ges/ges-track.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GES_TYPE_TIMELINE_FILE_SOURCE ges_timeline_filesource_get_type()
|
|
||||||
|
|
||||||
#define GES_TIMELINE_FILE_SOURCE(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE_FILE_SOURCE, GESTimelineFileSource))
|
|
||||||
|
|
||||||
#define GES_TIMELINE_FILE_SOURCE_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE_FILE_SOURCE, GESTimelineFileSourceClass))
|
|
||||||
|
|
||||||
#define GES_IS_TIMELINE_FILE_SOURCE(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE_FILE_SOURCE))
|
|
||||||
|
|
||||||
#define GES_IS_TIMELINE_FILE_SOURCE_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE_FILE_SOURCE))
|
|
||||||
|
|
||||||
#define GES_TIMELINE_FILE_SOURCE_GET_CLASS(obj) \
|
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_FILE_SOURCE, GESTimelineFileSourceClass))
|
|
||||||
|
|
||||||
typedef struct _GESTimelineFileSourcePrivate GESTimelineFileSourcePrivate;
|
|
||||||
|
|
||||||
struct _GESTimelineFileSource {
|
|
||||||
GESTimelineSource parent;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
GESTimelineFileSourcePrivate *priv;
|
|
||||||
|
|
||||||
/* Padding for API extension */
|
|
||||||
gpointer _ges_reserved[GES_PADDING];
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GESTimelineFileSourceClass:
|
|
||||||
*/
|
|
||||||
|
|
||||||
struct _GESTimelineFileSourceClass {
|
|
||||||
/*< private >*/
|
|
||||||
GESTimelineSourceClass parent_class;
|
|
||||||
|
|
||||||
/* Padding for API extension */
|
|
||||||
gpointer _ges_reserved[GES_PADDING];
|
|
||||||
};
|
|
||||||
|
|
||||||
GType ges_timeline_filesource_get_type (void);
|
|
||||||
|
|
||||||
void
|
|
||||||
ges_timeline_filesource_set_mute (GESTimelineFileSource * self, gboolean mute);
|
|
||||||
|
|
||||||
void
|
|
||||||
ges_timeline_filesource_set_is_image (GESTimelineFileSource * self,
|
|
||||||
gboolean is_image);
|
|
||||||
|
|
||||||
gboolean ges_timeline_filesource_is_muted (GESTimelineFileSource * self);
|
|
||||||
gboolean ges_timeline_filesource_is_image (GESTimelineFileSource * self);
|
|
||||||
const gchar *ges_timeline_filesource_get_uri (GESTimelineFileSource * self);
|
|
||||||
|
|
||||||
GESTimelineFileSource* ges_timeline_filesource_new (gchar *uri);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* _GES_TIMELINE_FILESOURCE */
|
|
||||||
|
|
|
@ -374,8 +374,8 @@ ges_timeline_pipeline_change_state (GstElement * element,
|
||||||
ret = GST_STATE_CHANGE_FAILURE;
|
ret = GST_STATE_CHANGE_FAILURE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (self->
|
if (self->priv->
|
||||||
priv->mode & (TIMELINE_MODE_RENDER | TIMELINE_MODE_SMART_RENDER))
|
mode & (TIMELINE_MODE_RENDER | TIMELINE_MODE_SMART_RENDER))
|
||||||
GST_DEBUG ("rendering => Updating pipeline caps");
|
GST_DEBUG ("rendering => Updating pipeline caps");
|
||||||
if (!ges_timeline_pipeline_update_caps (self)) {
|
if (!ges_timeline_pipeline_update_caps (self)) {
|
||||||
GST_ERROR_OBJECT (element, "Error setting the caps for rendering");
|
GST_ERROR_OBJECT (element, "Error setting the caps for rendering");
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "ges-internal.h"
|
#include "ges-internal.h"
|
||||||
#include "ges-track-object.h"
|
#include "ges-track-object.h"
|
||||||
#include "ges-track-filesource.h"
|
#include "ges-track-filesource.h"
|
||||||
#include "ges-asset-file-source.h"
|
#include "ges-uri-asset.h"
|
||||||
#include "ges-extractable.h"
|
#include "ges-extractable.h"
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
|
|
|
@ -59,8 +59,8 @@ typedef struct _GESTimelineSourceClass GESTimelineSourceClass;
|
||||||
typedef struct _GESTimelineEffect GESTimelineEffect;
|
typedef struct _GESTimelineEffect GESTimelineEffect;
|
||||||
typedef struct _GESTimelineEffectClass GESTimelineEffectClass;
|
typedef struct _GESTimelineEffectClass GESTimelineEffectClass;
|
||||||
|
|
||||||
typedef struct _GESTimelineFileSource GESTimelineFileSource;
|
typedef struct _GESUriClip GESUriClip;
|
||||||
typedef struct _GESTimelineFileSourceClass GESTimelineFileSourceClass;
|
typedef struct _GESUriClipClass GESUriClipClass;
|
||||||
|
|
||||||
typedef struct _GESTimelineTransition GESTimelineTransition;
|
typedef struct _GESTimelineTransition GESTimelineTransition;
|
||||||
typedef struct _GESTimelineTransitionClass GESTimelineTransitionClass;
|
typedef struct _GESTimelineTransitionClass GESTimelineTransitionClass;
|
||||||
|
@ -146,8 +146,8 @@ typedef struct _GESAssetClass GESAssetClass;
|
||||||
typedef struct _GESAssetClip GESAssetClip;
|
typedef struct _GESAssetClip GESAssetClip;
|
||||||
typedef struct _GESAssetClipClass GESAssetClipClass;
|
typedef struct _GESAssetClipClass GESAssetClipClass;
|
||||||
|
|
||||||
typedef struct _GESAssetFileSource GESAssetFileSource;
|
typedef struct _GESUriClipAsset GESUriClipAsset;
|
||||||
typedef struct _GESAssetFileSourceClass GESAssetFileSourceClass;
|
typedef struct _GESUriClipAssetClass GESUriClipAssetClass;
|
||||||
|
|
||||||
typedef struct _GESAssetTrackObject GESAssetTrackObject;
|
typedef struct _GESAssetTrackObject GESAssetTrackObject;
|
||||||
typedef struct _GESAssetTrackObjectClass GESAssetTrackObjectClass;
|
typedef struct _GESAssetTrackObjectClass GESAssetTrackObjectClass;
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* SECTION: ges-asset-file-source
|
* SECTION: ges-uri-clip-asset
|
||||||
* @short_description: A GESAsset subclass specialized in GESTimelineFileSource extraction
|
* @short_description: A GESAsset subclass specialized in GESUriClip extraction
|
||||||
*
|
*
|
||||||
* The #GESAssetFileSource is a special #GESAsset that lets you handle
|
* The #GESUriClipAsset is a special #GESAsset that lets you handle
|
||||||
* the media file to use inside the GStreamer Editing Services. It has APIs that
|
* 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
|
* let you get information about the medias. Also, the tags found in the media file are
|
||||||
* set as Metadatas of the Asser.
|
* set as Metadatas of the Asser.
|
||||||
|
@ -40,7 +40,7 @@ initable_iface_init (GInitableIface * initable_iface)
|
||||||
initable_iface->init = NULL;
|
initable_iface->init = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GESAssetFileSource, ges_asset_filesource,
|
G_DEFINE_TYPE_WITH_CODE (GESUriClipAsset, ges_uri_clip_asset,
|
||||||
GES_TYPE_ASSET_CLIP,
|
GES_TYPE_ASSET_CLIP,
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init));
|
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init));
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ static GParamSpec *properties[PROP_LAST];
|
||||||
static void discoverer_discovered_cb (GstDiscoverer * discoverer,
|
static void discoverer_discovered_cb (GstDiscoverer * discoverer,
|
||||||
GstDiscovererInfo * info, GError * err, gpointer user_data);
|
GstDiscovererInfo * info, GError * err, gpointer user_data);
|
||||||
|
|
||||||
struct _GESAssetFileSourcePrivate
|
struct _GESUriClipAssetPrivate
|
||||||
{
|
{
|
||||||
GstDiscovererInfo *info;
|
GstDiscovererInfo *info;
|
||||||
GstClockTime duration;
|
GstClockTime duration;
|
||||||
|
@ -70,7 +70,7 @@ struct _GESAssetFileSourcePrivate
|
||||||
struct _GESAssetTrackFileSourcePrivate
|
struct _GESAssetTrackFileSourcePrivate
|
||||||
{
|
{
|
||||||
GstDiscovererStreamInfo *sinfo;
|
GstDiscovererStreamInfo *sinfo;
|
||||||
GESAssetFileSource *parent_asset;
|
GESUriClipAsset *parent_asset;
|
||||||
|
|
||||||
const gchar *uri;
|
const gchar *uri;
|
||||||
GESTrackType type;
|
GESTrackType type;
|
||||||
|
@ -78,10 +78,10 @@ struct _GESAssetTrackFileSourcePrivate
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_asset_filesource_get_property (GObject * object, guint property_id,
|
ges_uri_clip_asset_get_property (GObject * object, guint property_id,
|
||||||
GValue * value, GParamSpec * pspec)
|
GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GESAssetFileSourcePrivate *priv = GES_ASSET_FILESOURCE (object)->priv;
|
GESUriClipAssetPrivate *priv = GES_URI_CLIP_ASSET (object)->priv;
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_DURATION:
|
case PROP_DURATION:
|
||||||
|
@ -93,10 +93,10 @@ ges_asset_filesource_get_property (GObject * object, guint property_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_asset_filesource_set_property (GObject * object, guint property_id,
|
ges_uri_clip_asset_set_property (GObject * object, guint property_id,
|
||||||
const GValue * value, GParamSpec * pspec)
|
const GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GESAssetFileSourcePrivate *priv = GES_ASSET_FILESOURCE (object)->priv;
|
GESUriClipAssetPrivate *priv = GES_URI_CLIP_ASSET (object)->priv;
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_DURATION:
|
case PROP_DURATION:
|
||||||
|
@ -112,7 +112,7 @@ _start_loading (GESAsset * asset, GError ** error)
|
||||||
{
|
{
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
const gchar *uri;
|
const gchar *uri;
|
||||||
GESAssetFileSourceClass *class = GES_ASSET_FILESOURCE_GET_CLASS (asset);
|
GESUriClipAssetClass *class = GES_URI_CLIP_ASSET_GET_CLASS (asset);
|
||||||
|
|
||||||
GST_DEBUG ("Started loading %p", asset);
|
GST_DEBUG ("Started loading %p", asset);
|
||||||
|
|
||||||
|
@ -173,13 +173,13 @@ _asset_proxied (GESAsset * self, const gchar * new_uri)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_asset_filesource_class_init (GESAssetFileSourceClass * klass)
|
ges_uri_clip_asset_class_init (GESUriClipAssetClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
g_type_class_add_private (klass, sizeof (GESAssetFileSourcePrivate));
|
g_type_class_add_private (klass, sizeof (GESUriClipAssetPrivate));
|
||||||
|
|
||||||
object_class->get_property = ges_asset_filesource_get_property;
|
object_class->get_property = ges_uri_clip_asset_get_property;
|
||||||
object_class->set_property = ges_asset_filesource_set_property;
|
object_class->set_property = ges_uri_clip_asset_set_property;
|
||||||
|
|
||||||
GES_ASSET_CLASS (klass)->start_loading = _start_loading;
|
GES_ASSET_CLASS (klass)->start_loading = _start_loading;
|
||||||
GES_ASSET_CLASS (klass)->request_id_update = _request_id_update;
|
GES_ASSET_CLASS (klass)->request_id_update = _request_id_update;
|
||||||
|
@ -187,7 +187,7 @@ ges_asset_filesource_class_init (GESAssetFileSourceClass * klass)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GESAssetFileSource:duration:
|
* GESUriClipAsset:duration:
|
||||||
*
|
*
|
||||||
* The duration (in nanoseconds) of the media file
|
* The duration (in nanoseconds) of the media file
|
||||||
*/
|
*/
|
||||||
|
@ -211,12 +211,12 @@ ges_asset_filesource_class_init (GESAssetFileSourceClass * klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_asset_filesource_init (GESAssetFileSource * self)
|
ges_uri_clip_asset_init (GESUriClipAsset * self)
|
||||||
{
|
{
|
||||||
GESAssetFileSourcePrivate *priv;
|
GESUriClipAssetPrivate *priv;
|
||||||
|
|
||||||
priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
||||||
GES_TYPE_ASSET_FILESOURCE, GESAssetFileSourcePrivate);
|
GES_TYPE_URI_CLIP_ASSET, GESUriClipAssetPrivate);
|
||||||
|
|
||||||
priv->info = NULL;
|
priv->info = NULL;
|
||||||
priv->duration = GST_CLOCK_TIME_NONE;
|
priv->duration = GST_CLOCK_TIME_NONE;
|
||||||
|
@ -224,12 +224,12 @@ ges_asset_filesource_init (GESAssetFileSource * self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_create_track_file_source_asset (GESAssetFileSource * asset,
|
_create_track_file_source_asset (GESUriClipAsset * asset,
|
||||||
GstDiscovererStreamInfo * sinfo, GESTrackType type)
|
GstDiscovererStreamInfo * sinfo, GESTrackType type)
|
||||||
{
|
{
|
||||||
GESAsset *tck_filesource_asset;
|
GESAsset *tck_filesource_asset;
|
||||||
GESAssetTrackFileSourcePrivate *priv_tckasset;
|
GESAssetTrackFileSourcePrivate *priv_tckasset;
|
||||||
GESAssetFileSourcePrivate *priv = asset->priv;
|
GESUriClipAssetPrivate *priv = asset->priv;
|
||||||
gchar *stream_id =
|
gchar *stream_id =
|
||||||
g_strdup (gst_discoverer_stream_info_get_stream_id (sinfo));
|
g_strdup (gst_discoverer_stream_info_get_stream_id (sinfo));
|
||||||
|
|
||||||
|
@ -255,13 +255,12 @@ _create_track_file_source_asset (GESAssetFileSource * asset,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_asset_filesource_set_info (GESAssetFileSource * self,
|
ges_uri_clip_asset_set_info (GESUriClipAsset * self, GstDiscovererInfo * info)
|
||||||
GstDiscovererInfo * info)
|
|
||||||
{
|
{
|
||||||
GList *tmp, *stream_list;
|
GList *tmp, *stream_list;
|
||||||
|
|
||||||
GESTrackType supportedformats = GES_TRACK_TYPE_UNKNOWN;
|
GESTrackType supportedformats = GES_TRACK_TYPE_UNKNOWN;
|
||||||
GESAssetFileSourcePrivate *priv = GES_ASSET_FILESOURCE (self)->priv;
|
GESUriClipAssetPrivate *priv = GES_URI_CLIP_ASSET (self)->priv;
|
||||||
|
|
||||||
/* Extract infos from the GstDiscovererInfo */
|
/* Extract infos from the GstDiscovererInfo */
|
||||||
stream_list = gst_discoverer_info_get_stream_list (info);
|
stream_list = gst_discoverer_info_get_stream_list (info);
|
||||||
|
@ -322,22 +321,21 @@ discoverer_discovered_cb (GstDiscoverer * discoverer,
|
||||||
const GstTagList *tags;
|
const GstTagList *tags;
|
||||||
|
|
||||||
const gchar *uri = gst_discoverer_info_get_uri (info);
|
const gchar *uri = gst_discoverer_info_get_uri (info);
|
||||||
GESAssetFileSource *mfs =
|
GESUriClipAsset *mfs =
|
||||||
GES_ASSET_FILESOURCE (ges_asset_cache_lookup
|
GES_URI_CLIP_ASSET (ges_asset_cache_lookup (GES_TYPE_URI_CLIP, uri));
|
||||||
(GES_TYPE_TIMELINE_FILE_SOURCE, uri));
|
|
||||||
|
|
||||||
tags = gst_discoverer_info_get_tags (info);
|
tags = gst_discoverer_info_get_tags (info);
|
||||||
if (tags)
|
if (tags)
|
||||||
gst_tag_list_foreach (tags, (GstTagForeachFunc) _set_meta_foreach, mfs);
|
gst_tag_list_foreach (tags, (GstTagForeachFunc) _set_meta_foreach, mfs);
|
||||||
|
|
||||||
if (err == NULL)
|
if (err == NULL)
|
||||||
ges_asset_filesource_set_info (mfs, info);
|
ges_uri_clip_asset_set_info (mfs, info);
|
||||||
ges_asset_cache_set_loaded (GES_TYPE_TIMELINE_FILE_SOURCE, uri, err);
|
ges_asset_cache_set_loaded (GES_TYPE_URI_CLIP, uri, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* API implementation */
|
/* API implementation */
|
||||||
/**
|
/**
|
||||||
* ges_asset_filesource_get_info:
|
* ges_uri_clip_asset_get_info:
|
||||||
* @self: Target asset
|
* @self: Target asset
|
||||||
*
|
*
|
||||||
* Gets #GstDiscovererInfo about the file
|
* Gets #GstDiscovererInfo about the file
|
||||||
|
@ -345,68 +343,68 @@ discoverer_discovered_cb (GstDiscoverer * discoverer,
|
||||||
* Returns: (transfer none): #GstDiscovererInfo of specified asset
|
* Returns: (transfer none): #GstDiscovererInfo of specified asset
|
||||||
*/
|
*/
|
||||||
GstDiscovererInfo *
|
GstDiscovererInfo *
|
||||||
ges_asset_filesource_get_info (const GESAssetFileSource * self)
|
ges_uri_clip_asset_get_info (const GESUriClipAsset * self)
|
||||||
{
|
{
|
||||||
return self->priv->info;
|
return self->priv->info;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_asset_filesource_get_duration:
|
* ges_uri_clip_asset_get_duration:
|
||||||
* @self: a #GESAssetFileSource
|
* @self: a #GESUriClipAsset
|
||||||
*
|
*
|
||||||
* Gets duration of the file represented by @self
|
* Gets duration of the file represented by @self
|
||||||
*
|
*
|
||||||
* Returns: The duration of @self
|
* Returns: The duration of @self
|
||||||
*/
|
*/
|
||||||
GstClockTime
|
GstClockTime
|
||||||
ges_asset_filesource_get_duration (GESAssetFileSource * self)
|
ges_uri_clip_asset_get_duration (GESUriClipAsset * self)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GES_IS_ASSET_FILESOURCE (self), GST_CLOCK_TIME_NONE);
|
g_return_val_if_fail (GES_IS_URI_CLIP_ASSET (self), GST_CLOCK_TIME_NONE);
|
||||||
|
|
||||||
return self->priv->duration;
|
return self->priv->duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_asset_filesource_is_image:
|
* ges_uri_clip_asset_is_image:
|
||||||
* @self: a #indent: Standard input:311: Error:Unexpected end of file
|
* @self: a #indent: Standard input:311: Error:Unexpected end of file
|
||||||
GESAssetFileSource
|
GESUriClipAsset
|
||||||
*
|
*
|
||||||
* Gets Whether the file represented by @self is an image or not
|
* Gets Whether the file represented by @self is an image or not
|
||||||
*
|
*
|
||||||
* Returns: Whether the file represented by @self is an image or not
|
* Returns: Whether the file represented by @self is an image or not
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
ges_asset_filesource_is_image (GESAssetFileSource * self)
|
ges_uri_clip_asset_is_image (GESUriClipAsset * self)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GES_IS_ASSET_FILESOURCE (self), FALSE);
|
g_return_val_if_fail (GES_IS_URI_CLIP_ASSET (self), FALSE);
|
||||||
|
|
||||||
return self->priv->is_image;
|
return self->priv->is_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_asset_filesource_new:
|
* ges_uri_clip_asset_new:
|
||||||
* @uri: The URI of the file for which to create a #GESAssetFileSource
|
* @uri: The URI of the file for which to create a #GESUriClipAsset
|
||||||
* @cancellable: optional %GCancellable object, %NULL to ignore.
|
* @cancellable: optional %GCancellable object, %NULL to ignore.
|
||||||
* @callback: (scope async): a #GAsyncReadyCallback to call when the initialization is finished
|
* @callback: (scope async): a #GAsyncReadyCallback to call when the initialization is finished
|
||||||
* @user_data: The user data to pass when @callback is called
|
* @user_data: The user data to pass when @callback is called
|
||||||
*
|
*
|
||||||
* Creates a #GESAssetFileSource for @uri
|
* Creates a #GESUriClipAsset for @uri
|
||||||
*
|
*
|
||||||
* Example of request of a GESAssetFileSource:
|
* Example of request of a GESUriClipAsset:
|
||||||
* |[
|
* |[
|
||||||
* // The request callback
|
* // The request callback
|
||||||
* static void
|
* static void
|
||||||
* filesource_asset_loaded_cb (GESAsset * source, GAsyncResult * res, gpointer user_data)
|
* filesource_asset_loaded_cb (GESAsset * source, GAsyncResult * res, gpointer user_data)
|
||||||
* {
|
* {
|
||||||
* GError *error = NULL;
|
* GError *error = NULL;
|
||||||
* GESAssetFileSource *filesource_asset;
|
* GESUriClipAsset *filesource_asset;
|
||||||
*
|
*
|
||||||
* filesource_asset = GES_ASSET_FILESOURCE (ges_asset_request_finish (res, &error));
|
* filesource_asset = GES_URI_CLIP_ASSET (ges_asset_request_finish (res, &error));
|
||||||
* if (filesource_asset) {
|
* if (filesource_asset) {
|
||||||
* g_print ("The file: %s is usable as a FileSource, it is%s an image and lasts %" GST_TIME_FORMAT,
|
* 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_asset_get_id (GES_ASSET (filesource_asset))
|
||||||
* ges_asset_filesource_is_image (filesource_asset) ? "" : " not",
|
* ges_uri_clip_asset_is_image (filesource_asset) ? "" : " not",
|
||||||
* GST_TIME_ARGS (ges_asset_filesource_get_duration (filesource_asset));
|
* GST_TIME_ARGS (ges_uri_clip_asset_get_duration (filesource_asset));
|
||||||
* } else {
|
* } else {
|
||||||
* g_print ("The file: %s is *not* usable as a FileSource because: %s",
|
* g_print ("The file: %s is *not* usable as a FileSource because: %s",
|
||||||
* ges_asset_get_id (source), error->message);
|
* ges_asset_get_id (source), error->message);
|
||||||
|
@ -416,36 +414,36 @@ ges_asset_filesource_is_image (GESAssetFileSource * self)
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* // The request:
|
* // The request:
|
||||||
* ges_asset_filesource_new (uri, (GAsyncReadyCallback) filesource_asset_loaded_cb, user_data);
|
* ges_uri_clip_asset_new (uri, (GAsyncReadyCallback) filesource_asset_loaded_cb, user_data);
|
||||||
* ]|
|
* ]|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ges_asset_filesource_new (const gchar * uri, GCancellable * cancellable,
|
ges_uri_clip_asset_new (const gchar * uri, GCancellable * cancellable,
|
||||||
GAsyncReadyCallback callback, gpointer user_data)
|
GAsyncReadyCallback callback, gpointer user_data)
|
||||||
{
|
{
|
||||||
ges_asset_request_async (GES_TYPE_TIMELINE_FILE_SOURCE, uri, cancellable,
|
ges_asset_request_async (GES_TYPE_URI_CLIP, uri, cancellable,
|
||||||
callback, user_data);
|
callback, user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_asset_filesource_set_timeout:
|
* ges_uri_clip_asset_set_timeout:
|
||||||
* @class: The #GESAssetFileSourceClass on which to set the discoverer timeout
|
* @class: The #GESUriClipAssetClass on which to set the discoverer timeout
|
||||||
* @timeout: The timeout to set
|
* @timeout: The timeout to set
|
||||||
*
|
*
|
||||||
* Sets the timeout of #GESAssetFileSource loading
|
* Sets the timeout of #GESUriClipAsset loading
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ges_asset_filesource_set_timeout (GESAssetFileSourceClass * class,
|
ges_uri_clip_asset_set_timeout (GESUriClipAssetClass * class,
|
||||||
GstClockTime timeout)
|
GstClockTime timeout)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GES_IS_ASSET_FILESOURCE_CLASS (class));
|
g_return_if_fail (GES_IS_URI_CLIP_ASSET_CLASS (class));
|
||||||
|
|
||||||
g_object_set (class->discoverer, "timeout", timeout, NULL);
|
g_object_set (class->discoverer, "timeout", timeout, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_asset_filesource_get_stream_assets:
|
* ges_uri_clip_asset_get_stream_assets:
|
||||||
* @self: A #GESAssetFileSource
|
* @self: A #GESUriClipAsset
|
||||||
*
|
*
|
||||||
* Get the GESAssetTrackFileSource @self containes
|
* Get the GESAssetTrackFileSource @self containes
|
||||||
*
|
*
|
||||||
|
@ -453,9 +451,9 @@ ges_asset_filesource_set_timeout (GESAssetFileSourceClass * class,
|
||||||
* #GList of #GESAssetTrackFileSource
|
* #GList of #GESAssetTrackFileSource
|
||||||
*/
|
*/
|
||||||
const GList *
|
const GList *
|
||||||
ges_asset_filesource_get_stream_assets (GESAssetFileSource * self)
|
ges_uri_clip_asset_get_stream_assets (GESUriClipAsset * self)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GES_IS_ASSET_FILESOURCE (self), FALSE);
|
g_return_val_if_fail (GES_IS_URI_CLIP_ASSET (self), FALSE);
|
||||||
|
|
||||||
return self->priv->asset_trackfilesources;
|
return self->priv->asset_trackfilesources;
|
||||||
}
|
}
|
||||||
|
@ -468,7 +466,7 @@ ges_asset_filesource_get_stream_assets (GESAssetFileSource * self)
|
||||||
* @short_description: A GESAsset subclass specialized in GESTrackFileSource extraction
|
* @short_description: A GESAsset subclass specialized in GESTrackFileSource extraction
|
||||||
*
|
*
|
||||||
* NOTE: You should never request such a #GESAsset as they will be created automatically
|
* NOTE: You should never request such a #GESAsset as they will be created automatically
|
||||||
* by #GESAssetFileSource-s.
|
* by #GESUriClipAsset-s.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
G_DEFINE_TYPE (GESAssetTrackFileSource, ges_asset_track_filesource,
|
G_DEFINE_TYPE (GESAssetTrackFileSource, ges_asset_track_filesource,
|
||||||
|
@ -524,11 +522,11 @@ ges_asset_track_filesource_init (GESAssetTrackFileSource * self)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_asset_track_filesource_get_stream_info:
|
* ges_asset_track_filesource_get_stream_info:
|
||||||
* @asset: A #GESAssetFileSource
|
* @asset: A #GESUriClipAsset
|
||||||
*
|
*
|
||||||
* Get the #GstDiscovererStreamInfo user by @asset
|
* Get the #GstDiscovererStreamInfo user by @asset
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): a #GESAssetFileSource
|
* Returns: (transfer none): a #GESUriClipAsset
|
||||||
*/
|
*/
|
||||||
GstDiscovererStreamInfo *
|
GstDiscovererStreamInfo *
|
||||||
ges_asset_track_filesource_get_stream_info (GESAssetTrackFileSource * asset)
|
ges_asset_track_filesource_get_stream_info (GESAssetTrackFileSource * asset)
|
||||||
|
@ -548,13 +546,13 @@ ges_asset_track_filesource_get_stream_uri (GESAssetTrackFileSource * asset)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_asset_track_filesource_get_filesource_asset:
|
* ges_asset_track_filesource_get_filesource_asset:
|
||||||
* @asset: A #GESAssetFileSource
|
* @asset: A #GESUriClipAsset
|
||||||
*
|
*
|
||||||
* Get the #GESAssetFileSource @self is contained in
|
* Get the #GESUriClipAsset @self is contained in
|
||||||
*
|
*
|
||||||
* Returns: a #GESAssetFileSource
|
* Returns: a #GESUriClipAsset
|
||||||
*/
|
*/
|
||||||
const GESAssetFileSource *
|
const GESUriClipAsset *
|
||||||
ges_asset_track_filesource_get_filesource_asset (GESAssetTrackFileSource *
|
ges_asset_track_filesource_get_filesource_asset (GESAssetTrackFileSource *
|
||||||
asset)
|
asset)
|
||||||
{
|
{
|
|
@ -18,8 +18,8 @@
|
||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
#ifndef _GES_ASSET_FILESOURCE_
|
#ifndef _GES_URI_CLIP_ASSET_
|
||||||
#define _GES_ASSET_FILESOURCE_
|
#define _GES_URI_CLIP_ASSET_
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
|
@ -29,34 +29,34 @@
|
||||||
#include <ges/ges-asset-track-object.h>
|
#include <ges/ges-asset-track-object.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
#define GES_TYPE_ASSET_FILESOURCE ges_asset_filesource_get_type()
|
#define GES_TYPE_URI_CLIP_ASSET ges_uri_clip_asset_get_type()
|
||||||
#define GES_ASSET_FILESOURCE(obj) \
|
#define GES_URI_CLIP_ASSET(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_ASSET_FILESOURCE, GESAssetFileSource))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_URI_CLIP_ASSET, GESUriClipAsset))
|
||||||
#define GES_ASSET_FILESOURCE_CLASS(klass) \
|
#define GES_URI_CLIP_ASSET_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_ASSET_FILESOURCE, GESAssetFileSourceClass))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_URI_CLIP_ASSET, GESUriClipAssetClass))
|
||||||
#define GES_IS_ASSET_FILESOURCE(obj) \
|
#define GES_IS_URI_CLIP_ASSET(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_ASSET_FILESOURCE))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_URI_CLIP_ASSET))
|
||||||
#define GES_IS_ASSET_FILESOURCE_CLASS(klass) \
|
#define GES_IS_URI_CLIP_ASSET_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_ASSET_FILESOURCE))
|
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_URI_CLIP_ASSET))
|
||||||
#define GES_ASSET_FILESOURCE_GET_CLASS(obj) \
|
#define GES_URI_CLIP_ASSET_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_ASSET_FILESOURCE, GESAssetFileSourceClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_URI_CLIP_ASSET, GESUriClipAssetClass))
|
||||||
|
|
||||||
typedef struct _GESAssetFileSourcePrivate GESAssetFileSourcePrivate;
|
typedef struct _GESUriClipAssetPrivate GESUriClipAssetPrivate;
|
||||||
|
|
||||||
GType ges_asset_filesource_get_type (void);
|
GType ges_uri_clip_asset_get_type (void);
|
||||||
|
|
||||||
struct _GESAssetFileSource
|
struct _GESUriClipAsset
|
||||||
{
|
{
|
||||||
GESAssetClip parent;
|
GESAssetClip parent;
|
||||||
|
|
||||||
/* <private> */
|
/* <private> */
|
||||||
GESAssetFileSourcePrivate *priv;
|
GESUriClipAssetPrivate *priv;
|
||||||
|
|
||||||
/* Padding for API extension */
|
/* Padding for API extension */
|
||||||
gpointer __ges_reserved[GES_PADDING];
|
gpointer __ges_reserved[GES_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GESAssetFileSourceClass
|
struct _GESUriClipAssetClass
|
||||||
{
|
{
|
||||||
GESAssetClipClass parent_class;
|
GESAssetClipClass parent_class;
|
||||||
|
|
||||||
|
@ -66,16 +66,16 @@ struct _GESAssetFileSourceClass
|
||||||
gpointer _ges_reserved[GES_PADDING];
|
gpointer _ges_reserved[GES_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
GstDiscovererInfo *ges_asset_filesource_get_info (const GESAssetFileSource * self);
|
GstDiscovererInfo *ges_uri_clip_asset_get_info (const GESUriClipAsset * self);
|
||||||
GstClockTime ges_asset_filesource_get_duration (GESAssetFileSource *self);
|
GstClockTime ges_uri_clip_asset_get_duration (GESUriClipAsset *self);
|
||||||
gboolean ges_asset_filesource_is_image (GESAssetFileSource *self);
|
gboolean ges_uri_clip_asset_is_image (GESUriClipAsset *self);
|
||||||
void ges_asset_filesource_new (const gchar *uri,
|
void ges_uri_clip_asset_new (const gchar *uri,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GAsyncReadyCallback callback,
|
GAsyncReadyCallback callback,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
void ges_asset_filesource_set_timeout (GESAssetFileSourceClass *class,
|
void ges_uri_clip_asset_set_timeout (GESUriClipAssetClass *class,
|
||||||
GstClockTime timeout);
|
GstClockTime timeout);
|
||||||
const GList * ges_asset_filesource_get_stream_assets (GESAssetFileSource *self);
|
const GList * ges_uri_clip_asset_get_stream_assets (GESUriClipAsset *self);
|
||||||
|
|
||||||
#define GES_TYPE_ASSET_TRACK_FILESOURCE ges_asset_track_filesource_get_type()
|
#define GES_TYPE_ASSET_TRACK_FILESOURCE ges_asset_track_filesource_get_type()
|
||||||
#define GES_ASSET_TRACK_FILESOURCE(obj) \
|
#define GES_ASSET_TRACK_FILESOURCE(obj) \
|
||||||
|
@ -112,7 +112,7 @@ struct _GESAssetTrackFileSourceClass
|
||||||
};
|
};
|
||||||
GstDiscovererStreamInfo * ges_asset_track_filesource_get_stream_info (GESAssetTrackFileSource *asset);
|
GstDiscovererStreamInfo * ges_asset_track_filesource_get_stream_info (GESAssetTrackFileSource *asset);
|
||||||
const gchar * ges_asset_track_filesource_get_stream_uri (GESAssetTrackFileSource *asset);
|
const gchar * ges_asset_track_filesource_get_stream_uri (GESAssetTrackFileSource *asset);
|
||||||
const GESAssetFileSource *ges_asset_track_filesource_get_filesource_asset (GESAssetTrackFileSource *asset);
|
const GESUriClipAsset *ges_asset_track_filesource_get_filesource_asset (GESAssetTrackFileSource *asset);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
#endif /* _GES_ASSET_FILESOURCE */
|
#endif /* _GES_URI_CLIP_ASSET */
|
|
@ -27,10 +27,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ges-internal.h"
|
#include "ges-internal.h"
|
||||||
#include "ges-timeline-file-source.h"
|
#include "ges-uri-clip.h"
|
||||||
#include "ges-timeline-source.h"
|
#include "ges-timeline-source.h"
|
||||||
#include "ges-track-filesource.h"
|
#include "ges-track-filesource.h"
|
||||||
#include "ges-asset-file-source.h"
|
#include "ges-uri-asset.h"
|
||||||
#include "ges-asset-track-object.h"
|
#include "ges-asset-track-object.h"
|
||||||
#include "ges-extractable.h"
|
#include "ges-extractable.h"
|
||||||
#include "ges-track-image-source.h"
|
#include "ges-track-image-source.h"
|
||||||
|
@ -38,16 +38,16 @@
|
||||||
|
|
||||||
static void ges_extractable_interface_init (GESExtractableInterface * iface);
|
static void ges_extractable_interface_init (GESExtractableInterface * iface);
|
||||||
|
|
||||||
#define parent_class ges_timeline_filesource_parent_class
|
#define parent_class ges_uri_clip_parent_class
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GESTimelineFileSource, ges_timeline_filesource,
|
G_DEFINE_TYPE_WITH_CODE (GESUriClip, ges_uri_clip,
|
||||||
GES_TYPE_TIMELINE_SOURCE,
|
GES_TYPE_TIMELINE_SOURCE,
|
||||||
G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
|
G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
|
||||||
ges_extractable_interface_init));
|
ges_extractable_interface_init));
|
||||||
|
|
||||||
GESExtractableInterface *parent_extractable_iface;
|
GESExtractableInterface *parent_extractable_iface;
|
||||||
|
|
||||||
struct _GESTimelineFileSourcePrivate
|
struct _GESUriClipPrivate
|
||||||
{
|
{
|
||||||
gchar *uri;
|
gchar *uri;
|
||||||
|
|
||||||
|
@ -65,23 +65,21 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static GList *ges_timeline_filesource_create_track_objects (GESClip *
|
static GList *ges_uri_clip_create_track_objects (GESClip *
|
||||||
obj, GESTrackType type);
|
obj, GESTrackType type);
|
||||||
static GESTrackObject
|
static GESTrackObject
|
||||||
* ges_timeline_filesource_create_track_object (GESClip * obj,
|
* ges_uri_clip_create_track_object (GESClip * obj, GESTrackType type);
|
||||||
GESTrackType type);
|
void ges_uri_clip_set_uri (GESUriClip * self, gchar * uri);
|
||||||
void ges_timeline_filesource_set_uri (GESTimelineFileSource * self,
|
|
||||||
gchar * uri);
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
filesource_set_max_duration (GESTimelineElement * element,
|
filesource_set_max_duration (GESTimelineElement * element,
|
||||||
GstClockTime maxduration);
|
GstClockTime maxduration);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_timeline_filesource_get_property (GObject * object, guint property_id,
|
ges_uri_clip_get_property (GObject * object, guint property_id,
|
||||||
GValue * value, GParamSpec * pspec)
|
GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GESTimelineFileSourcePrivate *priv = GES_TIMELINE_FILE_SOURCE (object)->priv;
|
GESUriClipPrivate *priv = GES_URI_CLIP (object)->priv;
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_URI:
|
case PROP_URI:
|
||||||
|
@ -103,21 +101,20 @@ ges_timeline_filesource_get_property (GObject * object, guint property_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_timeline_filesource_set_property (GObject * object, guint property_id,
|
ges_uri_clip_set_property (GObject * object, guint property_id,
|
||||||
const GValue * value, GParamSpec * pspec)
|
const GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GESTimelineFileSource *uriclip = GES_TIMELINE_FILE_SOURCE (object);
|
GESUriClip *uriclip = GES_URI_CLIP (object);
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_URI:
|
case PROP_URI:
|
||||||
ges_timeline_filesource_set_uri (uriclip, g_value_dup_string (value));
|
ges_uri_clip_set_uri (uriclip, g_value_dup_string (value));
|
||||||
break;
|
break;
|
||||||
case PROP_MUTE:
|
case PROP_MUTE:
|
||||||
ges_timeline_filesource_set_mute (uriclip, g_value_get_boolean (value));
|
ges_uri_clip_set_mute (uriclip, g_value_get_boolean (value));
|
||||||
break;
|
break;
|
||||||
case PROP_IS_IMAGE:
|
case PROP_IS_IMAGE:
|
||||||
ges_timeline_filesource_set_is_image (uriclip,
|
ges_uri_clip_set_is_image (uriclip, g_value_get_boolean (value));
|
||||||
g_value_get_boolean (value));
|
|
||||||
break;
|
break;
|
||||||
case PROP_SUPPORTED_FORMATS:
|
case PROP_SUPPORTED_FORMATS:
|
||||||
ges_clip_set_supported_formats (GES_CLIP (uriclip),
|
ges_clip_set_supported_formats (GES_CLIP (uriclip),
|
||||||
|
@ -129,9 +126,9 @@ ges_timeline_filesource_set_property (GObject * object, guint property_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_timeline_filesource_finalize (GObject * object)
|
ges_uri_clip_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
GESTimelineFileSourcePrivate *priv = GES_TIMELINE_FILE_SOURCE (object)->priv;
|
GESUriClipPrivate *priv = GES_URI_CLIP (object)->priv;
|
||||||
|
|
||||||
if (priv->uri)
|
if (priv->uri)
|
||||||
g_free (priv->uri);
|
g_free (priv->uri);
|
||||||
|
@ -139,21 +136,21 @@ ges_timeline_filesource_finalize (GObject * object)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_timeline_filesource_class_init (GESTimelineFileSourceClass * klass)
|
ges_uri_clip_class_init (GESUriClipClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
GESClipClass *timobj_class = GES_CLIP_CLASS (klass);
|
GESClipClass *timobj_class = GES_CLIP_CLASS (klass);
|
||||||
GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
|
GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (GESTimelineFileSourcePrivate));
|
g_type_class_add_private (klass, sizeof (GESUriClipPrivate));
|
||||||
|
|
||||||
object_class->get_property = ges_timeline_filesource_get_property;
|
object_class->get_property = ges_uri_clip_get_property;
|
||||||
object_class->set_property = ges_timeline_filesource_set_property;
|
object_class->set_property = ges_uri_clip_set_property;
|
||||||
object_class->finalize = ges_timeline_filesource_finalize;
|
object_class->finalize = ges_uri_clip_finalize;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GESTimelineFileSource:uri:
|
* GESUriClip:uri:
|
||||||
*
|
*
|
||||||
* The location of the file/resource to use.
|
* The location of the file/resource to use.
|
||||||
*/
|
*/
|
||||||
|
@ -162,7 +159,7 @@ ges_timeline_filesource_class_init (GESTimelineFileSourceClass * klass)
|
||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GESTimelineFileSource:mute:
|
* GESUriClip:mute:
|
||||||
*
|
*
|
||||||
* Whether the sound will be played or not.
|
* Whether the sound will be played or not.
|
||||||
*/
|
*/
|
||||||
|
@ -171,7 +168,7 @@ ges_timeline_filesource_class_init (GESTimelineFileSourceClass * klass)
|
||||||
FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GESTimelineFileSource:is-image:
|
* GESUriClip:is-image:
|
||||||
*
|
*
|
||||||
* Whether this filesource represents a still image or not. This must be set
|
* Whether this filesource represents a still image or not. This must be set
|
||||||
* before create_track_objects is called.
|
* before create_track_objects is called.
|
||||||
|
@ -191,10 +188,8 @@ ges_timeline_filesource_class_init (GESTimelineFileSourceClass * klass)
|
||||||
|
|
||||||
element_class->set_max_duration = filesource_set_max_duration;
|
element_class->set_max_duration = filesource_set_max_duration;
|
||||||
|
|
||||||
timobj_class->create_track_objects =
|
timobj_class->create_track_objects = ges_uri_clip_create_track_objects;
|
||||||
ges_timeline_filesource_create_track_objects;
|
timobj_class->create_track_object = ges_uri_clip_create_track_object;
|
||||||
timobj_class->create_track_object =
|
|
||||||
ges_timeline_filesource_create_track_object;
|
|
||||||
timobj_class->need_fill_track = FALSE;
|
timobj_class->need_fill_track = FALSE;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -225,24 +220,24 @@ extractable_get_parameters_from_id (const gchar * id, guint * n_params)
|
||||||
static gchar *
|
static gchar *
|
||||||
extractable_get_id (GESExtractable * self)
|
extractable_get_id (GESExtractable * self)
|
||||||
{
|
{
|
||||||
return g_strdup (GES_TIMELINE_FILE_SOURCE (self)->priv->uri);
|
return g_strdup (GES_URI_CLIP (self)->priv->uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
extractable_set_asset (GESExtractable * self, GESAsset * asset)
|
extractable_set_asset (GESExtractable * self, GESAsset * asset)
|
||||||
{
|
{
|
||||||
GESTimelineFileSource *uriclip = GES_TIMELINE_FILE_SOURCE (self);
|
GESUriClip *uriclip = GES_URI_CLIP (self);
|
||||||
GESAssetFileSource *filesource_asset = GES_ASSET_FILESOURCE (asset);
|
GESUriClipAsset *filesource_asset = GES_URI_CLIP_ASSET (asset);
|
||||||
GESClip *clip = GES_CLIP (self);
|
GESClip *clip = GES_CLIP (self);
|
||||||
|
|
||||||
if (GST_CLOCK_TIME_IS_VALID (GES_TIMELINE_ELEMENT (clip)) == FALSE)
|
if (GST_CLOCK_TIME_IS_VALID (GES_TIMELINE_ELEMENT (clip)) == FALSE)
|
||||||
_set_duration0 (GES_TIMELINE_ELEMENT (uriclip),
|
_set_duration0 (GES_TIMELINE_ELEMENT (uriclip),
|
||||||
ges_asset_filesource_get_duration (filesource_asset));
|
ges_uri_clip_asset_get_duration (filesource_asset));
|
||||||
|
|
||||||
ges_timeline_element_set_max_duration (GES_TIMELINE_ELEMENT (uriclip),
|
ges_timeline_element_set_max_duration (GES_TIMELINE_ELEMENT (uriclip),
|
||||||
ges_asset_filesource_get_duration (filesource_asset));
|
ges_uri_clip_asset_get_duration (filesource_asset));
|
||||||
ges_timeline_filesource_set_is_image (uriclip,
|
ges_uri_clip_set_is_image (uriclip,
|
||||||
ges_asset_filesource_is_image (filesource_asset));
|
ges_uri_clip_asset_is_image (filesource_asset));
|
||||||
|
|
||||||
if (ges_clip_get_supported_formats (clip) == GES_TRACK_TYPE_UNKNOWN) {
|
if (ges_clip_get_supported_formats (clip) == GES_TRACK_TYPE_UNKNOWN) {
|
||||||
|
|
||||||
|
@ -257,7 +252,7 @@ extractable_set_asset (GESExtractable * self, GESAsset * asset)
|
||||||
static void
|
static void
|
||||||
ges_extractable_interface_init (GESExtractableInterface * iface)
|
ges_extractable_interface_init (GESExtractableInterface * iface)
|
||||||
{
|
{
|
||||||
iface->asset_type = GES_TYPE_ASSET_FILESOURCE;
|
iface->asset_type = GES_TYPE_URI_CLIP_ASSET;
|
||||||
iface->check_id = (GESExtractableCheckId) extractable_check_id;
|
iface->check_id = (GESExtractableCheckId) extractable_check_id;
|
||||||
iface->get_parameters_from_id = extractable_get_parameters_from_id;
|
iface->get_parameters_from_id = extractable_get_parameters_from_id;
|
||||||
iface->get_id = extractable_get_id;
|
iface->get_id = extractable_get_id;
|
||||||
|
@ -265,25 +260,25 @@ ges_extractable_interface_init (GESExtractableInterface * iface)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_timeline_filesource_init (GESTimelineFileSource * self)
|
ges_uri_clip_init (GESUriClip * self)
|
||||||
{
|
{
|
||||||
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
||||||
GES_TYPE_TIMELINE_FILE_SOURCE, GESTimelineFileSourcePrivate);
|
GES_TYPE_URI_CLIP, GESUriClipPrivate);
|
||||||
|
|
||||||
/* Setting the duration to -1 by default. */
|
/* Setting the duration to -1 by default. */
|
||||||
GES_TIMELINE_ELEMENT (self)->duration = GST_CLOCK_TIME_NONE;
|
GES_TIMELINE_ELEMENT (self)->duration = GST_CLOCK_TIME_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_timeline_filesource_set_mute:
|
* ges_uri_clip_set_mute:
|
||||||
* @self: the #GESTimelineFileSource on which to mute or unmute the audio track
|
* @self: the #GESUriClip on which to mute or unmute the audio track
|
||||||
* @mute: %TRUE to mute @self audio track, %FALSE to unmute it
|
* @mute: %TRUE to mute @self audio track, %FALSE to unmute it
|
||||||
*
|
*
|
||||||
* Sets whether the audio track of this timeline object is muted or not.
|
* Sets whether the audio track of this timeline object is muted or not.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ges_timeline_filesource_set_mute (GESTimelineFileSource * self, gboolean mute)
|
ges_uri_clip_set_mute (GESUriClip * self, gboolean mute)
|
||||||
{
|
{
|
||||||
GList *tmp, *trackobjects;
|
GList *tmp, *trackobjects;
|
||||||
GESClip *object = (GESClip *) self;
|
GESClip *object = (GESClip *) self;
|
||||||
|
@ -319,63 +314,62 @@ filesource_set_max_duration (GESTimelineElement * element,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_timeline_filesource_set_is_image:
|
* ges_uri_clip_set_is_image:
|
||||||
* @self: the #GESTimelineFileSource
|
* @self: the #GESUriClip
|
||||||
* @is_image: %TRUE if @self is a still image, %FALSE otherwise
|
* @is_image: %TRUE if @self is a still image, %FALSE otherwise
|
||||||
*
|
*
|
||||||
* Sets whether the timeline object is a still image or not.
|
* Sets whether the timeline object is a still image or not.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ges_timeline_filesource_set_is_image (GESTimelineFileSource * self,
|
ges_uri_clip_set_is_image (GESUriClip * self, gboolean is_image)
|
||||||
gboolean is_image)
|
|
||||||
{
|
{
|
||||||
self->priv->is_image = is_image;
|
self->priv->is_image = is_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_timeline_filesource_is_muted:
|
* ges_uri_clip_is_muted:
|
||||||
* @self: the #GESTimelineFileSource
|
* @self: the #GESUriClip
|
||||||
*
|
*
|
||||||
* Lets you know if the audio track of @self is muted or not.
|
* Lets you know if the audio track of @self is muted or not.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the audio track of @self is muted, %FALSE otherwise.
|
* Returns: %TRUE if the audio track of @self is muted, %FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
ges_timeline_filesource_is_muted (GESTimelineFileSource * self)
|
ges_uri_clip_is_muted (GESUriClip * self)
|
||||||
{
|
{
|
||||||
return self->priv->mute;
|
return self->priv->mute;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_timeline_filesource_is_image:
|
* ges_uri_clip_is_image:
|
||||||
* @self: the #GESTimelineFileSource
|
* @self: the #GESUriClip
|
||||||
*
|
*
|
||||||
* Lets you know if @self is an image or not.
|
* Lets you know if @self is an image or not.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if @self is a still image %FALSE otherwise.
|
* Returns: %TRUE if @self is a still image %FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
ges_timeline_filesource_is_image (GESTimelineFileSource * self)
|
ges_uri_clip_is_image (GESUriClip * self)
|
||||||
{
|
{
|
||||||
return self->priv->is_image;
|
return self->priv->is_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_timeline_filesource_get_uri:
|
* ges_uri_clip_get_uri:
|
||||||
* @self: the #GESTimelineFileSource
|
* @self: the #GESUriClip
|
||||||
*
|
*
|
||||||
* Get the location of the resource.
|
* Get the location of the resource.
|
||||||
*
|
*
|
||||||
* Returns: The location of the resource.
|
* Returns: The location of the resource.
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const gchar *
|
||||||
ges_timeline_filesource_get_uri (GESTimelineFileSource * self)
|
ges_uri_clip_get_uri (GESUriClip * self)
|
||||||
{
|
{
|
||||||
return self->priv->uri;
|
return self->priv->uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GList *
|
static GList *
|
||||||
ges_timeline_filesource_create_track_objects (GESClip * obj, GESTrackType type)
|
ges_uri_clip_create_track_objects (GESClip * obj, GESTrackType type)
|
||||||
{
|
{
|
||||||
GList *res = NULL;
|
GList *res = NULL;
|
||||||
const GList *tmp, *stream_assets;
|
const GList *tmp, *stream_assets;
|
||||||
|
@ -383,7 +377,7 @@ ges_timeline_filesource_create_track_objects (GESClip * obj, GESTrackType type)
|
||||||
g_return_val_if_fail (GES_TIMELINE_ELEMENT (obj)->asset, NULL);
|
g_return_val_if_fail (GES_TIMELINE_ELEMENT (obj)->asset, NULL);
|
||||||
|
|
||||||
stream_assets =
|
stream_assets =
|
||||||
ges_asset_filesource_get_stream_assets (GES_ASSET_FILESOURCE
|
ges_uri_clip_asset_get_stream_assets (GES_URI_CLIP_ASSET
|
||||||
(GES_TIMELINE_ELEMENT (obj)->asset));
|
(GES_TIMELINE_ELEMENT (obj)->asset));
|
||||||
for (tmp = stream_assets; tmp; tmp = tmp->next) {
|
for (tmp = stream_assets; tmp; tmp = tmp->next) {
|
||||||
GESAssetTrackObject *asset = GES_ASSET_TRACK_OBJECT (tmp->data);
|
GESAssetTrackObject *asset = GES_ASSET_TRACK_OBJECT (tmp->data);
|
||||||
|
@ -396,9 +390,9 @@ ges_timeline_filesource_create_track_objects (GESClip * obj, GESTrackType type)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GESTrackObject *
|
static GESTrackObject *
|
||||||
ges_timeline_filesource_create_track_object (GESClip * obj, GESTrackType type)
|
ges_uri_clip_create_track_object (GESClip * obj, GESTrackType type)
|
||||||
{
|
{
|
||||||
GESTimelineFileSourcePrivate *priv = GES_TIMELINE_FILE_SOURCE (obj)->priv;
|
GESUriClipPrivate *priv = GES_URI_CLIP (obj)->priv;
|
||||||
GESTrackObject *res;
|
GESTrackObject *res;
|
||||||
|
|
||||||
if (priv->is_image) {
|
if (priv->is_image) {
|
||||||
|
@ -428,27 +422,27 @@ ges_timeline_filesource_create_track_object (GESClip * obj, GESTrackType type)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_timeline_filesource_new:
|
* ges_uri_clip_new:
|
||||||
* @uri: the URI the source should control
|
* @uri: the URI the source should control
|
||||||
*
|
*
|
||||||
* Creates a new #GESTimelineFileSource for the provided @uri.
|
* Creates a new #GESUriClip for the provided @uri.
|
||||||
*
|
*
|
||||||
* Returns: The newly created #GESTimelineFileSource, or NULL if there was an
|
* Returns: The newly created #GESUriClip, or NULL if there was an
|
||||||
* error.
|
* error.
|
||||||
*/
|
*/
|
||||||
GESTimelineFileSource *
|
GESUriClip *
|
||||||
ges_timeline_filesource_new (gchar * uri)
|
ges_uri_clip_new (gchar * uri)
|
||||||
{
|
{
|
||||||
GESTimelineFileSource *res = NULL;
|
GESUriClip *res = NULL;
|
||||||
|
|
||||||
if (gst_uri_is_valid (uri))
|
if (gst_uri_is_valid (uri))
|
||||||
res = g_object_new (GES_TYPE_TIMELINE_FILE_SOURCE, "uri", uri, NULL);
|
res = g_object_new (GES_TYPE_URI_CLIP, "uri", uri, NULL);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ges_timeline_filesource_set_uri (GESTimelineFileSource * self, gchar * uri)
|
ges_uri_clip_set_uri (GESUriClip * self, gchar * uri)
|
||||||
{
|
{
|
||||||
GESClip *clip = GES_CLIP (self);
|
GESClip *clip = GES_CLIP (self);
|
||||||
GList *tckobjs = ges_clip_get_track_objects (clip);
|
GList *tckobjs = ges_clip_get_track_objects (clip);
|
90
ges/ges-uri-clip.h
Normal file
90
ges/ges-uri-clip.h
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
/* GStreamer Editing Services
|
||||||
|
* Copyright (C) 2009 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||||
|
* 2009 Nokia Corporation
|
||||||
|
*
|
||||||
|
* 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., 51 Franklin St, Fifth Floor,
|
||||||
|
* Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _GES_URI_CLIP
|
||||||
|
#define _GES_URI_CLIP
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
|
#include <ges/ges-types.h>
|
||||||
|
#include <ges/ges-timeline-source.h>
|
||||||
|
#include <ges/ges-track.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define GES_TYPE_URI_CLIP ges_uri_clip_get_type()
|
||||||
|
|
||||||
|
#define GES_URI_CLIP(obj) \
|
||||||
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_URI_CLIP, GESUriClip))
|
||||||
|
|
||||||
|
#define GES_URI_CLIP_CLASS(klass) \
|
||||||
|
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_URI_CLIP, GESUriClipClass))
|
||||||
|
|
||||||
|
#define GES_IS_URI_CLIP(obj) \
|
||||||
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_URI_CLIP))
|
||||||
|
|
||||||
|
#define GES_IS_URI_CLIP_CLASS(klass) \
|
||||||
|
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_URI_CLIP))
|
||||||
|
|
||||||
|
#define GES_URI_CLIP_GET_CLASS(obj) \
|
||||||
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_URI_CLIP, GESUriClipClass))
|
||||||
|
|
||||||
|
typedef struct _GESUriClipPrivate GESUriClipPrivate;
|
||||||
|
|
||||||
|
struct _GESUriClip {
|
||||||
|
GESTimelineSource parent;
|
||||||
|
|
||||||
|
/*< private >*/
|
||||||
|
GESUriClipPrivate *priv;
|
||||||
|
|
||||||
|
/* Padding for API extension */
|
||||||
|
gpointer _ges_reserved[GES_PADDING];
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GESUriClipClass:
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct _GESUriClipClass {
|
||||||
|
/*< private >*/
|
||||||
|
GESTimelineSourceClass parent_class;
|
||||||
|
|
||||||
|
/* Padding for API extension */
|
||||||
|
gpointer _ges_reserved[GES_PADDING];
|
||||||
|
};
|
||||||
|
|
||||||
|
GType ges_uri_clip_get_type (void);
|
||||||
|
|
||||||
|
void
|
||||||
|
ges_uri_clip_set_mute (GESUriClip * self, gboolean mute);
|
||||||
|
|
||||||
|
void
|
||||||
|
ges_uri_clip_set_is_image (GESUriClip * self,
|
||||||
|
gboolean is_image);
|
||||||
|
|
||||||
|
gboolean ges_uri_clip_is_muted (GESUriClip * self);
|
||||||
|
gboolean ges_uri_clip_is_image (GESUriClip * self);
|
||||||
|
const gchar *ges_uri_clip_get_uri (GESUriClip * self);
|
||||||
|
|
||||||
|
GESUriClip* ges_uri_clip_new (gchar *uri);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* _GES_URI_CLIP */
|
||||||
|
|
|
@ -72,7 +72,7 @@ ges_init (void)
|
||||||
/* register timeline object classes with the system */
|
/* register timeline object classes with the system */
|
||||||
|
|
||||||
GES_TYPE_TIMELINE_TEST_SOURCE;
|
GES_TYPE_TIMELINE_TEST_SOURCE;
|
||||||
GES_TYPE_TIMELINE_FILE_SOURCE;
|
GES_TYPE_URI_CLIP;
|
||||||
GES_TYPE_TIMELINE_TITLE_SOURCE;
|
GES_TYPE_TIMELINE_TITLE_SOURCE;
|
||||||
GES_TYPE_TIMELINE_STANDARD_TRANSITION;
|
GES_TYPE_TIMELINE_STANDARD_TRANSITION;
|
||||||
GES_TYPE_TIMELINE_OVERLAY;
|
GES_TYPE_TIMELINE_OVERLAY;
|
||||||
|
|
|
@ -44,12 +44,12 @@
|
||||||
#include <ges/ges-timeline-parse-launch-effect.h>
|
#include <ges/ges-timeline-parse-launch-effect.h>
|
||||||
#include <ges/ges-custom-timeline-source.h>
|
#include <ges/ges-custom-timeline-source.h>
|
||||||
#include <ges/ges-timeline-effect.h>
|
#include <ges/ges-timeline-effect.h>
|
||||||
#include <ges/ges-timeline-file-source.h>
|
#include <ges/ges-uri-clip.h>
|
||||||
#include <ges/ges-screenshot.h>
|
#include <ges/ges-screenshot.h>
|
||||||
#include <ges/ges-asset.h>
|
#include <ges/ges-asset.h>
|
||||||
#include <ges/ges-asset-clip.h>
|
#include <ges/ges-asset-clip.h>
|
||||||
#include <ges/ges-asset-track-object.h>
|
#include <ges/ges-asset-track-object.h>
|
||||||
#include <ges/ges-asset-file-source.h>
|
#include <ges/ges-uri-asset.h>
|
||||||
#include <ges/ges-project.h>
|
#include <ges/ges-project.h>
|
||||||
#include <ges/ges-extractable.h>
|
#include <ges/ges-extractable.h>
|
||||||
#include <ges/ges-base-xml-formatter.h>
|
#include <ges/ges-base-xml-formatter.h>
|
||||||
|
|
|
@ -32,7 +32,7 @@ check_PROGRAMS = \
|
||||||
ges/basic \
|
ges/basic \
|
||||||
ges/layer \
|
ges/layer \
|
||||||
ges/effects \
|
ges/effects \
|
||||||
ges/filesource \
|
ges/uriclip \
|
||||||
ges/simplelayer \
|
ges/simplelayer \
|
||||||
ges/clip \
|
ges/clip \
|
||||||
ges/timelineedition \
|
ges/timelineedition \
|
||||||
|
|
|
@ -44,7 +44,7 @@ GST_START_TEST (test_basic)
|
||||||
ges_init ();
|
ges_init ();
|
||||||
|
|
||||||
mainloop = g_main_loop_new (NULL, FALSE);
|
mainloop = g_main_loop_new (NULL, FALSE);
|
||||||
ges_asset_request_async (GES_TYPE_TIMELINE_FILE_SOURCE,
|
ges_asset_request_async (GES_TYPE_URI_CLIP,
|
||||||
"file:///this/is/not/for/real", NULL, source_asset_created, NULL);
|
"file:///this/is/not/for/real", NULL, source_asset_created, NULL);
|
||||||
|
|
||||||
g_main_loop_run (mainloop);
|
g_main_loop_run (mainloop);
|
||||||
|
|
|
@ -220,8 +220,8 @@ GST_START_TEST (test_effect_clip)
|
||||||
GES_TRACK_EFFECT (tmp->data));
|
GES_TRACK_EFFECT (tmp->data));
|
||||||
fail_unless (priority > effect_prio);
|
fail_unless (priority > effect_prio);
|
||||||
fail_unless (GES_IS_TRACK_EFFECT (tmp->data));
|
fail_unless (GES_IS_TRACK_EFFECT (tmp->data));
|
||||||
fail_unless (ges_track_object_get_track (GES_TRACK_OBJECT (tmp->
|
fail_unless (ges_track_object_get_track (GES_TRACK_OBJECT (tmp->data))->
|
||||||
data))->type == track_type[i]);
|
type == track_type[i]);
|
||||||
effect_prio = priority;
|
effect_prio = priority;
|
||||||
|
|
||||||
g_object_unref (tmp->data);
|
g_object_unref (tmp->data);
|
||||||
|
|
|
@ -173,7 +173,7 @@ asset_added_cb (GESProject * project, GESAsset * asset)
|
||||||
GES_TYPE_TRACK_PARSE_LAUNCH_EFFECT) {
|
GES_TYPE_TRACK_PARSE_LAUNCH_EFFECT) {
|
||||||
assert_equals_string (ges_asset_get_id (asset), "agingtv");
|
assert_equals_string (ges_asset_get_id (asset), "agingtv");
|
||||||
} else {
|
} else {
|
||||||
info = ges_asset_filesource_get_info (GES_ASSET_FILESOURCE (asset));
|
info = ges_uri_clip_asset_get_info (GES_URI_CLIP_ASSET (asset));
|
||||||
fail_unless (GST_IS_DISCOVERER_INFO (info));
|
fail_unless (GST_IS_DISCOVERER_INFO (info));
|
||||||
assert_equals_string (ges_asset_get_id (asset), uri);
|
assert_equals_string (ges_asset_get_id (asset), uri);
|
||||||
}
|
}
|
||||||
|
@ -206,10 +206,10 @@ _test_project (GESProject * project, GESTimeline * timeline)
|
||||||
assert_equals_string (ges_meta_container_get_string (GES_META_CONTAINER
|
assert_equals_string (ges_meta_container_get_string (GES_META_CONTAINER
|
||||||
(project), "name"), "Example project");
|
(project), "name"), "Example project");
|
||||||
clips =
|
clips =
|
||||||
ges_timeline_layer_get_objects (GES_TIMELINE_LAYER (timeline->layers->
|
ges_timeline_layer_get_objects (GES_TIMELINE_LAYER (timeline->
|
||||||
data));
|
layers->data));
|
||||||
fail_unless (ges_meta_container_get_uint (GES_META_CONTAINER (timeline->
|
fail_unless (ges_meta_container_get_uint (GES_META_CONTAINER
|
||||||
layers->data), "a", &a_meta));
|
(timeline->layers->data), "a", &a_meta));
|
||||||
assert_equals_int (a_meta, 3);
|
assert_equals_int (a_meta, 3);
|
||||||
assert_equals_int (g_list_length (clips), 1);
|
assert_equals_int (g_list_length (clips), 1);
|
||||||
media_uri = ges_test_file_uri ("audio_video.ogg");
|
media_uri = ges_test_file_uri ("audio_video.ogg");
|
||||||
|
|
|
@ -8,19 +8,19 @@
|
||||||
</encoding-profiles>
|
</encoding-profiles>
|
||||||
<resources>
|
<resources>
|
||||||
<asset id="file:///test/not/exisiting"
|
<asset id="file:///test/not/exisiting"
|
||||||
extractable-type-name="GESTimelineFileSource"/>
|
extractable-type-name="GESUriClip"/>
|
||||||
</resources>
|
</resources>
|
||||||
<timeline>
|
<timeline>
|
||||||
<track track-type="2" caps="audio/x-raw" track-id="0"/>
|
<track track-type="2" caps="audio/x-raw" track-id="0"/>
|
||||||
<track track-type="4" caps="video/x-raw" track-id="1"/>
|
<track track-type="4" caps="video/x-raw" track-id="1"/>
|
||||||
<layer priority="0" properties='properties, auto-transition=(boolean)true;' metadatas='metadatas, a=(guint)3'>
|
<layer priority="0" properties='properties, auto-transition=(boolean)true;' metadatas='metadatas, a=(guint)3'>
|
||||||
<clip id="0" layer-priority='0' asset-id="file:///test/not/exisiting" type-name="GESTimelineFileSource" track-types="6" start="0" duration="1000000000">
|
<clip id="0" layer-priority='0' asset-id="file:///test/not/exisiting" type-name="GESUriClip" track-types="6" start="0" duration="1000000000">
|
||||||
<effect asset-id='agingtv' clip-id='0' type-name='GESTrackParseLaunchEffect' track-type='4' track-id='1' metadatas='metadatas;' children-properties='properties, scratch-lines=(uint)12;'/>
|
<effect asset-id='agingtv' clip-id='0' type-name='GESTrackParseLaunchEffect' track-type='4' track-id='1' metadatas='metadatas;' children-properties='properties, scratch-lines=(uint)12;'/>
|
||||||
</clip>
|
</clip>
|
||||||
</layer>
|
</layer>
|
||||||
<layer priority="1" properties='properties, auto-transition=(boolean)true;'>
|
<layer priority="1" properties='properties, auto-transition=(boolean)true;'>
|
||||||
<clip id="1" asset-id="file:///test/not/exisiting" layer-priority="1"
|
<clip id="1" asset-id="file:///test/not/exisiting" layer-priority="1"
|
||||||
type-name="GESTimelineFileSource" track-types="2" start="1000000000" duration="1000000000">
|
type-name="GESUriClip" track-types="2" start="1000000000" duration="1000000000">
|
||||||
</clip>
|
</clip>
|
||||||
</layer>
|
</layer>
|
||||||
</timeline>
|
</timeline>
|
||||||
|
|
|
@ -34,7 +34,7 @@ asset_created_cb (GObject * source, GAsyncResult * res, gpointer udata)
|
||||||
GList *tracks, *tmp;
|
GList *tracks, *tmp;
|
||||||
GESAsset *asset;
|
GESAsset *asset;
|
||||||
GESTimelineLayer *layer;
|
GESTimelineLayer *layer;
|
||||||
GESTimelineFileSource *tlfs;
|
GESUriClip *tlfs;
|
||||||
|
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
|
@ -44,10 +44,10 @@ asset_created_cb (GObject * source, GAsyncResult * res, gpointer udata)
|
||||||
fail_if (g_strcmp0 (ges_asset_get_id (asset), av_uri));
|
fail_if (g_strcmp0 (ges_asset_get_id (asset), av_uri));
|
||||||
|
|
||||||
layer = GES_TIMELINE_LAYER (g_async_result_get_user_data (res));
|
layer = GES_TIMELINE_LAYER (g_async_result_get_user_data (res));
|
||||||
tlfs = GES_TIMELINE_FILE_SOURCE (ges_timeline_layer_add_asset (layer,
|
tlfs = GES_URI_CLIP (ges_timeline_layer_add_asset (layer,
|
||||||
asset, 0, 0, GST_CLOCK_TIME_NONE, 1, GES_TRACK_TYPE_UNKNOWN));
|
asset, 0, 0, GST_CLOCK_TIME_NONE, 1, GES_TRACK_TYPE_UNKNOWN));
|
||||||
fail_unless (GES_IS_TIMELINE_FILE_SOURCE (tlfs));
|
fail_unless (GES_IS_URI_CLIP (tlfs));
|
||||||
fail_if (g_strcmp0 (ges_timeline_filesource_get_uri (tlfs), av_uri));
|
fail_if (g_strcmp0 (ges_uri_clip_get_uri (tlfs), av_uri));
|
||||||
assert_equals_uint64 (_DURATION (tlfs), GST_SECOND);
|
assert_equals_uint64 (_DURATION (tlfs), GST_SECOND);
|
||||||
|
|
||||||
fail_unless (ges_clip_get_supported_formats
|
fail_unless (ges_clip_get_supported_formats
|
||||||
|
@ -85,7 +85,7 @@ GST_START_TEST (test_filesource_basic)
|
||||||
fail_unless (layer != NULL);
|
fail_unless (layer != NULL);
|
||||||
fail_unless (ges_timeline_add_layer (timeline, layer));
|
fail_unless (ges_timeline_add_layer (timeline, layer));
|
||||||
|
|
||||||
ges_asset_request_async (GES_TYPE_TIMELINE_FILE_SOURCE,
|
ges_asset_request_async (GES_TYPE_URI_CLIP,
|
||||||
av_uri, NULL, asset_created_cb, layer);
|
av_uri, NULL, asset_created_cb, layer);
|
||||||
|
|
||||||
g_main_loop_run (mainloop);
|
g_main_loop_run (mainloop);
|
||||||
|
@ -122,7 +122,7 @@ GST_START_TEST (test_filesource_properties)
|
||||||
fail_unless (track != NULL);
|
fail_unless (track != NULL);
|
||||||
|
|
||||||
object = (GESClip *)
|
object = (GESClip *)
|
||||||
ges_timeline_filesource_new ((gchar *)
|
ges_uri_clip_new ((gchar *)
|
||||||
"crack:///there/is/no/way/this/exists");
|
"crack:///there/is/no/way/this/exists");
|
||||||
fail_unless (object != NULL);
|
fail_unless (object != NULL);
|
||||||
|
|
||||||
|
@ -182,12 +182,12 @@ GST_START_TEST (test_filesource_images)
|
||||||
{
|
{
|
||||||
GESTrackObject *trobj;
|
GESTrackObject *trobj;
|
||||||
GESClip *clip;
|
GESClip *clip;
|
||||||
GESTimelineFileSource *uriclip;
|
GESUriClip *uriclip;
|
||||||
GESTrack *a, *v;
|
GESTrack *a, *v;
|
||||||
|
|
||||||
ges_init ();
|
ges_init ();
|
||||||
|
|
||||||
uriclip = ges_timeline_filesource_new ((gchar *) TEST_URI);
|
uriclip = ges_uri_clip_new ((gchar *) TEST_URI);
|
||||||
g_object_set (G_OBJECT (uriclip), "supported-formats",
|
g_object_set (G_OBJECT (uriclip), "supported-formats",
|
||||||
(GESTrackType) GES_TRACK_TYPE_AUDIO | GES_TRACK_TYPE_VIDEO, NULL);
|
(GESTrackType) GES_TRACK_TYPE_AUDIO | GES_TRACK_TYPE_VIDEO, NULL);
|
||||||
clip = GES_CLIP (uriclip);
|
clip = GES_CLIP (uriclip);
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <ges/ges-asset-file-source.h>
|
#include <ges/ges-uri-asset.h>
|
||||||
#include <gst/pbutils/encoding-profile.h>
|
#include <gst/pbutils/encoding-profile.h>
|
||||||
#include <gst/pbutils/gstdiscoverer.h>
|
#include <gst/pbutils/gstdiscoverer.h>
|
||||||
#include <ges/ges-internal.h>
|
#include <ges/ges-internal.h>
|
||||||
|
@ -26,15 +26,15 @@
|
||||||
static void
|
static void
|
||||||
asset_loaded_cb (GObject * source, GAsyncResult * res, GMainLoop * mainloop)
|
asset_loaded_cb (GObject * source, GAsyncResult * res, GMainLoop * mainloop)
|
||||||
{
|
{
|
||||||
GESAssetFileSource *mfs =
|
GESUriClipAsset *mfs =
|
||||||
GES_ASSET_FILESOURCE (ges_asset_request_finish (res, NULL));
|
GES_URI_CLIP_ASSET (ges_asset_request_finish (res, NULL));
|
||||||
GstDiscovererInfo *discoverer_info = NULL;
|
GstDiscovererInfo *discoverer_info = NULL;
|
||||||
discoverer_info = ges_asset_filesource_get_info (mfs);
|
discoverer_info = ges_uri_clip_asset_get_info (mfs);
|
||||||
|
|
||||||
GST_DEBUG ("Result is %d", gst_discoverer_info_get_result (discoverer_info));
|
GST_DEBUG ("Result is %d", gst_discoverer_info_get_result (discoverer_info));
|
||||||
GST_DEBUG ("Info type is %s", G_OBJECT_TYPE_NAME (mfs));
|
GST_DEBUG ("Info type is %s", G_OBJECT_TYPE_NAME (mfs));
|
||||||
GST_DEBUG ("Duration is %" GST_TIME_FORMAT,
|
GST_DEBUG ("Duration is %" GST_TIME_FORMAT,
|
||||||
GST_TIME_ARGS (ges_asset_filesource_get_duration (mfs)));
|
GST_TIME_ARGS (ges_uri_clip_asset_get_duration (mfs)));
|
||||||
|
|
||||||
g_object_unref (mfs);
|
g_object_unref (mfs);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ main (int argc, gchar ** argv)
|
||||||
* order to function properly ! */
|
* order to function properly ! */
|
||||||
mainloop = g_main_loop_new (NULL, FALSE);
|
mainloop = g_main_loop_new (NULL, FALSE);
|
||||||
|
|
||||||
ges_asset_request_async (GES_TYPE_TIMELINE_FILE_SOURCE, argv[1], NULL,
|
ges_asset_request_async (GES_TYPE_URI_CLIP, argv[1], NULL,
|
||||||
(GAsyncReadyCallback) asset_loaded_cb, mainloop);
|
(GAsyncReadyCallback) asset_loaded_cb, mainloop);
|
||||||
|
|
||||||
g_main_loop_run (mainloop);
|
g_main_loop_run (mainloop);
|
||||||
|
|
|
@ -38,8 +38,8 @@ asset_loaded_cb (GObject * source_object, GAsyncResult * res,
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
GESAssetFileSource *mfs =
|
GESUriClipAsset *mfs =
|
||||||
GES_ASSET_FILESOURCE (ges_asset_request_finish (res, &error));
|
GES_URI_CLIP_ASSET (ges_asset_request_finish (res, &error));
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
GST_WARNING ("error creating asseti %s", error->message);
|
GST_WARNING ("error creating asseti %s", error->message);
|
||||||
|
@ -52,7 +52,7 @@ asset_loaded_cb (GObject * source_object, GAsyncResult * res,
|
||||||
* Check if we have loaded last asset and trigger concatenating
|
* Check if we have loaded last asset and trigger concatenating
|
||||||
*/
|
*/
|
||||||
if (assetsLoaded == assetsCount) {
|
if (assetsLoaded == assetsCount) {
|
||||||
GstDiscovererInfo *info = ges_asset_filesource_get_info (mfs);
|
GstDiscovererInfo *info = ges_uri_clip_asset_get_info (mfs);
|
||||||
GstEncodingProfile *profile = make_profile_from_info (info);
|
GstEncodingProfile *profile = make_profile_from_info (info);
|
||||||
ges_timeline_pipeline_set_render_settings (pipeline, output_uri, profile);
|
ges_timeline_pipeline_set_render_settings (pipeline, output_uri, profile);
|
||||||
/* We want the pipeline to render (without any preview) */
|
/* We want the pipeline to render (without any preview) */
|
||||||
|
@ -94,7 +94,7 @@ main (int argc, char **argv)
|
||||||
assetsCount = argc - 2;
|
assetsCount = argc - 2;
|
||||||
|
|
||||||
for (i = 2; i < argc; i++) {
|
for (i = 2; i < argc; i++) {
|
||||||
ges_asset_request_async (GES_TYPE_TIMELINE_FILE_SOURCE, argv[i],
|
ges_asset_request_async (GES_TYPE_URI_CLIP, argv[i],
|
||||||
NULL, (GAsyncReadyCallback) asset_loaded_cb, mainloop);
|
NULL, (GAsyncReadyCallback) asset_loaded_cb, mainloop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ update_effect_sensitivity (App * app)
|
||||||
|
|
||||||
/* effects will work for multiple FileSource */
|
/* effects will work for multiple FileSource */
|
||||||
for (i = app->selected_objects; i; i = i->next) {
|
for (i = app->selected_objects; i; i = i->next) {
|
||||||
if (!GES_IS_TIMELINE_FILE_SOURCE (i->data)) {
|
if (!GES_IS_URI_CLIP (i->data)) {
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -348,7 +348,7 @@ layer_object_added_cb (GESTimelineLayer * layer, GESClip * object, App * app)
|
||||||
|
|
||||||
gtk_list_store_append (app->model, &iter);
|
gtk_list_store_append (app->model, &iter);
|
||||||
|
|
||||||
if (GES_IS_TIMELINE_FILE_SOURCE (object)) {
|
if (GES_IS_URI_CLIP (object)) {
|
||||||
g_object_get (G_OBJECT (object), "uri", &description, NULL);
|
g_object_get (G_OBJECT (object), "uri", &description, NULL);
|
||||||
gtk_list_store_set (app->model, &iter, 0, description, 2, object, -1);
|
gtk_list_store_set (app->model, &iter, 0, description, 2, object, -1);
|
||||||
}
|
}
|
||||||
|
@ -681,7 +681,7 @@ connect_to_object (GESClip * object, App * app)
|
||||||
GST_TIME_ARGS (duration));
|
GST_TIME_ARGS (duration));
|
||||||
gtk_entry_set_text (app->seconds, buf);
|
gtk_entry_set_text (app->seconds, buf);
|
||||||
|
|
||||||
if (GES_IS_TIMELINE_FILE_SOURCE (object)) {
|
if (GES_IS_URI_CLIP (object)) {
|
||||||
connect_to_filesource (object, app);
|
connect_to_filesource (object, app);
|
||||||
} else if (GES_IS_TIMELINE_TITLE_SOURCE (object)) {
|
} else if (GES_IS_TIMELINE_TITLE_SOURCE (object)) {
|
||||||
connect_to_title_source (object, app);
|
connect_to_title_source (object, app);
|
||||||
|
@ -695,7 +695,7 @@ connect_to_object (GESClip * object, App * app)
|
||||||
static void
|
static void
|
||||||
disconnect_from_object (GESClip * object, App * app)
|
disconnect_from_object (GESClip * object, App * app)
|
||||||
{
|
{
|
||||||
if (GES_IS_TIMELINE_FILE_SOURCE (object)) {
|
if (GES_IS_URI_CLIP (object)) {
|
||||||
disconnect_from_filesource (object, app);
|
disconnect_from_filesource (object, app);
|
||||||
} else if (GES_IS_TIMELINE_TITLE_SOURCE (object)) {
|
} else if (GES_IS_TIMELINE_TITLE_SOURCE (object)) {
|
||||||
disconnect_from_title_source (object, app);
|
disconnect_from_title_source (object, app);
|
||||||
|
@ -1151,7 +1151,7 @@ app_add_file (App * app, gchar * uri)
|
||||||
|
|
||||||
GST_DEBUG ("adding file %s", uri);
|
GST_DEBUG ("adding file %s", uri);
|
||||||
|
|
||||||
obj = GES_CLIP (ges_timeline_filesource_new (uri));
|
obj = GES_CLIP (ges_uri_clip_new (uri));
|
||||||
|
|
||||||
ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER (app->layer),
|
ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER (app->layer),
|
||||||
obj, -1);
|
obj, -1);
|
||||||
|
@ -1603,7 +1603,7 @@ app_selection_changed_cb (GtkTreeSelection * selection, App * app)
|
||||||
gtk_widget_set_visible (app->properties, app->n_selected > 0);
|
gtk_widget_set_visible (app->properties, app->n_selected > 0);
|
||||||
|
|
||||||
gtk_widget_set_visible (app->filesource_properties,
|
gtk_widget_set_visible (app->filesource_properties,
|
||||||
app->selected_type == GES_TYPE_TIMELINE_FILE_SOURCE);
|
app->selected_type == GES_TYPE_URI_CLIP);
|
||||||
|
|
||||||
gtk_widget_set_visible (app->text_properties,
|
gtk_widget_set_visible (app->text_properties,
|
||||||
app->selected_type == GES_TYPE_TIMELINE_TITLE_SOURCE);
|
app->selected_type == GES_TYPE_TIMELINE_TITLE_SOURCE);
|
||||||
|
|
|
@ -43,7 +43,7 @@ make_source (char *path, guint64 start, guint64 duration, gint priority)
|
||||||
{
|
{
|
||||||
gchar *uri = gst_filename_to_uri (path, NULL);
|
gchar *uri = gst_filename_to_uri (path, NULL);
|
||||||
|
|
||||||
GESClip *ret = GES_CLIP (ges_timeline_filesource_new (uri));
|
GESClip *ret = GES_CLIP (ges_uri_clip_new (uri));
|
||||||
|
|
||||||
g_object_set (ret,
|
g_object_set (ret,
|
||||||
"start", (guint64) start,
|
"start", (guint64) start,
|
||||||
|
|
|
@ -30,7 +30,7 @@ main (int argc, gchar ** argv)
|
||||||
GESTimeline *timeline;
|
GESTimeline *timeline;
|
||||||
GESTrack *tracka, *trackv;
|
GESTrack *tracka, *trackv;
|
||||||
GESTimelineLayer *layer1, *layer2;
|
GESTimelineLayer *layer1, *layer2;
|
||||||
GESTimelineFileSource *src;
|
GESUriClip *src;
|
||||||
GMainLoop *mainloop;
|
GMainLoop *mainloop;
|
||||||
|
|
||||||
gint inpoint = 0, duration = 10;
|
gint inpoint = 0, duration = 10;
|
||||||
|
@ -90,7 +90,7 @@ main (int argc, gchar ** argv)
|
||||||
if (1) {
|
if (1) {
|
||||||
gchar *uri = gst_filename_to_uri (argv[1], NULL);
|
gchar *uri = gst_filename_to_uri (argv[1], NULL);
|
||||||
/* Add the main audio/video file */
|
/* Add the main audio/video file */
|
||||||
src = ges_timeline_filesource_new (uri);
|
src = ges_uri_clip_new (uri);
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
g_object_set (src, "in-point", inpoint * GST_SECOND,
|
g_object_set (src, "in-point", inpoint * GST_SECOND,
|
||||||
"duration", duration * GST_SECOND, "mute", mute, NULL);
|
"duration", duration * GST_SECOND, "mute", mute, NULL);
|
||||||
|
|
|
@ -63,7 +63,7 @@ main (int argc, gchar ** argv)
|
||||||
|
|
||||||
for (i = 1; i < argc; i++, offset += GST_SECOND) {
|
for (i = 1; i < argc; i++, offset += GST_SECOND) {
|
||||||
gchar *uri = gst_filename_to_uri (argv[i], NULL);
|
gchar *uri = gst_filename_to_uri (argv[i], NULL);
|
||||||
GESTimelineFileSource *src = ges_timeline_filesource_new (uri);
|
GESUriClip *src = ges_uri_clip_new (uri);
|
||||||
|
|
||||||
g_assert (src);
|
g_assert (src);
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
|
|
|
@ -62,7 +62,7 @@ main (int argc, gchar ** argv)
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
gchar *uri = gst_filename_to_uri (argv[i], NULL);
|
gchar *uri = gst_filename_to_uri (argv[i], NULL);
|
||||||
GESTimelineFileSource *src = ges_timeline_filesource_new (uri);
|
GESUriClip *src = ges_uri_clip_new (uri);
|
||||||
|
|
||||||
g_assert (src);
|
g_assert (src);
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
|
|
|
@ -117,7 +117,7 @@ main (int argc, gchar ** argv)
|
||||||
|
|
||||||
for (i = 2; i < argc; i++) {
|
for (i = 2; i < argc; i++) {
|
||||||
gchar *uri = gst_filename_to_uri (argv[i], NULL);
|
gchar *uri = gst_filename_to_uri (argv[i], NULL);
|
||||||
GESTimelineFileSource *src = ges_timeline_filesource_new (uri);
|
GESUriClip *src = ges_uri_clip_new (uri);
|
||||||
|
|
||||||
g_assert (src);
|
g_assert (src);
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
|
|
|
@ -37,7 +37,7 @@ make_source (char *path, guint64 start, guint64 duration, gint priority,
|
||||||
{
|
{
|
||||||
gchar *uri = gst_filename_to_uri (path, NULL);
|
gchar *uri = gst_filename_to_uri (path, NULL);
|
||||||
|
|
||||||
GESClip *ret = GES_CLIP (ges_timeline_filesource_new (uri));
|
GESClip *ret = GES_CLIP (ges_uri_clip_new (uri));
|
||||||
|
|
||||||
g_object_set (ret,
|
g_object_set (ret,
|
||||||
"start", (guint64) start,
|
"start", (guint64) start,
|
||||||
|
|
|
@ -42,7 +42,7 @@ make_source (gchar * path, guint64 start, guint64 duration, guint64 inpoint,
|
||||||
{
|
{
|
||||||
gchar *uri = gst_filename_to_uri (path, NULL);
|
gchar *uri = gst_filename_to_uri (path, NULL);
|
||||||
|
|
||||||
GESClip *ret = GES_CLIP (ges_timeline_filesource_new (uri));
|
GESClip *ret = GES_CLIP (ges_uri_clip_new (uri));
|
||||||
|
|
||||||
g_object_set (ret,
|
g_object_set (ret,
|
||||||
"start", (guint64) start,
|
"start", (guint64) start,
|
||||||
|
|
|
@ -211,7 +211,7 @@ create_timeline (int nbargs, gchar ** argv, gchar * audio, gchar * video)
|
||||||
}
|
}
|
||||||
|
|
||||||
inpoint = str_to_time (argv[i * 3 + 1]);
|
inpoint = str_to_time (argv[i * 3 + 1]);
|
||||||
obj = GES_CLIP (ges_timeline_filesource_new (uri));
|
obj = GES_CLIP (ges_uri_clip_new (uri));
|
||||||
g_object_set (obj,
|
g_object_set (obj,
|
||||||
"in-point", (guint64) inpoint, "duration", (guint64) duration, NULL);
|
"in-point", (guint64) inpoint, "duration", (guint64) duration, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue