Add vmethod for rtsp-media subclass to access rtpbin

This commit is contained in:
Youness Alaoui 2013-06-11 19:10:01 -04:00 committed by Wim Taymans
parent 081e6d3204
commit a95ab4b29e
2 changed files with 14 additions and 0 deletions

View file

@ -1712,6 +1712,19 @@ gst_rtsp_media_prepare (GstRTSPMedia * media, GstRTSPThread * thread)
goto is_reused;
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)
goto no_rtpbin;

View file

@ -101,6 +101,7 @@ struct _GstRTSPMediaClass {
GstRTSPRangeUnit unit);
gboolean (*query_position) (GstRTSPMedia *media, gint64 *position);
gboolean (*query_stop) (GstRTSPMedia *media, gint64 *stop);
gboolean (*setup_rtpbin) (GstRTSPMedia *media, GstElement *rtpbin);
/* signals */
void (*new_stream) (GstRTSPMedia *media, GstRTSPStream * stream);