logo资料库

Raspberry Pi GPU Audio Video Programming 无水印pdf.pdf

第1页 / 共448页
第2页 / 共448页
第3页 / 共448页
第4页 / 共448页
第5页 / 共448页
第6页 / 共448页
第7页 / 共448页
第8页 / 共448页
资料共448页,剩余部分请下载后查看
Cover
Copyright
Contents at a Glance
Contents
About the Author
Introduction
1: Introduction to the Raspberry Pi
Introduction
Programming Style
Conclusion
Resources
2: Khronos Group
Role of Khronos
OpenGL ES
OpenVG
EGL
OpenMAX
Conclusion
Resources
3: Compiling Programs for the Raspberry Pi
Generic Information
Versions of gcc
C99 or C11 Compilers
gcc Compile Flags
Includes
Dispmanx
EGL
OpenMAX
OpenGL ES
OpenVG
Libraries
Dispmanx
EGL
OpenMAX
OpenGL ES
OpenVG
Sample Makefiles
Dispmanx
EGL
OpenMAX
OpenVG
Using pkg-config
Conclusion
4: Dispmanx on the Raspberry Pi
Building Programs
Accessing the GPU
Garbage Collection
Screen Capture
Conclusion
Resources
5: EGL on the Raspberry Pi
Building Programs
Overview
Initializing EGL
Creating a Rendering Context
Creating an EGL Drawing Surface with Dispmanx
Garbage Collection
Conclusion
Resources
6: OpenGL ES on the Raspberry Pi
Building Programs
OpenGL ES
The esUtil Functions
Vertices
Shaders
Minimal Vertex Shader
Minimal Fragment Shader
Loading the Shaders
Creating the Program Object
Drawing Something
Putting It Together
Drawing an Opaque Red Triangle
A Colored Triangle
Varyings
Passing Multiple Attributes to the Vertex Shader
Drawing Squares and Other Shapes
Which to Choose?
Textures
TGA Files
Mipmaps
Creating a Texture Object
Texture Attributes and the Shaders
Drawing the Texture
Complete Code for Drawing an Image
Animation: Rotating an Image
Matrices
esUtil
Invoking Animation
Uniform Parameters: The Rotation Matrix
Conclusion
Resources
7: OpenMAX on the Raspberry Pi Concepts
OpenMAX Overview
OpenMAX Concepts
Conclusion
Resources
8: OpenMAX Components on the Raspberry Pi
Building Programs
OpenMAX IL Components
Getting a List of Components
Getting a Handle to a Component
Port Information
Getting and Setting Parameters
Getting Port Information
Getting Information About Specific Types of Port
Detailed Audio Port Information
Conclusion
Resources
9: OpenMAX on the Raspberry Pi State
Building Programs
Component States
Loaded to Idle
A Nonworking Program
What's Wrong with It?
Idle to Executing
When Do State Changes Occur?
What to Do When a State Change Occurs?
Conclusion
Resources
10: OpenMAX IL Client Library on the Raspberry Pi
Building Programs
Public Functions
Creating a Client
Changing Component State
Waiting for Events
Debugging Clients
Conclusion
Resources
11: OpenMAX Buffers on the Raspberry Pi
Building Programs
Buffers
OpenMAX Buffer Allocation
The IL Client Library
Writing to and Reading from Buffers
Sequence of Actions
The EOS Flag
A Hiccup: Port Settings Changed
Example Image Decoding
Conclusion
Resources
12: Image Processing on the Raspberry Pi
Building Programs
Image Components
Image Formats
Decoding a JPEG Image
Tunneling
Rendering an Image Using Tunnelling
Rendering an Image Without Tunneling
Conclusion
Resources
13: OpenMAX Video Processing on the Raspberry Pi
Building Programs
Video Components
Video Formats
Decoding an H.264 File
Rendering an H.264 Video
Going Full-Screen
Conclusion
Resources
14: OpenMAX Audio on the Raspberry Pi
Building Programs
Audio Components
Audio Formats
Decoding an Audio File Using audio_decode
Rendering PCM Data
PCM Data
Choosing an Output Device
Setting PCM Format
Decoding an MP3 File Using FFmpeg or Avconv
Rendering MP3 Using FFmpeg or LibAV and OpenMAX
Rendering MP3 with ID3 Extensions Using FFmpeg or LibAV and OpenMAX
Conclusion
Resources
15: Rendering OpenMAX to OpenGL on the Raspberry Pi
EGLImage
OpenMAX
OpenGL
eglCreateImageKHR
Broadcom GPU
Components
Threads
Rendering a Video into an OpenGL ES Texture
Conclusion
Resources
16: Playing Multimedia Files on the Raspberry Pi
Desperate Debugging
Multimedia Files
Demuxing Multimedia Files
Decoding the Audio Stream Using LibAV
Rendering an Audio Stream
Rendering the Video Stream (at Full Speed)
Rendering the Video Stream (with Scheduling)
Rendering Both Audio and Video
Use the Audio Decoder?
Conclusion
Resources
17: Basic OpenVG on the Raspberry Pi
Building Programs
Introduction
Dispmanx and EGL
OpenVG Pipeline
Drawing a Pink Triangle
Drawing Standard Shapes
Images
Creating a VGImage from Memory Data
Drawing an Image
Drawing an Image Using OpenVG Calls
Conclusion
Resources
18: Text Processing in OpenVG on the Raspberry Pi
Building Programs
Drawing Text
Drawing Text Using Cairo
Drawing Text Using Pango
FreeType
Font Faces
Paths and Glyphs
Drawing a FreeType Outline
Drawing a FreeType Bitmap
VGFonts and Multiple Characters
VGDrawGlyph
vgDrawGlyphs
Glyph Metrics
Conclusion
Resources
19: Overlays on the Raspberry Pi
Introduction
Dispmanx Layers
Drawing OpenGL ESon Top of an OpenMAX Image
Drawing OpenGL ES on Top of an OpenMAX Video
Drawing OpenVG on Top of an OpenMAX Image
Drawing OpenVG on Top of an OpenMAX Video
Drawing Text on Top of an OpenMAX Video Using Pango
Conclusion
Index
分享到:
收藏