figured out the plugin conflict
This commit is contained in:
parent
a5b71969ae
commit
f30acbcd76
2 changed files with 10 additions and 11 deletions
|
@ -39,10 +39,10 @@ Some utility commands:
|
||||||
openssl
|
openssl
|
||||||
gst_all_1.gstreamer
|
gst_all_1.gstreamer
|
||||||
gst_all_1.gst-plugins-base
|
gst_all_1.gst-plugins-base
|
||||||
gst_all_1.gst-plugins-good
|
# gst_all_1.gst-plugins-good
|
||||||
gst_all_1.gst-plugins-bad # contains gst-webrtc
|
gst_all_1.gst-plugins-bad # contains gst-webrtc
|
||||||
gst_all_1.gst-plugins-ugly
|
gst_all_1.gst-plugins-ugly # contains x264enc
|
||||||
gst_all_1.gst-plugins-rs
|
# gst_all_1.gst-plugins-rs #contains whipclientsink
|
||||||
mediamtx
|
mediamtx
|
||||||
];
|
];
|
||||||
cargoHash = nixpkgs.lib.fakeHash;
|
cargoHash = nixpkgs.lib.fakeHash;
|
||||||
|
|
15
src/main.rs
15
src/main.rs
|
@ -2,7 +2,6 @@ use std::sync::{atomic::AtomicBool, Arc};
|
||||||
|
|
||||||
use anyhow::Error;
|
use anyhow::Error;
|
||||||
use gstreamer::{prelude::*, Element, ElementFactory, Pipeline, State};
|
use gstreamer::{prelude::*, Element, ElementFactory, Pipeline, State};
|
||||||
use tracing::info;
|
|
||||||
use gstrswebrtc::{signaller::Signallable, webrtcsink::WhipWebRTCSink};
|
use gstrswebrtc::{signaller::Signallable, webrtcsink::WhipWebRTCSink};
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,6 +21,7 @@ fn main() -> Result<(), Error> {
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
gstreamer::init()?;
|
gstreamer::init()?;
|
||||||
|
gstrswebrtc::plugin_register_static()?;
|
||||||
|
|
||||||
let pipeline = Pipeline::with_name("rstp-pipeline");
|
let pipeline = Pipeline::with_name("rstp-pipeline");
|
||||||
|
|
||||||
|
@ -36,13 +36,12 @@ fn main() -> Result<(), Error> {
|
||||||
.name("whip-sink_123059")
|
.name("whip-sink_123059")
|
||||||
.build()?;
|
.build()?;
|
||||||
|
|
||||||
// THIS IS THE LINE CAUSING THE ERROR
|
if let Some(whipsink) = whipsink.dynamic_cast_ref::<gstrswebrtc::webrtcsink::WhipWebRTCSink>() {
|
||||||
if let Some(whipsink) = whipsink.dynamic_cast_ref::<WhipWebRTCSink>() {
|
let signaller = whipsink.property::<Signallable>("signaller");
|
||||||
//let signaller = whipsink.property::<Signallable>("signaller");
|
signaller.set_property_from_str(
|
||||||
//signaller.set_property_from_str(
|
"whip-endpoint",
|
||||||
// "whip-endpoint",
|
&format!("http://localhost:{}/{}/whip", 8889, "mystream"),
|
||||||
// &format!("http://localhost:{}/whip_sink/{}", 8889, "mystream"),
|
);
|
||||||
//);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.add_many([&source, &convert, &whipsink]).unwrap();
|
pipeline.add_many([&source, &convert, &whipsink]).unwrap();
|
||||||
|
|
Loading…
Reference in a new issue