├── .github └── ISSUE_TEMPLATE │ └── bug_report.md ├── .gitignore ├── CMakeLists.txt ├── LICENCE ├── README.md ├── buildme ├── containers ├── CMakeLists.txt ├── asf │ ├── CMakeLists.txt │ ├── asf_reader.c │ └── asf_writer.c ├── avi │ ├── CMakeLists.txt │ ├── avi_reader.c │ └── avi_writer.c ├── binary │ ├── CMakeLists.txt │ ├── binary_reader.c │ └── binary_writer.c ├── containers.h ├── containers_codecs.h ├── containers_types.h ├── core │ ├── containers.c │ ├── containers_bits.c │ ├── containers_bits.h │ ├── containers_bytestream.h │ ├── containers_codecs.c │ ├── containers_common.h │ ├── containers_filters.c │ ├── containers_filters.h │ ├── containers_index.c │ ├── containers_index.h │ ├── containers_io.c │ ├── containers_io.h │ ├── containers_io_helpers.c │ ├── containers_io_helpers.h │ ├── containers_list.c │ ├── containers_list.h │ ├── containers_loader.c │ ├── containers_loader.h │ ├── containers_logging.c │ ├── containers_logging.h │ ├── containers_private.h │ ├── containers_time.h │ ├── containers_uri.c │ ├── containers_uri.h │ ├── containers_utils.c │ ├── containers_utils.h │ ├── containers_waveformat.h │ ├── containers_writer_utils.c │ ├── containers_writer_utils.h │ ├── packetizers.c │ └── packetizers_private.h ├── dummy │ ├── CMakeLists.txt │ └── dummy_writer.c ├── flash │ ├── CMakeLists.txt │ └── flv_reader.c ├── h264 │ └── avc1_packetizer.c ├── io │ ├── io_file.c │ ├── io_http.c │ ├── io_net.c │ ├── io_null.c │ └── io_pktfile.c ├── metadata │ └── id3 │ │ ├── CMakeLists.txt │ │ ├── id3_metadata_reader.c │ │ └── id3_metadata_strings.h ├── mkv │ ├── CMakeLists.txt │ └── matroska_reader.c ├── mp4 │ ├── CMakeLists.txt │ ├── mp4_common.h │ ├── mp4_reader.c │ └── mp4_writer.c ├── mpeg │ ├── CMakeLists.txt │ └── ps_reader.c ├── mpga │ ├── CMakeLists.txt │ ├── mpga_common.h │ ├── mpga_packetizer.c │ └── mpga_reader.c ├── mpgv │ └── mpgv_packetizer.c ├── net │ ├── net_sockets.h │ ├── net_sockets_bsd.c │ ├── net_sockets_bsd.h │ ├── net_sockets_common.c │ ├── net_sockets_null.c │ ├── net_sockets_priv.h │ ├── net_sockets_win32.c │ └── net_sockets_win32.h ├── packetizers.h ├── pcm │ └── pcm_packetizer.c ├── qsynth │ ├── CMakeLists.txt │ └── qsynth_reader.c ├── raw │ ├── CMakeLists.txt │ ├── raw_video_common.h │ ├── raw_video_reader.c │ └── raw_video_writer.c ├── rcv │ ├── CMakeLists.txt │ └── rcv_reader.c ├── rtp │ ├── CMakeLists.txt │ ├── rtp_base64.c │ ├── rtp_base64.h │ ├── rtp_h264.c │ ├── rtp_h264.h │ ├── rtp_mpeg4.c │ ├── rtp_mpeg4.h │ ├── rtp_priv.h │ └── rtp_reader.c ├── rtsp │ ├── CMakeLists.txt │ └── rtsp_reader.c ├── rv9 │ ├── CMakeLists.txt │ └── rv9_reader.c ├── simple │ ├── CMakeLists.txt │ ├── simple_common.h │ ├── simple_reader.c │ └── simple_writer.c ├── test │ ├── CMakeLists.txt │ ├── autotest.cpp │ ├── check_frame_int.c │ ├── crc_32.c │ ├── datagram_receiver.c │ ├── datagram_sender.c │ ├── dump_pktfile.c │ ├── nb_io.h │ ├── nb_io_unix.c │ ├── nb_io_win32.c │ ├── rtp_decoder.c │ ├── stream_client.c │ ├── stream_server.c │ ├── test.c │ ├── test_bits.c │ ├── test_uri.c │ └── uri_pipe.c └── wav │ ├── CMakeLists.txt │ └── wav_reader.c ├── helpers ├── dtoverlay │ ├── CMakeLists.txt │ ├── dtoverlay.c │ └── dtoverlay.h ├── v3d │ ├── v3d_common.h │ └── v3d_ver.h └── vc_image │ ├── metadata_fourcc.h │ ├── vc_image.h │ ├── vc_image_helper.h │ └── vc_image_metadata.h ├── host_applications ├── android │ └── apps │ │ └── vidtex │ │ ├── CMakeLists.txt │ │ ├── applog.h │ │ ├── launcher.h │ │ ├── launcher_rpi.c │ │ ├── launcher_rpi.h │ │ ├── main.c │ │ ├── svp.c │ │ ├── svp.h │ │ ├── vidtex.c │ │ └── vidtex.h ├── framework │ └── common │ │ ├── host_ilcore.h │ │ └── ilcore.c ├── linux │ ├── CMakeLists.txt │ ├── apps │ │ ├── dtmerge │ │ │ ├── CMakeLists.txt │ │ │ ├── dtmerge.1 │ │ │ └── dtmerge.c │ │ ├── dtoverlay │ │ │ ├── CMakeLists.txt │ │ │ ├── dtoverlay-post │ │ │ ├── dtoverlay-pre │ │ │ ├── dtoverlay.1 │ │ │ ├── dtoverlay_main.c │ │ │ ├── dtparam.1 │ │ │ ├── utils.c │ │ │ └── utils.h │ │ ├── gencmd │ │ │ ├── CMakeLists.txt │ │ │ ├── gencmd.c │ │ │ └── vcgencmd.1 │ │ ├── hello_pi │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── Makefile.include │ │ │ ├── README │ │ │ ├── hello_audio │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ ├── audio.c │ │ │ │ ├── audioplay.h │ │ │ │ └── sinewave.c │ │ │ ├── hello_dispmanx │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ └── dispmanx.c │ │ │ ├── hello_encode │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ └── encode.c │ │ │ ├── hello_fft │ │ │ │ ├── gpu_fft.c │ │ │ │ ├── gpu_fft.h │ │ │ │ ├── gpu_fft.txt │ │ │ │ ├── gpu_fft_base.c │ │ │ │ ├── gpu_fft_shaders.c │ │ │ │ ├── gpu_fft_trans.c │ │ │ │ ├── gpu_fft_trans.h │ │ │ │ ├── gpu_fft_twiddles.c │ │ │ │ ├── hello_fft.c │ │ │ │ ├── hello_fft_2d.c │ │ │ │ ├── hello_fft_2d_bitmap.h │ │ │ │ ├── hex │ │ │ │ │ ├── shader_1024k.hex │ │ │ │ │ ├── shader_128k.hex │ │ │ │ │ ├── shader_16k.hex │ │ │ │ │ ├── shader_1k.hex │ │ │ │ │ ├── shader_2048k.hex │ │ │ │ │ ├── shader_256.hex │ │ │ │ │ ├── shader_256k.hex │ │ │ │ │ ├── shader_2k.hex │ │ │ │ │ ├── shader_32k.hex │ │ │ │ │ ├── shader_4096k.hex │ │ │ │ │ ├── shader_4k.hex │ │ │ │ │ ├── shader_512.hex │ │ │ │ │ ├── shader_512k.hex │ │ │ │ │ ├── shader_64k.hex │ │ │ │ │ ├── shader_8k.hex │ │ │ │ │ └── shader_trans.hex │ │ │ │ ├── mailbox.c │ │ │ │ ├── mailbox.h │ │ │ │ ├── makefile │ │ │ │ └── qasm │ │ │ │ │ ├── gpu_fft.qinc │ │ │ │ │ ├── gpu_fft_1024k.qasm │ │ │ │ │ ├── gpu_fft_128k.qasm │ │ │ │ │ ├── gpu_fft_16k.qasm │ │ │ │ │ ├── gpu_fft_1k.qasm │ │ │ │ │ ├── gpu_fft_2048k.qasm │ │ │ │ │ ├── gpu_fft_2048k.qinc │ │ │ │ │ ├── gpu_fft_256.qasm │ │ │ │ │ ├── gpu_fft_256k.qasm │ │ │ │ │ ├── gpu_fft_2k.qasm │ │ │ │ │ ├── gpu_fft_32k.qasm │ │ │ │ │ ├── gpu_fft_4096k.qasm │ │ │ │ │ ├── gpu_fft_4k.qasm │ │ │ │ │ ├── gpu_fft_512.qasm │ │ │ │ │ ├── gpu_fft_512k.qasm │ │ │ │ │ ├── gpu_fft_64k.qasm │ │ │ │ │ ├── gpu_fft_8k.qasm │ │ │ │ │ ├── gpu_fft_ex.qinc │ │ │ │ │ └── gpu_fft_trans.qasm │ │ │ ├── hello_font │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ ├── Vera.ttf │ │ │ │ └── main.c │ │ │ ├── hello_jpeg │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ ├── jpeg.c │ │ │ │ └── jpeg.h │ │ │ ├── hello_mmal_encode │ │ │ │ ├── Makefile │ │ │ │ └── mmal_encode.c │ │ │ ├── hello_teapot │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── cube_texture_and_coords.h │ │ │ │ ├── models.c │ │ │ │ ├── models.h │ │ │ │ ├── teapot.obj.dat │ │ │ │ ├── triangle.c │ │ │ │ ├── triangle.h │ │ │ │ └── video.c │ │ │ ├── hello_tiger │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ ├── license.txt │ │ │ │ ├── main.c │ │ │ │ ├── readme.txt │ │ │ │ ├── tiger.c │ │ │ │ └── tiger.h │ │ │ ├── hello_triangle │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Djenne_128_128.raw │ │ │ │ ├── Gaudi_128_128.raw │ │ │ │ ├── Lucca_128_128.raw │ │ │ │ ├── Makefile │ │ │ │ ├── cube_texture_and_coords.h │ │ │ │ └── triangle.c │ │ │ ├── hello_triangle2 │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ └── triangle2.c │ │ │ ├── hello_video │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ ├── README │ │ │ │ ├── test.h264 │ │ │ │ └── video.c │ │ │ ├── hello_videocube │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── cube_texture_and_coords.h │ │ │ │ ├── triangle.c │ │ │ │ ├── triangle.h │ │ │ │ └── video.c │ │ │ ├── hello_world │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Makefile │ │ │ │ └── world.c │ │ │ ├── libs │ │ │ │ ├── ilclient │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── ilclient.c │ │ │ │ │ ├── ilclient.h │ │ │ │ │ └── ilcore.c │ │ │ │ ├── revision │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── revision.c │ │ │ │ │ └── revision.h │ │ │ │ └── vgfont │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── font.c │ │ │ │ │ ├── graphics.c │ │ │ │ │ ├── graphics_x_private.h │ │ │ │ │ ├── vgfont.h │ │ │ │ │ ├── vgft.c │ │ │ │ │ └── vgft.h │ │ │ └── rebuild.sh │ │ ├── raspicam │ │ │ ├── CMakeLists.txt │ │ │ ├── Doxyfile │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── RaspiCLI.c │ │ │ ├── RaspiCLI.h │ │ │ ├── RaspiCamControl.c │ │ │ ├── RaspiCamControl.h │ │ │ ├── RaspiCommonSettings.c │ │ │ ├── RaspiCommonSettings.h │ │ │ ├── RaspiGPS.c │ │ │ ├── RaspiGPS.h │ │ │ ├── RaspiHelpers.c │ │ │ ├── RaspiHelpers.h │ │ │ ├── RaspiPreview.c │ │ │ ├── RaspiPreview.h │ │ │ ├── RaspiStill.c │ │ │ ├── RaspiStillYUV.c │ │ │ ├── RaspiTex.c │ │ │ ├── RaspiTex.h │ │ │ ├── RaspiTexStub.c │ │ │ ├── RaspiTexUtil.c │ │ │ ├── RaspiTexUtil.h │ │ │ ├── RaspiVid.c │ │ │ ├── RaspiVidYUV.c │ │ │ ├── gl_scenes │ │ │ │ ├── cube_texture_and_coords.h │ │ │ │ ├── mirror.c │ │ │ │ ├── mirror.h │ │ │ │ ├── models.c │ │ │ │ ├── models.h │ │ │ │ ├── sobel.c │ │ │ │ ├── sobel.h │ │ │ │ ├── square.c │ │ │ │ ├── square.h │ │ │ │ ├── teapot.c │ │ │ │ ├── teapot.h │ │ │ │ ├── vcsm_square.c │ │ │ │ ├── vcsm_square.h │ │ │ │ ├── yuv.c │ │ │ │ └── yuv.h │ │ │ ├── gps.h │ │ │ ├── imv_examples │ │ │ │ ├── README.md │ │ │ │ ├── imv2pgm.c │ │ │ │ ├── imv2txt.c │ │ │ │ └── plot.par │ │ │ ├── libgps_loader.c │ │ │ ├── libgps_loader.h │ │ │ ├── raspicam.7 │ │ │ ├── raspistill.1 │ │ │ ├── raspivid.1 │ │ │ ├── raspividyuv.1 │ │ │ ├── raspiyuv.1 │ │ │ ├── tga.c │ │ │ └── tga.h │ │ ├── smem │ │ │ ├── CMakeLists.txt │ │ │ └── smem.c │ │ ├── tvservice │ │ │ ├── CMakeLists.txt │ │ │ ├── tvservice.1 │ │ │ └── tvservice.c │ │ └── vcmailbox │ │ │ ├── CMakeLists.txt │ │ │ ├── raspiotp.7 │ │ │ ├── raspirev.7 │ │ │ ├── vcmailbox.1 │ │ │ ├── vcmailbox.7 │ │ │ └── vcmailbox.c │ ├── kernel_headers │ │ └── vmcs_sm_ioctl.h │ └── libs │ │ ├── bcm_host │ │ ├── CMakeLists.txt │ │ ├── bcm_host.c │ │ └── include │ │ │ └── bcm_host.h │ │ ├── debug_sym │ │ ├── CMakeLists.txt │ │ ├── debug_sym.c │ │ └── debug_sym.h │ │ └── sm │ │ ├── CMakeLists.txt │ │ ├── dma-buf.h │ │ ├── user-vcsm.c │ │ ├── user-vcsm.h │ │ └── vc_sm_cma_ioctl.h └── vmcs │ ├── test_apps │ ├── mmalcam │ │ ├── Makefile │ │ ├── mmalcam.c │ │ ├── mmalcam.h │ │ └── viewfinder.c │ └── mmalplay │ │ ├── Makefile │ │ ├── mmalplay.c │ │ ├── mmalplay.h │ │ └── playback.c │ └── vmcs_config.h.in ├── host_support └── include │ ├── vc_debug_sym.h │ └── vc_mem.h ├── interface ├── khronos │ ├── CMakeLists.txt │ ├── common │ │ ├── abstract │ │ │ └── khrn_client_platform_filler_abstract.h │ │ ├── direct │ │ │ └── khrn_client_platform_filler_direct.h │ │ ├── khrn_client.c │ │ ├── khrn_client.h │ │ ├── khrn_client_cache.c │ │ ├── khrn_client_cache.h │ │ ├── khrn_client_check_types.h │ │ ├── khrn_client_cr.c │ │ ├── khrn_client_global_image_map.c │ │ ├── khrn_client_global_image_map.h │ │ ├── khrn_client_mangle.h │ │ ├── khrn_client_platform.h │ │ ├── khrn_client_pointermap.c │ │ ├── khrn_client_pointermap.h │ │ ├── khrn_client_rpc.h │ │ ├── khrn_client_unmangle.h │ │ ├── khrn_client_vector.c │ │ ├── khrn_client_vector.h │ │ ├── khrn_int_color.h │ │ ├── khrn_int_common.h │ │ ├── khrn_int_generic_map.c │ │ ├── khrn_int_generic_map.h │ │ ├── khrn_int_hash.c │ │ ├── khrn_int_hash.h │ │ ├── khrn_int_hash_asm.s │ │ ├── khrn_int_ids.h │ │ ├── khrn_int_image.c │ │ ├── khrn_int_image.h │ │ ├── khrn_int_math.h │ │ ├── khrn_int_misc_impl.h │ │ ├── khrn_int_util.c │ │ ├── khrn_int_util.h │ │ ├── khrn_int_util_cr.h │ │ ├── khrn_options.c │ │ ├── khrn_options.h │ │ ├── linux │ │ │ ├── khrn_client_platform_linux.c │ │ │ └── khrn_client_rpc_linux.c │ │ ├── openwfc │ │ │ └── khrn_client_platform_openwfc.c │ │ ├── vcos │ │ │ └── khrn_client_platform_filler_vcos.h │ │ └── vcos_vchiq │ │ │ └── khrn_client_platform_filler_vcos_vchiq.h │ ├── egl │ │ ├── egl_client.c │ │ ├── egl_client_config.c │ │ ├── egl_client_config.h │ │ ├── egl_client_config_cr.c │ │ ├── egl_client_context.c │ │ ├── egl_client_context.h │ │ ├── egl_client_cr.c │ │ ├── egl_client_get_proc.c │ │ ├── egl_client_surface.c │ │ ├── egl_client_surface.h │ │ ├── egl_int.h │ │ ├── egl_int_config.h │ │ └── egl_int_impl.h │ ├── ext │ │ ├── egl_brcm_driver_monitor_client.c │ │ ├── egl_brcm_driver_monitor_client.h │ │ ├── egl_brcm_flush_client.c │ │ ├── egl_brcm_global_image_client.c │ │ ├── egl_brcm_perf_monitor_client.c │ │ ├── egl_brcm_perf_monitor_client.h │ │ ├── egl_khr_image_client.c │ │ ├── egl_khr_lock_surface_client.c │ │ ├── egl_khr_sync_client.c │ │ ├── egl_khr_sync_client.h │ │ ├── egl_openmaxil_client.c │ │ ├── egl_openmaxil_client.h │ │ ├── ext_gl_debug_marker.c │ │ ├── gl_oes_draw_texture_client.c │ │ ├── gl_oes_egl_image_client.c │ │ ├── gl_oes_framebuffer_object.c │ │ ├── gl_oes_map_buffer.c │ │ ├── gl_oes_matrix_palette_client.c │ │ └── gl_oes_query_matrix_client.c │ ├── glxx │ │ ├── gl11_int_config.h │ │ ├── gl11_int_impl.h │ │ ├── gl20_int_impl.h │ │ ├── glxx_client.c │ │ ├── glxx_client.h │ │ ├── glxx_int_attrib.h │ │ ├── glxx_int_config.h │ │ └── glxx_int_impl.h │ ├── include │ │ ├── EGL │ │ │ ├── egl.h │ │ │ ├── eglext.h │ │ │ ├── eglext_android.h │ │ │ ├── eglext_brcm.h │ │ │ ├── eglext_nvidia.h │ │ │ └── eglplatform.h │ │ ├── GLES │ │ │ ├── gl.h │ │ │ ├── glext.h │ │ │ └── glplatform.h │ │ ├── GLES2 │ │ │ ├── gl2.h │ │ │ ├── gl2ext.h │ │ │ └── gl2platform.h │ │ ├── KHR │ │ │ └── khrplatform.h │ │ ├── VG │ │ │ ├── openvg.h │ │ │ ├── vgext.h │ │ │ ├── vgplatform.h │ │ │ └── vgu.h │ │ └── WF │ │ │ ├── wfc.h │ │ │ └── wfcplatform.h │ ├── vg │ │ ├── vg_client.c │ │ ├── vg_client.h │ │ ├── vg_int.h │ │ ├── vg_int_config.h │ │ ├── vg_int_impl.h │ │ ├── vg_int_mat3x3.c │ │ ├── vg_int_mat3x3.h │ │ └── vg_int_util.h │ └── wf │ │ ├── wfc_client.c │ │ ├── wfc_client_ipc.c │ │ ├── wfc_client_ipc.h │ │ ├── wfc_client_server_api.c │ │ ├── wfc_client_stream.c │ │ ├── wfc_client_stream.h │ │ ├── wfc_int.h │ │ ├── wfc_ipc.h │ │ └── wfc_server_api.h ├── mmal │ ├── CMakeLists.txt │ ├── client │ │ ├── CMakeLists.txt │ │ └── brcmjpeg │ │ │ ├── CMakeLists.txt │ │ │ ├── brcmjpeg.c │ │ │ ├── brcmjpeg.h │ │ │ └── brcmjpeg_test.c │ ├── components │ │ ├── CMakeLists.txt │ │ ├── aaf_audio_render.cpp │ │ ├── aggregator.c │ │ ├── android_media_codec.cpp │ │ ├── artificial_camera.c │ │ ├── avcodec_audio_decoder.c │ │ ├── avcodec_video_decoder.c │ │ ├── clock.c │ │ ├── container_reader.c │ │ ├── copy.c │ │ ├── null_sink.c │ │ ├── passthrough.c │ │ ├── scheduler.c │ │ ├── sdl_audio_render.c │ │ ├── sdl_video_render.c │ │ ├── spdif.c │ │ └── splitter.c │ ├── core │ │ ├── CMakeLists.txt │ │ ├── mmal_buffer.c │ │ ├── mmal_buffer_private.h │ │ ├── mmal_clock.c │ │ ├── mmal_clock_private.h │ │ ├── mmal_component.c │ │ ├── mmal_component_private.h │ │ ├── mmal_core_private.h │ │ ├── mmal_events.c │ │ ├── mmal_events_private.h │ │ ├── mmal_format.c │ │ ├── mmal_logging.c │ │ ├── mmal_pool.c │ │ ├── mmal_port.c │ │ ├── mmal_port_clock.c │ │ ├── mmal_port_private.h │ │ └── mmal_queue.c │ ├── mmal.h │ ├── mmal_buffer.h │ ├── mmal_clock.h │ ├── mmal_common.h │ ├── mmal_component.h │ ├── mmal_encodings.h │ ├── mmal_events.h │ ├── mmal_format.h │ ├── mmal_logging.h │ ├── mmal_parameters.h │ ├── mmal_parameters_audio.h │ ├── mmal_parameters_camera.h │ ├── mmal_parameters_clock.h │ ├── mmal_parameters_common.h │ ├── mmal_parameters_video.h │ ├── mmal_pool.h │ ├── mmal_port.h │ ├── mmal_queue.h │ ├── mmal_types.h │ ├── openmaxil │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── mmalomx.h │ │ ├── mmalomx_buffer.c │ │ ├── mmalomx_buffer.h │ │ ├── mmalomx_commands.c │ │ ├── mmalomx_commands.h │ │ ├── mmalomx_core.c │ │ ├── mmalomx_logging.c │ │ ├── mmalomx_logging.h │ │ ├── mmalomx_marks.c │ │ ├── mmalomx_marks.h │ │ ├── mmalomx_parameters.c │ │ ├── mmalomx_parameters.h │ │ ├── mmalomx_registry.c │ │ ├── mmalomx_registry.h │ │ ├── mmalomx_roles.c │ │ ├── mmalomx_roles.h │ │ ├── mmalomx_util_params.c │ │ ├── mmalomx_util_params.h │ │ ├── mmalomx_util_params_audio.c │ │ ├── mmalomx_util_params_camera.c │ │ ├── mmalomx_util_params_common.h │ │ ├── mmalomx_util_params_misc.c │ │ └── mmalomx_util_params_video.c │ ├── test │ │ ├── CMakeLists.txt │ │ └── examples │ │ │ ├── example_basic_1.c │ │ │ ├── example_basic_2.c │ │ │ ├── example_connections.c │ │ │ └── example_graph.c │ ├── util │ │ ├── CMakeLists.txt │ │ ├── mmal_component_wrapper.c │ │ ├── mmal_component_wrapper.h │ │ ├── mmal_connection.c │ │ ├── mmal_connection.h │ │ ├── mmal_default_components.h │ │ ├── mmal_graph.c │ │ ├── mmal_graph.h │ │ ├── mmal_il.c │ │ ├── mmal_il.h │ │ ├── mmal_list.c │ │ ├── mmal_list.h │ │ ├── mmal_param_convert.c │ │ ├── mmal_param_convert.h │ │ ├── mmal_util.c │ │ ├── mmal_util.h │ │ ├── mmal_util_params.c │ │ ├── mmal_util_params.h │ │ ├── mmal_util_rational.c │ │ └── mmal_util_rational.h │ └── vc │ │ ├── CMakeLists.txt │ │ ├── mmal_vc_api.c │ │ ├── mmal_vc_api.h │ │ ├── mmal_vc_api_drm.c │ │ ├── mmal_vc_api_drm.h │ │ ├── mmal_vc_client.c │ │ ├── mmal_vc_client_priv.h │ │ ├── mmal_vc_dbglog.h │ │ ├── mmal_vc_diag.c │ │ ├── mmal_vc_msgnames.c │ │ ├── mmal_vc_msgnames.h │ │ ├── mmal_vc_msgs.h │ │ ├── mmal_vc_opaque_alloc.c │ │ ├── mmal_vc_opaque_alloc.h │ │ ├── mmal_vc_shm.c │ │ └── mmal_vc_shm.h ├── peer │ └── vc_vchi_dispmanx_common.h ├── vchi │ ├── common │ │ └── endian.h │ ├── connections │ │ └── connection.h │ ├── message_drivers │ │ └── message.h │ ├── vchi.h │ ├── vchi_cfg.h │ ├── vchi_cfg_internal.h │ ├── vchi_common.h │ └── vchi_mh.h ├── vchiq_arm │ ├── CMakeLists.txt │ ├── vchiq.h │ ├── vchiq_cfg.h │ ├── vchiq_if.h │ ├── vchiq_ioctl.h │ ├── vchiq_lib.c │ ├── vchiq_test.c │ ├── vchiq_test.h │ ├── vchiq_test_if.h │ ├── vchiq_util.c │ └── vchiq_util.h ├── vcos │ ├── CMakeLists.txt │ ├── generic │ │ ├── CMakeLists.txt │ │ ├── vcos_abort.c │ │ ├── vcos_cmd.c │ │ ├── vcos_common.h │ │ ├── vcos_deprecated.h │ │ ├── vcos_generic_blockpool.c │ │ ├── vcos_generic_blockpool.h │ │ ├── vcos_generic_event_flags.c │ │ ├── vcos_generic_event_flags.h │ │ ├── vcos_generic_named_sem.c │ │ ├── vcos_generic_named_sem.h │ │ ├── vcos_generic_quickslow_mutex.h │ │ ├── vcos_generic_reentrant_mtx.c │ │ ├── vcos_generic_reentrant_mtx.h │ │ ├── vcos_generic_safe_string.c │ │ ├── vcos_generic_tls.h │ │ ├── vcos_init.c │ │ ├── vcos_joinable_thread_from_plain.h │ │ ├── vcos_latch_from_sem.h │ │ ├── vcos_logcat.c │ │ ├── vcos_mem_from_malloc.c │ │ ├── vcos_mem_from_malloc.h │ │ ├── vcos_msgqueue.c │ │ ├── vcos_mutexes_are_reentrant.h │ │ └── vcos_thread_reaper.h │ ├── glibc │ │ └── vcos_backtrace.c │ ├── pthreads │ │ ├── CMakeLists.txt │ │ ├── vcos_dlfcn.c │ │ ├── vcos_futex_mutex.h │ │ ├── vcos_platform.h │ │ ├── vcos_platform_types.h │ │ └── vcos_pthreads.c │ ├── user_nodefs.h │ ├── vcos.h │ ├── vcos_assert.h │ ├── vcos_atomic_flags.h │ ├── vcos_attr.h │ ├── vcos_blockpool.h │ ├── vcos_build_info.h │ ├── vcos_cfg.h │ ├── vcos_cmd.h │ ├── vcos_ctype.h │ ├── vcos_dlfcn.h │ ├── vcos_event.h │ ├── vcos_event_flags.h │ ├── vcos_init.h │ ├── vcos_inttypes.h │ ├── vcos_isr.h │ ├── vcos_legacy_isr.h │ ├── vcos_logging.h │ ├── vcos_logging_control.h │ ├── vcos_lowlevel_thread.h │ ├── vcos_mem.h │ ├── vcos_mempool.h │ ├── vcos_msgqueue.h │ ├── vcos_mutex.h │ ├── vcos_named_semaphore.h │ ├── vcos_once.h │ ├── vcos_queue.h │ ├── vcos_quickslow_mutex.h │ ├── vcos_reentrant_mutex.h │ ├── vcos_semaphore.h │ ├── vcos_stdbool.h │ ├── vcos_stdint.h │ ├── vcos_string.h │ ├── vcos_thread.h │ ├── vcos_thread_attr.h │ ├── vcos_timer.h │ ├── vcos_tls.h │ └── vcos_types.h ├── vctypes │ ├── vc_display_types.h │ ├── vc_image_structs.h │ └── vc_image_types.h └── vmcs_host │ ├── CMakeLists.txt │ ├── khronos │ └── IL │ │ ├── OMX_Audio.h │ │ ├── OMX_Broadcom.h │ │ ├── OMX_Component.h │ │ ├── OMX_Core.h │ │ ├── OMX_ILCS.h │ │ ├── OMX_IVCommon.h │ │ ├── OMX_Image.h │ │ ├── OMX_Index.h │ │ ├── OMX_Other.h │ │ ├── OMX_Types.h │ │ └── OMX_Video.h │ ├── linux │ ├── vchost_config.h │ └── vcmisc.c │ ├── vc_cec.h │ ├── vc_cecservice.h │ ├── vc_cecservice_defs.h │ ├── vc_cma.h │ ├── vc_dispmanx.h │ ├── vc_dispmanx_types.h │ ├── vc_dispservice_defs.h │ ├── vc_dispservice_x_defs.h │ ├── vc_gencmd_defs.h │ ├── vc_hdmi.h │ ├── vc_hdmi_property.h │ ├── vc_ilcs_defs.h │ ├── vc_imageconv_defs.h │ ├── vc_sdtv.h │ ├── vc_service_common.c │ ├── vc_service_common.h │ ├── vc_tvservice.h │ ├── vc_tvservice_defs.h │ ├── vc_vchi_audioserv_defs.h │ ├── vc_vchi_bufman.h │ ├── vc_vchi_bufman_defs.h │ ├── vc_vchi_cecservice.c │ ├── vc_vchi_dispmanx.c │ ├── vc_vchi_dispmanx.h │ ├── vc_vchi_gencmd.c │ ├── vc_vchi_gencmd.h │ ├── vc_vchi_gpuserv.c │ ├── vc_vchi_gpuserv.h │ ├── vc_vchi_tvservice.c │ ├── vcgencmd.h │ ├── vchost.h │ ├── vchost_platform_config.h │ ├── vcilcs.c │ ├── vcilcs.h │ ├── vcilcs_common.c │ ├── vcilcs_common.h │ ├── vcilcs_in.c │ └── vcilcs_out.c ├── makefiles └── cmake │ ├── arm-linux.cmake │ ├── cmake_config.h.in │ ├── global_settings.cmake │ ├── srcs │ └── test-mtrace.c │ ├── toolchains │ ├── aarch64-linux-gnu.cmake │ ├── arm-linux-gnueabihf.cmake │ └── bcm2708-glibc-linux.cmake │ └── vmcs.cmake ├── middleware ├── dlloader │ └── dlfcn.h ├── imageconv │ └── imageconv.h ├── khronos │ ├── common │ │ ├── 2708 │ │ │ ├── khrn_interlock_filler_4.h │ │ │ └── khrn_prod_4.h │ │ ├── khrn_hw.h │ │ ├── khrn_image.h │ │ ├── khrn_interlock.h │ │ ├── khrn_map.h │ │ ├── khrn_mem.h │ │ ├── khrn_misc.h │ │ ├── khrn_pid_map.h │ │ ├── khrn_pid_map_value.h │ │ └── khrn_server_pointermap.h │ ├── dispatch │ │ └── khrn_dispatch.h │ ├── egl │ │ ├── egl_disp.h │ │ └── egl_server.h │ ├── ext │ │ └── egl_khr_image.h │ ├── vg │ │ ├── 2708 │ │ │ └── vg_config_filler_4.h │ │ └── vg_image.h │ └── wf │ │ └── wfc_server_stream.h └── openmaxil │ └── CMakeLists.txt ├── opensrc └── helpers │ └── libfdt │ ├── CMakeLists.txt │ ├── fdt.c │ ├── fdt.h │ ├── fdt_addresses.c │ ├── fdt_empty_tree.c │ ├── fdt_overlay.c │ ├── fdt_ro.c │ ├── fdt_rw.c │ ├── fdt_strerror.c │ ├── fdt_sw.c │ ├── fdt_wip.c │ ├── libfdt.h │ ├── libfdt_env.h │ └── libfdt_internal.h ├── pkgconfig ├── bcm_host.pc.in ├── brcmegl.pc.in ├── brcmglesv2.pc.in ├── brcmvg.pc.in ├── mmal.pc.in └── vcsm.pc.in ├── vcfw ├── drivers │ └── driver.h ├── logging │ └── logging.h ├── rtos │ ├── common │ │ └── rtos_common_mem.h │ └── rtos.h └── vclib │ └── vclib.h └── vcinclude ├── common.h ├── vc_image_types.h └── vcore.h /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | --- 11 | name: Bug report 12 | about: Create a report to help us fix your issue 13 | 14 | --- 15 | 16 | **Is this the right place for my bug report?** 17 | This repository contains the Raspberry Pi userland code. If you believe that the issue you are seeing is in the userland libraries, this is the right place. If not, we have other repositories for the GPU firmware at [github.com/raspberrypi/firmware](https://github.com/raspberrypi/firmware) and linux kernel at [github.com/raspberrypi/linux](https://github.com/raspberrypi/linux). If you have problems with the Raspbian distribution packages, report them in the [github.com/RPi-Distro/repo](https://github.com/RPi-Distro/repo). If you simply have a question, then [the Raspberry Pi forums](https://www.raspberrypi.org/forums) are the best place to ask it. 18 | 19 | **Describe the bug** 20 | Add a clear and concise description of what you think the bug is. 21 | 22 | **To reproduce** 23 | List the steps required to reproduce the issue. 24 | 25 | **Expected behaviour** 26 | Add a clear and concise description of what you expected to happen. 27 | 28 | **Actual behaviour** 29 | Add a clear and concise description of what actually happened. 30 | 31 | **System** 32 | Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions: 33 | 34 | * Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW 35 | * Which OS and version (`cat /etc/rpi-issue`)? 36 | * Which firmware version (`vcgencmd version`)? 37 | * Which kernel version (`uname -a`)? 38 | 39 | **Logs** 40 | If applicable, add the relevant output from `dmesg` or similar. 41 | 42 | **Additional context** 43 | Add any other relevant context for the problem. 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Build directory 2 | build/ 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | 9 | # Compiled Dynamic libraries 10 | *.so 11 | 12 | # Compiled Static libraries 13 | *.lai 14 | *.la 15 | *.a 16 | 17 | *.raw 18 | *.rgb 19 | *.bgr 20 | *.h264 21 | *.264 22 | *.yuyv 23 | *.uyvy 24 | *.yvyu 25 | *.vyuy 26 | *.i420 27 | *.yuv 28 | *.jpg 29 | *.avi 30 | *.pts 31 | *.ppm 32 | *.mkv 33 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Broadcom Europe Ltd 2 | Copyright (c) 2015, Raspberry Pi (Trading) Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Update 2 | ====== 3 | 4 | This repo is ancient and deprecated. 5 | 6 | It largely contains code using proprietary APIs to interface 7 | to the VideoCore firmware. We have since move to standard linux APIs. 8 | 9 | V4L2, DRM/KMS and Mesa are the APIs you should be using. 10 | 11 | The few useful tools from here (dtoverlay, dtmerge, vcmailbox, vcgencmd) 12 | have been moved to the raspberrypi/utils repo. 13 | 14 | Code from here is no longer installed on latest RPiOS Bookworm images. 15 | 16 | If you are using code from here you should rethink your solution. 17 | 18 | Consider this repo closed. 19 | 20 | ======================== 21 | 22 | This repository contains the source code for the ARM side libraries used on Raspberry Pi. 23 | These typically are installed in /opt/vc/lib and includes source for the ARM side code to interface to: 24 | EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG. 25 | 26 | Use buildme to build. It requires cmake to be installed and an ARM cross compiler. For 32-bit cross compilation it is set up to use this one: 27 | https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian 28 | 29 | Whilst 64-bit userspace is not officially supported, some of the libraries will work for it. To cross compile, install gcc-aarch64-linux-gnu and g++-aarch64-linux-gnu first. For both native and cross compiles, add the option ```--aarch64``` to the buildme command. 30 | 31 | Note that this repository does not contain the source for the edidparser and vcdbg binaries due to licensing restrictions. 32 | -------------------------------------------------------------------------------- /buildme: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | BUILDTYPE=Release 3 | ARCH=$(uname -m) 4 | ARM64=OFF 5 | CMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake 6 | 7 | if [ "$1" = "--debug" ]; then 8 | BUILDTYPE=Debug 9 | shift 10 | fi 11 | 12 | if [ "$1" = "--aarch64" ]; then 13 | ARM64=ON 14 | CMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/aarch64-linux-gnu.cmake 15 | shift 16 | fi 17 | 18 | BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`; 19 | 20 | if [ $ARCH = "armv6l" ] || [ $ARCH = "armv7l" ] || [ $ARCH = "aarch64" ]; then 21 | # Native compile on the Raspberry Pi 22 | mkdir -p build/raspberry/$BUILDSUBDIR 23 | pushd build/raspberry/$BUILDSUBDIR 24 | cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE -DARM64=$ARM64 ../../.. 25 | if [ $ARCH = "armv6l" ]; then 26 | make 27 | else 28 | make -j4 29 | fi 30 | if [ "$1" != "" ]; then 31 | sudo make install DESTDIR=$1 32 | else 33 | sudo make install 34 | fi 35 | elif [ "$1" = "--native" ]; then 36 | # Build natively on the host 37 | mkdir -p build/native/$BUILDSUBDIR 38 | pushd build/native/$BUILDSUBDIR 39 | cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE ../../.. 40 | shift 41 | make -j `nproc` $* 42 | else 43 | # Cross compile on a more capable machine 44 | mkdir -p build/arm-linux/$BUILDSUBDIR 45 | pushd build/arm-linux/$BUILDSUBDIR 46 | cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=$BUILDTYPE -DARM64=$ARM64 ../../.. 47 | make -j `nproc` 48 | 49 | if [ "$1" != "" ]; then 50 | sudo make install DESTDIR=$1 51 | fi 52 | fi 53 | popd 54 | -------------------------------------------------------------------------------- /containers/asf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_asf ${LIBRARY_TYPE} asf_reader.c) 9 | 10 | target_link_libraries(reader_asf containers) 11 | 12 | install(TARGETS reader_asf DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | add_library(writer_asf ${LIBRARY_TYPE} asf_writer.c) 15 | 16 | target_link_libraries(writer_asf containers) 17 | 18 | install(TARGETS writer_asf DESTINATION ${VMCS_PLUGIN_DIR}) 19 | 20 | -------------------------------------------------------------------------------- /containers/avi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_avi ${LIBRARY_TYPE} avi_reader.c) 9 | 10 | target_link_libraries(reader_avi containers) 11 | 12 | install(TARGETS reader_avi DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | add_library(writer_avi ${LIBRARY_TYPE} avi_writer.c) 15 | 16 | target_link_libraries(writer_avi containers) 17 | 18 | install(TARGETS writer_avi DESTINATION ${VMCS_PLUGIN_DIR}) 19 | 20 | -------------------------------------------------------------------------------- /containers/binary/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_binary ${LIBRARY_TYPE} binary_reader.c) 9 | 10 | target_link_libraries(reader_binary containers) 11 | 12 | install(TARGETS reader_binary DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | add_library(writer_binary ${LIBRARY_TYPE} binary_writer.c) 15 | 16 | target_link_libraries(writer_binary containers) 17 | 18 | install(TARGETS writer_binary DESTINATION ${VMCS_PLUGIN_DIR}) 19 | 20 | -------------------------------------------------------------------------------- /containers/core/containers_loader.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef VC_CONTAINERS_LOADER_H 29 | #define VC_CONTAINERS_LOADER_H 30 | 31 | /** Find and attempt to load & open reader, 'fileext' is a hint that can be used 32 | to speed up loading. */ 33 | VC_CONTAINER_STATUS_T vc_container_load_reader(VC_CONTAINER_T *p_ctx, const char *fileext); 34 | 35 | /** Find and attempt to load & open writer, 'fileext' is a hint used to help in 36 | selecting the appropriate container format. */ 37 | VC_CONTAINER_STATUS_T vc_container_load_writer(VC_CONTAINER_T *p_ctx, const char *fileext); 38 | 39 | void vc_container_unload(VC_CONTAINER_T *p_ctx); 40 | 41 | #endif /* VC_CONTAINERS_LOADER_H */ 42 | -------------------------------------------------------------------------------- /containers/dummy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(writer_dummy ${LIBRARY_TYPE} dummy_writer.c) 9 | 10 | target_link_libraries(writer_dummy containers) 11 | 12 | install(TARGETS writer_dummy DESTINATION ${VMCS_PLUGIN_DIR}) 13 | -------------------------------------------------------------------------------- /containers/flash/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_flv ${LIBRARY_TYPE} flv_reader.c) 9 | 10 | target_link_libraries(reader_flv containers) 11 | 12 | install(TARGETS reader_flv DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | -------------------------------------------------------------------------------- /containers/metadata/id3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_metadata_id3 ${LIBRARY_TYPE} id3_metadata_reader.c) 9 | 10 | target_link_libraries(reader_metadata_id3 containers) 11 | 12 | install(TARGETS reader_metadata_id3 DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | -------------------------------------------------------------------------------- /containers/mkv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_mkv ${LIBRARY_TYPE} matroska_reader.c) 9 | 10 | target_link_libraries(reader_mkv containers) 11 | 12 | install(TARGETS reader_mkv DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | -------------------------------------------------------------------------------- /containers/mp4/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_mp4 ${LIBRARY_TYPE} mp4_reader.c) 9 | 10 | target_link_libraries(reader_mp4 containers) 11 | 12 | install(TARGETS reader_mp4 DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | add_library(writer_mp4 ${LIBRARY_TYPE} mp4_writer.c) 15 | 16 | target_link_libraries(writer_mp4 containers) 17 | 18 | install(TARGETS writer_mp4 DESTINATION ${VMCS_PLUGIN_DIR}) 19 | 20 | -------------------------------------------------------------------------------- /containers/mpeg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_ps ${LIBRARY_TYPE} ps_reader.c) 9 | 10 | target_link_libraries(reader_ps containers) 11 | 12 | install(TARGETS reader_ps DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | -------------------------------------------------------------------------------- /containers/mpga/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_mpga ${LIBRARY_TYPE} mpga_reader.c) 9 | 10 | target_link_libraries(reader_mpga containers) 11 | 12 | install(TARGETS reader_mpga DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | -------------------------------------------------------------------------------- /containers/net/net_sockets_bsd.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _NET_SOCKETS_BSD_H_ 29 | #define _NET_SOCKETS_BSD_H_ 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | typedef int SOCKET_T; 38 | typedef socklen_t SOCKADDR_LEN_T; 39 | typedef void *SOCKOPT_CAST_T; 40 | #define INVALID_SOCKET -1 41 | #define SOCKET_ERROR -1 42 | 43 | #endif /* _NET_SOCKETS_BSD_H_ */ 44 | -------------------------------------------------------------------------------- /containers/net/net_sockets_win32.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _NET_SOCKETS_WIN32_H_ 29 | #define _NET_SOCKETS_WIN32_H_ 30 | 31 | #include 32 | #include 33 | 34 | typedef SOCKET SOCKET_T; 35 | typedef int SOCKADDR_LEN_T; 36 | typedef char *SOCKOPT_CAST_T; 37 | 38 | #endif /* _NET_SOCKETS_WIN32_H_ */ 39 | -------------------------------------------------------------------------------- /containers/qsynth/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_qsynth ${LIBRARY_TYPE} qsynth_reader.c) 9 | 10 | target_link_libraries(reader_qsynth containers) 11 | 12 | install(TARGETS reader_qsynth DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | -------------------------------------------------------------------------------- /containers/raw/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_raw_video ${LIBRARY_TYPE} raw_video_reader.c) 9 | 10 | target_link_libraries(reader_raw_video containers) 11 | 12 | install(TARGETS reader_raw_video DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | add_library(writer_raw_video ${LIBRARY_TYPE} raw_video_writer.c) 15 | 16 | target_link_libraries(writer_raw_video containers) 17 | 18 | install(TARGETS writer_raw_video DESTINATION ${VMCS_PLUGIN_DIR}) 19 | -------------------------------------------------------------------------------- /containers/rcv/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_rcv ${LIBRARY_TYPE} rcv_reader.c) 9 | 10 | target_link_libraries(reader_rcv containers) 11 | 12 | install(TARGETS reader_rcv DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | -------------------------------------------------------------------------------- /containers/rtp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | set(rtp_SRCS ${rtp_SRCS} rtp_reader.c) 9 | set(rtp_SRCS ${rtp_SRCS} rtp_h264.c) 10 | set(rtp_SRCS ${rtp_SRCS} rtp_mpeg4.c) 11 | set(rtp_SRCS ${rtp_SRCS} rtp_base64.c) 12 | add_library(reader_rtp ${LIBRARY_TYPE} ${rtp_SRCS}) 13 | 14 | target_link_libraries(reader_rtp containers) 15 | 16 | install(TARGETS reader_rtp DESTINATION ${VMCS_PLUGIN_DIR}) 17 | 18 | -------------------------------------------------------------------------------- /containers/rtp/rtp_h264.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _RTP_H264_H_ 29 | #define _RTP_H264_H_ 30 | 31 | #include "containers/containers.h" 32 | #include "containers/core/containers_list.h" 33 | 34 | /** H.264 parameter handler 35 | * 36 | * \param p_ctx Container context. 37 | * \param track Track data. 38 | * \param params Parameter list. 39 | * \return Status of decoding the H.264 parameters. */ 40 | VC_CONTAINER_STATUS_T h264_parameter_handler(VC_CONTAINER_T *p_ctx, VC_CONTAINER_TRACK_T *track, const VC_CONTAINERS_LIST_T *params); 41 | 42 | #endif /* _RTP_H264_H_ */ 43 | -------------------------------------------------------------------------------- /containers/rtp/rtp_mpeg4.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _RTP_MPEG4_H_ 29 | #define _RTP_MPEG4_H_ 30 | 31 | #include "containers/containers.h" 32 | #include "containers/core/containers_list.h" 33 | 34 | /** MPEG-4 parameter handler 35 | * 36 | * \param p_ctx Container context. 37 | * \param track Track data. 38 | * \param params Parameter list. 39 | * \return Status of decoding the MPEG-4 parameters. */ 40 | VC_CONTAINER_STATUS_T mp4_parameter_handler(VC_CONTAINER_T *p_ctx, VC_CONTAINER_TRACK_T *track, const VC_CONTAINERS_LIST_T *params); 41 | 42 | #endif /* _RTP_MPEG4_H_ */ 43 | -------------------------------------------------------------------------------- /containers/rtsp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | set(rtsp_SRCS ${rtsp_SRCS} rtsp_reader.c) 9 | add_library(reader_rtsp ${LIBRARY_TYPE} ${rtsp_SRCS}) 10 | 11 | target_link_libraries(reader_rtsp containers) 12 | 13 | install(TARGETS reader_rtsp DESTINATION ${VMCS_PLUGIN_DIR}) 14 | 15 | -------------------------------------------------------------------------------- /containers/rv9/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_rv9 ${LIBRARY_TYPE} rv9_reader.c) 9 | 10 | target_link_libraries(reader_rv9 containers) 11 | 12 | install(TARGETS reader_rv9 DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | -------------------------------------------------------------------------------- /containers/simple/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_simple ${LIBRARY_TYPE} simple_reader.c) 9 | 10 | target_link_libraries(reader_simple containers) 11 | 12 | install(TARGETS reader_simple DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | add_library(writer_simple ${LIBRARY_TYPE} simple_writer.c) 15 | 16 | target_link_libraries(writer_simple containers) 17 | 18 | install(TARGETS writer_simple DESTINATION ${VMCS_PLUGIN_DIR}) 19 | -------------------------------------------------------------------------------- /containers/simple/simple_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef SIMPLE_COMMON_H 28 | #define SIMPLE_COMMON_H 29 | 30 | #define SIGNATURE_STRING "S1MPL3" 31 | #define SIGNATURE_END_STRING "3LPM1S" 32 | 33 | /** List of configuration options supported in the header */ 34 | #define CONFIG_VARIANT "VARIANT" 35 | #define CONFIG_URI "URI" 36 | #define CONFIG_CODEC_VARIANT "CODEC_VARIANT" 37 | #define CONFIG_BITRATE "BITRATE" 38 | #define CONFIG_UNFRAMED "UNFRAMED" 39 | #define CONFIG_VIDEO_CROP "VIDEO_CROP" 40 | #define CONFIG_VIDEO_ASPECT "VIDEO_ASPECT" 41 | 42 | #endif /* SIMPLE_COMMON_H */ 43 | -------------------------------------------------------------------------------- /containers/test/nb_io.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _NB_IO_H_ 29 | #define _NB_IO_H_ 30 | 31 | /** Set whether console input is non-blocking or not. 32 | * 33 | * \param enable Pass true to set input as non-blocking, false to set it as blocking again.*/ 34 | void nb_set_nonblocking_input(int enable); 35 | 36 | /** \return Non-zero when there is a character available to read using nb_get_char(). */ 37 | int nb_char_available(void); 38 | 39 | /** \return The next character available from the console, or zero. */ 40 | char nb_get_char(void); 41 | 42 | /** Put the character out to the console. 43 | * 44 | * \param ch The character to be output. */ 45 | void nb_put_char(char ch); 46 | 47 | #endif /* _NB_IO_H_ */ 48 | -------------------------------------------------------------------------------- /containers/test/nb_io_win32.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #include /* For _kbhit() */ 29 | 30 | #include "nb_io.h" 31 | 32 | void nb_set_nonblocking_input(int enable) 33 | { 34 | /* No need to do anything in Win32 */ 35 | (void)enable; 36 | } 37 | 38 | int nb_char_available() 39 | { 40 | return _kbhit(); 41 | } 42 | 43 | char nb_get_char() 44 | { 45 | char c = _getch(); 46 | _putch(c); /* Echo back */ 47 | return c; 48 | } 49 | 50 | void nb_put_char(char ch) 51 | { 52 | _putch(ch); 53 | } 54 | -------------------------------------------------------------------------------- /containers/wav/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Container module needs to go in as a plugins so different prefix 2 | # and install path 3 | set(CMAKE_SHARED_LIBRARY_PREFIX "") 4 | 5 | # Make sure the compiler can find the necessary include files 6 | include_directories (../..) 7 | 8 | add_library(reader_wav ${LIBRARY_TYPE} wav_reader.c) 9 | 10 | target_link_libraries(reader_wav containers) 11 | 12 | install(TARGETS reader_wav DESTINATION ${VMCS_PLUGIN_DIR}) 13 | 14 | -------------------------------------------------------------------------------- /helpers/dtoverlay/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ============================================================================= 2 | # Copyright (c) 2016 Raspberry Pi (Trading) Ltd. 3 | # All rights reserved. 4 | # 5 | # FILE DESCRIPTION 6 | # CMake build file for dtoverlay library. 7 | # ============================================================================= 8 | 9 | cmake_minimum_required (VERSION 2.8) 10 | 11 | include_directories (${VIDEOCORE_ROOT} 12 | ${VIDEOCORE_ROOT}/helpers 13 | ${VIDEOCORE_ROOT}/opensrc/helpers/libfdt 14 | ${VIDEOCORE_HEADERS_BUILD_DIR}) 15 | 16 | if (CMAKE_COMPILER_IS_GNUCC) 17 | add_definitions (-ffunction-sections) 18 | endif () 19 | 20 | add_library (dtovl ${SHARED} 21 | dtoverlay.c) 22 | 23 | target_link_libraries(dtovl fdt) 24 | 25 | install (TARGETS dtovl DESTINATION lib) 26 | -------------------------------------------------------------------------------- /helpers/v3d/v3d_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef V3D_COMMON_H 28 | #define V3D_COMMON_H 29 | 30 | #include "helpers/v3d/v3d_ver.h" 31 | #include "interface/vcos/vcos_assert.h" 32 | #include "interface/vcos/vcos_stdbool.h" 33 | #include "interface/vcos/vcos_stdint.h" 34 | #include "interface/vcos/vcos_types.h" /* for vcos_unused and VCOS_STATIC_INLINE */ 35 | 36 | typedef uint32_t V3D_ADDR_T; 37 | typedef uint16_t float16_t; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /host_applications/android/apps/vidtex/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | SET(COMPILE_DEFINITIONS -Werror -Wall) 4 | 5 | # Set --no-as-needed to stop the linker discarding mmal_vc_client 6 | # as it can't see that the constructor registers a load of functionality 7 | # with the MMAL core. 8 | SET( CMAKE_EXE_LINKER_FLAGS "-Wl,--no-as-needed" ) 9 | 10 | include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/bcm_host/include) 11 | 12 | set (VIDTEX_SOURCES 13 | main.c 14 | launcher_rpi.c 15 | svp.c 16 | vidtex.c) 17 | add_executable(vidtex ${VIDTEX_SOURCES}) 18 | target_link_libraries(vidtex GLESv2 EGL m bcm_host mmal_core mmal_components mmal_util mmal_vc_client vcos) 19 | -------------------------------------------------------------------------------- /host_applications/android/apps/vidtex/applog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef APPLOG_H 29 | #define APPLOG_H 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | /** \file Application support for VCOS logging. 36 | * This header file is used to abstract the logging for files that are designed to be included 37 | * in different applications. It should be included before any other VMCS header files. 38 | */ 39 | 40 | #define VCOS_LOG_CATEGORY (&app_log_category) 41 | #include "interface/vcos/vcos.h" 42 | extern VCOS_LOG_CAT_T app_log_category; 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | 48 | #endif /* APPLOG_H */ 49 | -------------------------------------------------------------------------------- /host_applications/linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # linux apps 2 | 3 | add_subdirectory(libs/bcm_host) 4 | add_subdirectory(apps/gencmd) 5 | add_subdirectory(apps/tvservice) 6 | add_subdirectory(apps/vcmailbox) 7 | if(NOT ARM64) 8 | add_subdirectory(apps/raspicam) 9 | add_subdirectory(libs/sm) 10 | add_subdirectory(apps/smem) 11 | endif() 12 | add_subdirectory(libs/debug_sym) 13 | add_subdirectory(apps/dtoverlay) 14 | add_subdirectory(apps/dtmerge) 15 | 16 | if(ALL_APPS) 17 | add_subdirectory(apps/vcdbg) 18 | add_subdirectory(libs/elftoolchain) 19 | # add_subdirectory(apps/smct) 20 | add_subdirectory(apps/edid_parser) 21 | add_subdirectory(apps/hello_pi) 22 | endif() 23 | 24 | -------------------------------------------------------------------------------- /host_applications/linux/apps/dtmerge/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | get_filename_component (VIDEOCORE_ROOT ../../../.. ABSOLUTE) 4 | include (${VIDEOCORE_ROOT}/makefiles/cmake/global_settings.cmake) 5 | 6 | if (NOT WIN32) 7 | add_definitions(-Wall -Werror) 8 | endif () 9 | 10 | include_directories ( 11 | ${VIDEOCORE_HEADERS_BUILD_DIR} 12 | ${VIDEOCORE_ROOT} 13 | ${VIDEOCORE_ROOT}/opensrc/helpers/libfdt 14 | ${VIDEOCORE_ROOT}/helpers/dtoverlay 15 | ) 16 | 17 | add_executable(dtmerge dtmerge.c) 18 | target_link_libraries(dtmerge dtovl) 19 | 20 | install(TARGETS dtmerge RUNTIME DESTINATION bin) 21 | install(FILES dtmerge.1 DESTINATION man/man1) 22 | -------------------------------------------------------------------------------- /host_applications/linux/apps/dtmerge/dtmerge.1: -------------------------------------------------------------------------------- 1 | .TH DTMERGE 1 2 | . 3 | .SH NAME 4 | dtmerge \- merge an overlay or parameters into a base device-tree 5 | . 6 | . 7 | .SH SYNOPSIS 8 | .SY dtmerge 9 | .OP \-d 10 | .I base-dtb 11 | .I merged-dtb 12 | .I overlay-dtb 13 | .RI [ param=val \|.\|.\|.] 14 | .YS 15 | . 16 | .SY dtmerge 17 | .B \-h 18 | .YS 19 | . 20 | . 21 | .SH DESCRIPTION 22 | .B dtmerge 23 | is a command line utility for merging overlays and/or device-tree parameters 24 | with a base device-tree. 25 | See 26 | .B [DTREE] 27 | for more information. 28 | . 29 | .PP 30 | The base device-tree (in dtb format) is always specified as the first 31 | (non-option) argument. 32 | The second argument is the output filename, which will also be in dtb format. 33 | The third argument provides the name of the overlay to merge into the base 34 | tree. 35 | If this is "-" then no overlay is used and the utility will simply customize 36 | the base tree with any parameters given. 37 | . 38 | . 39 | .SH OPTIONS 40 | . 41 | .TP 42 | .BR \-d 43 | Show debug output during operation. 44 | . 45 | .TP 46 | .BR \-h 47 | Displays help on the application. 48 | . 49 | . 50 | .SH EXAMPLES 51 | . 52 | .TP 53 | .B dtmerge /boot/bcm2711-rpi-4-b.dtb out.dtb - spi=on i2c=on 54 | Produce a device-tree for the Raspberry Pi 4 in "out.dtb" which has the SPI and 55 | I2C interfaces activated. 56 | . 57 | .TP 58 | .B dtmerge /boot/bcm2710-rpi-3-b-plus.dtb out.dtb /boot/overlays/gpio-shutdown.dtbo 59 | Produce a device-tree for the Raspberry Pi 3+ in "out.dtb" which includes the 60 | GPIO shutdown overlay (with all parameters set to their default). 61 | . 62 | . 63 | .SH SEE ALSO 64 | .BR dtoverlay (1), 65 | .BR dtparam (1), 66 | .B [DTREE] 67 | . 68 | . 69 | .SH REFERENCES 70 | .TP 71 | .B [DTREE] 72 | https://www.raspberrypi.org/documentation/configuration/device-tree.md 73 | -------------------------------------------------------------------------------- /host_applications/linux/apps/dtoverlay/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | get_filename_component (VIDEOCORE_ROOT ../../../.. ABSOLUTE) 4 | include (${VIDEOCORE_ROOT}/makefiles/cmake/global_settings.cmake) 5 | 6 | if (NOT WIN32) 7 | add_definitions(-Wall -Werror) 8 | endif () 9 | 10 | include_directories ( 11 | ${VIDEOCORE_HEADERS_BUILD_DIR} 12 | ${VIDEOCORE_ROOT} 13 | ${VIDEOCORE_ROOT}/opensrc/helpers/libfdt 14 | ${VIDEOCORE_ROOT}/helpers/dtoverlay 15 | ) 16 | 17 | add_executable(dtoverlay dtoverlay_main.c utils.c) 18 | target_link_libraries(dtoverlay dtovl) 19 | install(TARGETS dtoverlay RUNTIME DESTINATION bin) 20 | install(FILES dtoverlay.1 DESTINATION man/man1) 21 | 22 | add_custom_command(TARGET dtoverlay POST_BUILD COMMAND ln;-sf;dtoverlay;dtparam) 23 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dtparam DESTINATION bin) 24 | install(FILES dtparam.1 DESTINATION man/man1) 25 | 26 | set(DTOVERLAY_SCRIPTS dtoverlay-pre dtoverlay-post) 27 | install(PROGRAMS ${DTOVERLAY_SCRIPTS} DESTINATION bin) 28 | -------------------------------------------------------------------------------- /host_applications/linux/apps/dtoverlay/dtoverlay-post: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if ! hash lxpanelctl 2> /dev/null; then 4 | exit 0 5 | fi 6 | 7 | CMD="lxpanelctl command volumealsabt start > /dev/null" 8 | 9 | for PID in $(pgrep -x lxpanel); do 10 | eval "$(grep -z "DISPLAY=" "/proc/$PID/environ" | tr -d '\0')" 11 | user="$(ps -p "$PID" -o uname=)" 12 | su "$user" -c "$CMD" 13 | done 14 | -------------------------------------------------------------------------------- /host_applications/linux/apps/dtoverlay/dtoverlay-pre: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if ! hash lxpanelctl 2> /dev/null; then 4 | exit 0 5 | fi 6 | 7 | CMD="lxpanelctl command volumealsabt stop >/dev/null" 8 | 9 | for PID in $(pgrep -x lxpanel); do 10 | eval "$(grep -z "DISPLAY=" "/proc/$PID/environ" | tr -d '\0')" 11 | user="$(ps -p "$PID" -o uname=)" 12 | su "$user" -c "$CMD" 13 | done 14 | -------------------------------------------------------------------------------- /host_applications/linux/apps/dtoverlay/dtparam.1: -------------------------------------------------------------------------------- 1 | .TH DTPARAM 1 2 | . 3 | .SH NAME 4 | dtparam \- manipulate parameters of the base device-tree 5 | . 6 | . 7 | .SH SYNOPSIS 8 | .SY dtparam 9 | .RI [ param=val \|.\|.\|.] 10 | .YS 11 | . 12 | .SY dtparam 13 | .B \-h 14 | .RI [ param ] 15 | .YS 16 | . 17 | . 18 | .SH DESCRIPTION 19 | .B dtparam 20 | is a command line utility for manipulating the base device-tree's parameters. 21 | For example, it can be used to enable the SPI or I2C interfaces at runtime 22 | without rebooting. 23 | If 24 | .B dtparam 25 | is run without any argument, it prints the names of all base device-tree 26 | parameters and their description. 27 | . 28 | . 29 | .SH OPTIONS 30 | . 31 | .TP 32 | .BR \-h " [\fIparam\fR]" 33 | If given without 34 | .I param 35 | displays help on the application overall. If 36 | .I param 37 | is specified, prints help about that parameter in the base device-tree. 38 | . 39 | . 40 | .SH EXAMPLES 41 | . 42 | .TP 43 | .B sudo dtparam spi=on 44 | Enable the SPI interface on the GPIO header. Note that root privileges are 45 | usually required for manipulating the base device-tree (hence, sudo in the 46 | example). 47 | . 48 | .TP 49 | .B dtparam -h spi 50 | Print help about the "spi" parameter. 51 | . 52 | .TP 53 | .B sudo dtparam audio=off 54 | Disable the audio output. 55 | . 56 | . 57 | .SH SEE ALSO 58 | .BR dtoverlay (1), 59 | .BR dtmerge (1), 60 | .B [DTREE] 61 | . 62 | . 63 | .SH REFERENCES 64 | .TP 65 | .B [DTREE] 66 | https://www.raspberrypi.org/documentation/configuration/device-tree.md 67 | -------------------------------------------------------------------------------- /host_applications/linux/apps/gencmd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | if (WIN32) 4 | set(VCOS_PLATFORM win32) 5 | else () 6 | set(VCOS_PLATFORM pthreads) 7 | add_definitions(-Wall -Werror) 8 | endif () 9 | 10 | include_directories( ../../../.. 11 | ../../../../interface/vcos 12 | ../../../../interface/vcos/${VCOS_PLATFORM} ) 13 | 14 | #add_subdirectory( ../../../../interface/vcos/${VCOS_PLATFORM} vcos) 15 | #add_subdirectory( ../../bin/gencmd) 16 | 17 | add_executable(vcgencmd gencmd.c) 18 | target_link_libraries(vcgencmd vcos vchiq_arm vchostif) 19 | install(TARGETS vcgencmd RUNTIME DESTINATION bin) 20 | install(FILES vcgencmd.1 DESTINATION man/man1) 21 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(BUILD_FONT FALSE) 2 | 3 | include_directories(${PROJECT_SOURCE_DIR}) 4 | include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/bcm_host/include) 5 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libs/ilclient) 6 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libs/vgfont) 7 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libs/revision) 8 | 9 | set(ILCLIENT_SRCS libs/ilclient/ilclient.c libs/ilclient/ilcore.c) 10 | add_library(ilclient ${ILCLIENT_SRCS}) 11 | 12 | set(REVISION_SRCS libs/revision/revision.c ) 13 | add_library(revision ${REVISION_SRCS}) 14 | 15 | set(HELLO_PI_LIBS ilclient openmaxil bcm_host vcos vchiq_arm revision) 16 | 17 | add_subdirectory(hello_world) 18 | add_subdirectory(hello_video) 19 | add_subdirectory(hello_audio) 20 | add_subdirectory(hello_triangle) 21 | add_subdirectory(hello_triangle2) 22 | add_subdirectory(hello_dispmanx) 23 | add_subdirectory(hello_tiger) 24 | add_subdirectory(hello_encode) 25 | add_subdirectory(hello_jpeg) 26 | add_subdirectory(hello_videocube) 27 | add_subdirectory(hello_teapot) 28 | 29 | if(BUILD_FONT) 30 | set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c) 31 | set_source_files_properties(${VGFONT_SRCS} PROPERTIES COMPILE_DEFINITIONS) 32 | add_library(vgfont ${VGFONT_SRCS}) 33 | 34 | add_subdirectory(hello_font) 35 | endif(BUILD_FONT) 36 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/Makefile: -------------------------------------------------------------------------------- 1 | all: apps 2 | 3 | libs/ilclient/libilclient.a: 4 | $(MAKE) -C libs/ilclient 5 | 6 | libs/vgfont/libvgfont.a: 7 | $(MAKE) -C libs/vgfont 8 | 9 | libs/revision/librevision.a: 10 | $(MAKE) -C libs/revision 11 | 12 | apps: libs/ilclient/libilclient.a libs/vgfont/libvgfont.a libs/revision/librevision.a 13 | $(MAKE) -C hello_world 14 | $(MAKE) -C hello_triangle 15 | $(MAKE) -C hello_triangle2 16 | $(MAKE) -C hello_video 17 | $(MAKE) -C hello_audio 18 | $(MAKE) -C hello_font 19 | $(MAKE) -C hello_dispmanx 20 | $(MAKE) -C hello_tiger 21 | $(MAKE) -C hello_encode 22 | $(MAKE) -C hello_jpeg 23 | $(MAKE) -C hello_videocube 24 | $(MAKE) -C hello_teapot 25 | $(MAKE) -C hello_fft 26 | $(MAKE) -C hello_mmal_encode 27 | 28 | clean: 29 | $(MAKE) -C libs/ilclient clean 30 | $(MAKE) -C libs/vgfont clean 31 | $(MAKE) -C libs/revision clean 32 | $(MAKE) -C hello_world clean 33 | $(MAKE) -C hello_triangle clean 34 | $(MAKE) -C hello_triangle2 clean 35 | $(MAKE) -C hello_video clean 36 | $(MAKE) -C hello_audio clean 37 | $(MAKE) -C hello_font clean 38 | $(MAKE) -C hello_dispmanx clean 39 | $(MAKE) -C hello_tiger clean 40 | $(MAKE) -C hello_encode clean 41 | $(MAKE) -C hello_jpeg clean 42 | $(MAKE) -C hello_videocube clean 43 | $(MAKE) -C hello_teapot clean 44 | $(MAKE) -C hello_fft clean 45 | $(MAKE) -C hello_mmal_encode clean 46 | 47 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/Makefile.include: -------------------------------------------------------------------------------- 1 | 2 | CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi 3 | 4 | LDFLAGS+=-L$(SDKSTAGE)/opt/vc/lib/ -lbrcmEGL -lbrcmGLESv2 -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L$(SDKSTAGE)/opt/vc/src/hello_pi/libs/ilclient -L$(SDKSTAGE)/opt/vc/src/hello_pi/libs/vgfont -L$(SDKSTAGE)/opt/vc/src/hello_pi/libs/revision 5 | 6 | INCLUDES+=-I$(SDKSTAGE)/opt/vc/include/ -I$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -I$(SDKSTAGE)/opt/vc/include/interface/vmcs_host/linux -I./ -I$(SDKSTAGE)/opt/vc/src/hello_pi/libs/ilclient -I$(SDKSTAGE)/opt/vc/src/hello_pi/libs/vgfont -I$(SDKSTAGE)/opt/vc/src/hello_pi/libs/revision 7 | 8 | all: $(BIN) $(LIB) 9 | 10 | %.o: %.c 11 | @rm -f $@ 12 | $(CC) $(CFLAGS) $(INCLUDES) -g -c $< -o $@ -Wno-deprecated-declarations 13 | 14 | %.o: %.cpp 15 | @rm -f $@ 16 | $(CXX) $(CFLAGS) $(INCLUDES) -g -c $< -o $@ -Wno-deprecated-declarations 17 | 18 | %.bin: $(OBJS) 19 | $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic 20 | 21 | %.a: $(OBJS) 22 | $(AR) r $@ $^ 23 | 24 | clean: 25 | for i in $(OBJS); do (if test -e "$$i"; then ( rm $$i ); fi ); done 26 | @rm -f $(BIN) $(LIB) 27 | 28 | 29 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/README: -------------------------------------------------------------------------------- 1 | Building on Pi 2 | ++++++++++++++ 3 | 4 | To build the test apps on the pi, first build the libs: 5 | make -C libs/ilclient 6 | make -C libs/vgfont 7 | 8 | then by entering each test app directory and run make. E.g. 9 | cd hello_world 10 | make 11 | ./hello_world.bin 12 | 13 | Running ./rebuild.sh will rebuild the all libs and and apps. 14 | 15 | 16 | Building on a different PC 17 | ++++++++++++++++++++++++++ 18 | 19 | If you want to build the samples on a different machine (cross-compile) then set: 20 | SDKSTAGE= and CC= 21 | before running make. 22 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_audio/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_audio.bin) 2 | set(SRCS audio.c sinewave.c) 3 | 4 | add_executable(${EXEC} ${SRCS}) 5 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 6 | 7 | install(TARGETS ${EXEC} 8 | RUNTIME DESTINATION bin) 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_audio/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=audio.o sinewave.o 2 | BIN=hello_audio.bin 3 | LDFLAGS+=-lilclient 4 | 5 | include ../Makefile.include 6 | 7 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_dispmanx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_dispmanx.bin) 2 | set(SRCS dispmanx.c) 3 | 4 | add_executable(${EXEC} ${SRCS}) 5 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 6 | 7 | install(TARGETS ${EXEC} 8 | RUNTIME DESTINATION bin) 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_dispmanx/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=dispmanx.o 2 | BIN=hello_dispmanx.bin 3 | 4 | include ../Makefile.include 5 | 6 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_encode/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_encode.bin) 2 | set(SRCS encode.c) 3 | 4 | add_executable(${EXEC} ${SRCS}) 5 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 6 | 7 | install(TARGETS ${EXEC} 8 | RUNTIME DESTINATION bin) 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_encode/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=encode.o 2 | BIN=hello_encode.bin 3 | LDFLAGS+=-lilclient 4 | 5 | include ../Makefile.include 6 | 7 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_fft/gpu_fft_trans.h: -------------------------------------------------------------------------------- 1 | /* 2 | BCM2835 "GPU_FFT" release 2.0 3 | Copyright (c) 2014, Andrew Holme. 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | * Neither the name of the copyright holder nor the 14 | names of its contributors may be used to endorse or promote products 15 | derived from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 21 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #include "gpu_fft.h" 30 | 31 | struct GPU_FFT_TRANS { 32 | struct GPU_FFT_BASE base; 33 | }; 34 | 35 | int gpu_fft_trans_prepare( 36 | int mb, 37 | struct GPU_FFT *src, 38 | struct GPU_FFT *dst, 39 | struct GPU_FFT_TRANS **out); 40 | 41 | unsigned gpu_fft_trans_execute( // src->out ==> T ==> dst->in 42 | struct GPU_FFT_TRANS *info); 43 | 44 | void gpu_fft_trans_release( 45 | struct GPU_FFT_TRANS *info); 46 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_fft/makefile: -------------------------------------------------------------------------------- 1 | S = hex/shader_256.hex \ 2 | hex/shader_512.hex \ 3 | hex/shader_1k.hex \ 4 | hex/shader_2k.hex \ 5 | hex/shader_4k.hex \ 6 | hex/shader_8k.hex \ 7 | hex/shader_16k.hex \ 8 | hex/shader_32k.hex \ 9 | hex/shader_64k.hex \ 10 | hex/shader_128k.hex \ 11 | hex/shader_256k.hex \ 12 | hex/shader_512k.hex \ 13 | hex/shader_1024k.hex \ 14 | hex/shader_2048k.hex \ 15 | hex/shader_4096k.hex 16 | 17 | C = mailbox.c gpu_fft.c gpu_fft_base.c gpu_fft_twiddles.c gpu_fft_shaders.c 18 | 19 | C1D = $(C) hello_fft.c 20 | C2D = $(C) hello_fft_2d.c gpu_fft_trans.c 21 | 22 | H1D = gpu_fft.h mailbox.h 23 | H2D = gpu_fft.h mailbox.h gpu_fft_trans.h hello_fft_2d_bitmap.h 24 | 25 | F = -lrt -lm -ldl 26 | 27 | all: hello_fft.bin hello_fft_2d.bin 28 | 29 | hello_fft.bin: $(S) $(C1D) $(H1D) 30 | gcc -o hello_fft.bin $(C1D) $(F) 31 | 32 | hello_fft_2d.bin: $(S) hex/shader_trans.hex $(C2D) $(H2D) 33 | gcc -o hello_fft_2d.bin $(C2D) $(F) 34 | 35 | clean: 36 | rm -f *.bin 37 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_font/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_font.bin) 2 | set(SRCS main.c) 3 | 4 | add_executable(${EXEC} ${SRCS}) 5 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 6 | target_link_libraries(${EXEC} vgfont freetype z) 7 | 8 | install(TARGETS ${EXEC} 9 | RUNTIME DESTINATION bin) 10 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_font/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=main.o 2 | BIN=hello_font.bin 3 | 4 | LDFLAGS+=-lvgfont -lfreetype -lz -lrevision 5 | 6 | include ../Makefile.include 7 | 8 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_font/Vera.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/userland/a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976/host_applications/linux/apps/hello_pi/hello_font/Vera.ttf -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_jpeg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_jpeg.bin) 2 | set(SRCS jpeg.c) 3 | 4 | add_executable(${EXEC} ${SRCS}) 5 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 6 | 7 | install(TARGETS ${EXEC} 8 | RUNTIME DESTINATION bin) 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_jpeg/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=jpeg.o 2 | BIN=hello_jpeg.bin 3 | LDFLAGS+=-lilclient 4 | 5 | include ../Makefile.include 6 | 7 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_mmal_encode/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=mmal_encode.o 2 | BIN=hello_mmal_encode.bin 3 | LDFLAGS+=-lmmal -lmmal_core -lmmal_components -lmmal_util -lmmal_vc_client 4 | # Set --no-as-needed to stop the linker discarding mmal_vc_client 5 | # as it can't see that the constructor registers a load of functionality 6 | # with the MMAL core. 7 | LDFLAGS+=-Wl,--no-as-needed 8 | 9 | include ../Makefile.include 10 | 11 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_teapot/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_teapot.bin) 2 | set(SRCS triangle.c video.c models.c) 3 | 4 | add_executable(${EXEC} ${SRCS}) 5 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 6 | 7 | install(TARGETS ${EXEC} 8 | RUNTIME DESTINATION bin) 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_teapot/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=triangle.o video.o models.o 2 | BIN=hello_teapot.bin 3 | LDFLAGS+=-lilclient -lrevision 4 | 5 | include ../Makefile.include 6 | 7 | 8 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_teapot/README.md: -------------------------------------------------------------------------------- 1 | hello_videocube 2 | =============== 3 | 4 | Sample for Raspberry Pi that uses egl_render to display video on an animated cube. -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_teapot/models.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef MODELS_T 29 | #define MODELS_T 30 | typedef struct opqaue_model_s * MODEL_T; 31 | 32 | MODEL_T load_wavefront(const char *modelname, const char *texturename); 33 | MODEL_T cube_wavefront(void); 34 | void unload_wavefront(MODEL_T m); 35 | int draw_wavefront(MODEL_T m, GLuint texture); 36 | #endif 37 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_teapot/teapot.obj.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/userland/a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976/host_applications/linux/apps/hello_pi/hello_teapot/teapot.obj.dat -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_teapot/triangle.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #pragma once 28 | 29 | 30 | void* video_decode_test(void* arg); 31 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_tiger/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_tiger.bin) 2 | set(SRCS main.c tiger.c) 3 | add_definitions(-D__RASPBERRYPI__) 4 | 5 | add_executable(${EXEC} ${SRCS}) 6 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 7 | 8 | install(TARGETS ${EXEC} 9 | RUNTIME DESTINATION bin) 10 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_tiger/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=main.o tiger.o 2 | BIN=hello_tiger.bin 3 | 4 | LDFLAGS+= -lrevision 5 | CFLAGS+=-D__RASPBERRYPI__ 6 | 7 | include ../Makefile.include 8 | 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_tiger/tiger.h: -------------------------------------------------------------------------------- 1 | #ifndef __TIGER_H 2 | #define __TIGER_H 3 | 4 | /*------------------------------------------------------------------------ 5 | * 6 | * OpenVG 1.0.1 Reference Implementation sample code 7 | * ------------------------------------------------- 8 | * 9 | * Copyright (c) 2007 The Khronos Group Inc. 10 | * 11 | * Permission is hereby granted, free of charge, to any person obtaining a 12 | * copy of this software and /or associated documentation files 13 | * (the "Materials "), to deal in the Materials without restriction, 14 | * including without limitation the rights to use, copy, modify, merge, 15 | * publish, distribute, sublicense, and/or sell copies of the Materials, 16 | * and to permit persons to whom the Materials are furnished to do so, 17 | * subject to the following conditions: 18 | * 19 | * The above copyright notice and this permission notice shall be included 20 | * in all copies or substantial portions of the Materials. 21 | * 22 | * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 25 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 26 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 27 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR 28 | * THE USE OR OTHER DEALINGS IN THE MATERIALS. 29 | * 30 | *//** 31 | * \file 32 | * \brief Header for including the Tiger image data. 33 | * \note 34 | *//*-------------------------------------------------------------------*/ 35 | 36 | extern const int tigerCommandCount; 37 | extern const char tigerCommands[]; 38 | extern const float tigerMinX; 39 | extern const float tigerMaxX; 40 | extern const float tigerMinY; 41 | extern const float tigerMaxY; 42 | extern const int tigerPointCount; 43 | extern const float tigerPoints[]; 44 | 45 | #endif /* __TIGER_H */ 46 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_triangle/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_triangle.bin) 2 | set(SRCS triangle.c) 3 | 4 | add_executable(${EXEC} ${SRCS}) 5 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 6 | 7 | install(TARGETS ${EXEC} 8 | RUNTIME DESTINATION bin) 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_triangle/Djenne_128_128.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/userland/a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976/host_applications/linux/apps/hello_pi/hello_triangle/Djenne_128_128.raw -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_triangle/Gaudi_128_128.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/userland/a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976/host_applications/linux/apps/hello_pi/hello_triangle/Gaudi_128_128.raw -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_triangle/Lucca_128_128.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/userland/a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976/host_applications/linux/apps/hello_pi/hello_triangle/Lucca_128_128.raw -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_triangle/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=triangle.o 2 | BIN=hello_triangle.bin 3 | 4 | LDFLAGS+= -lrevision 5 | 6 | include ../Makefile.include 7 | 8 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_triangle2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_triangle2.bin) 2 | set(SRCS triangle2.c) 3 | 4 | add_executable(${EXEC} ${SRCS}) 5 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 6 | 7 | install(TARGETS ${EXEC} 8 | RUNTIME DESTINATION bin) 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_triangle2/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=triangle2.o 2 | BIN=hello_triangle2.bin 3 | 4 | LDFLAGS+= -lrevision 5 | 6 | include ../Makefile.include 7 | 8 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_video/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_video.bin) 2 | set(SRCS video.c) 3 | 4 | add_executable(${EXEC} ${SRCS}) 5 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 6 | 7 | install(TARGETS ${EXEC} 8 | RUNTIME DESTINATION bin) 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_video/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=video.o 2 | BIN=hello_video.bin 3 | LDFLAGS+=-lilclient 4 | 5 | include ../Makefile.include 6 | 7 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_video/README: -------------------------------------------------------------------------------- 1 | The video clip test.h264 is (c) copyright 2008, Blender Foundation / www.bigbuckbunny.org 2 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_video/test.h264: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/userland/a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976/host_applications/linux/apps/hello_pi/hello_video/test.h264 -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_videocube/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_videocube.bin) 2 | set(SRCS triangle.c video.c) 3 | 4 | add_executable(${EXEC} ${SRCS}) 5 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 6 | 7 | install(TARGETS ${EXEC} 8 | RUNTIME DESTINATION bin) 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_videocube/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=triangle.o video.o 2 | BIN=hello_videocube.bin 3 | LDFLAGS+=-lilclient -lrevision 4 | 5 | include ../Makefile.include 6 | 7 | 8 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_videocube/README.md: -------------------------------------------------------------------------------- 1 | hello_videocube 2 | =============== 3 | 4 | Sample for Raspberry Pi that uses egl_render to display video on an animated cube. -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_videocube/triangle.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #pragma once 28 | 29 | 30 | void* video_decode_test(void* arg); 31 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_world/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(EXEC hello_world.bin) 2 | set(SRCS world.c) 3 | 4 | add_executable(${EXEC} ${SRCS}) 5 | target_link_libraries(${EXEC} ${HELLO_PI_LIBS}) 6 | 7 | install(TARGETS ${EXEC} 8 | RUNTIME DESTINATION bin) 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_world/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=world.o 2 | BIN=hello_world.bin 3 | 4 | include ../Makefile.include 5 | 6 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/hello_world/world.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | // Classic Hello World 29 | 30 | #include 31 | 32 | int main(void) 33 | { 34 | printf("Hello world!\n"); 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/libs/ilclient/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=ilclient.o ilcore.o 2 | LIB=libilclient.a 3 | 4 | include ../../Makefile.include 5 | 6 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/libs/revision/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=revision.o 2 | LIB=librevision.a 3 | 4 | include ../../Makefile.include 5 | 6 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/libs/revision/revision.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2019, Raspberry Pi (Trading) Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #define PROCESSOR_BCM2835 0 29 | #define PROCESSOR_BCM2836 1 30 | #define PROCESSOR_BCM2837 2 31 | #define PROCESSOR_BCM2838 3 32 | 33 | /* Returns the type of the Pi being used 34 | */ 35 | extern int get_model_type(void); 36 | 37 | /* Returns 1 if model is Pi4 38 | */ 39 | extern int is_model_pi4(void); 40 | 41 | /* returns the processor ID 42 | */ 43 | extern int get_processor_id(void); 44 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/libs/vgfont/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=font.o vgft.o graphics.o 2 | LIB=libvgfont.a 3 | 4 | INCLUDES+=-I$(SDKSTAGE)/usr/include/freetype2 -I$(SDKSTAGE)/usr/include -I$(SDKSTAGE)/usr/include/arm-linux-gnueabi 5 | 6 | include ../../Makefile.include 7 | 8 | -------------------------------------------------------------------------------- /host_applications/linux/apps/hello_pi/rebuild.sh: -------------------------------------------------------------------------------- 1 | make clean 2 | make -j$(nproc) 3 | -------------------------------------------------------------------------------- /host_applications/linux/apps/raspicam/Makefile: -------------------------------------------------------------------------------- 1 | OBJS=RaspiCamControl.o RaspiCLI.o RaspiPreview.o RaspiStill.o 2 | BIN=raspicam.bin 3 | LDFLAGS+=-lmmal -lmmal_core -lmmal_util -lm -ldl 4 | 5 | include ../Makefile.include 6 | 7 | -------------------------------------------------------------------------------- /host_applications/linux/apps/raspicam/README.md: -------------------------------------------------------------------------------- 1 | # RaspiCam Documentation 2 | 3 | The full documentation for the camera applications is now hosted in the Raspberry Pi documentation area. 4 | 5 | [Camera documentation](https://www.raspberrypi.org/documentation/raspbian/applications/camera.md) 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /host_applications/linux/apps/raspicam/RaspiGPS.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2018, Raspberry Pi (Trading) Ltd. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef RASPIGPS_H_ 29 | #define RASPIGPS_H_ 30 | 31 | #include 32 | #include 33 | 34 | #include "libgps_loader.h" 35 | 36 | int raspi_gps_setup(int verbose); 37 | void raspi_gps_shutdown(int verbose); 38 | 39 | struct gps_data_t *raspi_gps_lock(); 40 | void raspi_gps_unlock(); 41 | 42 | // Return string representation of the current fix 43 | // The resulting pointer is allocated so will 44 | // need to be freed when finished with. 45 | char *raspi_gps_location_string(); 46 | 47 | #endif /* RASPIGPS_H_ */ 48 | -------------------------------------------------------------------------------- /host_applications/linux/apps/raspicam/gl_scenes/mirror.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, Broadcom Europe Ltd 3 | Copyright (c) 2013, Tim Gover 4 | All rights reserved. 5 | 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the copyright holder nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef MIRROR_H 31 | #define MIRROR_H 32 | 33 | #include "RaspiTex.h" 34 | 35 | int mirror_open(RASPITEX_STATE *state); 36 | 37 | #endif /* MIRROR_H */ 38 | -------------------------------------------------------------------------------- /host_applications/linux/apps/raspicam/gl_scenes/models.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef MODELS_T 29 | #define MODELS_T 30 | typedef struct opqaue_model_s * MODEL_T; 31 | 32 | MODEL_T load_wavefront(const char *modelname, const char *texturename); 33 | MODEL_T cube_wavefront(void); 34 | void unload_wavefront(MODEL_T m); 35 | int draw_wavefront(MODEL_T m, GLuint texture); 36 | #endif 37 | -------------------------------------------------------------------------------- /host_applications/linux/apps/raspicam/gl_scenes/sobel.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, Broadcom Europe Ltd 3 | Copyright (c) 2013, Tim Gover 4 | All rights reserved. 5 | 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the copyright holder nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef SOBEL_H 31 | #define SOBEL_H 32 | 33 | #include "RaspiTex.h" 34 | 35 | int sobel_open(RASPITEX_STATE *state); 36 | 37 | #endif /* SOBEL_H */ 38 | -------------------------------------------------------------------------------- /host_applications/linux/apps/raspicam/gl_scenes/square.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, Broadcom Europe Ltd 3 | Copyright (c) 2013, Tim Gover 4 | All rights reserved. 5 | 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the copyright holder nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef SQUARE_H 31 | #define SQUARE_H 32 | 33 | #include "RaspiTex.h" 34 | 35 | int square_open(RASPITEX_STATE *state); 36 | 37 | #endif /* SQUARE_H */ 38 | -------------------------------------------------------------------------------- /host_applications/linux/apps/raspicam/gl_scenes/teapot.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012-2013, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef TEAPOT_H 29 | #define TEAPOT_H 30 | 31 | #include "RaspiTex.h" 32 | 33 | int teapot_open(RASPITEX_STATE *raspitex_state); 34 | 35 | #endif /* TEAPOT_H */ 36 | -------------------------------------------------------------------------------- /host_applications/linux/apps/raspicam/gl_scenes/vcsm_square.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, Broadcom Europe Ltd 3 | Copyright (c) 2016, Tim Gover 4 | All rights reserved. 5 | 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the copyright holder nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef VCSM_SQUARE_H 31 | #define VCSM_SQUARE_H 32 | 33 | #include "RaspiTex.h" 34 | 35 | int vcsm_square_open(RASPITEX_STATE *state); 36 | 37 | #endif /* VCSM_SQUARE_H */ 38 | -------------------------------------------------------------------------------- /host_applications/linux/apps/raspicam/gl_scenes/yuv.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, Broadcom Europe Ltd 3 | Copyright (c) 2013, Tim Gover 4 | All rights reserved. 5 | 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | * Neither the name of the copyright holder nor the 15 | names of its contributors may be used to endorse or promote products 16 | derived from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 22 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef YUV_H 31 | #define YUV_H 32 | 33 | #include "RaspiTex.h" 34 | 35 | int yuv_open(RASPITEX_STATE *state); 36 | 37 | #endif /* YUV_H */ 38 | -------------------------------------------------------------------------------- /host_applications/linux/apps/raspicam/imv_examples/README.md: -------------------------------------------------------------------------------- 1 | Post-processing example programs to play with the imv buffer: 2 | ============================================================= 3 | 4 | Compile: 5 | -------- 6 | gcc imv2pgm.c -o imv2pgm -lm 7 | 8 | gcc imv2txt.c -o imv2txt 9 | 10 | Record and split buffer: 11 | ------------------------ 12 | raspivid -x test.imv -o test.h264 13 | 14 | We need to split the buffer first using split: 15 | 16 | split -a 4 -d -b $(((120+1)\*68\*4)) test.imv frame- 17 | 18 | Play: 19 | ----- 20 | Now we can transform the velocity magnitues to a pgm image 21 | 22 | ./imv2pgm frame-0001 120 68 frame-0001.pgm 23 | 24 | Or loop over all frames and create a movie 25 | 26 | for i in frame-????; do ./imv2pgm $i 120 68 $i.pgm;convert $i.pgm $i.png; rm $i.pgm; done 27 | 28 | avconv -i frame-%04d.png motion.avi 29 | 30 | And we can create a text file for easy plotting 31 | 32 | ./imv2txt frame-0001 120 68 frame-0001.dat 33 | 34 | This textfile has in each line the center position x y of the macro block and 35 | the velocities u and v and the sum of differences sad. 36 | 37 | These can be plot with xmgrace 38 | 39 | xmgrace -autoscale none -settype xyvmap frame-0001.dat -param plot.par 40 | -------------------------------------------------------------------------------- /host_applications/linux/apps/smem/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | get_filename_component (VIDEOCORE_ROOT ../../../.. ABSOLUTE) 4 | include (${VIDEOCORE_ROOT}/makefiles/cmake/global_settings.cmake) 5 | 6 | if (NOT WIN32) 7 | add_definitions(-Wall -Werror) 8 | endif () 9 | 10 | include_directories ( 11 | ${VIDEOCORE_HEADERS_BUILD_DIR} 12 | ${VIDEOCORE_ROOT} 13 | ${VIDEOCORE_ROOT}/host_applications/linux/libs/sm 14 | ) 15 | 16 | add_executable(vcsmem smem.c) 17 | target_link_libraries(vcsmem vcos vcsm vchostif) 18 | 19 | install(TARGETS vcsmem RUNTIME DESTINATION bin) 20 | 21 | -------------------------------------------------------------------------------- /host_applications/linux/apps/tvservice/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/bcm_host/include) 2 | add_executable(tvservice tvservice.c) 3 | target_link_libraries(tvservice vchostif bcm_host) 4 | 5 | install(TARGETS tvservice 6 | RUNTIME DESTINATION bin) 7 | install(FILES tvservice.1 DESTINATION man/man1) 8 | -------------------------------------------------------------------------------- /host_applications/linux/apps/vcmailbox/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(vcmailbox vcmailbox.c) 2 | target_link_libraries(vcmailbox vchostif) 3 | 4 | install(TARGETS vcmailbox 5 | RUNTIME DESTINATION bin) 6 | install(FILES vcmailbox.1 DESTINATION man/man1) 7 | install(FILES vcmailbox.7 raspiotp.7 raspirev.7 DESTINATION man/man7) 8 | -------------------------------------------------------------------------------- /host_applications/linux/apps/vcmailbox/vcmailbox.1: -------------------------------------------------------------------------------- 1 | .TH VCMAILBOX 1 2 | . 3 | .SH NAME 4 | vcmailbox \- send messages to the VideoCore via the mailbox 5 | . 6 | . 7 | .SH SYNOPSIS 8 | .SY vcmailbox 9 | .RI [ word0 ] 10 | .RI [ word1 ] 11 | \|.\|.\|. 12 | . 13 | . 14 | .SH DESCRIPTION 15 | .B vcmailbox 16 | is a low-level utility for sending mailbox messages to the VideoCore. See 17 | .B [MAILBOX] 18 | or 19 | .BR vcmailbox (7) 20 | for more information on the available messages and their respective formats. 21 | and 22 | .BR raspiotp (7) 23 | for some examples of typical usage. 24 | . 25 | . 26 | .SH SEE ALSO 27 | .BR vcgencmd (1), 28 | .BR raspiotp (7), 29 | .B [MAILBOX] 30 | . 31 | . 32 | .SH REFERENCES 33 | .TP 34 | .B [MAILBOX] 35 | https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface 36 | -------------------------------------------------------------------------------- /host_applications/linux/libs/bcm_host/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | if (WIN32) 3 | set(VCOS_PLATFORM win32) 4 | else () 5 | set(VCOS_PLATFORM pthreads) 6 | add_definitions(-Wall -Werror) 7 | endif () 8 | 9 | # set this as we want all the source of vchostif to be available in libbcm_host 10 | set (CMAKE_SHARED_LINKER_FLAGS "-u vc_gpuserv_init ${CMAKE_SHARED_LINKER_FLAGS}") 11 | 12 | include_directories( ../../../.. 13 | ../../../../interface/vcos/${VCOS_PLATFORM} 14 | ../../../../host_support/linux/added/include 15 | ../../../../host_applications/vmcs/test_apps/iltest 16 | ../../../../host_applications/framework/common ) 17 | 18 | add_library(bcm_host ${SHARED} bcm_host.c) 19 | 20 | target_link_libraries(bcm_host vcos vchostif) 21 | 22 | install(TARGETS bcm_host DESTINATION lib) 23 | 24 | -------------------------------------------------------------------------------- /host_applications/linux/libs/debug_sym/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | get_filename_component (VIDEOCORE_ROOT ../../../../ ABSOLUTE) 3 | include (${VIDEOCORE_ROOT}/makefiles/cmake/global_settings.cmake) 4 | 5 | include_directories ( 6 | ${VCOS_ROOT}/{RTOS} 7 | ${VIDEOCORE_HEADERS_BUILD_DIR} 8 | ../../../../host_support/include 9 | ${VIDEOCORE_ROOT}) 10 | 11 | add_library(debug_sym ${SHARED} debug_sym.c) 12 | add_library(debug_sym_static STATIC debug_sym.c) 13 | 14 | install(TARGETS debug_sym DESTINATION lib) 15 | install(TARGETS debug_sym_static DESTINATION lib) 16 | install(FILES debug_sym.h DESTINATION include/interface/debug_sym) 17 | -------------------------------------------------------------------------------- /host_applications/linux/libs/sm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | if (WIN32) 3 | set(VCOS_PLATFORM win32) 4 | else () 5 | set(VCOS_PLATFORM pthreads) 6 | add_definitions(-Wall -Werror) 7 | endif () 8 | 9 | include_directories( ../../../.. 10 | ../../../../interface/vcos/${VCOS_PLATFORM} 11 | ../../../../host_applications/linux/kernel_headers ) 12 | 13 | add_library(vcsm ${SHARED} user-vcsm.c) 14 | 15 | target_link_libraries(vcsm vcos) 16 | 17 | install(TARGETS vcsm DESTINATION lib) 18 | install(FILES user-vcsm.h DESTINATION include/interface/vcsm) 19 | -------------------------------------------------------------------------------- /host_applications/linux/libs/sm/dma-buf.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 | /* 3 | * Framework for buffer objects that can be shared across devices/subsystems. 4 | * 5 | * Copyright(C) 2015 Intel Ltd 6 | * 7 | * This program is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License version 2 as published by 9 | * the Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 14 | * more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #ifndef _DMA_BUF_UAPI_H_ 21 | #define _DMA_BUF_UAPI_H_ 22 | 23 | #include 24 | 25 | /* begin/end dma-buf functions used for userspace mmap. */ 26 | struct dma_buf_sync { 27 | __u64 flags; 28 | }; 29 | 30 | #define DMA_BUF_SYNC_READ (1 << 0) 31 | #define DMA_BUF_SYNC_WRITE (2 << 0) 32 | #define DMA_BUF_SYNC_RW (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE) 33 | #define DMA_BUF_SYNC_START (0 << 2) 34 | #define DMA_BUF_SYNC_END (1 << 2) 35 | #define DMA_BUF_SYNC_VALID_FLAGS_MASK \ 36 | (DMA_BUF_SYNC_RW | DMA_BUF_SYNC_END) 37 | 38 | #define DMA_BUF_BASE 'b' 39 | #define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync) 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /host_applications/vmcs/test_apps/mmalcam/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | gcc -O3 viewfinder.c mmalcam.c -o mmalcam -lmmal -lmmal_core -lmmal_util -I/opt/vc/include/ -L/opt/vc/lib/ -lpthread -lvcos 3 | -------------------------------------------------------------------------------- /host_applications/vmcs/test_apps/mmalplay/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | gcc -O3 mmalplay.c playback.c -o mmalplay -lmmal -lmmal_core -lmmal_util -I/opt/vc/include/ -L/opt/vc/lib/ -lpthread -lvcos 3 | -------------------------------------------------------------------------------- /host_applications/vmcs/vmcs_config.h.in: -------------------------------------------------------------------------------- 1 | 2 | #ifndef VMCS_CONFIG_H 3 | #define VMCS_CONFIG_H 4 | 5 | /* 6 | * Autogenerated by cmake from host_applications/vmcs/vmcs_config.h.in 7 | */ 8 | 9 | /** Root location to look for installed resources. 10 | */ 11 | #define VMCS_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" 12 | 13 | /** Where to start looking for media files. 14 | */ 15 | #define VMCS_MEDIA_ROOT "/sd" 16 | 17 | /** We can't use pakfs - it relies on vc_filesys since only 18 | * VC understands PAK files, but vc_filesys can only be used 19 | * by VC itself or in response to a VC request inside the file 20 | * server. 21 | */ 22 | #define NO_PAKFS 1 23 | 24 | /** Don't try to check the disks after iltests. That's just silly 25 | * on linux. 26 | */ 27 | #define ILTEST_NO_DISK_CHECKS 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /interface/khronos/common/khrn_client_global_image_map.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef KHRN_CLIENT_GLOBAL_IMAGE_MAP_H 29 | #define KHRN_CLIENT_GLOBAL_IMAGE_MAP_H 30 | 31 | #define khrn_generic_map(X) khrn_global_image_map_##X 32 | #define KHRN_GENERIC_MAP(X) KHRN_GLOBAL_IMAGE_MAP_##X 33 | #define KHRN_GENERIC_MAP_KEY_T uint32_t 34 | #define KHRN_GENERIC_MAP_VALUE_T uint64_t 35 | 36 | #ifdef CLIENT_GLOBAL_IMAGE_MAP_C 37 | #include "interface/khronos/common/khrn_int_generic_map.c" 38 | #else 39 | #include "interface/khronos/common/khrn_int_generic_map.h" 40 | #endif 41 | 42 | #undef KHRN_GENERIC_MAP_VALUE_T 43 | #undef KHRN_GENERIC_MAP_KEY_T 44 | #undef KHRN_GENERIC_MAP 45 | #undef khrn_generic_map 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /interface/khronos/common/khrn_client_pointermap.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #include "interface/khronos/common/khrn_int_common.h" 29 | #include "interface/khronos/common/khrn_client_platform.h" 30 | 31 | #define KHRN_GENERIC_MAP_VALUE_NONE NULL 32 | #define KHRN_GENERIC_MAP_VALUE_DELETED ((void *)(uintptr_t)-1) 33 | #define KHRN_GENERIC_MAP_ALLOC khrn_platform_malloc 34 | #define KHRN_GENERIC_MAP_FREE khrn_platform_free 35 | 36 | #define CLIENT_POINTER_MAP_C 37 | #include "interface/khronos/common/khrn_client_pointermap.h" 38 | -------------------------------------------------------------------------------- /interface/khronos/common/khrn_client_pointermap.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef KHRN_CLIENT_POINTERMAP_H 29 | #define KHRN_CLIENT_POINTERMAP_H 30 | 31 | #define khrn_generic_map(X) khrn_pointer_map_##X 32 | #define KHRN_GENERIC_MAP(X) KHRN_POINTER_MAP_##X 33 | #define KHRN_GENERIC_MAP_KEY_T uint32_t 34 | #define KHRN_GENERIC_MAP_VALUE_T void * 35 | 36 | #ifdef CLIENT_POINTER_MAP_C 37 | #include "interface/khronos/common/khrn_int_generic_map.c" 38 | #else 39 | #include "interface/khronos/common/khrn_int_generic_map.h" 40 | #endif 41 | 42 | #undef KHRN_GENERIC_MAP_VALUE_T 43 | #undef KHRN_GENERIC_MAP_KEY_T 44 | #undef KHRN_GENERIC_MAP 45 | #undef khrn_generic_map 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /interface/khronos/common/khrn_client_vector.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef KHRN_CLIENT_VECTOR_H 29 | #define KHRN_CLIENT_VECTOR_H 30 | 31 | typedef struct { 32 | void *data; 33 | uint32_t capacity; 34 | uint32_t size; 35 | } KHRN_VECTOR_T; 36 | 37 | extern void khrn_vector_init(KHRN_VECTOR_T *vector, uint32_t capacity); 38 | extern void khrn_vector_term(KHRN_VECTOR_T *vector); 39 | 40 | extern bool khrn_vector_extend(KHRN_VECTOR_T *vector, uint32_t size); 41 | extern void khrn_vector_clear(KHRN_VECTOR_T *vector); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /interface/khronos/common/khrn_int_misc_impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #if defined(KHRN_IMPL_STRUCT) 28 | #define FN(type, name, args) type (*name) args; 29 | #elif defined(KHRN_IMPL_STRUCT_INIT) 30 | #define FN(type, name, args) name, 31 | #else 32 | #define FN(type, name, args) extern type name args; 33 | #endif 34 | 35 | FN(void, khrn_misc_startup_impl, (void)) 36 | FN(int, khrn_misc_try_unload_impl, (void)) 37 | FN(void, khrn_misc_fifo_finish_impl, (void)) 38 | FN(void, khrn_misc_rpc_flush_impl, (void)) 39 | 40 | #undef FN 41 | -------------------------------------------------------------------------------- /interface/khronos/egl/egl_client.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/userland/a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976/interface/khronos/egl/egl_client.c -------------------------------------------------------------------------------- /interface/khronos/egl/egl_client_config_cr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/userland/a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976/interface/khronos/egl/egl_client_config_cr.c -------------------------------------------------------------------------------- /interface/khronos/egl/egl_client_cr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/userland/a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976/interface/khronos/egl/egl_client_cr.c -------------------------------------------------------------------------------- /interface/khronos/egl/egl_int_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef EGL_INT_CONFIG_H 29 | #define EGL_INT_CONFIG_H 30 | 31 | #define EGL_CONFIG_MAX_WIDTH 2048 32 | #define EGL_CONFIG_MAX_HEIGHT 2048 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /interface/khronos/ext/egl_brcm_driver_monitor_client.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "interface/khronos/common/khrn_client.h" 28 | 29 | void egl_driver_monitor_term(CLIENT_PROCESS_STATE_T *process); 30 | -------------------------------------------------------------------------------- /interface/khronos/ext/egl_brcm_perf_monitor_client.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "interface/khronos/common/khrn_client.h" 28 | 29 | void egl_perf_monitor_term(CLIENT_PROCESS_STATE_T *process); 30 | -------------------------------------------------------------------------------- /interface/khronos/ext/egl_khr_sync_client.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | 29 | #include "interface/khronos/common/khrn_client.h" 30 | 31 | #ifdef RPC_DIRECT 32 | #include "middleware/khronos/egl/egl_server.h" 33 | #endif 34 | 35 | void egl_sync_destroy_all(KHRN_POINTER_MAP_T *sync_map); 36 | -------------------------------------------------------------------------------- /interface/khronos/ext/egl_openmaxil_client.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #include "interface/khronos/include/EGL/egl.h" 29 | #include "interface/khronos/include/EGL/eglext.h" 30 | 31 | extern int eglIntOpenMAXILDoneMarker (void* component_handle, EGLImageKHR egl_image); 32 | -------------------------------------------------------------------------------- /interface/khronos/include/WF/wfcplatform.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | * * 3 | * Sample implementation of wfcplatform.h, version 1.0, draft 19 * 4 | * * 5 | * Copyright (c) 2007-2009 The Khronos Group * 6 | * * 7 | *********************************************************************/ 8 | 9 | #ifndef _WFCPLATFORM_H_ 10 | #define _WFCPLATFORM_H_ 11 | 12 | #include "../KHR/khrplatform.h" 13 | #include "../EGL/egl.h" 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #ifndef WFC_API_CALL 20 | #define WFC_API_CALL KHRONOS_APICALL 21 | #endif 22 | #ifndef WFC_APIENTRY 23 | #define WFC_APIENTRY KHRONOS_APIENTRY 24 | #endif 25 | #ifndef WFC_APIEXIT 26 | #define WFC_APIEXIT KHRONOS_APIATTRIBUTES 27 | #endif 28 | 29 | #ifndef WFC_DEFAULT_SCREEN_NUMBER 30 | #define WFC_DEFAULT_SCREEN_NUMBER (0) 31 | #endif 32 | 33 | typedef enum { 34 | WFC_FALSE = 0, 35 | WFC_TRUE = 1, 36 | WFC_BOOLEAN_FORCE_32BIT = 0x7FFFFFFF 37 | } WFCboolean; 38 | 39 | typedef khronos_int32_t WFCint; 40 | typedef khronos_float_t WFCfloat; 41 | typedef khronos_uint32_t WFCbitfield; 42 | typedef khronos_uint32_t WFCHandle; 43 | 44 | typedef EGLDisplay WFCEGLDisplay; 45 | typedef void *WFCEGLSync; /* An opaque handle to an EGLSyncKHR */ 46 | typedef WFCHandle WFCNativeStreamType; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | 52 | #endif /* _WFCPLATFORM_H_ */ 53 | -------------------------------------------------------------------------------- /interface/khronos/vg/vg_int.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef VG_INT_H 29 | #define VG_INT_H 30 | 31 | /* 32 | object types as used on the client 33 | 34 | the server has a separate notion of object types, defined in 35 | middleware/khronos/vg/vg_server.c, which includes partially constructed 36 | objects ("blueprints") and a distinction between images and child images 37 | */ 38 | 39 | typedef enum { 40 | VG_CLIENT_OBJECT_TYPE_FONT = 0, 41 | VG_CLIENT_OBJECT_TYPE_IMAGE = 1, 42 | VG_CLIENT_OBJECT_TYPE_MASK_LAYER = 2, 43 | VG_CLIENT_OBJECT_TYPE_PAINT = 3, 44 | VG_CLIENT_OBJECT_TYPE_PATH = 4 45 | } VG_CLIENT_OBJECT_TYPE_T; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /interface/khronos/wf/wfc_client.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/userland/a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976/interface/khronos/wf/wfc_client.c -------------------------------------------------------------------------------- /interface/mmal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # We support building both static and shared libraries 2 | if (NOT DEFINED LIBRARY_TYPE) 3 | set(LIBRARY_TYPE SHARED) 4 | endif (NOT DEFINED LIBRARY_TYPE) 5 | 6 | add_definitions(-Wall -Werror) 7 | 8 | add_library(mmal SHARED util/mmal_util.c) 9 | 10 | add_subdirectory(core) 11 | add_subdirectory(util) 12 | add_subdirectory(vc) 13 | add_subdirectory(components) 14 | add_subdirectory(openmaxil) 15 | add_subdirectory(client) 16 | 17 | target_link_libraries(mmal mmal_core mmal_util mmal_vc_client vcos mmal_components) 18 | 19 | install(TARGETS mmal DESTINATION lib) 20 | install(FILES 21 | mmal.h 22 | mmal_buffer.h 23 | mmal_clock.h 24 | mmal_common.h 25 | mmal_component.h 26 | mmal_encodings.h 27 | mmal_events.h 28 | mmal_format.h 29 | mmal_logging.h 30 | mmal_parameters.h 31 | mmal_parameters_audio.h 32 | mmal_parameters_camera.h 33 | mmal_parameters_clock.h 34 | mmal_parameters_common.h 35 | mmal_parameters_video.h 36 | mmal_pool.h mmal_port.h 37 | mmal_queue.h 38 | mmal_types.h 39 | DESTINATION include/interface/mmal 40 | ) 41 | 42 | # Test apps 43 | if(BUILD_MMAL_APPS) 44 | add_subdirectory(test) 45 | endif(BUILD_MMAL_APPS) 46 | -------------------------------------------------------------------------------- /interface/mmal/client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(brcmjpeg) 2 | -------------------------------------------------------------------------------- /interface/mmal/client/brcmjpeg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(brcmjpeg SHARED brcmjpeg.c) 2 | target_link_libraries(brcmjpeg mmal_core mmal_util mmal_vc_client) 3 | 4 | include_directories(../../../../host_applications/linux/libs/sm) 5 | add_executable(brcmjpeg_test brcmjpeg_test.c) 6 | target_link_libraries(brcmjpeg_test brcmjpeg vcsm vcos) 7 | -------------------------------------------------------------------------------- /interface/mmal/components/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(mmal_components ${LIBRARY_TYPE} 2 | container_reader.c 3 | null_sink.c 4 | passthrough.c 5 | scheduler.c 6 | splitter.c 7 | copy.c 8 | artificial_camera.c 9 | aggregator.c 10 | clock.c 11 | spdif.c 12 | ) 13 | 14 | set(extra_components_SRCS avcodec_video_decoder.c avcodec_audio_decoder.c 15 | sdl_video_render.c sdl_audio_render.c aaf_audio_render.cpp android_media_codec.cpp) 16 | 17 | #target_link_libraries(mmal_components avcodec avutil) 18 | #target_link_libraries(mmal_components SDL) 19 | #if (WIN32) 20 | #target_link_libraries(mmal_components avcore avutil z) # For avcodec 21 | #target_link_libraries(mmal_components gdi32 winmm) # For SDL 22 | #endif (WIN32) 23 | 24 | add_custom_target(mmal_components_extra ALL 25 | COMMAND touch ${extra_components_SRCS} 26 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/interface/mmal/components) 27 | 28 | set(container_libs ${container_libs} containers) 29 | 30 | target_link_libraries(mmal_components ${container_libs} mmal_util) 31 | target_link_libraries(mmal_components mmal_core) 32 | 33 | install(TARGETS mmal_components DESTINATION lib) 34 | 35 | -------------------------------------------------------------------------------- /interface/mmal/core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library (mmal_core ${LIBRARY_TYPE} 2 | mmal_format.c 3 | mmal_port.c 4 | mmal_port_clock.c 5 | mmal_component.c 6 | mmal_buffer.c 7 | mmal_queue.c 8 | mmal_pool.c 9 | mmal_events.c 10 | mmal_logging.c 11 | mmal_clock.c 12 | ) 13 | 14 | target_link_libraries (mmal_core vcos mmal_vc_client) 15 | 16 | install(TARGETS mmal_core DESTINATION lib) 17 | install(FILES 18 | mmal_buffer_private.h 19 | mmal_clock_private.h 20 | mmal_component_private.h 21 | mmal_core_private.h 22 | mmal_port_private.h 23 | mmal_events_private.h 24 | DESTINATION include/interface/mmal/core 25 | ) 26 | -------------------------------------------------------------------------------- /interface/mmal/core/mmal_core_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef MMAL_CORE_PRIVATE_H 29 | #define MMAL_CORE_PRIVATE_H 30 | 31 | /** Initialise the logging system. 32 | */ 33 | void mmal_logging_init(void); 34 | 35 | /** Deinitialise the logging system. 36 | */ 37 | void mmal_logging_deinit(void); 38 | 39 | #endif /* MMAL_CORE_PRIVATE_H */ 40 | 41 | -------------------------------------------------------------------------------- /interface/mmal/core/mmal_logging.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "mmal_logging.h" 28 | #include "core/mmal_core_private.h" 29 | 30 | VCOS_LOG_CAT_T mmal_log_category; 31 | static VCOS_LOG_LEVEL_T mmal_log_level = VCOS_LOG_ERROR; 32 | 33 | void mmal_logging_init(void) 34 | { 35 | vcos_log_set_level(VCOS_LOG_CATEGORY, mmal_log_level); 36 | vcos_log_register("mmal", VCOS_LOG_CATEGORY); 37 | } 38 | 39 | void mmal_logging_deinit(void) 40 | { 41 | mmal_log_level = mmal_log_category.level; 42 | vcos_log_unregister(VCOS_LOG_CATEGORY); 43 | } 44 | -------------------------------------------------------------------------------- /interface/mmal/openmaxil/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library (mmal_omx ${LIBRARY_TYPE} 2 | mmalomx_core.c 3 | mmalomx_logging.c 4 | mmalomx_commands.c 5 | mmalomx_buffer.c 6 | mmalomx_marks.c 7 | mmalomx_roles.c 8 | mmalomx_parameters.c 9 | mmalomx_registry.c 10 | ) 11 | 12 | add_library (mmal_omxutil ${LIBRARY_TYPE} 13 | mmalomx_util_params.c 14 | mmalomx_util_params_audio.c 15 | mmalomx_util_params_video.c 16 | mmalomx_util_params_camera.c 17 | mmalomx_util_params_misc.c 18 | ) 19 | 20 | target_link_libraries (mmal_omx mmal_omxutil mmal_core mmal_util vcos) 21 | -------------------------------------------------------------------------------- /interface/mmal/openmaxil/README.md: -------------------------------------------------------------------------------- 1 | Please note that this wrapper layer has never been used in anger, 2 | and this is NOT used by the firmware. 3 | 4 | It was written with the intent of removing native OpenMaxIL support 5 | from a platform, but that never happened and is not relevant to the 6 | Raspberry Pi. 7 | 8 | Please consider that these files are deprecated. They are maintained 9 | here in case others are using them, but it is strongly recommended 10 | that they are not used for new projects. 11 | -------------------------------------------------------------------------------- /interface/mmal/openmaxil/mmalomx_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | /** \file 29 | * OpenMAX IL adaptation layer for MMAL - Buffer related functions 30 | */ 31 | 32 | OMX_ERRORTYPE mmalomx_buffer_send( 33 | MMALOMX_COMPONENT_T *component, 34 | OMX_BUFFERHEADERTYPE *omx_buffer, 35 | OMX_DIRTYPE direction); 36 | 37 | OMX_ERRORTYPE mmalomx_buffer_return( 38 | MMALOMX_PORT_T *port, 39 | MMAL_BUFFER_HEADER_T *mmal_buffer); 40 | -------------------------------------------------------------------------------- /interface/mmal/openmaxil/mmalomx_marks.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | /** \file 29 | * OpenMAX IL adaptation layer for MMAL - Marking related functions 30 | */ 31 | 32 | void mmalomx_mark_process_incoming(MMALOMX_COMPONENT_T *component, 33 | MMALOMX_PORT_T *port, OMX_BUFFERHEADERTYPE *omx_buffer); 34 | void mmalomx_mark_process_outgoing(MMALOMX_COMPONENT_T *component, 35 | MMALOMX_PORT_T *port, OMX_BUFFERHEADERTYPE *omx_buffer); 36 | 37 | -------------------------------------------------------------------------------- /interface/mmal/openmaxil/mmalomx_parameters.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | /** \file 29 | * OpenMAX IL adaptation layer for MMAL - Parameters related functions 30 | */ 31 | 32 | OMX_ERRORTYPE mmalomx_parameter_get(MMALOMX_COMPONENT_T *component, 33 | OMX_INDEXTYPE nParamIndex, OMX_PTR pParam); 34 | OMX_ERRORTYPE mmalomx_parameter_set(MMALOMX_COMPONENT_T *component, 35 | OMX_INDEXTYPE nParamIndex, OMX_PTR pParam); 36 | OMX_ERRORTYPE mmalomx_parameter_extension_index_get(OMX_STRING cParameterName, 37 | OMX_INDEXTYPE *pIndex); 38 | -------------------------------------------------------------------------------- /interface/mmal/openmaxil/mmalomx_registry.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | /** \file 29 | * OpenMAX IL adaptation layer for MMAL - Registry of components 30 | */ 31 | 32 | #define MMALOMX_COMPONENT_PREFIX "OMX.brcm." 33 | 34 | int mmalomx_registry_find_component(const char *name); 35 | 36 | const char *mmalomx_registry_component_mmal(int id); 37 | 38 | MMALOMX_ROLE_T mmalomx_registry_component_roles(int id, unsigned int index); 39 | MMAL_BOOL_T mmalomx_registry_component_supports_role(int id, MMALOMX_ROLE_T role); 40 | 41 | const char *mmalomx_registry_component_name(int index, const char **prefix); 42 | -------------------------------------------------------------------------------- /interface/mmal/openmaxil/mmalomx_util_params_audio.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #include "mmalomx.h" 29 | #include "mmalomx_util_params_common.h" 30 | #include "mmalomx_logging.h" 31 | 32 | const MMALOMX_PARAM_TRANSLATION_T mmalomx_param_xlator_audio[] = { 33 | MMALOMX_PARAM_TERMINATE() 34 | }; 35 | -------------------------------------------------------------------------------- /interface/mmal/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET( MMAL_TOP ../../.. ) 2 | 3 | include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/bcm_host/include) 4 | 5 | SET( MMALPLAY_TOP ${MMAL_TOP}/host_applications/vmcs/test_apps/mmalplay ) 6 | add_executable(mmalplay ${MMALPLAY_TOP}/playback.c ${MMALPLAY_TOP}/mmalplay.c) 7 | target_link_libraries(mmalplay mmal_core mmal_util bcm_host mmal_vc_client) 8 | target_link_libraries(mmalplay -Wl,--whole-archive mmal_components containers -Wl,--no-whole-archive mmal_core) 9 | target_link_libraries(mmalplay vcos) 10 | 11 | SET( MMALCAM_TOP ${MMAL_TOP}/host_applications/vmcs/test_apps/mmalcam ) 12 | add_executable(mmalcam ${MMALCAM_TOP}/viewfinder.c ${MMALCAM_TOP}/mmalcam.c) 13 | target_link_libraries(mmalcam mmal_core mmal_util bcm_host mmal_vc_client) 14 | target_link_libraries(mmalcam -Wl,--whole-archive mmal_components -Wl,--no-whole-archive mmal_core) 15 | target_link_libraries(mmalcam vcos) 16 | 17 | SET( MMALEXAMPLES_TOP ${MMAL_TOP}/interface/mmal/test/examples ) 18 | add_executable(mmal_example_connections ${MMALEXAMPLES_TOP}/example_connections.c) 19 | target_link_libraries(mmal_example_connections mmal_core mmal_util bcm_host mmal_vc_client) 20 | target_link_libraries(mmal_example_connections -Wl,--whole-archive mmal_components -Wl,--no-whole-archive mmal_core) 21 | add_executable(mmal_example_graph ${MMALEXAMPLES_TOP}/example_graph.c) 22 | target_link_libraries(mmal_example_graph mmal_core mmal_util bcm_host mmal_vc_client) 23 | target_link_libraries(mmal_example_graph -Wl,--whole-archive mmal_components -Wl,--no-whole-archive mmal_core) 24 | add_executable(mmal_example_basic_1 ${MMALEXAMPLES_TOP}/example_basic_1.c) 25 | target_link_libraries(mmal_example_basic_1 mmal_core mmal_util bcm_host mmal_vc_client) 26 | target_link_libraries(mmal_example_basic_1 -Wl,--whole-archive mmal_components -Wl,--no-whole-archive mmal_core) 27 | add_executable(mmal_example_basic_2 ${MMALEXAMPLES_TOP}/example_basic_2.c) 28 | target_link_libraries(mmal_example_basic_2 mmal_core mmal_util bcm_host mmal_vc_client) 29 | target_link_libraries(mmal_example_basic_2 -Wl,--whole-archive mmal_components -Wl,--no-whole-archive mmal_core) 30 | -------------------------------------------------------------------------------- /interface/mmal/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library (mmal_util ${LIBRARY_TYPE} 2 | mmal_il.c 3 | mmal_util.c 4 | mmal_connection.c 5 | mmal_graph.c 6 | mmal_list.c 7 | mmal_param_convert.c 8 | mmal_util_params.c 9 | mmal_component_wrapper.c 10 | mmal_util_rational.c 11 | ) 12 | 13 | target_link_libraries (mmal_util vcos) 14 | 15 | install(TARGETS mmal_util DESTINATION lib) 16 | install(FILES 17 | mmal_component_wrapper.h 18 | mmal_connection.h 19 | mmal_default_components.h 20 | mmal_graph.h 21 | mmal_il.h 22 | mmal_list.h 23 | mmal_param_convert.h 24 | mmal_util.h 25 | mmal_util_params.h 26 | mmal_util_rational.h 27 | DESTINATION include/interface/mmal/util 28 | ) 29 | -------------------------------------------------------------------------------- /interface/mmal/vc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions(-DENABLE_MMAL_VCSM) 2 | 3 | add_library(mmal_vc_client ${LIBRARY_TYPE} mmal_vc_client.c mmal_vc_shm.c mmal_vc_api.c mmal_vc_opaque_alloc.c mmal_vc_msgnames.c mmal_vc_api_drm.c) 4 | #target_link_libraries(mmal_vc_client vchiq_arm vcos) 5 | 6 | target_link_libraries(mmal_vc_client vchiq_arm vcos vcsm) 7 | 8 | if(BUILD_MMAL_APPS) 9 | add_executable(mmal_vc_diag mmal_vc_diag.c) 10 | target_link_libraries(mmal_vc_diag mmal mmal_vc_client debug_sym vcos) 11 | install(TARGETS mmal_vc_diag RUNTIME DESTINATION bin) 12 | endif(BUILD_MMAL_APPS) 13 | 14 | include_directories ( ../../../host_applications/linux/libs/sm ) 15 | 16 | install(TARGETS mmal_vc_client DESTINATION lib) 17 | install(FILES 18 | mmal_vc_api.h 19 | mmal_vc_api_drm.h 20 | mmal_vc_client_priv.h 21 | mmal_vc_msgnames.h 22 | mmal_vc_msgs.h 23 | mmal_vc_opaque_alloc.h 24 | mmal_vc_shm.h 25 | DESTINATION include/interface/mmal/vc 26 | ) 27 | -------------------------------------------------------------------------------- /interface/mmal/vc/mmal_vc_msgnames.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef MMAL_VC_MSGNAMES_H 29 | #define MMAL_VC_MSGNAMES_H 30 | 31 | #include "interface/vcos/vcos.h" 32 | 33 | /** Convert a message id to a name. 34 | */ 35 | const char *mmal_msgname(uint32_t id); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /interface/vchi/common/endian.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _VCHI_ENDIAN_H_ 29 | #define _VCHI_ENDIAN_H_ 30 | 31 | #include "interface/vcos/vcos.h" 32 | 33 | int16_t vchi_readbuf_int16 ( const void *ptr ); 34 | uint16_t vchi_readbuf_uint16( const void *ptr ); 35 | uint32_t vchi_readbuf_uint32( const void *ptr ); 36 | vcos_fourcc_t vchi_readbuf_fourcc( const void *ptr ); 37 | 38 | void vchi_writebuf_uint16( void *ptr, uint16_t value ); 39 | void vchi_writebuf_uint32( void *ptr, uint32_t value ); 40 | void vchi_writebuf_fourcc( void *ptr, vcos_fourcc_t value ); 41 | 42 | #endif /* _VCHI_ENDIAN_H_ */ 43 | 44 | /********************************** End of file ******************************************/ 45 | -------------------------------------------------------------------------------- /interface/vchi/vchi_mh.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef VCHI_MH_H_ 29 | #define VCHI_MH_H_ 30 | 31 | #include 32 | 33 | typedef int32_t VCHI_MEM_HANDLE_T; 34 | #define VCHI_MEM_HANDLE_INVALID 0 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /interface/vchiq_arm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_library(vchiq_arm SHARED 3 | vchiq_lib.c vchiq_util.c) 4 | 5 | # pull in VCHI cond variable emulation 6 | target_link_libraries(vchiq_arm vcos) 7 | 8 | install(TARGETS vchiq_arm DESTINATION lib) 9 | #install(FILES etc/10-vchiq.rules DESTINATION /etc/udev/rules.d) 10 | 11 | include_directories(../..) 12 | 13 | add_executable(vchiq_test 14 | vchiq_test.c) 15 | 16 | target_link_libraries(vchiq_test 17 | vchiq_arm 18 | vcos) 19 | 20 | install(TARGETS vchiq_test RUNTIME DESTINATION bin) 21 | -------------------------------------------------------------------------------- /interface/vchiq_arm/vchiq.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef VCHIQ_VCHIQ_H 29 | #define VCHIQ_VCHIQ_H 30 | 31 | #include "vchiq_if.h" 32 | #include "vchiq_util.h" 33 | #include "interface/vcos/vcos.h" 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /interface/vchiq_arm/vchiq_test_if.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef VCHIQ_TEST_IF_H 29 | #define VCHIQ_TEST_IF_H 30 | 31 | #include "vchiq.h" 32 | 33 | extern void vchiq_test_start_services(VCHIQ_INSTANCE_T instance); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /interface/vcos/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 2.8) 2 | 3 | get_filename_component (VIDEOCORE_ROOT "../.." ABSOLUTE) 4 | include (${VIDEOCORE_ROOT}/makefiles/cmake/global_settings.cmake) 5 | 6 | set (HEADERS 7 | vcos_assert.h 8 | vcos_atomic_flags.h 9 | vcos_blockpool.h 10 | vcos_cmd.h 11 | vcos_dlfcn.h 12 | vcos_event_flags.h 13 | vcos_event.h 14 | vcos.h 15 | vcos_init.h 16 | vcos_inttypes.h 17 | vcos_isr.h 18 | vcos_legacy_isr.h 19 | vcos_logging.h 20 | vcos_logging_control.h 21 | vcos_lowlevel_thread.h 22 | vcos_mem.h 23 | vcos_mempool.h 24 | vcos_msgqueue.h 25 | vcos_mutex.h 26 | vcos_named_semaphore.h 27 | vcos_once.h 28 | vcos_queue.h 29 | vcos_quickslow_mutex.h 30 | vcos_reentrant_mutex.h 31 | vcos_semaphore.h 32 | vcos_stdint.h 33 | vcos_string.h 34 | vcos_thread_attr.h 35 | vcos_thread.h 36 | vcos_timer.h 37 | vcos_tls.h 38 | vcos_types.h 39 | ) 40 | 41 | foreach (header ${HEADERS}) 42 | configure_file ("${header}" "${VCOS_HEADERS_BUILD_DIR}/${header}" COPYONLY) 43 | endforeach () 44 | 45 | if (CMAKE_COMPILER_IS_GNUCC) 46 | add_definitions (-ggdb -Werror -Wall) 47 | endif () 48 | 49 | if (CMAKE_COMPILER_2005) 50 | add_definitions (/WX /W4 /wd4127 /D_CRT_SECURE_NO_DEPRECATE) 51 | endif () 52 | 53 | include_directories (${VIDEOCORE_ROOT} ${VCOS_HEADERS_BUILD_DIR}) 54 | 55 | add_subdirectory (${RTOS}) 56 | 57 | set(VCOS_EXCLUDE_TESTS TRUE) 58 | if (NOT DEFINED VCOS_EXCLUDE_TESTS) 59 | add_testapp_subdirectory (test) 60 | endif (NOT DEFINED VCOS_EXCLUDE_TESTS) 61 | 62 | if (WIN32) 63 | build_command (RELEASE_BUILD_CMD CONFIGURATION Release) 64 | build_command (DEBUG_BUILD_CMD CONFIGURATION Debug) 65 | configure_file (build_all.bat.in build_all.bat @ONLY) 66 | endif () 67 | 68 | #install (FILES ${HEADERS} DESTINATION include/interface/vcos) 69 | -------------------------------------------------------------------------------- /interface/vcos/generic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set (HEADERS 3 | vcos_common.h 4 | vcos_generic_blockpool.h 5 | vcos_generic_event_flags.h 6 | vcos_generic_named_sem.h 7 | vcos_generic_quickslow_mutex.h 8 | vcos_generic_reentrant_mtx.h 9 | vcos_generic_tls.h 10 | vcos_joinable_thread_from_plain.h 11 | vcos_latch_from_sem.h 12 | vcos_mem_from_malloc.h 13 | vcos_mutexes_are_reentrant.h 14 | vcos_thread_reaper.h 15 | ) 16 | 17 | foreach (header ${HEADERS}) 18 | configure_file ("${header}" "${VCOS_HEADERS_BUILD_DIR}/generic/${header}" COPYONLY) 19 | endforeach () 20 | 21 | install (FILES ${HEADERS} DESTINATION include/interface/vcos/generic) 22 | -------------------------------------------------------------------------------- /interface/vcos/generic/vcos_deprecated.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | /* 29 | The symbol vcos_deprecated_code may be defined at most once, by the inclusion of "vcos_deprecated.h" in vcos_init.c. 30 | Any other inclusions of this header will cause the linker to warn about multiple definitions of vcos_deprecated_code, for example: 31 | [ldvc] (Warning) "vcos_deprecated_code" is multiply defined in libs/vcos_threadx/vcos_init.c.o and libs/xxxxx/xxxxx.c.o 32 | If you see a build message like this then the configuration you are building is using deprecated code. 33 | Contact the person named in the accompanying comment for advice - do not remove the inclusion. 34 | */ 35 | 36 | int vcos_deprecated_code; 37 | -------------------------------------------------------------------------------- /interface/vcos/glibc/vcos_backtrace.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #include 29 | #ifdef HAVE_CMAKE_CONFIG 30 | #include "cmake_config.h" 31 | #endif 32 | #ifdef HAVE_EXECINFO_H 33 | #include 34 | #endif 35 | #include 36 | #include 37 | #include 38 | 39 | void vcos_backtrace_self(void) 40 | { 41 | #ifdef HAVE_EXECINFO_H 42 | void *stack[64]; 43 | int depth = backtrace(stack, sizeof(stack)/sizeof(stack[0])); 44 | char **names = backtrace_symbols(stack, depth); 45 | int i; 46 | if (names) 47 | { 48 | for (i=0; i 44 | #else 45 | #include 46 | #endif 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /interface/vcos/vcos_inttypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef VCOS_INTTYPES_H 29 | #define VCOS_INTTYPES_H 30 | 31 | /** \file 32 | * Attempt to provide the support for fixed width integer types as per 33 | * inttypes.h. This simply includes inttypes.h, which should find the 34 | * system/toolchain version if present, otherwise falling back to the version 35 | * in interface/vcos/. The vcos versions initially only provide the 36 | * most common printf() macros. 37 | */ 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | #include 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif /* VCOS_INTTYPES_H */ 50 | -------------------------------------------------------------------------------- /interface/vcos/vcos_logging_control.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | 29 | -------------------------------------------------------------------------------- /interface/vcos/vcos_stdbool.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef VCOS_STDBOOL_H 28 | #define VCOS_STDBOOL_H 29 | 30 | #ifndef __cplusplus 31 | 32 | #if defined(__STDC__) && (__STDC_VERSION__ >= 199901L) 33 | #include 34 | #else 35 | /* sizeof(bool) == 1. hopefully this matches up with c++ (so structures and 36 | * such containing bool are binary compatible), but the c++ standard doesn't 37 | * require sizeof(bool) == 1, so there's no guarantee */ 38 | typedef unsigned char bool; 39 | enum { 40 | false, 41 | true 42 | }; 43 | #endif 44 | 45 | #endif /* __cplusplus */ 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /interface/vmcs_host/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | # interface/vmcs_host 3 | 4 | # not working in release build 5 | # add_definitions(-Werror) 6 | 7 | # vc_vchi_gencmd.c has a type-punning problem in vc_gencmd_read_response 8 | add_definitions(-fno-strict-aliasing) 9 | 10 | add_library(vchostif 11 | ${VMCS_TARGET}/vcmisc.c 12 | vc_vchi_gencmd.c vc_vchi_gpuserv.c 13 | vc_vchi_tvservice.c vc_vchi_cecservice.c 14 | vc_vchi_dispmanx.c vc_service_common.c) 15 | # ${VMCS_TARGET}/vmcs_main.c 16 | # vc_vchi_haud.c 17 | #add_library(bufman vc_vchi_bufman.c ) 18 | set(INSTALL_TARGETS vchostif) 19 | 20 | if(NOT ARM64) 21 | # OpenMAX/IL component service 22 | add_library(vcilcs 23 | vcilcs.c vcilcs_in.c vcilcs_out.c vcilcs_common.c) 24 | 25 | # ILCS pulls in EGL for the ILCS/EGL surface API support 26 | target_link_libraries(vcilcs brcmEGL brcmGLESv2 khrn_client vchiq_arm vcos) 27 | set(INSTALL_TARGETS ${INSTALL_TARGETS} vcilcs) 28 | endif() 29 | 30 | # vchostif needs ilcore as well (vmcs_main pulls it in) 31 | target_link_libraries(vchostif vchiq_arm vcos) 32 | 33 | #target_link_libraries(bufman WFC) 34 | 35 | install(TARGETS ${INSTALL_TARGETS} DESTINATION lib) 36 | 37 | -------------------------------------------------------------------------------- /interface/vmcs_host/khronos/IL/OMX_Other.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypi/userland/a54a0dbb2b8dcf9bafdddfc9a9374fb51d97e976/interface/vmcs_host/khronos/IL/OMX_Other.h -------------------------------------------------------------------------------- /interface/vmcs_host/linux/vcmisc.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #include 29 | 30 | void vc_sleep(int ms) 31 | { 32 | usleep(1000*ms); 33 | } 34 | -------------------------------------------------------------------------------- /interface/vmcs_host/vc_gencmd_defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef VC_GENCMD_DEFS_H 29 | #define VC_GENCMD_DEFS_H 30 | 31 | //Format of reply message is error code followed by a string 32 | #define GENCMDSERVICE_MSGFIFO_SIZE (4096 - 4) 33 | 34 | #define VC_GENCMD_VER 1 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /interface/vmcs_host/vchost_platform_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016, Raspberry Pi (Trading) Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #if defined(__unix__) && !defined(__ANDROID__) 29 | #include "linux/vchost_config.h" 30 | #else 31 | #include "vchost_config.h" 32 | #endif 33 | -------------------------------------------------------------------------------- /makefiles/cmake/cmake_config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef CMAKE_CONFIG_H 2 | #define CMAKE_CONFIG_H 3 | 4 | /* 5 | * Autogenerated by cmake from makefiles/cmake/cmake_config.h.in 6 | */ 7 | 8 | /** Do we have support for GLIBC mtrace() ? */ 9 | #cmakedefine HAVE_MTRACE 10 | 11 | /** Do we have the execinfo.h include file ? */ 12 | #cmakedefine HAVE_EXECINFO_H 13 | 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /makefiles/cmake/srcs/test-mtrace.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #include 29 | 30 | int main(int argc, const char **argv) 31 | { 32 | mtrace(); 33 | muntrace(); 34 | } 35 | 36 | -------------------------------------------------------------------------------- /makefiles/cmake/toolchains/aarch64-linux-gnu.cmake: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # CMake defines to cross-compile to ARM/Linux on BCM2708 using glibc. 4 | # 5 | 6 | SET(CMAKE_SYSTEM_NAME Linux) 7 | SET(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) 8 | SET(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++) 9 | SET(CMAKE_ASM_COMPILER aarch64-linux-gnu-gcc) 10 | SET(CMAKE_SYSTEM_PROCESSOR arm) 11 | 12 | #ADD_DEFINITIONS("-march=armv6") 13 | #add_definitions("-mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -marm") 14 | 15 | # rdynamic means the backtrace should work 16 | IF (CMAKE_BUILD_TYPE MATCHES "Debug") 17 | add_definitions(-rdynamic) 18 | ENDIF() 19 | 20 | # avoids annoying and pointless warnings from gcc 21 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE") 22 | SET(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -c") 23 | -------------------------------------------------------------------------------- /makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # CMake defines to cross-compile to ARM/Linux on BCM2708 using glibc. 4 | # 5 | 6 | SET(CMAKE_SYSTEM_NAME Linux) 7 | SET(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc) 8 | SET(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++) 9 | SET(CMAKE_ASM_COMPILER arm-linux-gnueabihf-gcc) 10 | SET(CMAKE_SYSTEM_PROCESSOR arm) 11 | 12 | #ADD_DEFINITIONS("-march=armv6") 13 | add_definitions("-mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -marm") 14 | 15 | # rdynamic means the backtrace should work 16 | IF (CMAKE_BUILD_TYPE MATCHES "Debug") 17 | add_definitions(-rdynamic) 18 | ENDIF() 19 | 20 | # avoids annoying and pointless warnings from gcc 21 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE") 22 | SET(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -c") 23 | -------------------------------------------------------------------------------- /makefiles/cmake/toolchains/bcm2708-glibc-linux.cmake: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # CMake defines to cross-compile to ARM/Linux on BCM2708 using glibc. 4 | # 5 | 6 | SET(CMAKE_SYSTEM_NAME Linux) 7 | SET(CMAKE_C_COMPILER bcm2708-gcc) 8 | SET(CMAKE_CXX_COMPILER bcm2708-g++) 9 | SET(CMAKE_ASM_COMPILER bcm2708-gcc) 10 | SET(CMAKE_SYSTEM_PROCESSOR arm) 11 | 12 | ADD_DEFINITIONS("-march=armv6") 13 | 14 | # rdynamic means the backtrace should work 15 | IF (CMAKE_BUILD_TYPE MATCHES "Debug") 16 | add_definitions(-rdynamic) 17 | ENDIF() 18 | 19 | # avoids annoying and pointless warnings from gcc 20 | SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE") 21 | SET(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -c") 22 | -------------------------------------------------------------------------------- /middleware/khronos/common/khrn_map.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef KHRN_MAP_H 29 | #define KHRN_MAP_H 30 | 31 | #define khrn_generic_map(X) khrn_map_##X 32 | #define KHRN_GENERIC_MAP(X) KHRN_MAP_##X 33 | #define KHRN_GENERIC_MAP_KEY_T uint32_t 34 | #define KHRN_GENERIC_MAP_VALUE_T MEM_HANDLE_T 35 | #define KHRN_GENERIC_MAP_RELOCATABLE 36 | 37 | #ifdef KHRN_MAP_C 38 | #include "interface/khronos/common/khrn_int_generic_map.c" 39 | #else 40 | #include "interface/khronos/common/khrn_int_generic_map.h" 41 | #endif 42 | 43 | #undef KHRN_GENERIC_MAP_RELOCATABLE 44 | #undef KHRN_GENERIC_MAP_VALUE_T 45 | #undef KHRN_GENERIC_MAP_KEY_T 46 | #undef KHRN_GENERIC_MAP 47 | #undef khrn_generic_map 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /middleware/khronos/common/khrn_mem.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #include "interface/khronos/common/khrn_int_util.h" 29 | 30 | #include "vcfw/rtos/common/rtos_common_mem.h" 31 | -------------------------------------------------------------------------------- /middleware/khronos/common/khrn_server_pointermap.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef KHRN_SERVER_POINTERMAP_H 29 | #define KHRN_SERVER_POINTERMAP_H 30 | 31 | #define khrn_generic_map(X) khrn_server_pointer_map_##X 32 | #define KHRN_GENERIC_MAP(X) KHRN_SERVER_POINTER_MAP_##X 33 | #define KHRN_GENERIC_MAP_KEY_T uint32_t 34 | #define KHRN_GENERIC_MAP_VALUE_T void * 35 | #define KHRN_GENERIC_MAP_RELOCATABLE 36 | 37 | #ifdef SERVER_POINTER_MAP_C 38 | #include "interface/khronos/common/khrn_int_generic_map.c" 39 | #else 40 | #include "interface/khronos/common/khrn_int_generic_map.h" 41 | #endif 42 | 43 | #undef KHRN_GENERIC_MAP_VALUE_T 44 | #undef KHRN_GENERIC_MAP_KEY_T 45 | #undef KHRN_GENERIC_MAP 46 | #undef khrn_generic_map 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /middleware/khronos/vg/2708/vg_config_filler_4.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef VG_CONFIG_FILLER_4_H 29 | #define VG_CONFIG_FILLER_4_H 30 | 31 | #define VG_CONFIG_RENDERER "VideoCore IV HW" 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /middleware/openmaxil/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ============================================================================= 2 | # Copyright (c) 2012 Broadcom Europe Limited. 3 | # All rights reserved. 4 | # 5 | # FILE DESCRIPTION 6 | # CMake build file for OpenMAX IL. 7 | # ============================================================================= 8 | 9 | cmake_minimum_required (VERSION 2.8) 10 | 11 | if (VIDEOCORE_SIMULATION) 12 | 13 | # VC-simulation build. 14 | 15 | add_library (openmaxil SHARED 16 | # core/ilcore.c 17 | core/ril_top.c 18 | core/ilmalloc.c 19 | core/ilvlls.c 20 | core/ilfifo.c 21 | core/ilutil.c) 22 | 23 | add_subdirectory (components) 24 | 25 | else () 26 | 27 | # Host build. 28 | # 29 | # Provides a host OpenMAX IL core as well as access to OpenMAX IL core and 30 | # components running on Videocore with the help of the ILCS library. 31 | # 32 | # Ideally, we would want the native 64-bit OMX_TICKS datatype but on 33 | # Videocore, structures are word-aligned, even if they have 64-bit members. 34 | # 35 | # remove_definitions(-DOMX_SKIP64BIT) 36 | 37 | add_definitions (-DVLL_PATH_PREFIX="${VMCS_PLUGIN_DIR}/") 38 | 39 | add_library (openmaxil SHARED 40 | ../../host_applications/framework/common/ilcore.c 41 | # core/ilcore.c 42 | # core/ril_top.c 43 | # core/ilmalloc.c 44 | # core/ilvlls.c 45 | # core/ilfifo.c 46 | ) 47 | 48 | target_link_libraries (openmaxil vcilcs vcos dl) 49 | 50 | endif () 51 | 52 | install (TARGETS openmaxil DESTINATION lib) 53 | -------------------------------------------------------------------------------- /opensrc/helpers/libfdt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(.) 2 | 3 | add_library(fdt 4 | fdt.c 5 | fdt_empty_tree.c 6 | fdt_ro.c 7 | fdt_rw.c 8 | fdt_sw.c 9 | fdt_strerror.c 10 | fdt_wip.c) 11 | 12 | INSTALL(FILES) 13 | 14 | -------------------------------------------------------------------------------- /opensrc/helpers/libfdt/fdt.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */ 2 | #ifndef FDT_H 3 | #define FDT_H 4 | /* 5 | * libfdt - Flat Device Tree manipulation 6 | * Copyright (C) 2006 David Gibson, IBM Corporation. 7 | * Copyright 2012 Kim Phillips, Freescale Semiconductor. 8 | */ 9 | 10 | #ifndef __ASSEMBLY__ 11 | 12 | struct fdt_header { 13 | fdt32_t magic; /* magic word FDT_MAGIC */ 14 | fdt32_t totalsize; /* total size of DT block */ 15 | fdt32_t off_dt_struct; /* offset to structure */ 16 | fdt32_t off_dt_strings; /* offset to strings */ 17 | fdt32_t off_mem_rsvmap; /* offset to memory reserve map */ 18 | fdt32_t version; /* format version */ 19 | fdt32_t last_comp_version; /* last compatible version */ 20 | 21 | /* version 2 fields below */ 22 | fdt32_t boot_cpuid_phys; /* Which physical CPU id we're 23 | booting on */ 24 | /* version 3 fields below */ 25 | fdt32_t size_dt_strings; /* size of the strings block */ 26 | 27 | /* version 17 fields below */ 28 | fdt32_t size_dt_struct; /* size of the structure block */ 29 | }; 30 | 31 | struct fdt_reserve_entry { 32 | fdt64_t address; 33 | fdt64_t size; 34 | }; 35 | 36 | struct fdt_node_header { 37 | fdt32_t tag; 38 | char name[0]; 39 | }; 40 | 41 | struct fdt_property { 42 | fdt32_t tag; 43 | fdt32_t len; 44 | fdt32_t nameoff; 45 | char data[0]; 46 | }; 47 | 48 | #endif /* !__ASSEMBLY */ 49 | 50 | #define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */ 51 | #define FDT_TAGSIZE sizeof(fdt32_t) 52 | 53 | #define FDT_BEGIN_NODE 0x1 /* Start node: full name */ 54 | #define FDT_END_NODE 0x2 /* End node */ 55 | #define FDT_PROP 0x3 /* Property: name off, 56 | size, content */ 57 | #define FDT_NOP 0x4 /* nop */ 58 | #define FDT_END 0x9 59 | 60 | #define FDT_V1_SIZE (7*sizeof(fdt32_t)) 61 | #define FDT_V2_SIZE (FDT_V1_SIZE + sizeof(fdt32_t)) 62 | #define FDT_V3_SIZE (FDT_V2_SIZE + sizeof(fdt32_t)) 63 | #define FDT_V16_SIZE FDT_V3_SIZE 64 | #define FDT_V17_SIZE (FDT_V16_SIZE + sizeof(fdt32_t)) 65 | 66 | #endif /* FDT_H */ 67 | -------------------------------------------------------------------------------- /opensrc/helpers/libfdt/fdt_empty_tree.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) 2 | /* 3 | * libfdt - Flat Device Tree manipulation 4 | * Copyright (C) 2012 David Gibson, IBM Corporation. 5 | */ 6 | #include "libfdt_env.h" 7 | 8 | #include 9 | #include 10 | 11 | #include "libfdt_internal.h" 12 | 13 | int fdt_create_empty_tree(void *buf, int bufsize) 14 | { 15 | int err; 16 | 17 | err = fdt_create(buf, bufsize); 18 | if (err) 19 | return err; 20 | 21 | err = fdt_finish_reservemap(buf); 22 | if (err) 23 | return err; 24 | 25 | err = fdt_begin_node(buf, ""); 26 | if (err) 27 | return err; 28 | 29 | err = fdt_end_node(buf); 30 | if (err) 31 | return err; 32 | 33 | err = fdt_finish(buf); 34 | if (err) 35 | return err; 36 | 37 | return fdt_open_into(buf, buf, bufsize); 38 | } 39 | -------------------------------------------------------------------------------- /opensrc/helpers/libfdt/fdt_strerror.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) 2 | /* 3 | * libfdt - Flat Device Tree manipulation 4 | * Copyright (C) 2006 David Gibson, IBM Corporation. 5 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 6 | */ 7 | #include "libfdt_env.h" 8 | 9 | #include 10 | #include 11 | 12 | #include "libfdt_internal.h" 13 | 14 | struct fdt_errtabent { 15 | const char *str; 16 | }; 17 | 18 | #define FDT_ERRTABENT(val) \ 19 | [(val)] = { .str = #val, } 20 | 21 | static struct fdt_errtabent fdt_errtable[] = { 22 | FDT_ERRTABENT(FDT_ERR_NOTFOUND), 23 | FDT_ERRTABENT(FDT_ERR_EXISTS), 24 | FDT_ERRTABENT(FDT_ERR_NOSPACE), 25 | 26 | FDT_ERRTABENT(FDT_ERR_BADOFFSET), 27 | FDT_ERRTABENT(FDT_ERR_BADPATH), 28 | FDT_ERRTABENT(FDT_ERR_BADPHANDLE), 29 | FDT_ERRTABENT(FDT_ERR_BADSTATE), 30 | 31 | FDT_ERRTABENT(FDT_ERR_TRUNCATED), 32 | FDT_ERRTABENT(FDT_ERR_BADMAGIC), 33 | FDT_ERRTABENT(FDT_ERR_BADVERSION), 34 | FDT_ERRTABENT(FDT_ERR_BADSTRUCTURE), 35 | FDT_ERRTABENT(FDT_ERR_BADLAYOUT), 36 | FDT_ERRTABENT(FDT_ERR_INTERNAL), 37 | FDT_ERRTABENT(FDT_ERR_BADNCELLS), 38 | FDT_ERRTABENT(FDT_ERR_BADVALUE), 39 | FDT_ERRTABENT(FDT_ERR_BADOVERLAY), 40 | FDT_ERRTABENT(FDT_ERR_NOPHANDLES), 41 | FDT_ERRTABENT(FDT_ERR_BADFLAGS), 42 | }; 43 | #define FDT_ERRTABSIZE (sizeof(fdt_errtable) / sizeof(fdt_errtable[0])) 44 | 45 | const char *fdt_strerror(int errval) 46 | { 47 | if (errval > 0) 48 | return ""; 49 | else if (errval == 0) 50 | return ""; 51 | else if (errval > -FDT_ERRTABSIZE) { 52 | const char *s = fdt_errtable[-errval].str; 53 | 54 | if (s) 55 | return s; 56 | } 57 | 58 | return ""; 59 | } 60 | -------------------------------------------------------------------------------- /opensrc/helpers/libfdt/fdt_wip.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) 2 | /* 3 | * libfdt - Flat Device Tree manipulation 4 | * Copyright (C) 2006 David Gibson, IBM Corporation. 5 | */ 6 | #include "libfdt_env.h" 7 | 8 | #include 9 | #include 10 | 11 | #include "libfdt_internal.h" 12 | 13 | int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset, 14 | const char *name, int namelen, 15 | uint32_t idx, const void *val, 16 | int len) 17 | { 18 | void *propval; 19 | int proplen; 20 | 21 | propval = fdt_getprop_namelen_w(fdt, nodeoffset, name, namelen, 22 | &proplen); 23 | if (!propval) 24 | return proplen; 25 | 26 | if (proplen < (len + idx)) 27 | return -FDT_ERR_NOSPACE; 28 | 29 | memcpy((char *)propval + idx, val, len); 30 | return 0; 31 | } 32 | 33 | int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name, 34 | const void *val, int len) 35 | { 36 | const void *propval; 37 | int proplen; 38 | 39 | propval = fdt_getprop(fdt, nodeoffset, name, &proplen); 40 | if (!propval) 41 | return proplen; 42 | 43 | if (proplen != len) 44 | return -FDT_ERR_NOSPACE; 45 | 46 | return fdt_setprop_inplace_namelen_partial(fdt, nodeoffset, name, 47 | strlen(name), 0, 48 | val, len); 49 | } 50 | 51 | static void fdt_nop_region_(void *start, int len) 52 | { 53 | fdt32_t *p; 54 | 55 | for (p = start; (char *)p < ((char *)start + len); p++) 56 | *p = cpu_to_fdt32(FDT_NOP); 57 | } 58 | 59 | int fdt_nop_property(void *fdt, int nodeoffset, const char *name) 60 | { 61 | struct fdt_property *prop; 62 | int len; 63 | 64 | prop = fdt_get_property_w(fdt, nodeoffset, name, &len); 65 | if (!prop) 66 | return len; 67 | 68 | fdt_nop_region_(prop, len + sizeof(*prop)); 69 | 70 | return 0; 71 | } 72 | 73 | int fdt_node_end_offset_(void *fdt, int offset) 74 | { 75 | int depth = 0; 76 | 77 | while ((offset >= 0) && (depth >= 0)) 78 | offset = fdt_next_node(fdt, offset, &depth); 79 | 80 | return offset; 81 | } 82 | 83 | int fdt_nop_node(void *fdt, int nodeoffset) 84 | { 85 | int endoffset; 86 | 87 | endoffset = fdt_node_end_offset_(fdt, nodeoffset); 88 | if (endoffset < 0) 89 | return endoffset; 90 | 91 | fdt_nop_region_(fdt_offset_ptr_w(fdt, nodeoffset, 0), 92 | endoffset - nodeoffset); 93 | return 0; 94 | } 95 | -------------------------------------------------------------------------------- /opensrc/helpers/libfdt/libfdt_internal.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */ 2 | #ifndef LIBFDT_INTERNAL_H 3 | #define LIBFDT_INTERNAL_H 4 | /* 5 | * libfdt - Flat Device Tree manipulation 6 | * Copyright (C) 2006 David Gibson, IBM Corporation. 7 | */ 8 | #include 9 | 10 | #define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) 11 | #define FDT_TAGALIGN(x) (FDT_ALIGN((x), FDT_TAGSIZE)) 12 | 13 | int32_t fdt_ro_probe_(const void *fdt); 14 | #define FDT_RO_PROBE(fdt) \ 15 | { \ 16 | int32_t totalsize_; \ 17 | if ((totalsize_ = fdt_ro_probe_(fdt)) < 0) \ 18 | return totalsize_; \ 19 | } 20 | 21 | int fdt_check_node_offset_(const void *fdt, int offset); 22 | int fdt_check_prop_offset_(const void *fdt, int offset); 23 | const char *fdt_find_string_(const char *strtab, int tabsize, const char *s); 24 | int fdt_node_end_offset_(void *fdt, int nodeoffset); 25 | 26 | static inline const void *fdt_offset_ptr_(const void *fdt, int offset) 27 | { 28 | return (const char *)fdt + fdt_off_dt_struct(fdt) + offset; 29 | } 30 | 31 | static inline void *fdt_offset_ptr_w_(void *fdt, int offset) 32 | { 33 | return (void *)(uintptr_t)fdt_offset_ptr_(fdt, offset); 34 | } 35 | 36 | static inline const struct fdt_reserve_entry *fdt_mem_rsv_(const void *fdt, int n) 37 | { 38 | const struct fdt_reserve_entry *rsv_table = 39 | (const struct fdt_reserve_entry *) 40 | ((const char *)fdt + fdt_off_mem_rsvmap(fdt)); 41 | 42 | return rsv_table + n; 43 | } 44 | static inline struct fdt_reserve_entry *fdt_mem_rsv_w_(void *fdt, int n) 45 | { 46 | return (void *)(uintptr_t)fdt_mem_rsv_(fdt, n); 47 | } 48 | 49 | #define FDT_SW_MAGIC (~FDT_MAGIC) 50 | 51 | #endif /* LIBFDT_INTERNAL_H */ 52 | -------------------------------------------------------------------------------- /pkgconfig/bcm_host.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: bcm_host 7 | Description: Broadcom VideoCore host API library 8 | Version: 1 9 | Libs: -L${libdir} -lbcm_host -lvcos -lvchiq_arm -pthread 10 | Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM 11 | -------------------------------------------------------------------------------- /pkgconfig/brcmegl.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: brcmEGL 7 | Description: Fake brcmEGL package for RPi 8 | Version: 10 9 | Requires: bcm_host 10 | Libs: -L${libdir} -lbrcmEGL -lbrcmGLESv2 -lbcm_host -lvchostif 11 | Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux \ 12 | -I${includedir}/interface/vcos/pthreads 13 | 14 | -------------------------------------------------------------------------------- /pkgconfig/brcmglesv2.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: brcmGLESv2 7 | Description: Fake brcmGLES2 package for RPi 8 | Version: 10 9 | Requires: bcm_host 10 | Libs: -L${libdir} -lbrcmGLESv2 11 | Cflags: -I${includedir} 12 | 13 | -------------------------------------------------------------------------------- /pkgconfig/brcmvg.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: brcmOpenVG 7 | Description: Fake brcmOpenVG package for RPi 8 | Version: 10 9 | Requires: bcm_host 10 | Libs: -L${libdir} -lbrcmOpenVG 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /pkgconfig/mmal.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: MMAL 7 | Description: Multi-Media Abstraction Layer library for RPi 8 | Version: 1 9 | Requires: vcsm 10 | Libs: -L${libdir} -lmmal -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /pkgconfig/vcsm.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: VCSM 7 | Description: VideoCore Shared Memory library for RPi 8 | Version: 1 9 | Libs: -L${libdir} -lvcsm -lvcos 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /vcinclude/vc_image_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, Broadcom Europe Ltd 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the copyright holder nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef __VC_INCLUDE_IMAGE_TYPES_H__ 29 | #define __VC_INCLUDE_IMAGE_TYPES_H__ 30 | 31 | #include "interface/vctypes/vc_image_types.h" 32 | #include "interface/vctypes/vc_image_structs.h" 33 | 34 | #endif /* __VC_INCLUDE_IMAGE_TYPES_H__ */ 35 | --------------------------------------------------------------------------------