Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize fake SurfaceFlinger from libminisf if present #13

Merged
merged 1 commit into from May 20, 2019

Conversation

@NotKit
Copy link
Collaborator

commented Feb 7, 2019

Ported from from mer-hybris/qt5-qpa-hwcomposer-plugin@c986132 and needed for Gemini PDA camera to work.

It should help with other Android 7 devices as well, as halium-7.1 does not have the following commit:
ubports/android_frameworks_native@ac0afed. It is not needed with libminsf from sailfishos/drodmedia, as ISurfaceComposer is provided (simply porting that commit is not enough at least for Gemini).

@NotKit NotKit force-pushed the NotKit:xenial branch 3 times, most recently from 1d0cca1 to 4416d76 Feb 7, 2019

Initialize fake SurfaceFlinger from libminisf if present
Ported from from mer-hybris/qt5-qpa-hwcomposer-plugin@c986132
and needed for Gemini PDA camera to work.

It should help with other Android 7 devices as well, as halium-7.1
does not have the following commit:
ubports/android_frameworks_native@ac0afed

@NotKit NotKit force-pushed the NotKit:xenial branch from 4416d76 to 8df3915 Feb 7, 2019

@APokorny
Copy link
Contributor

left a comment

Does that mean that on systems that do not have a libminisf.so we should implement some form of ISurfaceComposer and related interface to get media encoding/decoding to work?

@NotKit

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 13, 2019

I suppose this is relevant only for Halium 7.1 devices, as it was working on 5.1 base before. For those it can be built from sailfishos/droidmedia repository as part of Halium image.

@UniversalSuperBox

This comment has been minimized.

Copy link
Member

commented Mar 18, 2019

Have the appropriate changes been proposed to Halium to allow for that?

@fredldotme

This comment has been minimized.

Copy link

commented May 14, 2019

Tested on Sony Xperia X and fixes media-hub starting up (fixes remaining audio issues).

@UniversalSuperBox I'll approve as soon as Halium gets droidmedia integrated properly (I'd do it if necessary).

@fredldotme

This comment has been minimized.

Copy link

commented May 16, 2019

@NotKit is it possible to move this initialization step to mir-android-platform instead? Seems to me like a cleaner solution.

@dobey

This comment has been minimized.

Copy link
Member

commented May 16, 2019

@NotKit is it possible to move this initialization step to mir-android-platform instead? Seems to me like a cleaner solution.

I suppose that will be necessary for it to work in the new Mir, but to work on current xenial images, it needs to be in Mir which has the android platform included.

@fredldotme
Copy link

left a comment

Tested on Sony Xperia X with a Halium-7.1 base.

@Flohack74

This comment has been minimized.

Copy link
Member

commented May 20, 2019

@fredldotme So the test was positive and you recommend to merge? =) Please include a test result always so we know if we can proceed or not.

@fredldotme

This comment has been minimized.

Copy link

commented May 20, 2019

@Flohack74 what else might be required?

@Flohack74

This comment has been minimized.

Copy link
Member

commented May 20, 2019

I dont know but by just looking at the code I cannot judge if this is ok and has no side effects. Its important to convince a reviewer that the code is ok ;)

@fredldotme

This comment has been minimized.

Copy link

commented May 20, 2019

In that case I could merge the change myself :)

@Flohack74

This comment has been minimized.

Copy link
Member

commented May 20, 2019

If you are convinced that it is sound and free of bugs you can do this, yes.

@fredldotme

This comment has been minimized.

Copy link

commented May 20, 2019

Tested on Sony Xperia X (fixes media-hub startup) and Meizu MX4 (no regressions).

@fredldotme fredldotme merged commit 0713409 into ubports:xenial May 20, 2019

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

mariogrip pushed a commit that referenced this pull request Jun 16, 2019

Merge #808
808: Fix Mir unit tests r=AlanGriffiths a=wmww

With `std::list`, Mir unit tests segfaults with the following stack trace. Don't have enough motivation at the moment (or enough understanding of `std::list`) to figure out why. It seems likely there is a root cause I haven't actually addressed, so if you have ideas on what it may be or how to debug it, I'm all ears.

