gstreamer_editing_services/auto/video_track.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::{ffi, MetaContainer, Track};
7use glib::translate::*;
8
9glib::wrapper! {
10 /// A [`VideoTrack`][crate::VideoTrack] is a default video [`Track`][crate::Track], with a
11 /// [`TrackType::VIDEO`][crate::TrackType::VIDEO] [`track-type`][struct@crate::Track#track-type] and "video/x-raw(ANY)"
12 /// [`caps`][struct@crate::Track#caps].
13 ///
14 /// By default, a video track will have its [`restriction-caps`][struct@crate::Track#restriction-caps]
15 /// set to "video/x-raw" with the following properties:
16 ///
17 /// - width: 1280
18 /// - height: 720
19 /// - framerate: 30/1
20 ///
21 /// These fields are needed for negotiation purposes, but you can change
22 /// their values if you wish. It is advised that you do so using
23 /// [`GESTrackExt::update_restriction_caps()`][crate::prelude::GESTrackExt::update_restriction_caps()] with new values for the fields you
24 /// wish to change, and any additional fields you may want to add. Unlike
25 /// using [`GESTrackExt::set_restriction_caps()`][crate::prelude::GESTrackExt::set_restriction_caps()], this will ensure that these
26 /// default fields will at least have some value set.
27 ///
28 /// # Implements
29 ///
30 /// [`GESTrackExt`][trait@crate::prelude::GESTrackExt], [`trait@gst::prelude::BinExt`], [`trait@gst::prelude::ElementExt`], [`trait@gst::prelude::GstObjectExt`], [`trait@glib::ObjectExt`], [`trait@gst::prelude::ChildProxyExt`], [`MetaContainerExt`][trait@crate::prelude::MetaContainerExt]
31 #[doc(alias = "GESVideoTrack")]
32 pub struct VideoTrack(Object<ffi::GESVideoTrack, ffi::GESVideoTrackClass>) @extends Track, gst::Bin, gst::Element, gst::Object, @implements gst::ChildProxy, MetaContainer;
33
34 match fn {
35 type_ => || ffi::ges_video_track_get_type(),
36 }
37}
38
39impl VideoTrack {
40 pub const NONE: Option<&'static VideoTrack> = None;
41
42 /// Creates a new video track, with a [`TrackType::VIDEO`][crate::TrackType::VIDEO]
43 /// [`track-type`][struct@crate::Track#track-type] and "video/x-raw(ANY)" [`caps`][struct@crate::Track#caps], and
44 /// "video/x-raw" [`restriction-caps`][struct@crate::Track#restriction-caps] with the properties:
45 ///
46 /// - width: 1280
47 /// - height: 720
48 /// - framerate: 30/1
49 ///
50 /// You should use [`GESTrackExt::update_restriction_caps()`][crate::prelude::GESTrackExt::update_restriction_caps()] if you wish to
51 /// modify these fields, or add additional ones.
52 ///
53 /// # Returns
54 ///
55 /// The newly created video track.
56 #[doc(alias = "ges_video_track_new")]
57 pub fn new() -> VideoTrack {
58 assert_initialized_main_thread!();
59 unsafe { from_glib_none(ffi::ges_video_track_new()) }
60 }
61}
62
63impl Default for VideoTrack {
64 fn default() -> Self {
65 Self::new()
66 }
67}