![]() |
![]() |
![]() |
GStreamer RTSP Server Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
struct GstRTSPMediaFactory; struct GstRTSPMediaFactoryClass; GstRTSPMediaFactory * gst_rtsp_media_factory_new (void
); void gst_rtsp_media_factory_set_launch (GstRTSPMediaFactory *factory
,const gchar *launch
); gchar * gst_rtsp_media_factory_get_launch (GstRTSPMediaFactory *factory
); void gst_rtsp_media_factory_set_shared (GstRTSPMediaFactory *factory
,gboolean shared
); gboolean gst_rtsp_media_factory_is_shared (GstRTSPMediaFactory *factory
); void gst_rtsp_media_factory_set_eos_shutdown (GstRTSPMediaFactory *factory
,gboolean eos_shutdown
); gboolean gst_rtsp_media_factory_is_eos_shutdown (GstRTSPMediaFactory *factory
); GstRTSPMedia * gst_rtsp_media_factory_construct (GstRTSPMediaFactory *factory
,const GstRTSPUrl *url
); void gst_rtsp_media_factory_collect_streams (GstRTSPMediaFactory *factory
,const GstRTSPUrl *url
,GstRTSPMedia *media
);
"eos-shutdown" gboolean : Read / Write "launch" gchar* : Read / Write "shared" gboolean : Read / Write
struct GstRTSPMediaFactory;
The definition and logic for constructing the pipeline for a media. The media can contain multiple streams like audio and video.
struct GstRTSPMediaFactoryClass { GObjectClass parent_class; gchar * (*gen_key) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url); GstElement * (*get_element) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url); GstRTSPMedia * (*construct) (GstRTSPMediaFactory *factory, const GstRTSPUrl *url); void (*configure) (GstRTSPMediaFactory *factory, GstRTSPMedia *media); GstElement * (*create_pipeline)(GstRTSPMediaFactory *factory, GstRTSPMedia *media); };
The GstRTSPMediaFactory class structure.
GObjectClass |
|
convert url to a key for caching shared GstRTSPMedia objects.
The default implementation of this function will use the complete URL
including the query parameters to return a key. |
|
Construct and return a GstElement that is a GstBin containing
the elements to use for streaming the media. The bin should contain
payloaders payd for each stream. The default implementation of this
function returns the bin created from the launch parameter. |
|
the vmethod that will be called when the factory has to create the
GstRTSPMedia for url . The default implementation of this
function calls get_element to retrieve an element and then looks for
payd to create the streams. |
|
configure the media created with construct . The default
implementation will configure the 'shared' property of the media. |
|
create a new pipeline or re-use an existing one and
add the GstRTSPMedia's element created by construct to the pipeline. |
GstRTSPMediaFactory * gst_rtsp_media_factory_new (void
);
Create a new GstRTSPMediaFactory instance.
Returns : |
a new GstRTSPMediaFactory object. |
void gst_rtsp_media_factory_set_launch (GstRTSPMediaFactory *factory
,const gchar *launch
);
The gst_parse_launch()
line to use for constructing the pipeline in the
default prepare vmethod.
The pipeline description should return a GstBin as the toplevel element which can be accomplished by enclosing the dscription with brackets '(' ')'.
The description should return a pipeline with payloaders named pay0, pay1, etc.. Each of the payloaders will result in a stream.
|
a GstRTSPMediaFactory |
|
the launch description |
gchar * gst_rtsp_media_factory_get_launch (GstRTSPMediaFactory *factory
);
Get the gst_parse_launch()
pipeline description that will be used in the
default prepare vmethod.
|
a GstRTSPMediaFactory |
Returns : |
the configured launch description. g_free() after usage. |
void gst_rtsp_media_factory_set_shared (GstRTSPMediaFactory *factory
,gboolean shared
);
Configure if media created from this factory can be shared between clients.
|
a GstRTSPMediaFactory |
|
the new value |
gboolean gst_rtsp_media_factory_is_shared (GstRTSPMediaFactory *factory
);
Get if media created from this factory can be shared between clients.
|
a GstRTSPMediaFactory |
Returns : |
TRUE if the media will be shared between clients. |
void gst_rtsp_media_factory_set_eos_shutdown (GstRTSPMediaFactory *factory
,gboolean eos_shutdown
);
Configure if media created from this factory will have an EOS sent to the pipeline before shutdown.
|
a GstRTSPMediaFactory |
|
the new value |
gboolean gst_rtsp_media_factory_is_eos_shutdown
(GstRTSPMediaFactory *factory
);
Get if media created from this factory will have an EOS event sent to the pipeline before shutdown.
|
a GstRTSPMediaFactory |
Returns : |
TRUE if the media will receive EOS before shutdown. |
GstRTSPMedia * gst_rtsp_media_factory_construct (GstRTSPMediaFactory *factory
,const GstRTSPUrl *url
);
Prepare 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 GstRTSPMediaStream objects should be added to the result with the srcpad member set to a source pad that produces buffer of type application/x-rtp.
|
a GstRTSPMediaFactory |
|
the url used |
Returns : |
a new GstRTSPMedia if the media could be prepared. |
void gst_rtsp_media_factory_collect_streams (GstRTSPMediaFactory *factory
,const GstRTSPUrl *url
,GstRTSPMedia *media
);
"eos-shutdown"
property"eos-shutdown" gboolean : Read / Write
Send EOS down the pipeline before shutting down.
Default value: FALSE
"launch"
property"launch" gchar* : Read / Write
A launch description of the pipeline.
Default value: NULL
"shared"
property"shared" gboolean : Read / Write
If media from this factory is shared.
Default value: FALSE