mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 08:36:31 +00:00
gstreamer/pad: Rename Pad::builder_from_template() to builder_with_template()
Sounds more natural as it creates a build that is initialized *with* a template. But keep Pad::from_template() as it creates a new pad *from* a template.
This commit is contained in:
parent
0c0d671922
commit
79c457c8c4
2 changed files with 10 additions and 10 deletions
|
@ -1558,10 +1558,10 @@ impl Pad {
|
||||||
|
|
||||||
pub fn from_static_template(templ: &StaticPadTemplate, name: Option<&str>) -> Self {
|
pub fn from_static_template(templ: &StaticPadTemplate, name: Option<&str>) -> Self {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
Self::builder_from_static_template(templ, name).build()
|
Self::builder_with_static_template(templ, name).build()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn builder_from_static_template(
|
pub fn builder_with_static_template(
|
||||||
templ: &StaticPadTemplate,
|
templ: &StaticPadTemplate,
|
||||||
name: Option<&str>,
|
name: Option<&str>,
|
||||||
) -> PadBuilder<Self> {
|
) -> PadBuilder<Self> {
|
||||||
|
@ -1571,10 +1571,10 @@ impl Pad {
|
||||||
|
|
||||||
pub fn from_template(templ: &::PadTemplate, name: Option<&str>) -> Self {
|
pub fn from_template(templ: &::PadTemplate, name: Option<&str>) -> Self {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
Self::builder_from_template(templ, name).build()
|
Self::builder_with_template(templ, name).build()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn builder_from_template(templ: &::PadTemplate, name: Option<&str>) -> PadBuilder<Self> {
|
pub fn builder_with_template(templ: &::PadTemplate, name: Option<&str>) -> PadBuilder<Self> {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
PadBuilder::from_template(templ, name)
|
PadBuilder::from_template(templ, name)
|
||||||
}
|
}
|
||||||
|
@ -1593,10 +1593,10 @@ impl ::GhostPad {
|
||||||
|
|
||||||
pub fn from_static_template(templ: &StaticPadTemplate, name: Option<&str>) -> Self {
|
pub fn from_static_template(templ: &StaticPadTemplate, name: Option<&str>) -> Self {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
Self::builder_from_static_template(templ, name).build()
|
Self::builder_with_static_template(templ, name).build()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn builder_from_static_template(
|
pub fn builder_with_static_template(
|
||||||
templ: &StaticPadTemplate,
|
templ: &StaticPadTemplate,
|
||||||
name: Option<&str>,
|
name: Option<&str>,
|
||||||
) -> PadBuilder<Self> {
|
) -> PadBuilder<Self> {
|
||||||
|
@ -1606,10 +1606,10 @@ impl ::GhostPad {
|
||||||
|
|
||||||
pub fn from_template(templ: &::PadTemplate, name: Option<&str>) -> Self {
|
pub fn from_template(templ: &::PadTemplate, name: Option<&str>) -> Self {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
Self::builder_from_template(templ, name).build()
|
Self::builder_with_template(templ, name).build()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn builder_from_template(templ: &::PadTemplate, name: Option<&str>) -> PadBuilder<Self> {
|
pub fn builder_with_template(templ: &::PadTemplate, name: Option<&str>) -> PadBuilder<Self> {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
PadBuilder::from_template(templ, name)
|
PadBuilder::from_template(templ, name)
|
||||||
}
|
}
|
||||||
|
|
|
@ -570,7 +570,7 @@ mod tests {
|
||||||
|
|
||||||
fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self {
|
fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self {
|
||||||
let templ = klass.get_pad_template("sink").unwrap();
|
let templ = klass.get_pad_template("sink").unwrap();
|
||||||
let sinkpad = ::Pad::builder_from_template(&templ, Some("sink"))
|
let sinkpad = ::Pad::builder_with_template(&templ, Some("sink"))
|
||||||
.chain_function(|pad, parent, buffer| {
|
.chain_function(|pad, parent, buffer| {
|
||||||
TestElement::catch_panic_pad_function(
|
TestElement::catch_panic_pad_function(
|
||||||
parent,
|
parent,
|
||||||
|
@ -595,7 +595,7 @@ mod tests {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let templ = klass.get_pad_template("src").unwrap();
|
let templ = klass.get_pad_template("src").unwrap();
|
||||||
let srcpad = ::Pad::builder_from_template(&templ, Some("src"))
|
let srcpad = ::Pad::builder_with_template(&templ, Some("src"))
|
||||||
.event_function(|pad, parent, event| {
|
.event_function(|pad, parent, event| {
|
||||||
TestElement::catch_panic_pad_function(
|
TestElement::catch_panic_pad_function(
|
||||||
parent,
|
parent,
|
||||||
|
|
Loading…
Reference in a new issue