forked from mirrors/gstreamer-rs
Update for new_with_XXX/new_from_XXX function renaming
This commit is contained in:
parent
04875f3bff
commit
bfde1fd9d5
4 changed files with 10 additions and 16 deletions
|
@ -58,7 +58,7 @@ fn main_loop() -> Result<(), Error> {
|
|||
let basic = RTSPAuth::make_basic("user", "password");
|
||||
// For propery authentication, we want to use encryption. And there's no
|
||||
// encryption without a certificate!
|
||||
let cert = gio::TlsCertificate::new_from_pem(
|
||||
let cert = gio::TlsCertificate::from_pem(
|
||||
"-----BEGIN CERTIFICATE-----\
|
||||
MIICJjCCAY+gAwIBAgIBBzANBgkqhkiG9w0BAQUFADCBhjETMBEGCgmSJomT8ixk\
|
||||
ARkWA0NPTTEXMBUGCgmSJomT8ixkARkWB0VYQU1QTEUxHjAcBgNVBAsTFUNlcnRp\
|
||||
|
|
|
@ -69,7 +69,7 @@ mod tests {
|
|||
|
||||
let mut buffer = gst::Buffer::new();
|
||||
let port = 5000;
|
||||
let inet_addr = gio::InetAddress::new_from_string("127.0.0.1");
|
||||
let inet_addr = gio::InetAddress::from_string("127.0.0.1");
|
||||
|
||||
let expected_addr = &gio::InetSocketAddress::new(&inet_addr, port);
|
||||
|
||||
|
|
|
@ -607,7 +607,7 @@ mod tests {
|
|||
|
||||
glib_object_subclass!();
|
||||
|
||||
fn new_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 sinkpad = ::Pad::from_template(&templ, Some("sink"));
|
||||
let templ = klass.get_pad_template("src").unwrap();
|
||||
|
|
|
@ -112,10 +112,8 @@ mod tutorial5 {
|
|||
Inhibit(false)
|
||||
});
|
||||
|
||||
let play_button = gtk::Button::new_from_icon_name(
|
||||
Some("media-playback-start"),
|
||||
gtk::IconSize::SmallToolbar,
|
||||
);
|
||||
let play_button =
|
||||
gtk::Button::from_icon_name(Some("media-playback-start"), gtk::IconSize::SmallToolbar);
|
||||
let pipeline = playbin.clone();
|
||||
play_button.connect_clicked(move |_| {
|
||||
let pipeline = &pipeline;
|
||||
|
@ -124,10 +122,8 @@ mod tutorial5 {
|
|||
.expect("Unable to set the pipeline to the `Playing` state");
|
||||
});
|
||||
|
||||
let pause_button = gtk::Button::new_from_icon_name(
|
||||
Some("media-playback-pause"),
|
||||
gtk::IconSize::SmallToolbar,
|
||||
);
|
||||
let pause_button =
|
||||
gtk::Button::from_icon_name(Some("media-playback-pause"), gtk::IconSize::SmallToolbar);
|
||||
let pipeline = playbin.clone();
|
||||
pause_button.connect_clicked(move |_| {
|
||||
let pipeline = &pipeline;
|
||||
|
@ -136,10 +132,8 @@ mod tutorial5 {
|
|||
.expect("Unable to set the pipeline to the `Paused` state");
|
||||
});
|
||||
|
||||
let stop_button = gtk::Button::new_from_icon_name(
|
||||
Some("media-playback-stop"),
|
||||
gtk::IconSize::SmallToolbar,
|
||||
);
|
||||
let stop_button =
|
||||
gtk::Button::from_icon_name(Some("media-playback-stop"), gtk::IconSize::SmallToolbar);
|
||||
let pipeline = playbin.clone();
|
||||
stop_button.connect_clicked(move |_| {
|
||||
let pipeline = &pipeline;
|
||||
|
@ -148,7 +142,7 @@ mod tutorial5 {
|
|||
.expect("Unable to set the pipeline to the `Ready` state");
|
||||
});
|
||||
|
||||
let slider = gtk::Scale::new_with_range(
|
||||
let slider = gtk::Scale::with_range(
|
||||
gtk::Orientation::Horizontal,
|
||||
0.0 as f64,
|
||||
100.0 as f64,
|
||||
|
|
Loading…
Reference in a new issue