docs: update GESAudioTrack and GESVideoTrack
authorHenry Wilkes <hwilkes@igalia.com>
Wed, 12 Feb 2020 22:23:38 +0000 (22:23 +0000)
committerThibault Saunier <tsaunier@igalia.com>
Thu, 5 Mar 2020 20:04:51 +0000 (17:04 -0300)
ges/ges-audio-track.c
ges/ges-video-track.c

index 1ac8af07c5ff10b48d177e695d9e575a483e3ccb..952f7864a1b1e05ab7be2cf52efaec63a7f1beda 100644 (file)
 /**
  * SECTION: gesaudiotrack
  * @title: GESAudioTrack
- * @short_description: A standard GESTrack for raw audio
+ * @short_description: A standard #GESTrack for raw audio
  *
- * Sane default properties to specify and fixate the output stream are
- * set as restriction-caps.
- * It is advised, to modify these properties, to use
- * #ges_track_update_restriction_caps, setting them directly is
- * possible through #ges_track_set_restriction_caps, but not specifying
- * one of them can lead to negotiation issues, only use that function
- * if you actually know what you're doing :)
+ * A #GESAudioTrack is a default audio #GESTrack, with a
+ * #GES_TRACK_TYPE_AUDIO #GESTrack:track-type and "audio/x-raw(ANY)"
+ * #GESTrack:caps.
  *
- * The default properties are:
- * - format: S32LE
+ * By default, an audio track will have its #GESTrack:restriction-caps
+ * set to "audio/x-raw" with the following properties:
+ *
+ * - format: "S32LE"
  * - channels: 2
  * - rate: 44100
- * - layout: interleaved
+ * - layout: "interleaved"
+ *
+ * These fields are needed for negotiation purposes, but you can change
+ * their values if you wish. It is advised that you do so using
+ * ges_track_update_restriction_caps() with new values for the fields you
+ * wish to change, and any additional fields you may want to add. Unlike
+ * using ges_track_set_restriction_caps(), this will ensure that these
+ * default fields will at least have some value set.
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -112,10 +117,19 @@ ges_audio_track_class_init (GESAudioTrackClass * klass)
 /**
  * ges_audio_track_new:
  *
- * Creates a new #GESAudioTrack of type #GES_TRACK_TYPE_AUDIO and with generic
- * raw audio caps ("audio/x-raw");
+ * Creates a new audio track, with a #GES_TRACK_TYPE_AUDIO
+ * #GESTrack:track-type, "audio/x-raw(ANY)" #GESTrack:caps, and
+ * "audio/x-raw" #GESTrack:restriction-caps with the properties:
+ *
+ * - format: "S32LE"
+ * - channels: 2
+ * - rate: 44100
+ * - layout: "interleaved"
+ *
+ * You should use ges_track_update_restriction_caps() if you wish to
+ * modify these fields, or add additional ones.
  *
- * Returns: (transfer floating): A new #GESTrack
+ * Returns: (transfer floating): The newly created audio track.
  */
 GESAudioTrack *
 ges_audio_track_new (void)
index 6f2fc34be91396be700d8e3165e1e53a243c82ec..1cfe9c7b44051748df720d506579431a283f4e52 100644 (file)
  * @title: GESVideoTrack
  * @short_description: A standard GESTrack for raw video
  *
- * Sane default properties to specify and fixate the output stream are
- * set as restriction-caps.
- * It is advised, to modify these properties, to use
- * #ges_track_update_restriction_caps, setting them directly is
- * possible through #ges_track_set_restriction_caps.
+ * A #GESVideoTrack is a default video #GESTrack, with a
+ * #GES_TRACK_TYPE_VIDEO #GESTrack:track-type and "video/x-raw(ANY)"
+ * #GESTrack:caps.
  *
- * The default properties are:
- * - width: 1920
- * - height: 1080
+ * By default, a video track will have its #GESTrack:restriction-caps
+ * set to "video/x-raw" with the following properties:
+ *
+ * - width: 1280
+ * - height: 720
  * - framerate: 30/1
+ *
+ * These fields are needed for negotiation purposes, but you can change
+ * their values if you wish. It is advised that you do so using
+ * ges_track_update_restriction_caps() with new values for the fields you
+ * wish to change, and any additional fields you may want to add. Unlike
+ * using ges_track_set_restriction_caps(), this will ensure that these
+ * default fields will at least have some value set.
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -148,10 +155,18 @@ ges_video_track_class_init (GESVideoTrackClass * klass)
 /**
  * ges_video_track_new:
  *
- * Creates a new #GESVideoTrack of type #GES_TRACK_TYPE_VIDEO and with generic
- * raw video caps ("video/x-raw");
+ * Creates a new video track, with a #GES_TRACK_TYPE_VIDEO
+ * #GESTrack:track-type and "video/x-raw(ANY)" #GESTrack:caps, and
+ * "video/x-raw" #GESTrack:restriction-caps with the properties:
+ *
+ * - width: 1280
+ * - height: 720
+ * - framerate: 30/1
+ *
+ * You should use ges_track_update_restriction_caps() if you wish to
+ * modify these fields, or add additional ones.
  *
- * Returns: (transfer floating): A new #GESTrack.
+ * Returns: (transfer floating): The newly created video track.
  */
 GESVideoTrack *
 ges_video_track_new (void)