Difference between revisions of "Raspberry Pi Fedora Remix Multimedia Demo Programs"
Chris Tyler (talk | contribs) (Created page with '== Multimedia Demos == There are four multimedia demo programs provided by the Raspberry Pi Foundation and package in the Remix: * hello_world - the classic test program, that j…') |
Chris Tyler (talk | contribs) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:Raspberry Pi Fedora Remix]] | ||
== Multimedia Demos == | == Multimedia Demos == | ||
− | There are four multimedia demo programs provided by the Raspberry Pi Foundation and | + | There are four multimedia demo programs provided by the Raspberry Pi Foundation and packaged in the Remix in source form: |
− | * hello_world - the classic test program, | + | * hello_world - the classic test program, which prints "Hello, World!" on the screen |
− | * hello_video - a simple H.264 video player | + | * hello_video - a simple H.264 full-screen video player |
* hello_triangle - an OpenGL-ES demo program which displays a rolling cube with textures on each side | * hello_triangle - an OpenGL-ES demo program which displays a rolling cube with textures on each side | ||
− | * | + | * hello_audio - an audio demo that plays a sine wave with a slow sine wave amplitude modulation |
== Building the Demos == | == Building the Demos == | ||
Line 17: | Line 18: | ||
# Select a demo. Change to that directory -- the directory name will be <code>~/hello_pi/''nameOfDemo''</code> -- for example, to change to the demo for the hello_audio program: <code>cd ~/hello_pi/hello_audio</code> | # Select a demo. Change to that directory -- the directory name will be <code>~/hello_pi/''nameOfDemo''</code> -- for example, to change to the demo for the hello_audio program: <code>cd ~/hello_pi/hello_audio</code> | ||
# Build the demo: <code>make</code> | # Build the demo: <code>make</code> | ||
− | # The resulting program name will end in <code>.bin</code> -- run it by typing: <code>./*.bin</code> | + | # The resulting program name will end in <code>.bin</code> -- you can run it by typing: <code>./*.bin</code> |
# You can modify the programs by editing the C source code (files ending in <code>.c</code>) and recompiling the software by typing <code>make</code> | # You can modify the programs by editing the C source code (files ending in <code>.c</code>) and recompiling the software by typing <code>make</code> | ||
== File Locations == | == File Locations == | ||
− | In the Remix, the vc ( | + | In the Remix, the vc (Broadcom VideoCore IV GPU) libraries are in <code>/usr/lib</code> and subdirectories, and the headers are in <code>/usr/include</code>; utilities are in <code>/usr/bin</code> and <code>/usr/sbin</code>. This is different from the Foundation's reference image, which has these files in subdirectories of <code>/opt/vc</code>. The move from <code>/opt</code> to the system directories reflects the fact that these libraries are part of the base system and not a 3rd-party add-on. |
+ | |||
+ | The source code for the demo programs has been patched so that the libraries and headers are accessed in their new locations. | ||
== License Information == | == License Information == | ||
− | License information for the libraries is contained in the corresponding header files. | + | License information for the libraries and/or headers is generally contained in the corresponding header files. |
Latest revision as of 10:37, 15 March 2012
Multimedia Demos
There are four multimedia demo programs provided by the Raspberry Pi Foundation and packaged in the Remix in source form:
- hello_world - the classic test program, which prints "Hello, World!" on the screen
- hello_video - a simple H.264 full-screen video player
- hello_triangle - an OpenGL-ES demo program which displays a rolling cube with textures on each side
- hello_audio - an audio demo that plays a sine wave with a slow sine wave amplitude modulation
Building the Demos
Recommended steps:
- Ensure that the
raspberrypi-vc-demo-source
package is installed (it's installed in the released image). - Install the C/C++ toolchain. If you have sufficient space (about 600M), it's recommended that you install the full set of development tools and libraries (
yum groupinstall "Development Tools" "Development Libraries"
). Alternately, you could install a minimal set of tools (gcc, make, etc). (TODO: come up with the minimum set of tools/libraries needed for the demo code). - It's recommended that you build and run the code as a regular user:
- Make a personal copy of the source code in your home directory:
cp -R /usr/share/raspberypi-vc-demo-source/hello-pi ~
- As root, change the permissions on the vchiq device so that all users can access it:
chmod a+rw /dev/vchiq
- Make a personal copy of the source code in your home directory:
- Select a demo. Change to that directory -- the directory name will be
~/hello_pi/nameOfDemo
-- for example, to change to the demo for the hello_audio program:cd ~/hello_pi/hello_audio
- Build the demo:
make
- The resulting program name will end in
.bin
-- you can run it by typing:./*.bin
- You can modify the programs by editing the C source code (files ending in
.c
) and recompiling the software by typingmake
File Locations
In the Remix, the vc (Broadcom VideoCore IV GPU) libraries are in /usr/lib
and subdirectories, and the headers are in /usr/include
; utilities are in /usr/bin
and /usr/sbin
. This is different from the Foundation's reference image, which has these files in subdirectories of /opt/vc
. The move from /opt
to the system directories reflects the fact that these libraries are part of the base system and not a 3rd-party add-on.
The source code for the demo programs has been patched so that the libraries and headers are accessed in their new locations.
License Information
License information for the libraries and/or headers is generally contained in the corresponding header files.