}
/* parse @transport and return a valid transport in @tr. only transports
- * from @supported are returned. Returns FALSE if no valid transport
+ * supported by @stream are returned. Returns FALSE if no valid transport
* was found. */
static gboolean
-parse_transport (const char *transport, GstRTSPLowerTrans supported,
+parse_transport (const char *transport, GstRTSPStream * stream,
GstRTSPTransport * tr)
{
gint i;
goto next;
}
- /* we have a transport, see if it's RTP/AVP */
- if (tr->trans != GST_RTSP_TRANS_RTP || tr->profile != GST_RTSP_PROFILE_AVP) {
- GST_WARNING ("invalid transport %s", transports[i]);
- goto next;
- }
-
- if (!(tr->lower_transport & supported)) {
+ /* we have a transport, see if it's supported */
+ if (!gst_rtsp_stream_is_transport_supported (stream, tr)) {
GST_WARNING ("unsupported transport %s", transports[i]);
goto next;
}
GstRTSPUrl *uri;
gchar *transport;
GstRTSPTransport *ct, *st;
- GstRTSPLowerTrans supported;
GstRTSPStatusCode code;
GstRTSPSession *session;
GstRTSPStreamTransport *trans;
gst_rtsp_transport_new (&ct);
- /* our supported transports */
- supported = gst_rtsp_stream_get_protocols (stream);
-
/* parse and find a usable supported transport */
- if (!parse_transport (transport, supported, ct))
+ if (!parse_transport (transport, stream, ct))
goto unsupported_transports;
/* update the client transport */