pub trait RTSPMediaFactoryImpl:
RTSPMediaFactoryImplExt
+ ObjectImpl
+ Send
+ Sync {
// Provided methods
fn gen_key(&self, url: &RTSPUrl) -> Option<GString> { ... }
fn create_element(&self, url: &RTSPUrl) -> Option<Element> { ... }
fn construct(&self, url: &RTSPUrl) -> Option<RTSPMedia> { ... }
fn create_pipeline(&self, media: &RTSPMedia) -> Option<Pipeline> { ... }
fn configure(&self, media: &RTSPMedia) { ... }
fn media_constructed(&self, media: &RTSPMedia) { ... }
fn media_configure(&self, media: &RTSPMedia) { ... }
}
Provided Methods§
sourcefn gen_key(&self, url: &RTSPUrl) -> Option<GString>
fn gen_key(&self, url: &RTSPUrl) -> Option<GString>
convert url
to a key for caching shared RTSPMedia
objects.
The default implementation of this function will use the complete URL
including the query parameters to return a key.
sourcefn create_element(&self, url: &RTSPUrl) -> Option<Element>
fn create_element(&self, url: &RTSPUrl) -> Option<Element>
Construct and return a gst::Element
that is a gst::Bin
containing
the elements to use for streaming the media.
The bin should contain payloaders pay`d` for each stream. The default implementation of this function returns the bin created from the launch parameter.
§url
the url used
§Returns
a new gst::Element
.
sourcefn construct(&self, url: &RTSPUrl) -> Option<RTSPMedia>
fn construct(&self, url: &RTSPUrl) -> Option<RTSPMedia>
Construct the media object and create its streams. Implementations should create the needed gstreamer elements and add them to the result object. No state changes should be performed on them yet.
One or more GstRTSPStream objects should be created from the result with gst_rtsp_media_create_stream ().
After the media is constructed, it can be configured and then prepared with gst_rtsp_media_prepare ().
The returned media will be locked and must be unlocked afterwards.
§url
the url used
§Returns
a new RTSPMedia
if the media could be prepared.
sourcefn create_pipeline(&self, media: &RTSPMedia) -> Option<Pipeline>
fn create_pipeline(&self, media: &RTSPMedia) -> Option<Pipeline>
create a new pipeline or re-use an existing one and
add the RTSPMedia
’s element created by construct
to the pipeline.
sourcefn configure(&self, media: &RTSPMedia)
fn configure(&self, media: &RTSPMedia)
configure the media created with construct
. The default
implementation will configure the ‘shared’ property of the media.
sourcefn media_constructed(&self, media: &RTSPMedia)
fn media_constructed(&self, media: &RTSPMedia)
signal emitted when a media was constructed
sourcefn media_configure(&self, media: &RTSPMedia)
fn media_configure(&self, media: &RTSPMedia)
signal emitted when a media should be configured