mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
Add vmethod for rtsp-media subclass to access rtpbin
This commit is contained in:
parent
081e6d3204
commit
a95ab4b29e
2 changed files with 14 additions and 0 deletions
|
@ -1712,6 +1712,19 @@ gst_rtsp_media_prepare (GstRTSPMedia * media, GstRTSPThread * thread)
|
||||||
goto is_reused;
|
goto is_reused;
|
||||||
|
|
||||||
priv->rtpbin = gst_element_factory_make ("rtpbin", NULL);
|
priv->rtpbin = gst_element_factory_make ("rtpbin", NULL);
|
||||||
|
if (priv->rtpbin != NULL) {
|
||||||
|
GstRTSPMediaClass *klass;
|
||||||
|
gboolean success = TRUE;
|
||||||
|
|
||||||
|
klass = GST_RTSP_MEDIA_GET_CLASS (media);
|
||||||
|
if (klass->setup_rtpbin)
|
||||||
|
success = klass->setup_rtpbin (media, priv->rtpbin);
|
||||||
|
|
||||||
|
if (success == FALSE) {
|
||||||
|
gst_object_unref (priv->rtpbin);
|
||||||
|
priv->rtpbin = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (priv->rtpbin == NULL)
|
if (priv->rtpbin == NULL)
|
||||||
goto no_rtpbin;
|
goto no_rtpbin;
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,7 @@ struct _GstRTSPMediaClass {
|
||||||
GstRTSPRangeUnit unit);
|
GstRTSPRangeUnit unit);
|
||||||
gboolean (*query_position) (GstRTSPMedia *media, gint64 *position);
|
gboolean (*query_position) (GstRTSPMedia *media, gint64 *position);
|
||||||
gboolean (*query_stop) (GstRTSPMedia *media, gint64 *stop);
|
gboolean (*query_stop) (GstRTSPMedia *media, gint64 *stop);
|
||||||
|
gboolean (*setup_rtpbin) (GstRTSPMedia *media, GstElement *rtpbin);
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*new_stream) (GstRTSPMedia *media, GstRTSPStream * stream);
|
void (*new_stream) (GstRTSPMedia *media, GstRTSPStream * stream);
|
||||||
|
|
Loading…
Reference in a new issue