Skip to content
This repository

RaspberryPI support #1282

Merged
merged 62 commits into from over 1 year ago

14 participants

huceke Scott Richmond Andrée Hansson Pez Cuckow Voyager1 Memphiz Rainer Hochecker Joakim Plate davilla Charles Blaxland Michal Piechowiak Cory Fields Lars Op den Kamp Andreas Zelend
huceke
Collaborator

This PR brings RaspberryPI support to XBMC. :

1.) Library wrapper for the host and omx implementation.

2.) EGL windowing support.

The EGL windowing needed some enhancments to get the full fange of display modes. Android needs testing if the changes do not break it.

3.) Additional pseudo 3D display modes for the PI.

We are able to use 3D modes on the PI. XBMC does not render the GUI double, this done by the firmware. For this there are new 3D modes.

4.) OMXPlayer.

OMXPlayer is an aditional player for the PI, close based on DVDPlayer. The player does not use AE out of the OMX nature. It is also able to use hardware audio decoding when the user has the licence for it.

5.) Changes to the player selection.

The default player selection in xbmc is too cosy with DVDPlayer.

6.) Build infrastructure simmiliar to android.

The forgotten points are in the source ..... ;)

added some commits August 10, 2012
huceke [rbp] added raspberrypi toolchain support files 3cbb14a
huceke [rbp] added raspberrypi platform support files e2f5d99
huceke [rbp] added raspberrypi support to system globals 88ad708
huceke [rbp] added linux event for sdle less builds 0384505
huceke [rbp] added to non asm version of mathutils 9871aca
huceke [rbp] added raspberrypi support to xbmc app af49207
huceke [rbp] adadded raspberrypi openmax support 5dda4e6
huceke [rbp] AE enable rapsberrypi and disable asm in converter 14a4011
huceke [rbp] added raspberrypi EGL support plus a pseudo 3D mode for 3D output b0f57b8
huceke [rbp] added raspberrypi as.xml settings b144fd2
huceke [rbp] added raspberrypi guisetting tweaks 05cee69
huceke [rbp] include refresh rate in resolution check so we see all and get …
…the right one
c853cb6
huceke [rbp] added missing EGL files from b0f57b850b5b51710f84e94e94a5125d82…
…017580
18c401c
huceke [rbp] added raspberrypi omxplayer a91e874
huceke [rbp] fix blending with gui during hw-rendered playback d7b9041
huceke [rbp] added raspberrypi omx image decoding 8bd067d
huceke [rbp] added raspberrypi support to our configure system 6b37a4c
huceke [rbp] cec: added support for the Raspberry Pi. needs libCEC v1.8.0+. …
…other targets are still supported by libCEC 1.7.0
9787d57
huceke [rbp] added a minimal doc file 5182b60
huceke [rbp] fixed linux compile d9a4065
huceke [rbp] fixed protect return vales in peripherals too bedd4af
huceke [rbp] changed limit jpeg decoding to half width and height. this is a…
… workaround for the PI's limited memory
d70dee6
huceke [rbp] fixed channel mapping. thx popcornmix for finding it 1892d3d
huceke [rbp] fixed crash in thumbnail extraction. disable all ffmpeg cpu opt…
…ions for now, until we figgured out which ones are safe to use on the PI arm core
177bc0b
huceke [rbp] changed, we can now turn on optimizations. configure doesn't me…
…ss anymore with our settings
c464fae
huceke [rbp] fixed channel mapping for hwdecode path. thx popcornmix for fin…
…ding it
8db1a70
huceke [rbp] fixed do not force dvdplayer for rtmp streams d11a167
huceke [rbp] fixed only volume boost on downmix. thx popcornmix for finding it 7d0e8be
huceke [rbp] changed playercorefactory should be more friendly to other play…
…ers than DVDPlayer only
5719641
huceke
Collaborator

@opdenkamp : Do so. Thx

huceke
Collaborator

@Memphiz : https://github.com/huceke/xbmc/blob/6b37a4c8ec605689aee9b8625aec0c41764f21b4/configure.in#L895 comes out of the android merge. It is not PI speciffic.

Edit: My bad, missunderstanding.

