rags - allow urls like rtsp://. http:// etc. streams again
This commit is contained in:
parent
0be3c1b350
commit
fe95c8db8b
|
@ -251,12 +251,16 @@ elm_main(int argc, char **argv)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *realpath = strdup(argv[i]);
|
char *realpath = strdup(argv[i]);
|
||||||
Efreet_Uri *uri = efreet_uri_decode(realpath);
|
|
||||||
if (uri)
|
if (!strncasecmp(realpath, "file:/", 6))
|
||||||
{
|
{
|
||||||
free(realpath);
|
Efreet_Uri *uri = efreet_uri_decode(realpath);
|
||||||
realpath = ecore_file_realpath(uri->path);
|
if (uri)
|
||||||
efreet_uri_free(uri);
|
{
|
||||||
|
free(realpath);
|
||||||
|
realpath = ecore_file_realpath(uri->path);
|
||||||
|
efreet_uri_free(uri);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ecore_file_is_dir(realpath))
|
if (ecore_file_is_dir(realpath))
|
||||||
{
|
{
|
||||||
|
|
|
@ -632,12 +632,18 @@ video_file_set(Evas_Object *obj, const char *file)
|
||||||
char *realfile = NULL;
|
char *realfile = NULL;
|
||||||
Video *sd = evas_object_smart_data_get(obj);
|
Video *sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
|
printf("video_file_set ... %s\n", file);
|
||||||
evas_object_hide(sd->o_img);
|
evas_object_hide(sd->o_img);
|
||||||
evas_object_hide(sd->o_vid);
|
evas_object_hide(sd->o_vid);
|
||||||
evas_object_hide(sd->clip);
|
evas_object_hide(sd->clip);
|
||||||
eina_stringshare_replace(&(sd->file), file);
|
eina_stringshare_replace(&(sd->file), file);
|
||||||
if (sd->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))
|
if (!strncasecmp(sd->file, "file:/", 6))
|
||||||
{
|
{
|
||||||
Efreet_Uri *uri = efreet_uri_decode(sd->file);
|
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);
|
efreet_uri_free(uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((!strncasecmp(sd->file, "http:/", 6)) ||
|
else if (is_url)
|
||||||
(!strncasecmp(sd->file, "https:/", 7)))
|
|
||||||
realfile = strdup(sd->file);
|
realfile = strdup(sd->file);
|
||||||
else
|
else
|
||||||
realfile = ecore_file_realpath(sd->file);
|
realfile = ecore_file_realpath(sd->file);
|
||||||
|
@ -656,6 +661,7 @@ video_file_set(Evas_Object *obj, const char *file)
|
||||||
free(realfile);
|
free(realfile);
|
||||||
eina_stringshare_replace(&(sd->artfile), NULL);
|
eina_stringshare_replace(&(sd->artfile), NULL);
|
||||||
emotion_object_file_set(sd->o_vid, sd->file);
|
emotion_object_file_set(sd->o_vid, sd->file);
|
||||||
|
printf("set emotion to %s\n", sd->file);
|
||||||
video_position_set(obj, 0.0);
|
video_position_set(obj, 0.0);
|
||||||
if (sd->doart)
|
if (sd->doart)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue