After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 774728 - Subtitle showing as rectangular box in android platform
Subtitle showing as rectangular box in android platform
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.8.3
Other other
: Normal normal
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-19 18:00 UTC by Kim Jonathan
Modified: 2017-01-06 13:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Android test app (590.01 KB, application/zip)
2016-11-19 18:00 UTC, Kim Jonathan
Details

Description Kim Jonathan 2016-11-19 18:00:59 UTC
Created attachment 340319 [details]
Android test app

Hi,

Subtitle is showing as rectangular box on android device irrespective of subtitle language. I tried english, german etc...
Modified test app for android studio (Windows) attached.

Thanks.
Comment 1 Nicolas Dufresne (ndufresne) 2016-11-20 02:35:36 UTC
That means you have no fonts installed. That probably broke when you ported to Android studio ...
Comment 2 Kim Jonathan 2016-11-20 04:42:55 UTC
(In reply to Nicolas Dufresne (stormer) from comment #1)
> That means you have no fonts installed. That probably broke when you ported
> to Android studio ...

There is fontconfig folder in my app assets folder and contents are below.
As discussed with slomo_ on irc, he suggested that its a bug and I should file it.

...app\assets\fontconfig\fonts.conf
...app\assets\fontconfig\fonts\truetype\Ubuntu-R.ttf
Comment 3 Nicolas Dufresne (ndufresne) 2016-11-20 16:47:19 UTC
Still means that you have no fonts visible in your installation ;-P The initialization code generated by the ndk-build script we provides sets various environment. Would it be possible to dump you environment variable and share ?
Comment 4 Kim Jonathan 2016-12-26 15:13:22 UTC
(In reply to Nicolas Dufresne (stormer) from comment #3)
> Still means that you have no fonts visible in your installation ;-P The
> initialization code generated by the ndk-build script we provides sets
> various environment. Would it be possible to dump you environment variable
> and share ?

I found the bug inside Android Studio. As per my understanding, when a project
is imported in Android Studio, it creates an Assets folder inside app folder.
But ideally it should be inside app/src/main folder otherwise android studio will not consider it as assets and will not be added in generated apk file. I created the same manually and copied all fontconfig stuff (fontconfig, fonts.conf, etc...) from gstreamer sdk to that folder and it started working. Currently I am using "Ubuntu-R" font file for subtitle rendering on my android phone and its working fine. Thanks for all your support.
Comment 5 Kim Jonathan 2016-12-26 15:15:35 UTC
I tried with english, spanish french, german subtitles and all are working.
But chinese and japanese language did not work. If you need more info for this,
I will share and working app and logs as well.
Comment 6 Arun Raghavan 2017-01-05 05:23:58 UTC
With the new gradle build system, we should be using app/src/main/assets. I'm pushing a fix to our Makefile to do this automatically.
Comment 7 Arun Raghavan 2017-01-06 13:34:51 UTC
Also fixed in 1.10, for which you'll need an addition to your app Gradle file:

  https://cgit.freedesktop.org/gstreamer/gst-examples/commit/playback/player/android

We did it this way so as to not change the default in a bugfix release.