and others added some commits August 13, 2012
huceke [rbp] added missing mode from b0f57b850b5b51710f84e94e94a5125d82017580 7faf411
huceke [rbp] fixed, removed redudant grypt check and default use_alsa for al…
…l platforms.
83a27a2
huceke [rbp] fixed, hanewin patch not needed for libnfs 1.3.0 88960bd
huceke [rbp] fixed, do not hardcode library in omx library wrapper. 297988b
[rbp] fixed asm usage in AEConvert. i was told that this is NEON code. acbfa94
[rbp] fixed libsquish native arm compile 8b6af54
huceke [rbp] fixed acbfa940dc07911d1658ce16b06fa4b9e972eb35 the asm works on…
… ARM NEON and VFP. thx Cory
0de0af6
huceke [rbp] fixed 8b6af545b317b5b0cd792f1c77e17cb95a60fe69. propper compile…
… fix for libsquish. thx Cory
3dd86bd
huceke [rbp] revert c853cb6614ac8367fa3c7ace04a943af84882199 and added refre…
…shrate to WinSystem base so we can store and check it in the EGL windowing. My understanding how XBMC handles refreshrates was wrong, missed the point with the start parameter --standalone
e124c6d
huceke [rbp] fixed omxcore using wrong wait f3d9b77
huceke [rbp] changed texture loading assign original size after we sucessful…
…l decoded and allocated the picture.
30fe959
huceke [rbp] changed be consistent with Texture.cpp in enable the omx jpeg d…
…ecoder.
f5845bc
huceke [rbp] changed pause thumbjobs but do not wait for running jobs to be …
…paused.
c9610fc
huceke [rbp] fixed don't apply overscan settings in 3d mode. it just kills it. 0b50307
huceke [rbp] fixed omx fillbuffer, deinit of components, some wrong event wa…
…its, port enabled/disabled detection

Changed the way we wait for fillbuffer. A semaphore is more relaiable.
Fixed some wrong event waits. Should speedup some omx operations.
Deinit of components was wrong. Special free the buffers.
Changed port enableed/disabled detection to use omx functions and no internal statetracking.
Some cosmetics and removed some duplicate code.
b88ebf3
huceke [rbp] added omxplayer Makefile to .gitignore b8e3dd7
huceke [rbp] changed EGL refactoring to match closer the generic EGL impleme…
…ntation and moake log messages more consitent.
490bc0f
huceke [rbp] fixed move RBP platform init after setup of the environment oth…
…erwise a debug build will assert in specialprotocoll.
a3a79ef
huceke [rbp] fixed host side forced hdmi mode. when on the host side hdmi mo…
…de is forced, we should not touch the hdmi settings.
d9d0e78
huceke [rbp] fixed move bcm_host_deinit after omx deinit. treat libbcm_host …
…wrapper as external library. we are already linked against libbcm_host.
6bf5c0e
Scott Richmond

Hi,
I believe some of your work here includes a fix for downmixing AC3 audio from 5.1 to 2.0? If so, would it be more beneficial to put it into its own pull request? There are many who are suffering this issue on the various Raspberri Pi XBMC distro's (OpenElec) and it looks like this pull request is quite large!

huceke
Collaborator

Please have patience. Prio number one is to nail critical bugs down and get the merge done.

Scott Richmond

No problems huceke. Is there an ETA on this pull request?

Deleted user

The content you are editing has changed. Reload the page and try again.

a bit longer into the future than it used to be due to all these useless questions you guys keep nagging us with. eta is when it is ready and not a minute before.

Sending Request…

Attach images by dragging & dropping or selecting them. Octocat-spinner-32 Uploading your images… Unfortunately, we don't support that file type. Try again with a PNG, GIF, or JPG. Yowza, that's a big file. Try again with an image file smaller than 10MB. This browser doesn't support image attachments. We recommend updating to the latest Internet Explorer, Google Chrome, or Firefox. Something went really wrong, and we can't process that image. Try again.

Andrée Hansson

@Pezmc I'm sure we're a lot of people waiting for this to get merged, but I'd rather wait for a proper merge than having a broken main repository that might take weeks to trace bugs in (and code that doesn't follow the XBMC standards). Let them work in peace, I'm sure they'll announce it once they got it all sorted out. :)

Pez Cuckow

@peol Can't this be split into some of the major problems as separate pull requests. E.g. the force HDMI and Downmixing AC3

huceke huceke merged commit 45fe6fc into from September 04, 2012
huceke huceke closed this September 04, 2012
Andreas Zelend
Collaborator

@opdenkamp Hi Lars, I'm afraid that you forgot to upload the file to the server. If this is automated and just takes some time, I apologize.

Collaborator

yeah indeed, there's a comment about this on the original commit/pr. i've asked in the internal irc channel whether someone can upload it.

Voyager1
Collaborator

all - there's an issue with this - all video now plays at half-height (platform = Windows). Reverting this PR solves it for me.

Memphiz
Owner

I saw something similar on linux.

moved .xbmc away - restart - still an issue - moved .xbmc back - restart - all fine. Not sure what was wonky there.

Rainer Hochecker
Collaborator

Did some investigation. Changes in BaseRenderer seem to be wrong. I always get a wrong refresh rate chosen.

Memphiz
Owner

same it doesn't switch at all (stays at 60 hz). And now i got the state again where the movie height is wrong...

Memphiz
Owner

