rags - allow urls like rtsp://. http:// etc. streams again

This commit is contained in:
Carsten Haitzler 2020-01-16 21:39:11 +00:00
parent 0be3c1b350
commit fe95c8db8b
2 changed files with 17 additions and 7 deletions

View File

@ -251,6 +251,9 @@ elm_main(int argc, char **argv)
else
{
char *realpath = strdup(argv[i]);
if (!strncasecmp(realpath, "file:/", 6))
{
Efreet_Uri *uri = efreet_uri_decode(realpath);
if (uri)
{
@ -258,6 +261,7 @@ elm_main(int argc, char **argv)
realpath = ecore_file_realpath(uri->path);
efreet_uri_free(uri);
}
}
if (ecore_file_is_dir(realpath))
{
recursion = calloc(1, sizeof(Recursion_Data));

View File

@ -632,12 +632,18 @@ video_file_set(Evas_Object *obj, const char *file)
char *realfile = NULL;
Video *sd = evas_object_smart_data_get(obj);
if (!sd) return;
printf("video_file_set ... %s\n", file);
evas_object_hide(sd->o_img);
evas_object_hide(sd->o_vid);
evas_object_hide(sd->clip);
eina_stringshare_replace(&(sd->file), file);
if (sd->file)
{
const char *colon = strchr(sd->file, ':');
Eina_Bool is_url = EINA_FALSE;
if ((colon) && (colon[1] == '/') && (colon[2] == '/'))
is_url = EINA_TRUE;
if (!strncasecmp(sd->file, "file:/", 6))
{
Efreet_Uri *uri = efreet_uri_decode(sd->file);
@ -647,8 +653,7 @@ video_file_set(Evas_Object *obj, const char *file)
efreet_uri_free(uri);
}
}
else if ((!strncasecmp(sd->file, "http:/", 6)) ||
(!strncasecmp(sd->file, "https:/", 7)))
else if (is_url)
realfile = strdup(sd->file);
else
realfile = ecore_file_realpath(sd->file);
@ -656,6 +661,7 @@ video_file_set(Evas_Object *obj, const char *file)
free(realfile);
eina_stringshare_replace(&(sd->artfile), NULL);
emotion_object_file_set(sd->o_vid, sd->file);
printf("set emotion to %s\n", sd->file);
video_position_set(obj, 0.0);
if (sd->doart)
{