Posts: 46
Joined: May 2012
Reputation:
0
I was trying to find some information about the showstopper for atv2/ios5 on mainline and thought this was it. I must say it is not that trivial to find that information around here.
The problem how it was described here didn't sound impossible to track, Run-time problem is probably more difficult.
Sure I'm interested!
For starters, I'm a professional software developer since more than 2 decades but I've treated everything from Apple as paria until I found out that this little nice atv2 ran xbmc.
ATV/XBMC with live-TV and spotify fits my needs perfectly! I must also say that it is running very stable this couple of weeks I've had it in my hands. Great work!
Would it be a good idea to create a thread to discuss the "real" problem?
If we share the findings so far maybe we can track this down with joint force.
Since my experiance regarding atv/ios/xbmc is limited and I may ask "stupid" questions, please try to avoid answering with retoric question. That doesn't benefit anyone. So spread the information and I'm sure this can be solved!
Keep up the excellent work!
Posts: 11,582
Joined: Feb 2008
Reputation:
84
davilla
Retired-Team-XBMC Developer
Posts: 11,582
No, in Eden ffmpeg was dlopen'ed in both cases(ios/atv2) but Eden has the patch. So all is good there.
In mainline code, we changed from using dylibs to linking static libs for ffmepg (an issue with actually building an ffmpeg as an arm dylib).
Now ffmpeg becomes part of xbmc binary and there's no need to dlopen it. BUT in iOS, xbmc is a real app, in atv2 it is a bundle (frapp) that frontrow loads using dlopen. So under atv2, it's the same dlopen issue regardless of if frontrow does the dlopen or if xbmc would do the dlopen.
Any bundle that contains references to global symbols in .text segments from the assembler code that require fixups to their offset symbol address. If you dlopen it, bang. kernel panic. This also applies if the loader loads the dylib too, so make a simple binary app that links to ffmpegs dylibs, run it and bang, kernel panic.
Posts: 46
Joined: May 2012
Reputation:
0
So if I understand correctly, the main problem is that ffmpeg can't be used as a dylib on arm/neon.
What does ffmpeg guys say about it? Have you got any feedback?
Posts: 11,582
Joined: Feb 2008
Reputation:
84
davilla
Retired-Team-XBMC Developer
Posts: 11,582
no, there are two issues, 1) ffmpeg will not compile as a dylib. 2) ffmpeg used in any dylib/bundle will panic the kernel when loaded. 1) is not so important, 2) is a deal breaker for atv2.
Posts: 71
Joined: Sep 2011
Reputation:
0
Hi Guys,
Its really interesting to understand the issue here, thanks Davilla.
I apologise for injecting myself into conversation and please forgive my significant ignorance however, for those willing, is it possible to replace Frontrow with XBMC? Would XBMC then be loaded as a ‘real app’ and thus mitigate the requirement for it to be dlopen'ed by Frontrow?
Posts: 46
Joined: May 2012
Reputation:
0
I do understand that you currently link it statically. But if the ffmpeg would build as a dylib and behave as one, I beleive the problem would be solved. I don't know, but isn't it reasonable that the ffmpeg would build as a dylib on arm. I beleive this is normal on other platforms.
Is this an active decission of ffmpeg to not support dylib on arm?
This should probably be an issue on other arm platforms as well. But on other platforms they can choose to make a static link.
I also understand that even if we make a static link of ffmpeg in the atv2-xbmc bundle it still doesn't matter since the hole shebang will be dynamically loaded anyway.
Posts: 11,582
Joined: Feb 2008
Reputation:
84
davilla
Retired-Team-XBMC Developer
Posts: 11,582
* davilla slams his head on his desk, multiple times. dyloading ffmpeg code is the issue, does not matter if it's a ffmpeg built dylib or a static link into a bundle that is dyloaded. Dyload it, bang, kernel panic.
Posts: 3,025
Joined: Sep 2011
Reputation:
255
DDDamian
Team-XBMC Developer
Posts: 3,025
ow - i think baiting Davilla with "How to write shared libraries" is like waving the red flag at the bull (or maybe the spear in the side)
System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!