see this screeny https://dl.dropbox.com/u/30371861/wrongheight.png

somehow the size info is missing in the osd too isn't it?

Memphiz
Owner

i only get this on linux as it seems...

Voyager1
Collaborator

I had it on Windows (Release) but not in the debug build... beats me :-)

Memphiz
Owner

correction - the wrong height also happens on osx ... its different from start to start...

Joakim Plate
Collaborator
Joakim Plate
Collaborator
Cory Fields

@huceke this breaks other arm builds.

ffmpeg should be figuring out which arm instructions to use based on the cpu it's provided with (we already pass that in). We'll need to revert this unless you can give an example of something that's not detected correctly.

Collaborator

With arm flags :

grep ARM lib/ffmpeg/config.h
#define ARCH_ARM 1
#define HAVE_ARMV5TE 1
#define HAVE_ARMV6 1
#define HAVE_ARMV6T2 0
#define HAVE_ARMVFP 1

Without arm flags :

grep ARM lib/ffmpeg/config.h
#define ARCH_ARM 1
#define HAVE_ARMV5TE 1
#define HAVE_ARMV6 1
#define HAVE_ARMV6T2 0
#define HAVE_ARMVFP 1

So i assume it should be save for the PI to revert the arm configure flags.

Please leave use_hardcoded_tables alone. This is needed on the PI. Without hardcoded tables ffmpeg crashes on the PI.

Owner

Perfect, thanks.

Collaborator

friendly reminder here, arm flags are still there and because of that we can't play stuff on android now ( http://pastebin.com/EkJDJRX8 )
removing them fix that on android, but I would like someone who actually know what he's doing to look at it ;)

Christian Wohlert christian667 referenced this pull request in mazkolain/spotimc October 17, 2012
Closed

Make spotimc compatible to XBMC 12 (Frodo) #66

Charles Blaxland

Hi huceke, it seems this change has caused some playback problems for my Rdio plugin in Frodo.
Forum discussion: http://forum.xbmc.org/showthread.php?tid=152538&pid=1304505
Trac issue: http://trac.xbmc.org/ticket/13864

It seems that with this change PAPlayer now handles my rtmp stream, and it fails with "Unable to Init codec". Just trying to understand the change and how I can get my plugin working again? Are you able to provide any insight?

Collaborator

@huceke, I'm working on a fix :) stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 62 unique commits by 3 authors.

Aug 10, 2012
huceke [rbp] added raspberrypi toolchain support files 3cbb14a
huceke [rbp] added raspberrypi platform support files e2f5d99
huceke [rbp] added raspberrypi support to system globals 88ad708
huceke [rbp] added linux event for sdle less builds 0384505
huceke [rbp] added to non asm version of mathutils 9871aca
huceke [rbp] added raspberrypi support to xbmc app af49207
huceke [rbp] adadded raspberrypi openmax support 5dda4e6
huceke [rbp] AE enable rapsberrypi and disable asm in converter 14a4011
huceke [rbp] added raspberrypi EGL support plus a pseudo 3D mode for 3D output b0f57b8
huceke [rbp] added raspberrypi as.xml settings b144fd2
huceke [rbp] added raspberrypi guisetting tweaks 05cee69
huceke [rbp] include refresh rate in resolution check so we see all and get …
…the right one
c853cb6
huceke [rbp] added missing EGL files from b0f57b850b5b51710f84e94e94a5125d82…
…017580
18c401c
huceke [rbp] added raspberrypi omxplayer a91e874
huceke [rbp] fix blending with gui during hw-rendered playback d7b9041
huceke [rbp] added raspberrypi omx image decoding 8bd067d
huceke [rbp] added raspberrypi support to our configure system 6b37a4c
huceke [rbp] cec: added support for the Raspberry Pi. needs libCEC v1.8.0+. …
…other targets are still supported by libCEC 1.7.0
9787d57
huceke [rbp] added a minimal doc file 5182b60
huceke [rbp] fixed linux compile d9a4065
Aug 12, 2012
huceke [rbp] fixed protect return vales in peripherals too bedd4af
huceke [rbp] changed limit jpeg decoding to half width and height. this is a…
… workaround for the PI's limited memory
d70dee6
huceke [rbp] fixed channel mapping. thx popcornmix for finding it 1892d3d
huceke [rbp] fixed crash in thumbnail extraction. disable all ffmpeg cpu opt…
…ions for now, until we figgured out which ones are safe to use on the PI arm core
177bc0b
huceke [rbp] changed, we can now turn on optimizations. configure doesn't me…
…ss anymore with our settings
c464fae
huceke [rbp] fixed channel mapping for hwdecode path. thx popcornmix for fin…
…ding it
8db1a70
huceke [rbp] fixed do not force dvdplayer for rtmp streams d11a167
huceke [rbp] fixed only volume boost on downmix. thx popcornmix for finding it 7d0e8be
huceke [rbp] changed playercorefactory should be more friendly to other play…
…ers than DVDPlayer only
5719641
Aug 13, 2012
huceke [rbp] added missing mode from b0f57b850b5b51710f84e94e94a5125d82017580 7faf411
huceke [rbp] fixed, removed redudant grypt check and default use_alsa for al…
…l platforms.
83a27a2
huceke [rbp] fixed, hanewin patch not needed for libnfs 1.3.0 88960bd
huceke [rbp] fixed, do not hardcode library in omx library wrapper. 297988b
Aug 14, 2012
[rbp] fixed asm usage in AEConvert. i was told that this is NEON code. acbfa94
[rbp] fixed libsquish native arm compile 8b6af54
Aug 15, 2012
huceke [rbp] fixed acbfa940dc07911d1658ce16b06fa4b9e972eb35 the asm works on…
… ARM NEON and VFP. thx Cory
0de0af6
huceke [rbp] fixed 8b6af545b317b5b0cd792f1c77e17cb95a60fe69. propper compile…
… fix for libsquish. thx Cory
3dd86bd
huceke [rbp] revert c853cb6614ac8367fa3c7ace04a943af84882199 and added refre…
…shrate to WinSystem base so we can store and check it in the EGL windowing. My understanding how XBMC handles refreshrates was wrong, missed the point with the start parameter --standalone
e124c6d
Aug 17, 2012
huceke [rbp] fixed omxcore using wrong wait f3d9b77
huceke [rbp] changed texture loading assign original size after we sucessful…
…l decoded and allocated the picture.
30fe959
huceke [rbp] changed be consistent with Texture.cpp in enable the omx jpeg d…
…ecoder.
f5845bc
Aug 18, 2012
huceke [rbp] changed pause thumbjobs but do not wait for running jobs to be …
…paused.
c9610fc
huceke [rbp] fixed don't apply overscan settings in 3d mode. it just kills it. 0b50307
huceke [rbp] fixed omx fillbuffer, deinit of components, some wrong event wa…
…its, port enabled/disabled detection

