narrowed down the required plugins
This commit is contained in:
parent
0bed2e8595
commit
27504d9754
3 changed files with 14 additions and 24 deletions
|
@ -17,7 +17,7 @@ gst-plugin-rtsp = "0.13.0"
|
|||
gst-plugin-hlssink3 = "0.13.0"
|
||||
gst-plugin-reqwest = "0.13.0"
|
||||
|
||||
gstreamer = { version = "0.23.0", features = ["v1_22"] }
|
||||
gstreamer = { version = "0.23.0", features = ["v1_24"] }
|
||||
gstreamer-webrtc = { version = "0.23.0", features = ["v1_22"] }
|
||||
lazy_static = "1.5.0"
|
||||
log = "0.4.22"
|
||||
|
|
|
@ -42,7 +42,7 @@ Some utility commands:
|
|||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gst-plugins-bad # contains gst-webrtc
|
||||
gst_all_1.gst-plugins-ugly # contains x264enc
|
||||
gst_all_1.gst-plugins-rs #contains whipclientsink
|
||||
# gst_all_1.gst-plugins-rs #contains whipclientsink
|
||||
mediamtx
|
||||
libnice
|
||||
];
|
||||
|
|
34
src/main.rs
34
src/main.rs
|
@ -35,8 +35,8 @@ fn main() -> Result<(), Error> {
|
|||
gstrswebrtc::plugin_register_static()?;
|
||||
|
||||
gstrsrtp::plugin_register_static()?;
|
||||
gstrsrtsp::plugin_register_static()?;
|
||||
gstwebrtchttp::plugin_register_static()?;
|
||||
// gstrsrtsp::plugin_register_static()?;
|
||||
// gstwebrtchttp::plugin_register_static()?;
|
||||
// gsthlssink3::plugin_register_static()?;
|
||||
|
||||
// working pipeline
|
||||
|
@ -59,39 +59,29 @@ fn main() -> Result<(), Error> {
|
|||
let signaller = whipsink.property::<Signallable>("signaller");
|
||||
signaller.set_property_from_str(
|
||||
"whip-endpoint",
|
||||
&format!("http://localhost:{}/whip", 8889),
|
||||
"http://localhost:8080/whip"
|
||||
);
|
||||
}
|
||||
|
||||
for i in whipclientsink.list_properties() {
|
||||
println!("{:?}", i.type_());
|
||||
}
|
||||
|
||||
pipeline
|
||||
.add_many(&[&videotestsrc, &x264enc, &whipclientsink])
|
||||
.unwrap();
|
||||
Element::link_many(&[&videotestsrc, &x264enc, &whipclientsink])
|
||||
.unwrap();
|
||||
|
||||
|
||||
if let Some(whipsink) = whipclientsink.dynamic_cast_ref::<gstrswebrtc::webrtcsink::WhipWebRTCSink>() {
|
||||
let signaller = whipsink.property::<Signallable>("signaller");
|
||||
signaller.set_property_from_str(
|
||||
"whip-endpoint",
|
||||
&format!("http://localhost:{}/whip", 8889),
|
||||
);
|
||||
}
|
||||
|
||||
// PIPELINE START
|
||||
pipeline.set_state(State::Playing).unwrap();
|
||||
|
||||
let bus = pipeline.bus().unwrap();
|
||||
|
||||
|
||||
loop {
|
||||
if to_quit.load(std::sync::atomic::Ordering::SeqCst) {
|
||||
println!("Recieved Ctrl+C, stopping");
|
||||
|
||||
pipeline.set_state(State::Null).unwrap();
|
||||
break;
|
||||
}
|
||||
std::thread::sleep(std::time::Duration::from_millis(200));
|
||||
}
|
||||
let _ = bus.timed_pop_filtered(
|
||||
gstreamer::ClockTime::NONE,
|
||||
&[gstreamer::MessageType::Eos]
|
||||
);
|
||||
|
||||
println!("Success!");
|
||||
|
||||
|
|
Loading…
Reference in a new issue