mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-09-27 20:12:06 +00:00
rtp: Fix mutability of caps in RtpHeaderExtension API
This commit is contained in:
parent
6e6f5108a9
commit
d7fe610767
3 changed files with 54 additions and 39 deletions
|
@ -72,6 +72,21 @@ manual_traits = ["RTPHeaderExtensionExtManual"]
|
||||||
# Mutability of BufferRef
|
# Mutability of BufferRef
|
||||||
manual = true
|
manual = true
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "set_caps_from_attributes"
|
||||||
|
# Mutability of CapsRef
|
||||||
|
manual = true
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "set_caps_from_attributes_helper"
|
||||||
|
# Mutability of CapsRef
|
||||||
|
manual = true
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "update_non_rtp_src_caps"
|
||||||
|
# Mutability of CapsRef
|
||||||
|
manual = true
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "get_sdp_caps_field_name"
|
name = "get_sdp_caps_field_name"
|
||||||
[object.function.return]
|
[object.function.return]
|
||||||
|
|
|
@ -62,12 +62,6 @@ pub trait RTPHeaderExtensionExt: 'static {
|
||||||
#[doc(alias = "gst_rtp_header_extension_set_attributes_from_caps")]
|
#[doc(alias = "gst_rtp_header_extension_set_attributes_from_caps")]
|
||||||
fn set_attributes_from_caps(&self, caps: &gst::Caps) -> bool;
|
fn set_attributes_from_caps(&self, caps: &gst::Caps) -> bool;
|
||||||
|
|
||||||
#[doc(alias = "gst_rtp_header_extension_set_caps_from_attributes")]
|
|
||||||
fn set_caps_from_attributes(&self, caps: &gst::Caps) -> bool;
|
|
||||||
|
|
||||||
#[doc(alias = "gst_rtp_header_extension_set_caps_from_attributes_helper")]
|
|
||||||
fn set_caps_from_attributes_helper(&self, caps: &gst::Caps, attributes: &str) -> bool;
|
|
||||||
|
|
||||||
#[doc(alias = "gst_rtp_header_extension_set_direction")]
|
#[doc(alias = "gst_rtp_header_extension_set_direction")]
|
||||||
fn set_direction(&self, direction: RTPHeaderExtensionDirection);
|
fn set_direction(&self, direction: RTPHeaderExtensionDirection);
|
||||||
|
|
||||||
|
@ -80,9 +74,6 @@ pub trait RTPHeaderExtensionExt: 'static {
|
||||||
#[doc(alias = "gst_rtp_header_extension_set_wants_update_non_rtp_src_caps")]
|
#[doc(alias = "gst_rtp_header_extension_set_wants_update_non_rtp_src_caps")]
|
||||||
fn set_wants_update_non_rtp_src_caps(&self, state: bool);
|
fn set_wants_update_non_rtp_src_caps(&self, state: bool);
|
||||||
|
|
||||||
#[doc(alias = "gst_rtp_header_extension_update_non_rtp_src_caps")]
|
|
||||||
fn update_non_rtp_src_caps(&self, caps: &gst::Caps) -> bool;
|
|
||||||
|
|
||||||
#[doc(alias = "gst_rtp_header_extension_wants_update_non_rtp_src_caps")]
|
#[doc(alias = "gst_rtp_header_extension_wants_update_non_rtp_src_caps")]
|
||||||
fn wants_update_non_rtp_src_caps(&self) -> bool;
|
fn wants_update_non_rtp_src_caps(&self) -> bool;
|
||||||
}
|
}
|
||||||
|
@ -142,27 +133,6 @@ impl<O: IsA<RTPHeaderExtension>> RTPHeaderExtensionExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_caps_from_attributes(&self, caps: &gst::Caps) -> bool {
|
|
||||||
unsafe {
|
|
||||||
from_glib(ffi::gst_rtp_header_extension_set_caps_from_attributes(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
caps.to_glib_none().0,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_caps_from_attributes_helper(&self, caps: &gst::Caps, attributes: &str) -> bool {
|
|
||||||
unsafe {
|
|
||||||
from_glib(
|
|
||||||
ffi::gst_rtp_header_extension_set_caps_from_attributes_helper(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
caps.to_glib_none().0,
|
|
||||||
attributes.to_glib_none().0,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_direction(&self, direction: RTPHeaderExtensionDirection) {
|
fn set_direction(&self, direction: RTPHeaderExtensionDirection) {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::gst_rtp_header_extension_set_direction(
|
ffi::gst_rtp_header_extension_set_direction(
|
||||||
|
@ -196,15 +166,6 @@ impl<O: IsA<RTPHeaderExtension>> RTPHeaderExtensionExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_non_rtp_src_caps(&self, caps: &gst::Caps) -> bool {
|
|
||||||
unsafe {
|
|
||||||
from_glib(ffi::gst_rtp_header_extension_update_non_rtp_src_caps(
|
|
||||||
self.as_ref().to_glib_none().0,
|
|
||||||
caps.to_glib_none().0,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn wants_update_non_rtp_src_caps(&self) -> bool {
|
fn wants_update_non_rtp_src_caps(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::gst_rtp_header_extension_wants_update_non_rtp_src_caps(
|
from_glib(ffi::gst_rtp_header_extension_wants_update_non_rtp_src_caps(
|
||||||
|
|
|
@ -20,6 +20,15 @@ pub trait RTPHeaderExtensionExtManual: 'static {
|
||||||
output: &mut gst::BufferRef,
|
output: &mut gst::BufferRef,
|
||||||
data: &mut [u8],
|
data: &mut [u8],
|
||||||
) -> Result<usize, glib::BoolError>;
|
) -> Result<usize, glib::BoolError>;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_rtp_header_extension_set_caps_from_attributes")]
|
||||||
|
fn set_caps_from_attributes(&self, caps: &mut gst::CapsRef) -> bool;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_rtp_header_extension_set_caps_from_attributes_helper")]
|
||||||
|
fn set_caps_from_attributes_helper(&self, caps: &mut gst::CapsRef, attributes: &str) -> bool;
|
||||||
|
|
||||||
|
#[doc(alias = "gst_rtp_header_extension_update_non_rtp_src_caps")]
|
||||||
|
fn update_non_rtp_src_caps(&self, caps: &mut gst::CapsRef) -> bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<RTPHeaderExtension>> RTPHeaderExtensionExtManual for O {
|
impl<O: IsA<RTPHeaderExtension>> RTPHeaderExtensionExtManual for O {
|
||||||
|
@ -66,4 +75,34 @@ impl<O: IsA<RTPHeaderExtension>> RTPHeaderExtensionExtManual for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn set_caps_from_attributes(&self, caps: &mut gst::CapsRef) -> bool {
|
||||||
|
unsafe {
|
||||||
|
from_glib(ffi::gst_rtp_header_extension_set_caps_from_attributes(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
caps.as_mut_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn set_caps_from_attributes_helper(&self, caps: &mut gst::CapsRef, attributes: &str) -> bool {
|
||||||
|
unsafe {
|
||||||
|
from_glib(
|
||||||
|
ffi::gst_rtp_header_extension_set_caps_from_attributes_helper(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
caps.as_mut_ptr(),
|
||||||
|
attributes.to_glib_none().0,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn update_non_rtp_src_caps(&self, caps: &mut gst::CapsRef) -> bool {
|
||||||
|
unsafe {
|
||||||
|
from_glib(ffi::gst_rtp_header_extension_update_non_rtp_src_caps(
|
||||||
|
self.as_ref().to_glib_none().0,
|
||||||
|
caps.as_mut_ptr(),
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue