Fixes for gstreamer-rs API changes

Creating pad templates can return None now.
This commit is contained in:
Sebastian Dröge 2019-01-29 17:26:40 +02:00
parent 2a656a98b6
commit 9db02cb55e
16 changed files with 56 additions and 28 deletions

View file

@ -172,7 +172,8 @@ impl ObjectSubclass for AudioEcho {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
let sink_pad_template = gst::PadTemplate::new(
@ -180,7 +181,8 @@ impl ObjectSubclass for AudioEcho {
gst::PadDirection::Sink,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(sink_pad_template);
klass.install_properties(&PROPERTIES);

View file

@ -555,7 +555,8 @@ impl ObjectSubclass for MccEnc {
gst::PadDirection::Sink,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(sink_pad_template);
let caps = gst::Caps::builder("application/x-mcc").build();
@ -564,7 +565,8 @@ impl ObjectSubclass for MccEnc {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
klass.install_properties(&PROPERTIES);

View file

@ -603,7 +603,8 @@ impl ObjectSubclass for MccParse {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
let caps = gst::Caps::builder("application/x-mcc")
@ -614,7 +615,8 @@ impl ObjectSubclass for MccParse {
gst::PadDirection::Sink,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(sink_pad_template);
}
}

View file

@ -144,7 +144,8 @@ impl ObjectSubclass for FileSink {
gst::PadDirection::Sink,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(sink_pad_template);
klass.install_properties(&PROPERTIES);

View file

@ -158,7 +158,8 @@ impl ObjectSubclass for FileSrc {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
klass.install_properties(&PROPERTIES);

View file

@ -230,7 +230,8 @@ impl ObjectSubclass for FlvDemux {
gst::PadDirection::Src,
gst::PadPresence::Sometimes,
&caps,
);
)
.unwrap();
klass.add_pad_template(audiosrc_pad_template);
let mut caps = gst::Caps::new_empty();
@ -263,7 +264,8 @@ impl ObjectSubclass for FlvDemux {
gst::PadDirection::Src,
gst::PadPresence::Sometimes,
&caps,
);
)
.unwrap();
klass.add_pad_template(videosrc_pad_template);
let caps = gst::Caps::builder("video/x-flv").build();
@ -272,7 +274,8 @@ impl ObjectSubclass for FlvDemux {
gst::PadDirection::Sink,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(sink_pad_template);
}
}

View file

@ -462,7 +462,8 @@ impl ObjectSubclass for HttpSrc {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
klass.install_properties(&PROPERTIES);

View file

@ -507,7 +507,8 @@ impl ObjectSubclass for AppSrc {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
klass.install_properties(&PROPERTIES);

View file

@ -649,7 +649,8 @@ impl ObjectSubclass for ProxySink {
gst::PadDirection::Sink,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(sink_pad_template);
klass.install_properties(&PROPERTIES_SINK);
@ -1186,7 +1187,8 @@ impl ObjectSubclass for ProxySrc {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
klass.install_properties(&PROPERTIES_SRC);

View file

@ -774,7 +774,8 @@ impl ObjectSubclass for Queue {
gst::PadDirection::Sink,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(sink_pad_template);
let src_pad_template = gst::PadTemplate::new(
@ -782,7 +783,8 @@ impl ObjectSubclass for Queue {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
klass.install_properties(&PROPERTIES);

View file

@ -586,7 +586,8 @@ impl ObjectSubclass for TcpClientSrc {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
klass.install_properties(&PROPERTIES);

View file

@ -872,7 +872,8 @@ impl ObjectSubclass for UdpSrc {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
klass.install_properties(&PROPERTIES);

View file

@ -1192,7 +1192,8 @@ impl ObjectSubclass for ToggleRecord {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
let sink_pad_template = gst::PadTemplate::new(
@ -1200,7 +1201,8 @@ impl ObjectSubclass for ToggleRecord {
gst::PadDirection::Sink,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(sink_pad_template);
let src_pad_template = gst::PadTemplate::new(
@ -1208,7 +1210,8 @@ impl ObjectSubclass for ToggleRecord {
gst::PadDirection::Src,
gst::PadPresence::Sometimes,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
let sink_pad_template = gst::PadTemplate::new(
@ -1216,7 +1219,8 @@ impl ObjectSubclass for ToggleRecord {
gst::PadDirection::Sink,
gst::PadPresence::Request,
&caps,
);
)
.unwrap();
klass.add_pad_template(sink_pad_template);
}
}

View file

@ -220,7 +220,8 @@ impl ObjectSubclass for Identity {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
let sink_pad_template = gst::PadTemplate::new(
@ -228,7 +229,8 @@ impl ObjectSubclass for Identity {
gst::PadDirection::Sink,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(sink_pad_template);
}
}

View file

@ -186,7 +186,8 @@ impl ObjectSubclass for Rgb2Gray {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
// On the sink pad, we can accept BGRx of any
@ -213,7 +214,8 @@ impl ObjectSubclass for Rgb2Gray {
gst::PadDirection::Sink,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(sink_pad_template);
// Install all our properties

View file

@ -269,7 +269,8 @@ impl ObjectSubclass for SineSrc {
gst::PadDirection::Src,
gst::PadPresence::Always,
&caps,
);
)
.unwrap();
klass.add_pad_template(src_pad_template);
// Install all our properties