mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 09:31:06 +00:00
Remove EncodingTarget::add_profile() and consider it immutable
This commit is contained in:
parent
1cecb1c8ab
commit
00a5fecdbb
2 changed files with 3 additions and 11 deletions
|
@ -193,8 +193,9 @@ status = "generate"
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "add_profile"
|
name = "add_profile"
|
||||||
[object.function.return]
|
# can be provided on constructor and we better
|
||||||
bool_return_is_error = "Failed to add profile"
|
# consider this immutable
|
||||||
|
ignore = true
|
||||||
|
|
||||||
[[object.function]]
|
[[object.function]]
|
||||||
name = "get_category"
|
name = "get_category"
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
use EncodingProfile;
|
use EncodingProfile;
|
||||||
use Error;
|
use Error;
|
||||||
use ffi;
|
use ffi;
|
||||||
use glib;
|
|
||||||
use glib::object::IsA;
|
use glib::object::IsA;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib_ffi;
|
use glib_ffi;
|
||||||
|
@ -55,8 +54,6 @@ unsafe impl Send for EncodingTarget {}
|
||||||
unsafe impl Sync for EncodingTarget {}
|
unsafe impl Sync for EncodingTarget {}
|
||||||
|
|
||||||
pub trait EncodingTargetExt {
|
pub trait EncodingTargetExt {
|
||||||
fn add_profile<P: IsA<EncodingProfile>>(&self, profile: &P) -> Result<(), glib::error::BoolError>;
|
|
||||||
|
|
||||||
fn get_category(&self) -> String;
|
fn get_category(&self) -> String;
|
||||||
|
|
||||||
fn get_description(&self) -> String;
|
fn get_description(&self) -> String;
|
||||||
|
@ -73,12 +70,6 @@ pub trait EncodingTargetExt {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<EncodingTarget>> EncodingTargetExt for O {
|
impl<O: IsA<EncodingTarget>> EncodingTargetExt for O {
|
||||||
fn add_profile<P: IsA<EncodingProfile>>(&self, profile: &P) -> Result<(), glib::error::BoolError> {
|
|
||||||
unsafe {
|
|
||||||
glib::error::BoolError::from_glib(ffi::gst_encoding_target_add_profile(self.to_glib_none().0, profile.to_glib_full()), "Failed to add profile")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn get_category(&self) -> String {
|
fn get_category(&self) -> String {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::gst_encoding_target_get_category(self.to_glib_none().0))
|
from_glib_none(ffi::gst_encoding_target_get_category(self.to_glib_none().0))
|
||||||
|
|
Loading…
Reference in a new issue