```
GNU gdb (Ubuntu 8.2.91.20190405-0ubuntu3) 8.2.91.20190405-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./bin/mir_unit_tests...
(gdb) r
Starting program: /home/wmww/code/mir/build/bin/mir_unit_tests 
MIR_CLIENT_PLATFORM_PATH=/home/wmww/code/mir/build/bin/../lib/client-modules/
MIR_SERVER_PLATFORM_PATH=/home/wmww/code/mir/build/bin/../lib/server-modules/
LD_LIBRARY_PATH=:/usr/local/lib:/usr/local/lib:/home/wmww/code/mir/build/bin/../lib
exec=/home/wmww/code/mir/build/bin/mir_unit_tests.bin
process 3530 is executing new program: /home/wmww/code/mir/build/bin/mir_unit_tests.bin
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000555557873374 in std::_Function_base::_M_empty (this=0x10) at /usr/include/c++/8/bits/std_function.h:260
260	    bool _M_empty() const { return !_M_manager; }
(gdb) bt
#0  0x0000555557873374 in std::_Function_base::_M_empty() const (this=0x10) at /usr/include/c++/8/bits/std_function.h:260
#1  0x00005555588889bd in std::function<std::experimental::fundamentals_v1::optional<int> (char const*, int, unsigned int)>::operator()(char const*, int, unsigned int) const
    (this=0x10, __args#0=0x5555597a6af0 "/home/wmww/code/mir/build/bin/mir_unit_tests.bin", __args#1=524288, __args#2=0) at /usr/include/c++/8/bits/std_function.h:685
#2  0x00005555588882b9 in (anonymous namespace)::run_handlers(char const*, int, mode_t) (path=0x5555597a6af0 "/home/wmww/code/mir/build/bin/mir_unit_tests.bin", flags=524288, mode=0)
    at /home/wmww/code/mir/tests/mir_test_framework/open_wrapper.cpp:58
#3  0x000055555888841a in open(char const*, int, mode_t) (path=0x5555597a6af0 "/home/wmww/code/mir/build/bin/mir_unit_tests.bin", flags=524288, mode=0)
    at /home/wmww/code/mir/tests/mir_test_framework/open_wrapper.cpp:78
#4  0x00007ffff7784262 in lttng_ust_elf_create () at /usr/lib/x86_64-linux-gnu/liblttng-ust.so.0
#5  0x00007ffff7785e5e in  () at /usr/lib/x86_64-linux-gnu/liblttng-ust.so.0
#6  0x00007ffff737b557 in __GI___dl_iterate_phdr (callback=0x7ffff7785fd0, data=0x7fffffffdb90) at dl-iteratephdr.c:75
#7  0x00007ffff77864eb in lttng_ust_dl_update () at /usr/lib/x86_64-linux-gnu/liblttng-ust.so.0
#8  0x00007ffff77662e9 in  () at /usr/lib/x86_64-linux-gnu/liblttng-ust.so.0
#9  0x00007ffff7fe295a in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe0e8, env=env@entry=0x7fffffffe0f8) at dl-init.c:72
#10 0x00007ffff7fe2a59 in call_init (env=0x7fffffffe0f8, argv=0x7fffffffe0e8, argc=1, l=<optimized out>) at dl-init.c:30
#11 0x00007ffff7fe2a59 in _dl_init (main_map=0x7ffff7ffe190, argc=1, argv=0x7fffffffe0e8, env=0x7fffffffe0f8) at dl-init.c:119
#12 0x00007ffff7fd30ca in _dl_start_user () at /lib64/ld-linux-x86-64.so.2
#13 0x0000000000000001 in  ()
#14 0x00007fffffffe3b8 in  ()
#15 0x0000000000000000 in  ()
```

Co-authored-by: William Wold <wm@wmww.sh>

fredldotme added a commit to ubports/mir-android-platform that referenced this pull request Aug 16, 2019

Initialize fake SurfaceFlinger from libminisf if present
This implements the same change as ubports/mir#13

Original commit message:
Ported from from mer-hybris/qt5-qpa-hwcomposer-plugin@c986132 and needed for Gemini PDA camera to work.

It should help with other Android 7 devices as well, as halium-7.1 does not have the following commit:
ubports/android_frameworks_native@ac0afed. It is not needed with libminsf from sailfishos/drodmedia, as ISurfaceComposer is provided (simply porting that commit is not enough at least for Gemini).

fredldotme added a commit to ubports/mir-android-platform that referenced this pull request Aug 16, 2019

Initialize fake SurfaceFlinger from libminisf if present
This implements the same change as ubports/mir#13

Original commit message:
Ported from from mer-hybris/qt5-qpa-hwcomposer-plugin@c986132 and needed for Gemini PDA camera to work.

It should help with other Android 7 devices as well, as halium-7.1 does not have the following commit:
ubports/android_frameworks_native@ac0afed. It is not needed with libminsf from sailfishos/drodmedia, as ISurfaceComposer is provided (simply porting that commit is not enough at least for Gemini).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.