+2006-07-04 Wim Taymans <wim@fluendo.com>
+
+ * gst/playback/gstplaybasebin.c: (is_stream), (gen_source_element):
+ Improve checking if we are dealing with a stream. Added some
+ more uris that need buffering.
+
2006-07-03 Edward Hervey <edward@fluendo.com>
* ext/vorbis/vorbisdec.c: (vorbis_do_clip):
return subbin;
}
+/* lame - FIXME, maybe we can use seek_types/mask here? */
+static gboolean
+is_stream (GstPlayBaseBin * play_base_bin, gchar * uri)
+{
+ static const gchar *uris[] = { "http://", "mms://", "mmsh://",
+ "mmsu://", "mmst://", "rtp://", "rtsp://", NULL
+ };
+ gint i;
+
+ for (i = 0; uris[i]; i++) {
+ if (g_str_has_prefix (uri, uris[i]))
+ return TRUE;
+ }
+ return FALSE;
+}
+
/*
* Generate a source element that does caching for network streams.
*/
if (!source)
return NULL;
- /* lame - FIXME, maybe we can use seek_types/mask here? */
- play_base_bin->is_stream = !strncmp (play_base_bin->uri, "http://", 7) ||
- !strncmp (play_base_bin->uri, "mms://", 6) ||
- !strncmp (play_base_bin->uri, "rtp://", 6) ||
- !strncmp (play_base_bin->uri, "rtsp://", 7);
+ play_base_bin->is_stream = is_stream (play_base_bin, play_base_bin->uri);
/* make HTTP sources send extra headers so we get icecast
* metadata in case the stream is an icecast stream */