Commit 813c4b4f authored by Aurélien Zanelli's avatar Aurélien Zanelli Committed by Thibault Saunier
Browse files

ges: add some g-i annotations according to documentation

Mainly (transfer xxx) and (nullable). Also fix some typo.

https://bugzilla.gnome.org/show_bug.cgi?id=766459
parent dc952990
......@@ -477,7 +477,7 @@ _gtask_return_true (GTask * task, gpointer udata)
*
* Looks for asset with specified id in cache and it's completely loaded.
*
* Returns: (transfer none): The #GESAsset found or %NULL
* Returns: (transfer none) (nullable): The #GESAsset found or %NULL
*/
GESAsset *
ges_asset_cache_lookup (GType extractable_type, const gchar * id)
......@@ -770,7 +770,7 @@ ges_asset_list_proxies (GESAsset * asset)
* ges_asset_get_proxy:
* @asset: The #GESAsset to get currenlty used proxy
*
* Returns: (transfer none): The proxy in use for @asset
* Returns: (transfer none) (nullable): The proxy in use for @asset
*/
GESAsset *
ges_asset_get_proxy (GESAsset * asset)
......@@ -788,7 +788,7 @@ ges_asset_get_proxy (GESAsset * asset)
* ges_asset_get_proxy_target:
* @proxy: The #GESAsset from which to get the the asset it proxies.
*
* Returns: (transfer none): The #GESAsset that is proxied by @proxy
* Returns: (transfer none) (nullable): The #GESAsset that is proxied by @proxy
*/
GESAsset *
ges_asset_get_proxy_target (GESAsset * proxy)
......@@ -1283,8 +1283,8 @@ ges_list_assets (GType filter)
* ges_asset_get_error:
* @self: The asset to retrieve the error from
*
* Returns: (transfer none): The #GError of the asset or %NULL if the asset was
* loaded without issue
* Returns: (transfer none) (nullable): The #GError of the asset or %NULL if
* the asset was loaded without issue
*
* Since: 1.8
*/
......
......@@ -183,7 +183,7 @@ ges_audio_test_source_get_freq (GESAudioTestSource * self)
/**
* ges_audio_test_source_get_volume:
* @self: a #GESAudioTestSource
*
*
* Get the current volume of @self.
*
* Returns: The current volume of @self
......@@ -203,7 +203,7 @@ ges_audio_test_source_get_volume (GESAudioTestSource * self)
*
* Creates a new #GESAudioTestSource.
*
* Returns: The newly created #GESAudioTestSource.
* Returns: (transfer floating) (nullable): The newly created #GESAudioTestSource.
*/
GESAudioTestSource *
ges_audio_test_source_new (void)
......
......@@ -114,7 +114,7 @@ ges_audio_track_class_init (GESAudioTrackClass * klass)
* Creates a new #GESAudioTrack of type #GES_TRACK_TYPE_AUDIO and with generic
* raw audio caps ("audio/x-raw");
*
* Returns: A new #GESTrack
* Returns: (transfer floating): A new #GESTrack
*/
GESAudioTrack *
ges_audio_track_new (void)
......
......@@ -287,7 +287,7 @@ ges_audio_transition_duration_changed (GESTrackElement * track_element,
*
* Creates a new #GESAudioTransition.
*
* Returns: The newly created #GESAudioTransition.
* Returns: (transfer floating): The newly created #GESAudioTransition.
*/
GESAudioTransition *
ges_audio_transition_new (void)
......
......@@ -185,8 +185,8 @@ ges_audio_uri_source_init (GESAudioUriSource * self)
*
* Creates a new #GESAudioUriSource for the provided @uri.
*
* Returns: The newly created #GESAudioUriSource, or %NULL if there was an
* error.
* Returns: (transfer floating) (nullable): The newly created
* #GESAudioUriSource, or %NULL if there was an error.
*/
GESAudioUriSource *
ges_audio_uri_source_new (gchar * uri)
......
......@@ -824,8 +824,8 @@ ges_clip_init (GESClip * self)
* keep a reference to the newly created trackelement, you therefore need to
* call @ges_container_remove when you are done with it.
*
* Returns: (transfer none): A #GESTrackElement. Returns NULL if the #GESTrackElement could not
* be created.
* Returns: (transfer none) (nullable): A #GESTrackElement. Returns NULL if
* the #GESTrackElement could not be created.
*/
GESTrackElement *
ges_clip_create_track_element (GESClip * clip, GESTrackType type)
......@@ -1053,8 +1053,8 @@ ges_clip_move_to_layer (GESClip * clip, GESLayer * layer)
* Note: If many objects match, then the one with the highest priority will be
* returned.
*
* Returns: (transfer full): The #GESTrackElement used by @track, else %NULL,
* Unref after usage
* Returns: (transfer full) (nullable): The #GESTrackElement used by @track,
* else %NULL. Unref after usage
*/
GESTrackElement *
......@@ -1090,7 +1090,7 @@ ges_clip_find_track_element (GESClip * clip, GESTrack * track, GType type)
*
* Get the #GESLayer to which this clip belongs.
*
* Returns: (transfer full): The #GESLayer where this @clip is being
* Returns: (transfer full) (nullable): The #GESLayer where this @clip is being
* used, or %NULL if it is not used on any layer. The caller should unref it
* usage.
*/
......@@ -1265,8 +1265,8 @@ ges_clip_set_top_effect_index (GESClip * clip, GESBaseEffect * effect,
* property must be registered using @ges_effect_class_register_rate_property;
* for the 'pitch' plugin, this is already done.
*
* Returns: (transfer none): The newly created #GESClip resulting from the
* splitting
* Returns: (transfer none) (nullable): The newly created #GESClip resulting
* from the splitting or %NULL if the clip can't be split.
*/
GESClip *
ges_clip_split (GESClip * clip, guint64 position)
......
......@@ -176,7 +176,7 @@ _create_track_element (GESClip * self, GESTrackType type)
*
* Creates a new #GESEffectClip from the description of the bin.
*
* Returns: a newly created #GESEffectClip, or
* Returns: (transfer floating) (nullable): a newly created #GESEffectClip, or
* %NULL if something went wrong.
*/
GESEffectClip *
......
......@@ -257,7 +257,7 @@ ges_effect_create_element (GESTrackElement * object)
* #ges_asset_request (GES_TYPE_EFFECT, "audio your ! bin ! description", NULL);
* and extract that asset to be in full control.
*
* Returns: a newly created #GESEffect, or %NULL if something went
* Returns: (nullable): a newly created #GESEffect, or %NULL if something went
* wrong.
*/
GESEffect *
......
......@@ -83,7 +83,8 @@ ges_extractable_default_init (GESExtractableInterface * iface)
*
* Method for getting an asset from a #GESExtractable
*
* Returns: (transfer none): The #GESAsset or %NULL if none has been set
* Returns: (transfer none) (nullable): The #GESAsset or %NULL if none has
* been set
*/
GESAsset *
ges_extractable_get_asset (GESExtractable * self)
......@@ -212,8 +213,8 @@ ges_extractable_type_get_asset_type (GType type)
*
* Check if @id is valid for @type
*
* Returns: (transfer full): A newly allocated string containing the actuall
* ID (after some processing) or %NULL if the ID is wrong.
* Returns: (transfer full) (nullable): A newly allocated string containing
* the actual ID (after some processing) or %NULL if the ID is wrong.
*/
gchar *
ges_extractable_type_check_id (GType type, const gchar * id, GError ** error)
......
......@@ -791,7 +791,7 @@ ges_group_init (GESGroup * self)
* together, it is recommanded to use the #ges_container_group method so the
* proper subclass is selected.
*
* Returns: The new empty group.
* Returns: (transfer floating): The new empty group.
*/
GESGroup *
ges_group_new (void)
......
......@@ -181,7 +181,7 @@ ges_image_source_init (GESImageSource * self)
*
* Creates a new #GESImageSource for the provided @uri.
*
* Returns: A new #GESImageSource.
* Returns: (transfer floating): A new #GESImageSource.
*/
GESImageSource *
ges_image_source_new (gchar * uri)
......
......@@ -502,7 +502,7 @@ ges_layer_is_empty (GESLayer * layer)
* are constructed, you should connect to the container::child-added signal which
* is emited right after those elements are ready to be used.
*
* Returns: TRUE if the clip was properly added to the layer, or FALSE
* Returns: %TRUE if the clip was properly added to the layer, or %FALSE
* if the @layer refuses to add the clip.
*/
gboolean
......@@ -662,7 +662,7 @@ ges_layer_add_asset (GESLayer * layer,
*
* Creates a new #GESLayer.
*
* Returns: A new #GESLayer
* Returns: (transfer floating): A new #GESLayer
*/
GESLayer *
ges_layer_new (void)
......@@ -676,7 +676,7 @@ ges_layer_new (void)
*
* Get the #GESTimeline in which #GESLayer currently is.
*
* Returns: (transfer none): the #GESTimeline in which #GESLayer
* Returns: (transfer none) (nullable): the #GESTimeline in which #GESLayer
* currently is or %NULL if not in any timeline yet.
*/
GESTimeline *
......
......@@ -426,8 +426,8 @@ ges_meta_container_set_meta (GESMetaContainer * container,
*
* Serializes a meta container to a string.
*
* Returns: a newly-allocated string, or NULL in case of an error. The
* string must be freed with g_free() when no longer needed.
* Returns: (nullable): a newly-allocated string, or NULL in case of an error.
* The string must be freed with g_free() when no longer needed.
*/
gchar *
ges_meta_container_metas_to_string (GESMetaContainer * container)
......
......@@ -261,7 +261,7 @@ ges_multi_file_source_init (GESMultiFileSource * self)
*
* Creates a new #GESMultiFileSource for the provided @uri.
*
* Returns: A new #GESMultiFileSource.
* Returns: (transfer floating): A new #GESMultiFileSource.
*/
GESMultiFileSource *
ges_multi_file_source_new (gchar * uri)
......
......@@ -401,7 +401,7 @@ no_encodebin:
*
* Creates a new conveninence #GESPipeline.
*
* Returns: the new #GESPipeline.
* Returns: (transfer floating): the new #GESPipeline.
*/
GESPipeline *
ges_pipeline_new (void)
......@@ -921,7 +921,7 @@ _unlink_track (GESPipeline * self, GESTrack * track)
/**
* ges_pipeline_set_timeline:
* @pipeline: a #GESPipeline
* @timeline: the #GESTimeline to set on the @pipeline.
* @timeline: (transfer full): the #GESTimeline to set on the @pipeline.
*
* Sets the timeline to use in this pipeline.
*
......@@ -1196,7 +1196,7 @@ ges_pipeline_set_mode (GESPipeline * pipeline, GESPipelineFlags mode)
* is currently used by the sink. This information can be retrieve from caps
* associated with the buffer.
*
* Returns: (transfer full): a #GstSample or %NULL
* Returns: (transfer full) (nullable): a #GstSample or %NULL
*/
GstSample *
......@@ -1284,11 +1284,11 @@ ges_pipeline_save_thumbnail (GESPipeline * self, int width, int
* and height. If -1 is specified for either dimension, it will be left at
* native size. You can retreive this information from the caps associated
* with the buffer.
*
*
* The caller is responsible for unreffing the returned sample with
* #gst_sample_unref.
*
* Returns: (transfer full): a #GstSample or %NULL
* Returns: (transfer full) (nullable): a #GstSample or %NULL
*/
GstSample *
......
......@@ -732,7 +732,7 @@ ges_project_create_asset (GESProject * project, const gchar * id,
* "asset-added" signal to get the asset when it finally gets added to
* @project
*
* Returns: (transfer full): The newly created #GESAsset
* Returns: (transfer full) (nullable): The newly created #GESAsset or %NULL.
*/
GESAsset *
ges_project_create_asset_sync (GESProject * project, const gchar * id,
......
......@@ -358,8 +358,8 @@ ges_test_clip_create_track_element (GESClip * clip, GESTrackType type)
*
* Creates a new #GESTestClip.
*
* Returns: The newly created #GESTestClip, or NULL if there was an
* error.
* Returns: (transfer floating) (nullable): The newly created #GESTestClip,
* or %NULL if there was an error.
*/
GESTestClip *
ges_test_clip_new (void)
......@@ -379,8 +379,8 @@ ges_test_clip_new (void)
*
* Creates a new #GESTestClip for the provided @nick.
*
* Returns: The newly created #GESTestClip, or NULL if there was an
* error.
* Returns: (transfer floating) (nullable): The newly created #GESTestClip,
* or %NULL if there was an error.
*/
GESTestClip *
ges_test_clip_new_for_nick (gchar * nick)
......
......@@ -38,7 +38,6 @@ G_DEFINE_TYPE (GESTextOverlayClip, ges_text_overlay_clip,
#define DEFAULT_PROP_FONT_DESC "Serif 36"
#define DEFAULT_PROP_VALIGNMENT GES_TEXT_VALIGN_BASELINE
#define DEFAULT_PROP_HALIGNMENT GES_TEXT_HALIGN_CENTER
#
struct _GESTextOverlayClipPrivate
{
......@@ -583,8 +582,8 @@ ges_text_overlay_clip_create_track_element (GESClip * clip, GESTrackType type)
*
* Creates a new #GESTextOverlayClip
*
* Returns: The newly created #GESTextOverlayClip, or NULL if there was an
* error.
* Returns: (transfer floating) (nullable): The newly created
* #GESTextOverlayClip, or %NULL if there was an error.
*/
GESTextOverlayClip *
ges_text_overlay_clip_new (void)
......
......@@ -425,8 +425,8 @@ ges_text_overlay_get_ypos (GESTextOverlay * self)
*
* Creates a new #GESTextOverlay.
*
* Returns: The newly created #GESTextOverlay or %NULL if something went
* wrong.
* Returns: (transfer floating) (nullable): The newly created #GESTextOverlay or
* %NULL if something went wrong.
*/
GESTextOverlay *
ges_text_overlay_new (void)
......
......@@ -553,8 +553,8 @@ had_parent:
* Returns the parent of @self. This function increases the refcount
* of the parent object so you should gst_object_unref() it after usage.
*
* Returns: (transfer full): parent of @self, this can be %NULL if @self
* has no parent. unref after usage.
* Returns: (transfer full) (nullable): parent of @self, this can be %NULL if
* @self has no parent. unref after usage.
*/
GESTimelineElement *
ges_timeline_element_get_parent (GESTimelineElement * self)
......@@ -629,8 +629,8 @@ had_timeline:
* Returns the timeline of @self. This function increases the refcount
* of the timeline so you should gst_object_unref() it after usage.
*
* Returns: (transfer full): timeline of @self, this can be %NULL if @self
* has no timeline. unref after usage.
* Returns: (transfer full) (nullable): timeline of @self, this can be %NULL if
* @self has no timeline. unref after usage.
*/
GESTimeline *
ges_timeline_element_get_timeline (GESTimelineElement * self)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment