docs: update GESAudioTrack and GESVideoTrack

This commit is contained in:
Henry Wilkes 2020-02-12 22:23:38 +00:00 committed by Thibault Saunier
parent 2f2d57ff2b
commit a03afa5476
2 changed files with 54 additions and 25 deletions

View file

@ -20,21 +20,26 @@
/** /**
* SECTION: gesaudiotrack * SECTION: gesaudiotrack
* @title: 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 * A #GESAudioTrack is a default audio #GESTrack, with a
* set as restriction-caps. * #GES_TRACK_TYPE_AUDIO #GESTrack:track-type and "audio/x-raw(ANY)"
* It is advised, to modify these properties, to use * #GESTrack:caps.
* #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 :)
* *
* The default properties are: * By default, an audio track will have its #GESTrack:restriction-caps
* - format: S32LE * set to "audio/x-raw" with the following properties:
*
* - format: "S32LE"
* - channels: 2 * - channels: 2
* - rate: 44100 * - 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 #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
@ -112,10 +117,19 @@ ges_audio_track_class_init (GESAudioTrackClass * klass)
/** /**
* ges_audio_track_new: * ges_audio_track_new:
* *
* Creates a new #GESAudioTrack of type #GES_TRACK_TYPE_AUDIO and with generic * Creates a new audio track, with a #GES_TRACK_TYPE_AUDIO
* raw audio caps ("audio/x-raw"); * #GESTrack:track-type, "audio/x-raw(ANY)" #GESTrack:caps, and
* "audio/x-raw" #GESTrack:restriction-caps with the properties:
* *
* Returns: (transfer floating): A new #GESTrack * - 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): The newly created audio track.
*/ */
GESAudioTrack * GESAudioTrack *
ges_audio_track_new (void) ges_audio_track_new (void)

View file

@ -22,16 +22,23 @@
* @title: GESVideoTrack * @title: GESVideoTrack
* @short_description: A standard GESTrack for raw video * @short_description: A standard GESTrack for raw video
* *
* Sane default properties to specify and fixate the output stream are * A #GESVideoTrack is a default video #GESTrack, with a
* set as restriction-caps. * #GES_TRACK_TYPE_VIDEO #GESTrack:track-type and "video/x-raw(ANY)"
* It is advised, to modify these properties, to use * #GESTrack:caps.
* #ges_track_update_restriction_caps, setting them directly is
* possible through #ges_track_set_restriction_caps.
* *
* The default properties are: * By default, a video track will have its #GESTrack:restriction-caps
* - width: 1920 * set to "video/x-raw" with the following properties:
* - height: 1080 *
* - width: 1280
* - height: 720
* - framerate: 30/1 * - 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 #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
@ -148,10 +155,18 @@ ges_video_track_class_init (GESVideoTrackClass * klass)
/** /**
* ges_video_track_new: * ges_video_track_new:
* *
* Creates a new #GESVideoTrack of type #GES_TRACK_TYPE_VIDEO and with generic * Creates a new video track, with a #GES_TRACK_TYPE_VIDEO
* raw video caps ("video/x-raw"); * #GESTrack:track-type and "video/x-raw(ANY)" #GESTrack:caps, and
* "video/x-raw" #GESTrack:restriction-caps with the properties:
* *
* Returns: (transfer floating): A new #GESTrack. * - 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): The newly created video track.
*/ */
GESVideoTrack * GESVideoTrack *
ges_video_track_new (void) ges_video_track_new (void)