1// Take a look at the license at the top of the repository in the LICENSE file.
23use crate::ffi;
4use gst::CapsFeatures;
5use std::sync::LazyLock;
67/// Name of the caps feature indicating that the stream is interlaced.
8///
9/// Currently it is only used for video with 'interlace-mode=alternate'
10/// to ensure backwards compatibility for this new mode.
11/// In this mode each buffer carries a single field of interlaced video.
12/// [`VideoBufferFlags::TOP_FIELD`][crate::VideoBufferFlags::TOP_FIELD] and [`VideoBufferFlags::BOTTOM_FIELD`][crate::VideoBufferFlags::BOTTOM_FIELD]
13/// indicate whether the buffer carries a top or bottom field. The order of
14/// buffers/fields in the stream and the timestamps on the buffers indicate the
15/// temporal order of the fields.
16/// Top and bottom fields are expected to alternate in this mode.
17/// The frame rate in the caps still signals the frame rate, so the notional field
18/// rate will be twice the frame rate from the caps
19/// (see `GST_VIDEO_INFO_FIELD_RATE_N`).
20#[cfg(feature = "v1_16")]
21#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
22pub static CAPS_FEATURE_FORMAT_INTERLACED: &glib::GStr =
23unsafe { glib::GStr::from_utf8_with_nul_unchecked(ffi::GST_CAPS_FEATURE_FORMAT_INTERLACED) };
24#[cfg(feature = "v1_16")]
25#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
26pub static CAPS_FEATURES_FORMAT_INTERLACED: LazyLock<CapsFeatures> =
27 LazyLock::new(|| CapsFeatures::new([CAPS_FEATURE_FORMAT_INTERLACED]));
2829pub static CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META: &glib::GStr = unsafe {
30 glib::GStr::from_utf8_with_nul_unchecked(
31 ffi::GST_CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META,
32 )
33};
34pub static CAPS_FEATURES_META_GST_VIDEO_AFFINE_TRANSFORMATION_META: LazyLock<CapsFeatures> =
35 LazyLock::new(|| CapsFeatures::new([CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META]));
3637pub static CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META: &glib::GStr = unsafe {
38 glib::GStr::from_utf8_with_nul_unchecked(
39 ffi::GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META,
40 )
41};
42pub static CAPS_FEATURES_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META: LazyLock<CapsFeatures> =
43 LazyLock::new(|| CapsFeatures::new([CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META]));
4445pub static CAPS_FEATURE_META_GST_VIDEO_META: &glib::GStr =
46unsafe { glib::GStr::from_utf8_with_nul_unchecked(ffi::GST_CAPS_FEATURE_META_GST_VIDEO_META) };
47pub static CAPS_FEATURES_META_GST_VIDEO_META: LazyLock<CapsFeatures> =
48 LazyLock::new(|| CapsFeatures::new([CAPS_FEATURE_META_GST_VIDEO_META]));
4950pub static CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION: &glib::GStr = unsafe {
51 glib::GStr::from_utf8_with_nul_unchecked(
52 ffi::GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
53 )
54};
55pub static CAPS_FEATURES_META_GST_VIDEO_OVERLAY_COMPOSITION: LazyLock<CapsFeatures> =
56 LazyLock::new(|| CapsFeatures::new([CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION]));