update url handling to detect yourupe-dl output url streams

This commit is contained in:
Carsten Haitzler 2014-01-21 22:27:10 +09:00
parent b80c2f6f88
commit c8f20f9312
1 changed files with 19 additions and 4 deletions

View File

@ -680,7 +680,8 @@ _type_mov_init(Evas_Object *obj)
NULL,
"gstreamer",
"xine",
"vlc"
"vlc",
"gstreamer1"
};
char *mod = NULL;
@ -1315,13 +1316,27 @@ media_src_type_get(const char *src)
query = strchr(src, '?');
if (query)
{
if (strchr(query + 1, '=') && strchr(query + 1, '&'))
if (strchr(query + 1, '=') && !strchr(query + 1, '&'))
{
const char *p = strstr(src, "www.youtube.com/watch");
if (p && (p < query))
type = TYPE_MOV;
}
else if (strchr(query + 1, '=') && strchr(query + 1, '&'))
{
const char *p = strstr(src, ".youtube.com/");
if (p && (p < query))
type = TYPE_MOV;
else
{
p = strstr(src, ".googlevideo.com/");
if (p && (p < query))
type = TYPE_MOV;
}
}
}
}
return type;
}