Changed the way we wait for fillbuffer. A semaphore is more relaiable.
Fixed some wrong event waits. Should speedup some omx operations.
Deinit of components was wrong. Special free the buffers.
Changed port enableed/disabled detection to use omx functions and no internal statetracking.
Some cosmetics and removed some duplicate code.
b88ebf3
huceke [rbp] added omxplayer Makefile to .gitignore b8e3dd7
Aug 19, 2012
huceke [rbp] changed EGL refactoring to match closer the generic EGL impleme…
…ntation and moake log messages more consitent.
490bc0f
Aug 21, 2012
huceke [rbp] fixed move RBP platform init after setup of the environment oth…
…erwise a debug build will assert in specialprotocoll.
a3a79ef
Aug 22, 2012
huceke [rbp] fixed host side forced hdmi mode. when on the host side hdmi mo…
…de is forced, we should not touch the hdmi settings.
d9d0e78
Aug 27, 2012
huceke [rbp] fixed move bcm_host_deinit after omx deinit. treat libbcm_host …
…wrapper as external library. we are already linked against libbcm_host.
6bf5c0e
Aug 29, 2012
huceke [rbp] fixed possible overread in texture loading. 9cbb272
huceke [rbp] fixed WMV3 and VC1 support. thx popcornmix f63b3aa
Sep 03, 2012
huceke [rbp] changed turn back on ffmpeg optimisations and remove -fomit-fra…
…me-pointer it is set by -O3 optimisation
b134678
Sep 04, 2012
huceke [rbp] omxplayer is also gappless. somehow 4318e82
huceke [rbp] dissable AE on the PI 42171f4
huceke [rbp] force omxplayer to be the one and only player. The ALSA kernel …
…driver is to buggy on the PI. TheUni we can clear that mess up with your player selection.
3312617
huceke [rbp] changed omximage move dimension settings to a function 1c9c058
huceke [rbp] chatch up with dvdplayer changes, clean up headers and some com…
…ments.
b32264c
huceke [rbp] changed hide output device selection. AE is off for now. a5f1022
huceke [rbp] changed dissable alsa as well in configure. 63fb0c5
Lars Op den Kamp [rbp/cec] removed a whole bunch of sanity checks from configure.in fo…
…r libCEC. libCEC already contains these checks for the Pi
2f7a376
Lars Op den Kamp cec: bump the libCEC versions of win32 and osx to 1.8.1 (same as linux) 19793b2
Lars Op den Kamp [rbp] #define the virtual PID and VID to use for the RPi peripherals 494cb5e
Something went wrong with that request. Please try again.