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

v-0.4.0
Carsten Haitzler 3 years ago
parent 0be3c1b350
commit fe95c8db8b
  1. 14
      src/bin/main.c
  2. 10
      src/bin/video.c

@ -251,12 +251,16 @@ elm_main(int argc, char **argv)
else
{
char *realpath = strdup(argv[i]);
Efreet_Uri *uri = efreet_uri_decode(realpath);
if (uri)
if (!strncasecmp(realpath, "file:/", 6))
{
free(realpath);
realpath = ecore_file_realpath(uri->path);
efreet_uri_free(uri);
Efreet_Uri *uri = efreet_uri_decode(realpath);
if (uri)
{
free(realpath);
realpath = ecore_file_realpath(uri->path);
efreet_uri_free(uri);
}
}
if (ecore_file_is_dir(realpath))
{

@ -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)
{

Loading…
Cancel
Save