mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 16:40:35 +00:00
Move value for PropertyNotification message into the builder instead of constructor
This commit is contained in:
parent
c2f075ed8d
commit
7bc1fce97d
1 changed files with 11 additions and 7 deletions
|
@ -319,12 +319,9 @@ impl GstRc<MessageRef> {
|
|||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn new_property_notify<'a, V: Into<Option<&'a glib::ToSendValue>>>(
|
||||
property_name: &'a str,
|
||||
value: V,
|
||||
) -> PropertyNotifyBuilder<'a> {
|
||||
pub fn new_property_notify<'a>(property_name: &'a str) -> PropertyNotifyBuilder<'a> {
|
||||
assert_initialized_main_thread!();
|
||||
PropertyNotifyBuilder::new(property_name, value.into())
|
||||
PropertyNotifyBuilder::new(property_name)
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
|
@ -2291,14 +2288,21 @@ pub struct PropertyNotifyBuilder<'a> {
|
|||
}
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
impl<'a> PropertyNotifyBuilder<'a> {
|
||||
fn new(property_name: &'a str, value: Option<&'a glib::ToSendValue>) -> Self {
|
||||
fn new(property_name: &'a str) -> Self {
|
||||
skip_assert_initialized!();
|
||||
Self {
|
||||
src: None,
|
||||
seqnum: None,
|
||||
other_fields: Vec::new(),
|
||||
property_name: property_name,
|
||||
value: value,
|
||||
value: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn value(self, value: &'a glib::ToSendValue) -> Self {
|
||||
Self {
|
||||
value: Some(value),
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue