mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 08:36:31 +00:00
gstreamer-video: expose caps features
This commit is contained in:
parent
31313fb5c8
commit
02a43819a7
2 changed files with 65 additions and 0 deletions
56
gstreamer-video/src/caps_features.rs
Normal file
56
gstreamer-video/src/caps_features.rs
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
// Copyright (C) 2020 Mathieu Duponchelle <mathieu@centricular.com>
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
// option. This file may not be copied, modified, or distributed
|
||||||
|
// except according to those terms.
|
||||||
|
|
||||||
|
use gst::CapsFeatures;
|
||||||
|
use gst_video_sys;
|
||||||
|
use std::ffi::CStr;
|
||||||
|
|
||||||
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
|
pub static CAPS_FEATURE_FORMAT_INTERLACED: Lazy<&'static str> = Lazy::new(|| unsafe {
|
||||||
|
CStr::from_ptr(gst_video_sys::GST_CAPS_FEATURE_FORMAT_INTERLACED)
|
||||||
|
.to_str()
|
||||||
|
.unwrap()
|
||||||
|
});
|
||||||
|
pub static CAPS_FEATURES_FORMAT_INTERLACED: Lazy<CapsFeatures> =
|
||||||
|
Lazy::new(|| CapsFeatures::new(&[*CAPS_FEATURE_FORMAT_INTERLACED]));
|
||||||
|
|
||||||
|
pub static CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META: Lazy<&'static str> =
|
||||||
|
Lazy::new(|| unsafe {
|
||||||
|
CStr::from_ptr(gst_video_sys::GST_CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META)
|
||||||
|
.to_str()
|
||||||
|
.unwrap()
|
||||||
|
});
|
||||||
|
pub static CAPS_FEATURES_META_GST_VIDEO_AFFINE_TRANSFORMATION_META: Lazy<CapsFeatures> =
|
||||||
|
Lazy::new(|| CapsFeatures::new(&[*CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META]));
|
||||||
|
|
||||||
|
pub static CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META: Lazy<&'static str> =
|
||||||
|
Lazy::new(|| unsafe {
|
||||||
|
CStr::from_ptr(gst_video_sys::GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META)
|
||||||
|
.to_str()
|
||||||
|
.unwrap()
|
||||||
|
});
|
||||||
|
pub static CAPS_FEATURES_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META: Lazy<CapsFeatures> =
|
||||||
|
Lazy::new(|| CapsFeatures::new(&[*CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META]));
|
||||||
|
|
||||||
|
pub static CAPS_FEATURE_META_GST_VIDEO_META: Lazy<&'static str> = Lazy::new(|| unsafe {
|
||||||
|
CStr::from_ptr(gst_video_sys::GST_CAPS_FEATURE_META_GST_VIDEO_META)
|
||||||
|
.to_str()
|
||||||
|
.unwrap()
|
||||||
|
});
|
||||||
|
pub static CAPS_FEATURES_META_GST_VIDEO_META: Lazy<CapsFeatures> =
|
||||||
|
Lazy::new(|| CapsFeatures::new(&[*CAPS_FEATURE_META_GST_VIDEO_META]));
|
||||||
|
|
||||||
|
pub static CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION: Lazy<&'static str> =
|
||||||
|
Lazy::new(|| unsafe {
|
||||||
|
CStr::from_ptr(gst_video_sys::GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION)
|
||||||
|
.to_str()
|
||||||
|
.unwrap()
|
||||||
|
});
|
||||||
|
pub static CAPS_FEATURES_META_GST_VIDEO_OVERLAY_COMPOSITION: Lazy<CapsFeatures> =
|
||||||
|
Lazy::new(|| CapsFeatures::new(&[*CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION]));
|
|
@ -42,6 +42,15 @@ macro_rules! skip_assert_initialized {
|
||||||
mod auto;
|
mod auto;
|
||||||
pub use auto::*;
|
pub use auto::*;
|
||||||
|
|
||||||
|
mod caps_features;
|
||||||
|
pub use caps_features::{
|
||||||
|
CAPS_FEATURES_FORMAT_INTERLACED, CAPS_FEATURES_META_GST_VIDEO_AFFINE_TRANSFORMATION_META,
|
||||||
|
CAPS_FEATURES_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, CAPS_FEATURES_META_GST_VIDEO_META,
|
||||||
|
CAPS_FEATURES_META_GST_VIDEO_OVERLAY_COMPOSITION, CAPS_FEATURE_FORMAT_INTERLACED,
|
||||||
|
CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META,
|
||||||
|
CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, CAPS_FEATURE_META_GST_VIDEO_META,
|
||||||
|
CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
|
||||||
|
};
|
||||||
mod video_format;
|
mod video_format;
|
||||||
pub use video_format::*;
|
pub use video_format::*;
|
||||||
mod video_format_info;
|
mod video_format_info;
|
||||||
|
|
Loading…
Reference in a new issue