mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-01-10 09:15:27 +00:00
Update gstreamer-rtsp-server
This commit is contained in:
parent
68951d775f
commit
ba73440a9a
22 changed files with 149 additions and 25 deletions
|
@ -22,7 +22,6 @@ external_libraries = [
|
||||||
generate = [
|
generate = [
|
||||||
"GstRtspServer.RTSPAddressFlags",
|
"GstRtspServer.RTSPAddressFlags",
|
||||||
"GstRtspServer.RTSPAddressPoolResult",
|
"GstRtspServer.RTSPAddressPoolResult",
|
||||||
"GstRtspServer.RTSPMediaFactory",
|
|
||||||
"GstRtspServer.RTSPMediaFactoryURI",
|
"GstRtspServer.RTSPMediaFactoryURI",
|
||||||
"GstRtspServer.RTSPMediaStatus",
|
"GstRtspServer.RTSPMediaStatus",
|
||||||
"GstRtspServer.RTSPMountPoints",
|
"GstRtspServer.RTSPMountPoints",
|
||||||
|
@ -206,6 +205,15 @@ status = "generate"
|
||||||
[object.function.return]
|
[object.function.return]
|
||||||
bool_return_is_error = "Failed to unsuspend media"
|
bool_return_is_error = "Failed to unsuspend media"
|
||||||
|
|
||||||
|
[[object]]
|
||||||
|
name = "GstRtspServer.RTSPMediaFactory"
|
||||||
|
status = "generate"
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "add_role_from_structure"
|
||||||
|
# Different structure mutability needed
|
||||||
|
ignore = true
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "GstRtspServer.RTSPSessionMedia"
|
name = "GstRtspServer.RTSPSessionMedia"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
|
|
@ -36,6 +36,7 @@ optional = true
|
||||||
[features]
|
[features]
|
||||||
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-rtsp-sys/v1_10", "gstreamer-net-sys/v1_10", "gstreamer-rtsp-server-sys/v1_10"]
|
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-rtsp-sys/v1_10", "gstreamer-net-sys/v1_10", "gstreamer-rtsp-server-sys/v1_10"]
|
||||||
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-rtsp-sys/v1_12", "gstreamer-net-sys/v1_12", "gstreamer-rtsp-server-sys/v1_12", "v1_10"]
|
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-rtsp-sys/v1_12", "gstreamer-net-sys/v1_12", "gstreamer-rtsp-server-sys/v1_12", "v1_10"]
|
||||||
|
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-rtsp-sys/v1_14", "gstreamer-net-sys/v1_14", "gstreamer-rtsp-server-sys/v1_14", "v1_12"]
|
||||||
embed-lgpl-docs = ["rustdoc-stripper"]
|
embed-lgpl-docs = ["rustdoc-stripper"]
|
||||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||||
dox = ["gstreamer-rtsp-server-sys/dox", "glib/dox", "gstreamer/dox"]
|
dox = ["gstreamer-rtsp-server-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
@ -50,6 +50,8 @@ unsafe impl Sync for RTSPMedia {}
|
||||||
pub trait RTSPMediaExt {
|
pub trait RTSPMediaExt {
|
||||||
fn collect_streams(&self);
|
fn collect_streams(&self);
|
||||||
|
|
||||||
|
//fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 9, id: 31 }) -> bool;
|
||||||
|
|
||||||
fn create_stream<P: IsA<gst::Element>, Q: IsA<gst::Pad>>(&self, payloader: &P, pad: &Q) -> Option<RTSPStream>;
|
fn create_stream<P: IsA<gst::Element>, Q: IsA<gst::Pad>>(&self, payloader: &P, pad: &Q) -> Option<RTSPStream>;
|
||||||
|
|
||||||
fn find_stream(&self, control: &str) -> Option<RTSPStream>;
|
fn find_stream(&self, control: &str) -> Option<RTSPStream>;
|
||||||
|
@ -108,6 +110,10 @@ pub trait RTSPMediaExt {
|
||||||
|
|
||||||
//fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool;
|
//fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool;
|
||||||
|
|
||||||
|
//fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool;
|
||||||
|
|
||||||
|
//fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff;
|
||||||
|
|
||||||
fn set_address_pool<'a, P: Into<Option<&'a RTSPAddressPool>>>(&self, pool: P);
|
fn set_address_pool<'a, P: Into<Option<&'a RTSPAddressPool>>>(&self, pool: P);
|
||||||
|
|
||||||
fn set_buffer_size(&self, size: u32);
|
fn set_buffer_size(&self, size: u32);
|
||||||
|
@ -212,6 +218,10 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 9, id: 31 }) -> bool {
|
||||||
|
// unsafe { TODO: call ffi::gst_rtsp_media_complete_pipeline() }
|
||||||
|
//}
|
||||||
|
|
||||||
fn create_stream<P: IsA<gst::Element>, Q: IsA<gst::Pad>>(&self, payloader: &P, pad: &Q) -> Option<RTSPStream> {
|
fn create_stream<P: IsA<gst::Element>, Q: IsA<gst::Pad>>(&self, payloader: &P, pad: &Q) -> Option<RTSPStream> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::gst_rtsp_media_create_stream(self.to_glib_none().0, payloader.to_glib_none().0, pad.to_glib_none().0))
|
from_glib_none(ffi::gst_rtsp_media_create_stream(self.to_glib_none().0, payloader.to_glib_none().0, pad.to_glib_none().0))
|
||||||
|
@ -376,6 +386,14 @@ impl<O: IsA<RTSPMedia> + IsA<glib::object::Object>> RTSPMediaExt for O {
|
||||||
// unsafe { TODO: call ffi::gst_rtsp_media_seek() }
|
// unsafe { TODO: call ffi::gst_rtsp_media_seek() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
//fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool {
|
||||||
|
// unsafe { TODO: call ffi::gst_rtsp_media_seek_full() }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff {
|
||||||
|
// unsafe { TODO: call ffi::gst_rtsp_media_seekable() }
|
||||||
|
//}
|
||||||
|
|
||||||
fn set_address_pool<'a, P: Into<Option<&'a RTSPAddressPool>>>(&self, pool: P) {
|
fn set_address_pool<'a, P: Into<Option<&'a RTSPAddressPool>>>(&self, pool: P) {
|
||||||
let pool = pool.into();
|
let pool = pool.into();
|
||||||
let pool = pool.to_glib_none();
|
let pool = pool.to_glib_none();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ impl RTSPServer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn io_func(socket: &gio::Socket, condition: glib::IOCondition, server: &RTSPServer) -> bool {
|
pub fn io_func<P: IsA<RTSPServer>>(socket: &gio::Socket, condition: glib::IOCondition, server: &P) -> bool {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(ffi::gst_rtsp_server_io_func(socket.to_glib_none().0, condition.to_glib(), server.to_glib_none().0))
|
from_glib(ffi::gst_rtsp_server_io_func(socket.to_glib_none().0, condition.to_glib(), server.to_glib_none().0))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ pub trait RTSPSessionExt {
|
||||||
|
|
||||||
fn is_expired_usec(&self, now: i64) -> bool;
|
fn is_expired_usec(&self, now: i64) -> bool;
|
||||||
|
|
||||||
fn manage_media(&self, path: &str, media: &RTSPMedia) -> Option<RTSPSessionMedia>;
|
fn manage_media<P: IsA<RTSPMedia>>(&self, path: &str, media: &P) -> Option<RTSPSessionMedia>;
|
||||||
|
|
||||||
//fn next_timeout(&self, now: /*Ignored*/&mut glib::TimeVal) -> i32;
|
//fn next_timeout(&self, now: /*Ignored*/&mut glib::TimeVal) -> i32;
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ impl<O: IsA<RTSPSession> + IsA<glib::object::Object>> RTSPSessionExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn manage_media(&self, path: &str, media: &RTSPMedia) -> Option<RTSPSessionMedia> {
|
fn manage_media<P: IsA<RTSPMedia>>(&self, path: &str, media: &P) -> Option<RTSPSessionMedia> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_none(ffi::gst_rtsp_session_manage_media(self.to_glib_none().0, path.to_glib_none().0, media.to_glib_full()))
|
from_glib_none(ffi::gst_rtsp_session_manage_media(self.to_glib_none().0, path.to_glib_none().0, media.to_glib_full()))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ glib_wrapper! {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RTSPSessionMedia {
|
impl RTSPSessionMedia {
|
||||||
pub fn new(path: &str, media: &RTSPMedia) -> RTSPSessionMedia {
|
pub fn new<P: IsA<RTSPMedia>>(path: &str, media: &P) -> RTSPSessionMedia {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_rtsp_session_media_new(path.to_glib_none().0, media.to_glib_full()))
|
from_glib_full(ffi::gst_rtsp_session_media_new(path.to_glib_none().0, media.to_glib_full()))
|
||||||
|
@ -47,6 +47,8 @@ pub trait RTSPSessionMediaExt {
|
||||||
|
|
||||||
fn get_transport(&self, idx: u32) -> Option<RTSPStreamTransport>;
|
fn get_transport(&self, idx: u32) -> Option<RTSPStreamTransport>;
|
||||||
|
|
||||||
|
//fn get_transports(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 26 };
|
||||||
|
|
||||||
fn matches(&self, path: &str) -> Option<i32>;
|
fn matches(&self, path: &str) -> Option<i32>;
|
||||||
|
|
||||||
//fn set_rtsp_state(&self, state: /*Ignored*/gst_rtsp::RTSPState);
|
//fn set_rtsp_state(&self, state: /*Ignored*/gst_rtsp::RTSPState);
|
||||||
|
@ -89,6 +91,10 @@ impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//fn get_transports(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 26 } {
|
||||||
|
// unsafe { TODO: call ffi::gst_rtsp_session_media_get_transports() }
|
||||||
|
//}
|
||||||
|
|
||||||
fn matches(&self, path: &str) -> Option<i32> {
|
fn matches(&self, path: &str) -> Option<i32> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut matched = mem::uninitialized();
|
let mut matched = mem::uninitialized();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
@ -47,7 +47,9 @@ unsafe impl Sync for RTSPStream {}
|
||||||
pub trait RTSPStreamExt {
|
pub trait RTSPStreamExt {
|
||||||
fn add_transport(&self, trans: &RTSPStreamTransport) -> Result<(), glib::error::BoolError>;
|
fn add_transport(&self, trans: &RTSPStreamTransport) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
//fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_setttings: bool) -> bool;
|
//fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_settings: bool) -> bool;
|
||||||
|
|
||||||
|
//fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool;
|
||||||
|
|
||||||
fn get_address_pool(&self) -> Option<RTSPAddressPool>;
|
fn get_address_pool(&self) -> Option<RTSPAddressPool>;
|
||||||
|
|
||||||
|
@ -83,8 +85,12 @@ pub trait RTSPStreamExt {
|
||||||
|
|
||||||
fn get_retransmission_time(&self) -> gst::ClockTime;
|
fn get_retransmission_time(&self) -> gst::ClockTime;
|
||||||
|
|
||||||
|
fn get_rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket>;
|
||||||
|
|
||||||
fn get_rtcp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket>;
|
fn get_rtcp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket>;
|
||||||
|
|
||||||
|
fn get_rtp_multicast_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket>;
|
||||||
|
|
||||||
fn get_rtp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket>;
|
fn get_rtp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket>;
|
||||||
|
|
||||||
fn get_rtpinfo(&self) -> Option<(u32, u32, u32, gst::ClockTime)>;
|
fn get_rtpinfo(&self) -> Option<(u32, u32, u32, gst::ClockTime)>;
|
||||||
|
@ -107,6 +113,12 @@ pub trait RTSPStreamExt {
|
||||||
|
|
||||||
fn is_client_side(&self) -> bool;
|
fn is_client_side(&self) -> bool;
|
||||||
|
|
||||||
|
fn is_complete(&self) -> bool;
|
||||||
|
|
||||||
|
fn is_receiver(&self) -> bool;
|
||||||
|
|
||||||
|
fn is_sender(&self) -> bool;
|
||||||
|
|
||||||
//fn is_transport_supported(&self, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> bool;
|
//fn is_transport_supported(&self, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> bool;
|
||||||
|
|
||||||
fn join_bin<P: IsA<gst::Bin>, Q: IsA<gst::Element>>(&self, bin: &P, rtpbin: &Q, state: gst::State) -> Result<(), glib::error::BoolError>;
|
fn join_bin<P: IsA<gst::Bin>, Q: IsA<gst::Element>>(&self, bin: &P, rtpbin: &Q, state: gst::State) -> Result<(), glib::error::BoolError>;
|
||||||
|
@ -123,6 +135,8 @@ pub trait RTSPStreamExt {
|
||||||
|
|
||||||
fn reserve_address(&self, address: &str, port: u32, n_ports: u32, ttl: u32) -> Option<RTSPAddress>;
|
fn reserve_address(&self, address: &str, port: u32, n_ports: u32, ttl: u32) -> Option<RTSPAddress>;
|
||||||
|
|
||||||
|
fn seekable(&self) -> bool;
|
||||||
|
|
||||||
fn set_address_pool<'a, P: Into<Option<&'a RTSPAddressPool>>>(&self, pool: P);
|
fn set_address_pool<'a, P: Into<Option<&'a RTSPAddressPool>>>(&self, pool: P);
|
||||||
|
|
||||||
fn set_blocked(&self, blocked: bool) -> bool;
|
fn set_blocked(&self, blocked: bool) -> bool;
|
||||||
|
@ -155,6 +169,8 @@ pub trait RTSPStreamExt {
|
||||||
|
|
||||||
//fn transport_filter<'a, P: Into<Option<&'a /*Unimplemented*/RTSPStreamTransportFilterFunc>>, Q: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, func: P, user_data: Q) -> Vec<RTSPStreamTransport>;
|
//fn transport_filter<'a, P: Into<Option<&'a /*Unimplemented*/RTSPStreamTransportFilterFunc>>, Q: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, func: P, user_data: Q) -> Vec<RTSPStreamTransport>;
|
||||||
|
|
||||||
|
fn unblock_linked(&self) -> bool;
|
||||||
|
|
||||||
fn update_crypto<'a, P: Into<Option<&'a gst::Caps>>>(&self, ssrc: u32, crypto: P) -> bool;
|
fn update_crypto<'a, P: Into<Option<&'a gst::Caps>>>(&self, ssrc: u32, crypto: P) -> bool;
|
||||||
|
|
||||||
fn connect_new_rtcp_encoder<F: Fn(&Self, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
fn connect_new_rtcp_encoder<F: Fn(&Self, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||||
|
@ -175,10 +191,14 @@ impl<O: IsA<RTSPStream> + IsA<glib::object::Object>> RTSPStreamExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_setttings: bool) -> bool {
|
//fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_settings: bool) -> bool {
|
||||||
// unsafe { TODO: call ffi::gst_rtsp_stream_allocate_udp_sockets() }
|
// unsafe { TODO: call ffi::gst_rtsp_stream_allocate_udp_sockets() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
//fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool {
|
||||||
|
// unsafe { TODO: call ffi::gst_rtsp_stream_complete_stream() }
|
||||||
|
//}
|
||||||
|
|
||||||
fn get_address_pool(&self) -> Option<RTSPAddressPool> {
|
fn get_address_pool(&self) -> Option<RTSPAddressPool> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_rtsp_stream_get_address_pool(self.to_glib_none().0))
|
from_glib_full(ffi::gst_rtsp_stream_get_address_pool(self.to_glib_none().0))
|
||||||
|
@ -281,12 +301,24 @@ impl<O: IsA<RTSPStream> + IsA<glib::object::Object>> RTSPStreamExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn get_rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> {
|
||||||
|
unsafe {
|
||||||
|
from_glib_full(ffi::gst_rtsp_stream_get_rtcp_multicast_socket(self.to_glib_none().0, family.to_glib()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn get_rtcp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> {
|
fn get_rtcp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_rtsp_stream_get_rtcp_socket(self.to_glib_none().0, family.to_glib()))
|
from_glib_full(ffi::gst_rtsp_stream_get_rtcp_socket(self.to_glib_none().0, family.to_glib()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn get_rtp_multicast_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> {
|
||||||
|
unsafe {
|
||||||
|
from_glib_full(ffi::gst_rtsp_stream_get_rtp_multicast_socket(self.to_glib_none().0, family.to_glib()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn get_rtp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> {
|
fn get_rtp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(ffi::gst_rtsp_stream_get_rtp_socket(self.to_glib_none().0, family.to_glib()))
|
from_glib_full(ffi::gst_rtsp_stream_get_rtp_socket(self.to_glib_none().0, family.to_glib()))
|
||||||
|
@ -360,6 +392,24 @@ impl<O: IsA<RTSPStream> + IsA<glib::object::Object>> RTSPStreamExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn is_complete(&self) -> bool {
|
||||||
|
unsafe {
|
||||||
|
from_glib(ffi::gst_rtsp_stream_is_complete(self.to_glib_none().0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn is_receiver(&self) -> bool {
|
||||||
|
unsafe {
|
||||||
|
from_glib(ffi::gst_rtsp_stream_is_receiver(self.to_glib_none().0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn is_sender(&self) -> bool {
|
||||||
|
unsafe {
|
||||||
|
from_glib(ffi::gst_rtsp_stream_is_sender(self.to_glib_none().0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//fn is_transport_supported(&self, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> bool {
|
//fn is_transport_supported(&self, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> bool {
|
||||||
// unsafe { TODO: call ffi::gst_rtsp_stream_is_transport_supported() }
|
// unsafe { TODO: call ffi::gst_rtsp_stream_is_transport_supported() }
|
||||||
//}
|
//}
|
||||||
|
@ -406,6 +456,12 @@ impl<O: IsA<RTSPStream> + IsA<glib::object::Object>> RTSPStreamExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn seekable(&self) -> bool {
|
||||||
|
unsafe {
|
||||||
|
from_glib(ffi::gst_rtsp_stream_seekable(self.to_glib_none().0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn set_address_pool<'a, P: Into<Option<&'a RTSPAddressPool>>>(&self, pool: P) {
|
fn set_address_pool<'a, P: Into<Option<&'a RTSPAddressPool>>>(&self, pool: P) {
|
||||||
let pool = pool.into();
|
let pool = pool.into();
|
||||||
let pool = pool.to_glib_none();
|
let pool = pool.to_glib_none();
|
||||||
|
@ -506,6 +562,12 @@ impl<O: IsA<RTSPStream> + IsA<glib::object::Object>> RTSPStreamExt for O {
|
||||||
// unsafe { TODO: call ffi::gst_rtsp_stream_transport_filter() }
|
// unsafe { TODO: call ffi::gst_rtsp_stream_transport_filter() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
fn unblock_linked(&self) -> bool {
|
||||||
|
unsafe {
|
||||||
|
from_glib(ffi::gst_rtsp_stream_unblock_linked(self.to_glib_none().0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn update_crypto<'a, P: Into<Option<&'a gst::Caps>>>(&self, ssrc: u32, crypto: P) -> bool {
|
fn update_crypto<'a, P: Into<Option<&'a gst::Caps>>>(&self, ssrc: u32, crypto: P) -> bool {
|
||||||
let crypto = crypto.into();
|
let crypto = crypto.into();
|
||||||
let crypto = crypto.to_glib_none();
|
let crypto = crypto.to_glib_none();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
|
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
|
|
@ -62,12 +62,14 @@ mod r_t_s_p_session_pool;
|
||||||
mod r_t_s_p_context;
|
mod r_t_s_p_context;
|
||||||
mod r_t_s_p_auth;
|
mod r_t_s_p_auth;
|
||||||
mod r_t_s_p_token;
|
mod r_t_s_p_token;
|
||||||
|
mod r_t_s_p_media_factory;
|
||||||
|
|
||||||
pub use r_t_s_p_server::RTSPServerExtManual;
|
pub use r_t_s_p_server::RTSPServerExtManual;
|
||||||
pub use r_t_s_p_address_pool::RTSPAddressPoolExtManual;
|
pub use r_t_s_p_address_pool::RTSPAddressPoolExtManual;
|
||||||
pub use r_t_s_p_client::RTSPClientExtManual;
|
pub use r_t_s_p_client::RTSPClientExtManual;
|
||||||
pub use r_t_s_p_session_pool::RTSPSessionPoolExtManual;
|
pub use r_t_s_p_session_pool::RTSPSessionPoolExtManual;
|
||||||
pub use r_t_s_p_auth::RTSPAuthExtManual;
|
pub use r_t_s_p_auth::RTSPAuthExtManual;
|
||||||
|
pub use r_t_s_p_media_factory::RTSPMediaFactoryExtManual;
|
||||||
|
|
||||||
pub use r_t_s_p_context::*;
|
pub use r_t_s_p_context::*;
|
||||||
pub use r_t_s_p_token::*;
|
pub use r_t_s_p_token::*;
|
||||||
|
@ -100,4 +102,5 @@ pub mod prelude {
|
||||||
pub use r_t_s_p_session_pool::RTSPSessionPoolExtManual;
|
pub use r_t_s_p_session_pool::RTSPSessionPoolExtManual;
|
||||||
pub use r_t_s_p_auth::RTSPAuthExtManual;
|
pub use r_t_s_p_auth::RTSPAuthExtManual;
|
||||||
pub use r_t_s_p_token::GstRcRTSPTokenExt;
|
pub use r_t_s_p_token::GstRcRTSPTokenExt;
|
||||||
|
pub use r_t_s_p_media_factory::RTSPMediaFactoryExtManual;
|
||||||
}
|
}
|
||||||
|
|
26
gstreamer-rtsp-server/src/r_t_s_p_media_factory.rs
Normal file
26
gstreamer-rtsp-server/src/r_t_s_p_media_factory.rs
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
// Copyright (C) 2018 Sebastian Dröge <sebastian@centricular.com>
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
// option. This file may not be copied, modified, or distributed
|
||||||
|
// except according to those terms.
|
||||||
|
|
||||||
|
use RTSPMediaFactory;
|
||||||
|
|
||||||
|
use glib::translate::*;
|
||||||
|
use gst;
|
||||||
|
|
||||||
|
pub trait RTSPMediaFactoryExtManual {
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
|
fn add_role_from_structure(&self, structure: &gst::StructureRef);
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExtManual for O {
|
||||||
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||||
|
fn add_role_from_structure(&self, structure: &gst::StructureRef) {
|
||||||
|
unsafe {
|
||||||
|
ffi::gst_rtsp_media_factory_add_role_from_structure(self.to_glib_none().0, structure.as_mut_ptr());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue