diff options
author | Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> | 2014-11-26 00:28:35 +0100 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2014-12-06 10:34:18 +0100 |
commit | e9544ce1d67da6990f0a1cae75774063ec37be9d (patch) | |
tree | ea87fdb7cc23d276e65bfd8168626b6b5b63612f /ges | |
parent | 18f14de105ed7541b0b3f58f59d33bb83633cd36 (diff) |
track: [API]: ges_track_update_restriction_caps.
+ And specify default restriction caps for audio and video tracks.
+ Add ges_track_set_restriction_caps to the sections, it was missing.
https://bugzilla.gnome.org/show_bug.cgi?id=740726
Diffstat (limited to 'ges')
-rw-r--r-- | ges/ges-video-track.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ges/ges-video-track.c b/ges/ges-video-track.c index bb2be9ca..1dcc11b8 100644 --- a/ges/ges-video-track.c +++ b/ges/ges-video-track.c @@ -20,8 +20,26 @@ /** * SECTION: 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, 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: + * - width: 1280 + * - height: 720 + * - framerate: 25/1 + * - max-framerate: 25/1 + * - views: 1 (related to stereoscopy) */ +#define DEFAULT_RESTRICTION_CAPS "video/x-raw, width=1280, height=720, " \ + "framerate=25/1, max-framerate=25/1, views=1, interlace-mode=progressive" + #include "ges-video-track.h" #include "ges-smart-video-mixer.h" @@ -143,6 +161,8 @@ ges_video_track_new (void) ret = g_object_new (GES_TYPE_VIDEO_TRACK, "track-type", GES_TRACK_TYPE_VIDEO, "caps", caps, NULL); + ges_track_set_restriction_caps (GES_TRACK (ret), + gst_caps_from_string (DEFAULT_RESTRICTION_CAPS)); ges_track_set_create_element_for_gap_func (GES_TRACK (ret), create_element_for_raw_video_gap); |