forked from mirrors/gstreamer-rs
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
|
||||
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]]
|
||||
name = "get_sdp_caps_field_name"
|
||||
[object.function.return]
|
||||
|
|
|
@ -62,12 +62,6 @@ pub trait RTPHeaderExtensionExt: 'static {
|
|||
#[doc(alias = "gst_rtp_header_extension_set_attributes_from_caps")]
|
||||
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")]
|
||||
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")]
|
||||
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")]
|
||||
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) {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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,
|
||||
data: &mut [u8],
|
||||
) -> 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 {
|
||||
|
@ -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