summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-09-01 12:25:01 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-09-01 12:26:01 +0100
commitd5d7c553021026dc870aa6ad79179b351674e7e0 (patch)
treed57b90860b1718c48061d4da7a447d98ff1381db
parent173b3a108e1b2093ac37650619a61568aaed4e04 (diff)
elm icon/thumb - fix handling of a wider range of video extns
the xetension list for video files was far too small. it menas it missed many kinds of video files. this fixes that to have a much wider range/list. @fix
-rw-r--r--src/lib/elementary/elm_icon.c13
-rw-r--r--src/lib/elementary/elm_thumb.c13
-rw-r--r--src/lib/elementary/elm_thumb_legacy.h6
3 files changed, 23 insertions, 9 deletions
diff --git a/src/lib/elementary/elm_icon.c b/src/lib/elementary/elm_icon.c
index c6b626a410..b6aeff0135 100644
--- a/src/lib/elementary/elm_icon.c
+++ b/src/lib/elementary/elm_icon.c
@@ -85,9 +85,16 @@ _icon_thumb_display(Elm_Icon_Data *sd)
85 int prefix_size; 85 int prefix_size;
86 const char **ext, *ptr; 86 const char **ext, *ptr;
87 static const char *extensions[] = 87 static const char *extensions[] =
88 { 88 {
89 ".avi", ".mp4", ".ogv", ".mov", ".mpg", ".wmv", NULL 89 ".asf", ".avi", ".bdm", ".bdmv", ".clpi", ".cpi", ".dv", ".fla",
90 }; 90 ".flv", ".m1v", ".m2t", ".m2v", ".m4v", ".mkv", ".mov", ".mp2",
91 ".mp2ts", ".mp4", ".mpe", ".mpeg", ".mpg", ".mpl", ".mpls", ".mts",
92 ".mxf", ".nut", ".nuv", ".ogg", ".ogm", ".ogv", ".qt", ".rm", ".rmj",
93 ".rmm", ".rms", ".rmvb", ".rmx", ".rv", ".swf", ".ts", ".weba",
94 ".webm", ".wmv", ".3g2", ".3gp", ".3gp2", ".3gpp", ".3gpp2", ".3p2",
95 ".264",
96 NULL
97 };
91 98
92 prefix_size = eina_stringshare_strlen(sd->thumb.file.path) - 4; 99 prefix_size = eina_stringshare_strlen(sd->thumb.file.path) - 4;
93 if (prefix_size >= 0) 100 if (prefix_size >= 0)
diff --git a/src/lib/elementary/elm_thumb.c b/src/lib/elementary/elm_thumb.c
index 555ff01635..f883e183ed 100644
--- a/src/lib/elementary/elm_thumb.c
+++ b/src/lib/elementary/elm_thumb.c
@@ -670,9 +670,16 @@ _elm_thumb_efl_file_load(Eo *obj, Elm_Thumb_Data *sd)
670 int prefix_size; 670 int prefix_size;
671 const char **ext, *ptr; 671 const char **ext, *ptr;
672 static const char *extensions[] = 672 static const char *extensions[] =
673 { 673 {
674 ".avi", ".mp4", ".ogv", ".mov", ".mpg", ".wmv", NULL 674 ".asf", ".avi", ".bdm", ".bdmv", ".clpi", ".cpi", ".dv", ".fla",
675 }; 675 ".flv", ".m1v", ".m2t", ".m2v", ".m4v", ".mkv", ".mov", ".mp2",
676 ".mp2ts", ".mp4", ".mpe", ".mpeg", ".mpg", ".mpl", ".mpls", ".mts",
677 ".mxf", ".nut", ".nuv", ".ogg", ".ogm", ".ogv", ".qt", ".rm", ".rmj",
678 ".rmm", ".rms", ".rmvb", ".rmx", ".rv", ".swf", ".ts", ".weba",
679 ".webm", ".wmv", ".3g2", ".3gp", ".3gp2", ".3gpp", ".3gpp2", ".3p2",
680 ".264",
681 NULL
682 };
676 683
677 if (efl_file_loaded_get(obj)) return 0; 684 if (efl_file_loaded_get(obj)) return 0;
678 prefix_size = eina_stringshare_strlen(sd->file) - 4; 685 prefix_size = eina_stringshare_strlen(sd->file) - 4;
diff --git a/src/lib/elementary/elm_thumb_legacy.h b/src/lib/elementary/elm_thumb_legacy.h
index 48fcc1a262..4a8965732e 100644
--- a/src/lib/elementary/elm_thumb_legacy.h
+++ b/src/lib/elementary/elm_thumb_legacy.h
@@ -28,9 +28,9 @@ EAPI Evas_Object *elm_thumb_add(Evas_Object *parent);
28 * 28 *
29 * Set the file that will be used as thumbnail @b source. 29 * Set the file that will be used as thumbnail @b source.
30 * 30 *
31 * The file can be an image or a video (in that case, acceptable 31 * The file can be an image or a video (in that case extension will e used
32 * extensions are: avi, mp4, ogv, mov, mpg and wmv). To start the 32 * to guess if it is a video or not). To start the video animation, use the
33 * video animation, use the function elm_thumb_animate(). 33 * function elm_thumb_animate().
34 * 34 *
35 * @see elm_thumb_file_get() 35 * @see elm_thumb_file_get()
36 * @see elm_thumb_reload() 36 * @see elm_thumb_reload()