精华内容
下载资源
问答
  • (OK) 编译 LineageOS-14.1-kiwi for (VirtualBox) 编译输出
    千次阅读
    2017-03-07 07:39:50
    [root@localhost lineage-14.1-kiwi-on-VB]# m -j32 iso_img
    make: Entering directory '/opt/android-x86/lineage-14.1-kiwi-on-VB'
    ============================================
    PLATFORM_VERSION_CODENAME=REL
    PLATFORM_VERSION=7.1.1
    LINEAGE_VERSION=14.1-20170306-UNOFFICIAL-android_x86_64
    TARGET_PRODUCT=cm_android_x86_64
    TARGET_BUILD_VARIANT=userdebug
    TARGET_BUILD_TYPE=release
    TARGET_BUILD_APPS=
    TARGET_ARCH=x86_64
    TARGET_ARCH_VARIANT=x86_64
    TARGET_CPU_VARIANT=
    TARGET_2ND_ARCH=x86
    TARGET_2ND_ARCH_VARIANT=x86
    TARGET_2ND_CPU_VARIANT=
    HOST_ARCH=x86_64
    HOST_2ND_ARCH=x86
    HOST_OS=linux
    HOST_OS_EXTRA=Linux-4.9.13-100.fc24.x86_64-x86_64-with-fedora-24-Twenty_Four
    HOST_CROSS_OS=windows
    HOST_CROSS_ARCH=x86
    HOST_CROSS_2ND_ARCH=x86_64
    HOST_BUILD_TYPE=release
    BUILD_ID=NOF26W
    OUT_DIR=/opt/android-x86/lineage-14.1-kiwi-on-VB/out
    ============================================
    which: no ninja in (/usr/lib/jvm/java-8-openjdk-amd64/bin:/opt/android-x86/lineage-14.1-kiwi-on-VB/out/host/linux-x86/bin:/opt/android-x86/lineage-14.1-kiwi-on-VB/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin:/opt/android-x86/lineage-14.1-kiwi-on-VB/prebuilts/gcc/linux-x86/:/opt/android-x86/lineage-14.1-kiwi-on-VB/development/scripts:/opt/android-x86/lineage-14.1-kiwi-on-VB/prebuilts/devtools/tools:/opt/android-x86/lineage-14.1-kiwi-on-VB/external/selinux/prebuilts/bin:/opt/android-x86/lineage-14.1-kiwi-on-VB/prebuilts/android-emulator/linux-x86_64:/usr/libexec/python2-sphinx:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/android-on-linux/android-sdk-linux/platform-tools:/root/bin)
    fatal: Not a git repository (or any parent up to mount point /opt)
    Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
    Running kati to generate build-cm_android_x86_64.ninja...
    No need to regenerate ninja file
    Starting build with ninja
    ninja: Entering directory `.'
    [ 46% 61/130] Ensure Jack server is installed and started
    Jack server already installed in "/root/.jack-server"
    Server is already running
    [ 74% 97/130] Building Kernel Config
    make: Entering directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
      GEN     /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/obj/KERNEL_OBJ/Makefile
    drivers/mmc/card/Kconfig:132:warning: leading whitespace ignored
    arch/x86/configs/android-x86_64_defconfig:313:warning: override: reassigning to symbol CPU_FREQ_STAT
    warning: (DRM_I915 && DRM_GMA500 && ACER_WMI) selects ACPI_VIDEO which has unmet direct dependencies (ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT)
    warning: (X86) selects HAVE_KPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (X86) selects HAVE_KRETPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (DRM_I915 && DRM_GMA500 && ACER_WMI) selects ACPI_VIDEO which has unmet direct dependencies (ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT)
    warning: (X86) selects HAVE_KPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (X86) selects HAVE_KRETPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    #
    # configuration written to .config
    #
    make: Leaving directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
    make: Entering directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
      GEN     /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/obj/KERNEL_OBJ/Makefile
    scripts/kconfig/conf --savedefconfig=defconfig Kconfig
    drivers/mmc/card/Kconfig:132:warning: leading whitespace ignored
    warning: (DRM_I915 && DRM_GMA500 && ACER_WMI) selects ACPI_VIDEO which has unmet direct dependencies (ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT)
    warning: (X86) selects HAVE_KPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (X86) selects HAVE_KRETPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (X86) selects HAVE_KPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (X86) selects HAVE_KRETPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (DRM_I915 && DRM_GMA500 && ACER_WMI) selects ACPI_VIDEO which has unmet direct dependencies (ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT)
    make: Leaving directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
    [ 77% 101/130] target  C++: recovery <= bootable/recovery/recovery.cpp
    bootable/recovery/recovery.cpp:410:49: warning: comparison of constant 255 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare]
        if (boot.command[0] != 0 && boot.command[0] != 255) {
                                    ~~~~~~~~~~~~~~~ ^  ~~~
    bootable/recovery/recovery.cpp:414:47: warning: comparison of constant 255 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare]
        if (boot.status[0] != 0 && boot.status[0] != 255) {
                                   ~~~~~~~~~~~~~~ ^  ~~~
    bootable/recovery/recovery.cpp:438:62: warning: comparison of constant 255 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare]
            } else if (boot.recovery[0] != 0 && boot.recovery[0] != 255) {
                                                ~~~~~~~~~~~~~~~~ ^  ~~~
    3 warnings generated.
    [ 81% 106/130] Building Kernel Headers
    make: Entering directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
      GEN     /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/obj/KERNEL_OBJ/Makefile
    drivers/mmc/card/Kconfig:132:warning: leading whitespace ignored
    arch/x86/configs/android-x86_64_defconfig:313:warning: override: reassigning to symbol CPU_FREQ_STAT
    warning: (DRM_I915 && DRM_GMA500 && ACER_WMI) selects ACPI_VIDEO which has unmet direct dependencies (ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT)
    warning: (X86) selects HAVE_KPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (X86) selects HAVE_KRETPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (DRM_I915 && DRM_GMA500 && ACER_WMI) selects ACPI_VIDEO which has unmet direct dependencies (ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT)
    warning: (X86) selects HAVE_KPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (X86) selects HAVE_KRETPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    #
    # configuration written to .config
    #
    make: Leaving directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
    make: Entering directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
      CHK     include/generated/uapi/linux/version.h
    make[2]: Nothing to be done for 'all'.
    make[2]: Nothing to be done for 'relocs'.
    make: Leaving directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
    [ 92% 116/125] build /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/obj/NOTICE.html
    Combining NOTICE files into HTML
    Combining NOTICE files into text
    [ 96% 120/125] Target system fs image: /opt/android-x86/lin...d_x86_64/obj/PACKAGING/systemimage_intermediates/system.img
    BuildImage: in_dir = /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/system, out_file = /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/obj/PACKAGING/systemimage_intermediates/system.img
    fs type is not ext4
    Running:  mkuserimg.sh /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/system /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 0 -D /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/system -L system /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/root/file_contexts.bin
    make_ext4fs -T -1 -S /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/root/file_contexts.bin -L system -l 1361M -a system /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/obj/PACKAGING/systemimage_intermediates/system.img /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/system /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/system
    Creating filesystem with parameters:
        Size: 1427111936
        Block size: 4096
        Blocks per group: 32768
        Inodes per group: 7920
        Inode size: 256
        Journal blocks: 5444
        Label: system
        Blocks: 348416
        Block groups: 11
        Reserved block group size: 87
    Created filesystem with 3507/87120 inodes and 328259/348416 blocks
    Running ['mkuserimg.sh', '/opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/system', '/opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/obj/PACKAGING/systemimage_intermediates/system.img', 'ext4', 'system', '0', '-D', '/opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/system', '-L', 'system', '/opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/root/file_contexts.bin'] command, exit code = 0
    [ 96% 121/125] build /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/system.sfs
    Parallel mksquashfs: Using 32 processors
    Creating 4.0 filesystem on /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/system.sfs, block size 131072.
    [===========================================================|] 10888/10888 100%
    
    Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
    	compressed data, compressed metadata, compressed fragments, compressed xattrs
    	duplicates are removed
    Filesystem size 513023.70 Kbytes (501.00 Mbytes)
    	36.81% of uncompressed filesystem size (1393706.79 Kbytes)
    Inode table size 27859 bytes (27.21 Kbytes)
    	63.82% of uncompressed inode table size (43652 bytes)
    Directory table size 30 bytes (0.03 Kbytes)
    	93.75% of uncompressed directory table size (32 bytes)
    Number of duplicate files found 0
    Number of inodes 2
    Number of files 1
    Number of fragments 0
    Number of symbolic links  0
    Number of device nodes 0
    Number of fifo nodes 0
    Number of socket nodes 0
    Number of directories 1
    Number of ids (unique uids + gids) 1
    Number of uids 1
    	root (0)
    Number of gids 1
    	root (0)
    [ 98% 123/125] Building Kernel
    make: Entering directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
      GEN     /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/obj/KERNEL_OBJ/Makefile
    scripts/kconfig/conf --silentoldconfig Kconfig
    drivers/mmc/card/Kconfig:132:warning: leading whitespace ignored
    warning: (DRM_I915 && DRM_GMA500 && ACER_WMI) selects ACPI_VIDEO which has unmet direct dependencies (ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT)
    warning: (X86) selects HAVE_KPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (X86) selects HAVE_KRETPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (DRM_I915 && DRM_GMA500 && ACER_WMI) selects ACPI_VIDEO which has unmet direct dependencies (ACPI && X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL && INPUT)
    warning: (X86) selects HAVE_KPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    warning: (X86) selects HAVE_KRETPROBES which has unmet direct dependencies (HUAWEI_KERNEL_DEBUG)
    make[2]: Nothing to be done for 'all'.
      GEN     /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/obj/KERNEL_OBJ/Makefile
      CHK     include/generated/uapi/linux/version.h
      CHK     include/generated/utsrelease.h
      CC      scripts/mod/devicetable-offsets.s
      GEN     scripts/mod/devicetable-offsets.h
      HOSTCC  scripts/mod/file2alias.o
      HOSTLD  scripts/mod/modpost
    make[2]: Nothing to be done for 'relocs'.
      Using /opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64 as source for kernel
      CALL    /opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64/scripts/checksyscalls.sh
      CHK     include/generated/compile.h
    make[4]: 'arch/x86/realmode/rm/realmode.bin' is up to date.
    /opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64/drivers/media/platform/msm/Makefile:17: "CONFIG_MINIISP = false"
    Kernel: arch/x86/boot/bzImage is ready  (#4)
    make: Leaving directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
    DTBs not enabled
    Building Kernel Modules
    make: Entering directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
    make[2]: Nothing to be done for 'all'.
      GEN     /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/obj/KERNEL_OBJ/Makefile
      CHK     include/generated/uapi/linux/version.h
      CHK     include/generated/utsrelease.h
      CC      scripts/mod/devicetable-offsets.s
      GEN     scripts/mod/devicetable-offsets.h
      HOSTCC  scripts/mod/file2alias.o
      HOSTLD  scripts/mod/modpost
    /opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64/drivers/media/platform/msm/Makefile:17: "CONFIG_MINIISP = false"
    make[2]: Nothing to be done for 'relocs'.
      Using /opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64 as source for kernel
      CALL    /opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64/scripts/checksyscalls.sh
    /opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64/drivers/media/platform/msm/Makefile:17: "CONFIG_MINIISP = false"
      Building modules, stage 2.
      MODPOST 11 modules
    make: Leaving directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
    make: Entering directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
      INSTALL net/ipv4/netfilter/ipt_MASQUERADE.ko
      INSTALL net/ipv4/netfilter/iptable_nat.ko
      INSTALL net/ipv4/netfilter/nf_nat_ipv4.ko
      INSTALL net/netfilter/nf_nat.ko
      INSTALL net/netfilter/nf_nat_ftp.ko
      INSTALL net/ipv4/netfilter/ipt_NATTYPE.ko
      INSTALL net/netfilter/nf_nat_irc.ko
      INSTALL net/netfilter/nf_nat_sip.ko
      INSTALL net/netfilter/xt_LOG.ko
      INSTALL net/netfilter/xt_mark.ko
      INSTALL net/netfilter/xt_nat.ko
      DEPMOD  3.10.49
    make: Leaving directory '/opt/android-x86/lineage-14.1-kiwi-on-VB/kernel/generic/android_x86_64'
    [100% 125/125] ----- Making iso image ------
    Warning: creating filesystem that does not conform to ISO-9660.
    genisoimage 1.1.11 (Linux)
    Scanning /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/boot
    Scanning /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/boot/efi
    Scanning /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/boot/efi/boot
    Scanning /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/boot/isolinux
    Scanning /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/boot/.disk
    Scanning /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/boot/boot
    Scanning /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/boot/boot/grub
    Writing:   Initial Padblock                        Start Block 0
    Done with: Initial Padblock                        Block(s)    16
    Writing:   Primary Volume Descriptor               Start Block 16
    Done with: Primary Volume Descriptor               Block(s)    1
    Writing:   Eltorito Volume Descriptor              Start Block 17
    Size of boot image is 4 sectors -> No emulation
    Size of boot image is 6144 sectors -> No emulation
    Done with: Eltorito Volume Descriptor              Block(s)    1
    Writing:   Joliet Volume Descriptor                Start Block 18
    Done with: Joliet Volume Descriptor                Block(s)    1
    Writing:   End Volume Descriptor                   Start Block 19
    Done with: End Volume Descriptor                   Block(s)    1
    Writing:   Version block                           Start Block 20
    Done with: Version block                           Block(s)    1
    Writing:   Path table                              Start Block 21
    Done with: Path table                              Block(s)    4
    Writing:   Joliet path table                       Start Block 25
    Done with: Joliet path table                       Block(s)    4
    Writing:   Directory tree                          Start Block 29
    Done with: Directory tree                          Block(s)    7
    Writing:   Joliet directory tree                   Start Block 36
    Done with: Joliet directory tree                   Block(s)    7
    Writing:   Directory tree cleanup                  Start Block 43
    Done with: Directory tree cleanup                  Block(s)    0
    Writing:   Extension record                        Start Block 43
    Done with: Extension record                        Block(s)    1
    Writing:   The File(s)                             Start Block 44
      1.88% done, estimate finish Mon Mar  6 23:42:56 2017
      3.77% done, estimate finish Mon Mar  6 23:42:56 2017
      5.65% done, estimate finish Mon Mar  6 23:42:56 2017
      7.53% done, estimate finish Mon Mar  6 23:42:56 2017
      9.41% done, estimate finish Mon Mar  6 23:42:56 2017
     11.29% done, estimate finish Mon Mar  6 23:42:56 2017
     13.17% done, estimate finish Mon Mar  6 23:42:56 2017
     15.06% done, estimate finish Mon Mar  6 23:42:56 2017
     16.93% done, estimate finish Mon Mar  6 23:42:56 2017
     18.82% done, estimate finish Mon Mar  6 23:42:56 2017
     20.70% done, estimate finish Mon Mar  6 23:42:56 2017
     22.58% done, estimate finish Mon Mar  6 23:42:56 2017
     24.46% done, estimate finish Mon Mar  6 23:42:56 2017
     26.34% done, estimate finish Mon Mar  6 23:42:56 2017
     28.22% done, estimate finish Mon Mar  6 23:42:56 2017
     30.11% done, estimate finish Mon Mar  6 23:42:56 2017
     31.99% done, estimate finish Mon Mar  6 23:42:56 2017
     33.87% done, estimate finish Mon Mar  6 23:42:56 2017
     35.75% done, estimate finish Mon Mar  6 23:42:56 2017
     37.63% done, estimate finish Mon Mar  6 23:42:56 2017
     39.51% done, estimate finish Mon Mar  6 23:42:56 2017
     41.40% done, estimate finish Mon Mar  6 23:42:56 2017
     43.27% done, estimate finish Mon Mar  6 23:42:56 2017
     45.16% done, estimate finish Mon Mar  6 23:42:56 2017
     47.04% done, estimate finish Mon Mar  6 23:42:56 2017
     48.92% done, estimate finish Mon Mar  6 23:42:56 2017
     50.80% done, estimate finish Mon Mar  6 23:42:56 2017
     52.68% done, estimate finish Mon Mar  6 23:42:56 2017
     54.56% done, estimate finish Mon Mar  6 23:42:57 2017
     56.45% done, estimate finish Mon Mar  6 23:42:57 2017
     58.32% done, estimate finish Mon Mar  6 23:42:57 2017
     60.21% done, estimate finish Mon Mar  6 23:42:57 2017
     62.09% done, estimate finish Mon Mar  6 23:42:57 2017
     63.97% done, estimate finish Mon Mar  6 23:42:57 2017
     65.85% done, estimate finish Mon Mar  6 23:42:57 2017
     67.73% done, estimate finish Mon Mar  6 23:42:57 2017
     69.61% done, estimate finish Mon Mar  6 23:42:57 2017
     71.50% done, estimate finish Mon Mar  6 23:42:57 2017
     73.38% done, estimate finish Mon Mar  6 23:42:57 2017
     75.26% done, estimate finish Mon Mar  6 23:42:57 2017
     77.14% done, estimate finish Mon Mar  6 23:42:57 2017
     79.02% done, estimate finish Mon Mar  6 23:42:57 2017
     80.90% done, estimate finish Mon Mar  6 23:42:57 2017
     82.79% done, estimate finish Mon Mar  6 23:42:57 2017
     84.66% done, estimate finish Mon Mar  6 23:42:57 2017
     86.55% done, estimate finish Mon Mar  6 23:42:57 2017
     88.43% done, estimate finish Mon Mar  6 23:42:57 2017
     90.31% done, estimate finish Mon Mar  6 23:42:57 2017
     92.19% done, estimate finish Mon Mar  6 23:42:57 2017
     94.07% done, estimate finish Mon Mar  6 23:42:57 2017
     95.95% done, estimate finish Mon Mar  6 23:42:57 2017
     97.84% done, estimate finish Mon Mar  6 23:42:57 2017
     99.72% done, estimate finish Mon Mar  6 23:42:57 2017
    Total translation table size: 6900
    Total rockridge attributes bytes: 3312
    Total directory bytes: 12288
    Path table size(bytes): 88
    Done with: The File(s)                             Block(s)    265571
    Writing:   Ending Padblock                         Start Block 265615
    Done with: Ending Padblock                         Block(s)    150
    Max brk space used 23000
    265765 extents written (519 MB)
    
    
    /opt/android-x86/lineage-14.1-kiwi-on-VB/out/target/product/android_x86_64/cm_android_x86_64.iso is built successfully.
    
    
    make: Leaving directory '/opt/android-x86/lineage-14.1-kiwi-on-VB'
    
    #### make completed successfully (54 seconds) ####
    
    [root@localhost lineage-14.1-kiwi-on-VB]# 
    

    更多相关内容
  • 你好,请问一下这是什么原因: WARNING: your're using an unofficial version of Tampermonkey. Please check it for malware because this version was re-packaged! 就是按照您的博客下载的插件,但最后会出现...
  • Barcode reader for 1D barcodes (very early version as of 1.55) Implementation characteristics Efficient: image data is packed binary (into 32-bit words); operations on 32-bit data whenever ...
  • Removing a module using kernel threads is very difficult to do without creating race conditions. The safest solution is to create a module that cannot be removed. In the initialization call MOD_INC_...

    看到这篇文章,很适合linux入门者。故把它翻译过来,练练英语,呵呵!初次翻译,有不当的地方请多指教,一起交流!我的Email:xiasound@gmail.com  QQ:454052811

    免责声明:所有使用从这页获得的信息和代码,由自己负责。如果你发现了什么问题,你可以email给我,但是我不能保证一定能帮得上忙。

    在这里,我会试着回答几个问题,这些问题我经常在论坛comp.os.linux.development.apps 和 comp.os.linux.development.system.上看到 。如果哪位知道针对此新闻组的官方的FAQ,请告诉我。这个网页迫切需要清除和重新组织,我只是感觉我现在没有时间马上处理。如果你有些建议或想补充缺失的答案,同样欢迎你email我。
    你是通过google找到此文的吗?我在服务器日志上看到很多人是这样找到的。你们其中的一些会在这里找到你要的答案,另外一些则不会。如果你翻遍整个网页也没有看到你要的答案,明显的下一步你可以在两新闻组中提问(comp.os.linux.development.apps 和 comp.os.linux.development.system.)。如果你读完此页有额外的问题,那么欢迎你提问,除非你提问了,否则我不能回答。不要做这样的家伙,他第一次想知道kernel_thread返回值的信息而找到此页,得到信息它和sys_fork的返回值是一样的,三个小时后他回来寻找sys_fork返回值的信息。他寻找到一个我可以在五分钟内回答的答案,真的浪费三个小时!

    除非有特殊说明,此页的代码片段皆出于我手,它们受保护于GPL 2.
    1.我可以从哪里下载Linux?
    http://kernel.org/#newtolinux
    http://google.com/linux?q=distributions
    http://lwn.net/Distributions/

    2.我想写一个内核模块,我该从哪里入手呢?
    http://www.tldp.org/LDP/lkmpg/mpg.html
    http://www.kernelnewbies.org/
    http://www.xml.com/ldd/chapter/book/index.html
    http://www.oreilly.com/catalog/linuxdrive2/
    http://www.kerneltraffic.org/kernel-traffic/kt20050605_312.html#8
    3.你能推荐我一些关于内核黑客的书或信息来源吗?
    这些建议由Daniel Versick提供:
    *如果你想全面的理解Linux内核的算法和数据结构,这本书是一个不错的选择。
    "Understanding the Linux Kernel"
    by Daniel P. Bovet & Marco Cesati
    2001 O'Reilly & Associates Inc.
    ISBN 0-596-00002-2
    *为了实现一个Linux设备驱动程序:
    "Linux Device Drivers" - 2nd edition
    by Alessandro Rubini & Jonathan Corbet
    2001 O'Reilly & Associates Inc.
    ISBN 0-596-00008-1
    同样在网络上可以看到: http://www.xml.com/ldd/chapter/book/index.html
    *同样是一本关于Linux内核算法和数据结构的书
    "Linux Kernel Internals"
    by Michael Beck, Harald Bohme, Mirko Dziadzka, Ulrich Kunitz, Robert
    Magnus, Dirk Verworner
    Addison Wesley
    ISBN 0201331438
    *如果你想找一本关于Linux网络实现的书,试试这本((but it is AFAIK only available in German at the moment): );
    "Linux Netzwerkarchitektur"
    by Klaus Wehrle, Frank Paehlke, Hartmut Ritter, Daniel Mueller and Marc Bechler
    2002 Addison Wesley
    ISBN 3-8273-1509-3

    4我可以在哪里找到在线的man pages?
    这是其中的几个
    http://www.cwi.nl/~aeb/linux/man2html/
    http://linux.ctyme.com/
    5.为什么我要加载的内核模块时,会提示未解决的符号?

        *忘记包含一个定义宏或者一个内联函数的头文件;

        *你未使用优化选项,一些内核头文件需要开启优化选项才能正常工作。在gcc命令行里 使用-O2开启优化,一些内联函数需要这样,检测编译错误,去除一些虚拟引用。

        *该符号在内核中未定义。注意大多数c标准库函数不能在内核中引用。

        *该符号定义了,但是没有被导出以允许其他模块引用。一个符号只有在内核的某个地方导出,才能允许内核的其他模块引用。大多数符号是由kernel/ksyms.c导出的。注意符号只能由定义它的模块本身导出。

        *编译的内核和模块有不同的modversions设置。

    6.什么是 modversions?
    http://www.kernelnewbies.org/faq/#compmod.xml

    7.我的printk语句输出到哪儿了?

       如果你使用文本模式的VC,会直接输出到屏幕上。如果你使用X,不会出现这种情况;大多数情况调试内核模块最好不要使用X界面。如果你坚持使用X,可以从如下的地方找到输出。

    *你可以使用虚拟控制台,显示信息;

    *你可以读取系统日志文件。通常日志文件命名为/var/log/messages.通常使用命令"tail -f /var/log/messages"可以单独的显示到一个终端上。

    *你可以使用"dmesg"命令;

    *你可以使用命令"cat /proc/kmsg".;

    *你可以使用一个串口终端,这需要两台电脑。

    注意  日志文件名称取决于发行版:

    • Red Hat (还有 Mandrake 或其他) 使用 /var/log/messages
    • Debian 使用 /var/log/syslog
    • 还有一些发行版使用/var/log/kern.log.(According to this posting some distributions use /var/log/kern.log. );

    日志是否输出到屏幕取决于消息的重要性。它们被定义了8个级别,级别0是最重要的,仅当系统要崩溃的时候使用。最不重要的是级别7,它通常被用来调试输出;消息的级别取决于每行的开始的三个字符,它们定义在 <linux/kernel.h> ;如果没有指定消息级别,我们会使用一个默认的级别。内核有一个变量指定多么重要的信息必须在屏幕上直接登录。通常klogd进程,将改变这个变量,使更少的消息使得它在屏幕上,但所有的信息将被发送syslgd过程记录到文件中。

    8.内核模块和内核线程之间有什么不同?

    很高兴你发问,大多数新手以为它们相同而没有发问。

         内核模块是一段放置在内核地址空间代码片段;类似于共享库。模块中可以包含代码和数据,代码可以被任何内核线程访问。当模块加载的时候,一个特殊的初始化代码将被调用,并快速的返回成功或失败,当模块被卸载的时候,指定的卸载函数将被调用,做一些清理函数。

         内核线程是一个不包含用户地址空间的进程当一个进程运行在内核模式是与通常的进程有着一些不同,它们共享所有的内核空间,如果一个模块注册了一个函数在内核空间它可以被任何进程甚至多个进程同时调用;
    9. 我可以从一个内核模块中启动一个内核线程吗?

         你可以这样做。但大多数内核模块并不需要开启内核线程。你在写一个驱动时,如果你想开启一个内核线程,这样其实容易犯错。不管怎样,如果你发现你真的需要一个内核线程你可以轻松的使用函数kernel_thread开启;

    #include <fixme>
    extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);

    该函数会启动一个线程,函数的返回值定义情况是和函数sys_fork一样。返回一个正值代表生成线程id,如果返回的是一个负值代表发生了某种错误。返回0是不可能的,因为子进程…(这句不知怎么翻译:because the child terminates after calling fn and does not return to the caller of kernel_thread.The action performed by the new thread is equivalent to the statement exit(fn(arg));. )新线程的行为相当于执行了语句exit(fn(arg));. 参数arg通常指向一个结构体,结构体会在新线程中用到,确保当线程用到时,结构体是存在的。如果结构体是一个局部变量,函数调用完kernel_thread可能在读取结构提前已经退出了,我们要避免这一点。如果不需要该结构体,我们通常在该位置填充NULL。在一个新的内核线程了你通常需要去做的是:

    int my_thread(void *arg)
    {
            daemonize("kmyd");
            while(1) {
                    /* Insert your own code here */
            }
    }

    像其他进程一样,内核线程会僵死直到它的父进程发现。如果一个内核线程由一个初始化函数产生,他的父进程就是这个模块的加载部分。如果模块的加载部分终止,该进程会以init作为其新的父进程,在这种情况下init会照顾它直到其终止运行。在其他的情况下,你需要保证僵尸进程的处理。内核线程不能像用户态中那样忽视它的子进程,当用户模式下的程序忽视了它的子进程当出现僵死情况是内核会告诉它,但在内核态没有谁会提醒你。卸载一个使用内核线程的模块而保证不产生竞态。最安全的方式是不卸载模块。在模块初始化部分调用MOD_INC_USE_COUNT从而使模块使用计数为1.在任何地方也不要改变这个内核计数。举一个可以卸载的例子,我们可以查看内核关于usb驱动的例子linux/drivers/usb/hub.c. 它同样有着它的竞争条件,只不过是被恰当的处理了。这里给一个另外的例子(未测试),我相信是可以避免竞态的:

    Removing a module using kernel threads is very difficult to do without creating race conditions. The safest solution is to create a module that cannot be removed. In the initialization call MOD_INC_USE_COUNT to get a usecount of 1. Don't change the usecount anywhere else. For an example that can be removed look on the kernel usb driver linux/drivers/usb/hub.c. It has also had its race conditions, but they have presumably been fixed. Here goes another (untested) example which I believe is race free:

    static DECLARE_COMPLETION(mythread_exited);
    static atomic_t time_to_quit = ATOMIC_INIT(0);
    
    int my_thread(void *arg)
    {
    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
            daemonize("kmyd");
    #else
            daemonize();
            strcpy(current->comm, "kmyd");
    #endif
            while(!atomic_read(&time_to_quit)) {
                    /* Insert your own code here */
            }
            complete_and_exit(&mythread_exited, 0);
    }
    
    static void __exit exit_mymodule(void)
    {
    	atomic_inc(&time_to_quit);
    	/* Insert code here to wake up the thread if necessary */
    	wait_for_completion(&mythread_exited);
    }

    10. 我可以在一个内核模块中读写一个文件吗?

         可以,但有一点棘手。你不能使用像open, read, write, and close用户空间的函数,取代之的是函数use filp_open 和返回的结构体方法。时刻记住做清除工作。这儿有个例子: (FIXME: Put the updated version here) kcp.c.如果你需要更多的例子建议你看看the khttpd 或 tux webserver的源码。时刻记着只能在进程的上下文访问文件。在内核中访问文件,要时刻警惕你的设计。通常情况下这不是一个好主意。内核代码通常不适用配置文件,取代的是传递参数给内核或模块加载器.如果实现的功能比较复杂,可以在用户空间写一个程序解析配置文件将结果以一个适当的方式传递给内核(比如通过一一系列的调用建一个内核结构体)iptables-restore 就是这样一个例子。通常一个驱动传输数据到硬件可以引用头文件中定义的字符数组。往往是一个驱动需要转移到设备的固件存储在头文件中的字符数组。这通常是初始化数据,所以之前启动/ sbin / init的内存被释放的权利。如果你想从文件中加载固件,也可以做一个用户模式工具。如果你仍然想在内核中访问文件,至少不硬编码的路径。文件名可以通过内核或模块加载器的参数。这通常是在初始化数据,发生在/sbin/init 启动前.如果你想从一个文件加载固件,你可以在用户层写个工具实现。如果你一定要在内核中访问文件,至少不要指定文件名。你可以将文件名作为参数传递给内核或模块加载器。

    11.我可以在模块中添加一个系统调用吗?

          简短的说: NO

         详细点来说:在一些内核版本中,我们可能通过sys_call_table修改和添加系统调用。但是因为此表不能在运行的时候修改,它不受保护,修改此表有可能导致竞态。即使不考虑竞态,当我们在使用或压栈的时候卸载模块,也会产生问题。因为模块会修改sys_call_table,在新内核中该符号不会被一直导出。换句话说,如果你在加载一个模块的时候得到一个这样的提示"unresolved symbol sys_call_table",它的意思是说模块中由一个bug,内核不会接受有bug的模块。

    12. 我可以在内核或模块中使用c++吗?

         不能,可以在kernel mailing list FAQ.中读到更多消息。

    13.linux和cpu关系好吗?   这段不知道咋翻译~

    Does Linux have CPU affinity?
    The answer below is mostly outdated. In kernel version 2.6 user mode processes can use the sched_setaffinity and sched_getaffinity system calls. There is a patch which backports them to 2.4.
    All recent Linux versions will try to keep processes as long time as possible on the same CPU. But processes will be moved if the CPUs are not equally loaded. True CPU affinity was introduced in 2.4.0, but is only available in kernel mode. It can be used from kernel modules, but was not used by the kernel itself. Starting in 2.4.7-pre5 it is used by ksoftirqd to start one instance for each CPU. In 2.5.8-pre3 a systemcall to set CPU affinity was introduced.
    I have written a module implementing a userspace interface for the CPU affinity in 2.4.x kernels. WARNING: this is untested code cpus_allowed.tgz

    14.我怎样才能使用大于2GB的文件?

    在32位的平台上想使用大于等于2GB的文件,你需要传递标志O_LARGEFILE给系统调用open。如果哪位兄弟知道该宏定义在那个头文件,请告诉我。同时,你可以使用如下的代码:

    #ifndef O_LARGEFILE
    #define O_LARGEFILE 0100000
    #endif

    可以像这样使用open系统调用:

    fd=open(filename,O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE,0666);

    如果你想在标准输入输出时使用大文件,你需要一个其中使用O_LARGEFILE标志调用open的fopen版本。另外一个方式是避免使用fopen,使用open和fdopen取代之。

    有人给我提了这样个有用的建议关于大文件:

    Hello.
    I needed to essentially treat an entire hard drive as one large file, and discovered I couldn't get past 2 GB into it until I defined the following macros in my source:

    #define _GNU_SOURCE
    #define _LARGEFILE_SOURCE  
    #define _LARGEFILE64_SOURCE  
    #define _FILE_OFFSET_BITS 64

    The _LARGEFILE_SOURCE macro permits the use of fseeko() and ftello(), among other things. _LARGEFILE64_SOURCE actually permits the use of 64-bit functions like fseeko64() and ftello64() and, finally, _FILE_OFFSET_BITS determines which interface will be used by default. If the macro isn't defined or is defined as 32 then the default interface is 32 bits. If it is defined as 64 then the default interface is the 64-bit interface, and a call to fseeko() will use this 64 bit interface.
    I cribbed from the file NOTES that accompanies glibc v2.2.5 on my Slackware 8.1 box to write this E-mail but I know these extensions exist in glibc v2.2.3 as well.
    HTH

    15.我怎样在一个进程里使用大于3GB的虚拟内存?

    唯一真正解决你的问题的方法是使用64位的平台,但也有另外的变通方法。正常情况下4GB的空间被等分成4份,每个有着不同的作用。第一块是用于执行程序和brk/sbrk 分配。第二块是用于mmaps,共享库和malloc的mmaps,第三块用于栈空间,第四用于内核本身。由于堆的增长自下而上和栈的增长自上而下,一个未使用的部分可用于其他。您可能希望通过改变TASK_UNMAPPED_BASE定义在linux / include / asm的/ processor.h改变BRK和mmap之间的分裂。或者您也可以尝试Linux版本2.4.17此修补程序。该补丁还需要更多的测试。您还可以更改用户空间和内核空间之间的分割,是定义在linux / include / asm的/ page_offset.h PAGE_OFFSET_RAW。请注意,不正确的设置可以使内核无法使用。你应该留下至少8MB加#%3,需要蒸出4MB的物理空间为你的内核。

    已建议在内核邮件列表(linux-kernel@vger.kernel.org)完全不同的方法。您可以分配使用的SysV或POSIX共享内存共享内存段。然后根据需要映射和取消映射段。 (这是有点类似于DOS下的EMM)单个段的规模有限,但你可以有很多段甚至超越4GB如果您有足够的物理RAM或交换空间的总大小。可以重映射文件或文件的一部分在你的进程中。内存映射文件在大多数情况下,如同共享内存。

    16.为什么 Red Hat Linux 7.3, 8.0, and 9加载glibc 到42000000?

    在Red Hat Linux 7.3, 8.0, and 9 中c库被加载到一个指定的地址而不是动态的地址。


    On Red Hat Linux 7.3, 8.0, and 9 the C library is compiled for a fixed address rather than a dynamic address. The constant RedHat has chosen is a little above the default TASK_UNMAPPED_BASE, so even though a few memory mappings have been made before libc is mapped, it can get the address it wants. In most cases this fixed address for libc is a good idea, but it does have a single disadvantage. If you change TASK_UNMAPPED_BASE to get more contiguous address space, the choice of 42000000 is very bad. You can install the source rpm and change this address in the spec file to something else like 07000000, you should also add your initials to the release field so it is always clear that this is a version you changed. Then you can build a new rpm file and install it. On RedHat 7.3 an easier, but not as good solution is to install the i386 version of glibc. (Does this work on RH8.0 as well?)

    17.在linux下我怎样使用posix的共享内存?How do I use posix shared memory in Linux

        你可以在shm_open(3) man page上得到一些帮助。上面没有提到的是你需要包含头文件<sys/fcntl.h>.同时记得要在编译时加上-lrt选项。基本上linux实现shm_open 依赖于/dev/shm 通过调用open访问,同时文件/dev/shm必须存在同时是临时文件系统的挂载点(这个文件系统过去称为shm,现在这个名称废弃了)。注意在Fedora Core 1(i586上)使用-lrt编译的程序不会可靠地运行。
    18.我怎样从终端上读取一个单个字符

    Floyd Davidson 写了一个漂亮的 posting 在 comp.os.linux.development.apps上,有关于此的 .

    19.我怎样预防僵尸进程?

    僵尸进程是一个被父进程抛弃的死掉的子进程。如果你想生成一个子进程,但是又不想承担父进程的责任,你可以调用两次fork。简单的来说,如果你只想直到调用成功或失败,你可以这样做(未测试):

    int doublefork()
    {
    	pid_t pid=fork();
    	int status;
    	switch(pid) {
    		case 0:
    			switch(fork()) {
    				case 0: return 0;
    				case -1: _exit(1);
    				default: _exit(0);
    			}
    		case -1:
    			return -1;
    	}
    	waitpid(pid,&status,0);
    	if (status) return -1;
    	return 1;
    }

    复杂一点的情况来说,你需要直到新进程的id,或失败的错误码errno,进程间通讯(未测试):

    pid_t doublefork()
    {
    	struct {
    		pid_t pid2;
    		int errno_;
    	} data;
    	int pipefd[2];
    	pid_t pid1;
    
    	if (pipe(pipefd)) return -1;
    	pid1=fork();
    	switch(pid1) {
    		case 0:
    			close(pipefd[0]);
    			data.pid2=fork();
    			data.errno_=errno;
    
    			if (data.pid2) {
    				write(pipefd[1],&data,sizeof(data));
    				_exit(0);
    			}
    			close(pipefd[1]);
    			return 0;
    		case -1:
    			close(pipefd[0]);
    			close(pipefd[1]);
    			return -1;
    	}
    
    	close(pipefd[1]);
    	assert(read(pipefd[0],&data,sizeof(data))==sizeof(data));
    	close(pipefd[0]);
    	waitpid(pid1,NULL,0);
    	errno=data.errno_;
    	return data.pid2;
    }

    一些系统可能有其他的处理方式,上面的方式可能是最常见的. 可以读取Unix Programming FAQ的相关章节this section

    20. 我怎样等待一个非我子进程的进程终止?

    最方便的莫过于由一个方式得到任意自己想要的进程终止的通知了,然,不幸的是,没有标准的方式来得到这些。

    这有一些技巧可能有所帮助:

         1.如果想要等待的进程和所在的进程有着亲缘关系,你可以使用管道的方式。管道的产生需要一个共同的祖先进程调用系统调用pipe()。()被等待的进程是写入者,等待的进程作为读取端,当读到EOF时,进程终止了。这个的关键点是写入端的进程关闭写管道。比起等待进程终止,管道还有更好的使用方法。

    • 你可以等待一组内所有进程的终止,通过让他们作为管道的写入端。
    • 多个进程可以等待一个进程终止,因为可以有多个读取者;
    • You can make use of the close on exec flag on the write end of the pipe to indicate if you want to be notified if the process calls execve and not only if it terminates.
    • You can even use select on the read end of the pipe.

       2. 你可以建一个循环,循环中每隔半秒检查这个进程是否还存在。这不是一个好的方案,但是如果情况不允许你选择管道的方式,这也是一个适合的方案。

      3.最后,你可以使用ptrace(),但这通常不是一个好主意,因为:

    • 会影响进程的运行

    • 是进程运行变慢。

    • 一个进程只能包含一个跟踪者。

    • 只能跟踪自己的进程。

       

    21.我怎样探测一个进程是否存在?

       你可以使用系统调用kill()。将信号代码部分填充未0,不会发送信号给指定进程,但是依然会进行错误检查。如果返回值为0,说明进程依然存在,你可以给它发信号。
    如果返回-1,说明进程不存在或者是一个不能向它发送信号的进程,在这种情况下使用errno来找出到底是那种情况。如果是ESRCH 表明进程不存在,如果是EPERM 表明进程是存在的但是不允许给它发信号。查看kill(2) man page 可获取更多信息。

    (网上有篇说到此点的文件:http://www.cnblogs.com/xuxm2007/archive/2011/04/15/2016735.html

    22.问什么进程接收到SIGSEGV但是没有产生core dump?

        这有许多可能。我会将他们列出来,但是我有可能会遗漏一些。

    core文件大小可能超出了当前的限制。查证是否有这个限制,然后取消它。sh或者类似的shell使用ulimit -a查看当前的限制,ulimit -S -c unlimited 样的指令关闭限制。最后确认它确实关闭了限制。在tsh  csh或类似的shell中使用limit and limit coredumpsize unlimited.

    你没有权限生成core文件。核实你是否有该目录的写权限,和如果存在一个core文件你有向其写的权限。注意core文件是位于生成core文件的进程的当前目录,它有可能和其父进程的当前目录不一样。

    核实所在的文件系统是可写的且有足够的空闲空间。

    如果工作目录下有一个与其同名的子目录,也会导致不生成core文件。

    如果同名的core文件已经存在,同时它有着多个硬链接,那么系统也不会产生core文件。

    核实执行程序的suid 或sgid 位是否使能,如果使能的话core默认下是关闭的。同样的情况是你有这文件的执行权限但是却没有该文件的读权限时。

    一些内核版本在共享空间(AKA threads). 里不能使用core dump。最近的内核可以core dump,但是会文件名上注上进程的pid。

    可能性文件的格式可能不是一个标准的格式不支持core dump。每一个可执行文件格式都必须由一个 core转存功能。

    段错误可能导致内核的oops,查看系统日志是否有oops信息。

    23.我怎样修改core文件名和所在位置?

        在linux 2.4及以后版本中文件/proc/sys/kernel/core_uses_pid and /proc/sys/kernel/core_pattern 决定着core dump。如果core_uses_pid 被设置为1.每个core名称后会缀上进程的pid,默认的情况下是给多线程编程程序中。

    你可以修改core_pattern从而改变更多的设置。你可以修改它从而改变core的文件名,你也可以指定一个文件路径从而不再当前目录生成core文件。这很方便

    That can be handy because some file systems are not nice to core dump to. (The root file system, tmpfs, and nfs are examples of places where a core dump can hurt). You can use certain escape sequences in the name specification

    %%
    A % character

    %p
    The pid (if you use this, it will no longer be appended).

    %u
    The user id as a number

    %g
    The group id as a number

    %s
    The signal causing the dump

    %t
    The time when the dump started

    %h
    The hostname

    %e
    The name of the executable

    举个例子,你可以设置路径为/mnt/bigfs/coredumps/%u/%e,这样不同的用户会将core文件放在不同的目录下,并以程序的名为名。使用这种方法你需要预先生成目录,比注意修改目录的所有者和适当的权限。如果你不想使用uid而想使用用户名访问文件,你可以自己建符号链接。

    24. 我怎样从运行的进程中得到core?

           如果你仅想让一个程序终止并产生一个core,你可以向它发送信号SIGABRT,可以使用kill从其他进程发送此信号。或者有进程本身调用kill, raise, or abort发送。如果你想得到一个core文件但不想让进程终止,事情就有点小麻烦。程序的初始化部分中,信号句柄中已经做了处理。从外部的话,内核没有提供一个简单的方法得到core文件而不杀死它。但gdb中提供了一个gcore命令实现了这一艰难的工作。在Fedora Core中你也可以在你的shell中使用gcore(它只是一个脚本调用gdb);

    25.我怎样得到一个设置有suid的程序dump core?

          如果你有源代码,你可以轻松的在main函数中加一条语句,使能保存core文件标志。

    #include <sys/prctl.h>
    ...
    /* The last three arguments are just padding, because the
     * system call requires five arguments.
     */
    prctl(PR_SET_DUMPABLE,1,42,42,42);

         如果哪位兄弟知道一个简洁安全且不用重新编译代码的得到设置有suid标志的可执行程序的core文件,请告诉我。

          如果你有源代码,你可以轻松的在main函数中加一条语句,使能保存core文件标志。同时我实现了一个模块如上所说你真的需要从设置有suid位的可执行程序得到core文件而不想重新编译程序,可以使用它。加载的时候传入想要core文件的进程pid,进程的保存core文件标志将被打开。卸载该模块任何时候都会返回一个出错值。(FIXME: Find out what the purpose of /proc/sys/kernel/core_setuid_ok is)

    26.为什么我找不到/proc/kcore?

         /proc下的文件不是真实的文件,它们是虚拟的文件。Kcore可以被用来调试运行中的内核。它的格式和通常的core文件类似。你不用担心,它一直存在并不会带来任何问题。如果你对其使用ls命令会显示文件的大小相当于系统内核存储空间的大小。但它不会占用任何磁盘空间和内存空间。(为什么不占用内存空间呢,memory翻译为内存对吗?);

    27.我怎样找到一个用户的家目录?

        针对不同的形式有着不同的方法。如果你仅是想知道当前用户的家目录,你可以使用环境变量HOME。在程序是使用getenv("HOME") 。你需要检查返回的指针是不是等于NULL和指向的字符串是否为空。如果环境变量HOME不恰当打印出错误信息并中止程序。在emacs和大多数shells中,当前用户目录也被称为“~”。这有一个代码示例:

    char *myhome()
    {
    	char *r=getenv("HOME");
    	if ((!r)||((*r) != '/')) {
    		fprintf(stderr,"Fix the HOME environment variable.\n");
    		return "/";
    	}
    	return r;
    }

    寻找一个指定用户的主目录是另外一个问题。你需要使用函数getpwnam。传递给该函数一个用户名,它将返回一个结构体,你包含的其中的一个域中为用户的家目录。你需要检查函数的返回值,确认该用户是确实存在的。如果你得到一个空指针,你可以忽略掉返回的结构体。在emacs和大多数shell中,用户的主目录也被称为"~username". 下面是示例代码:

    char *usershome(const char * name)
    {
    	struct passwd *tmp=getpwnam(name);
    	if (!tmp) return NULL;
    	return tmp->pw_dir;
    }

    比较少见的情况是一个设置有suid的程序需要知道当前用户家目录,这时你不能使用环境变量。通常情况下一个设置有suid位的程序不能使用任何环境变量。这种情况下你可以使用函数getpwuid。如下是示例代码:

    char *myhome_suid_version()
    {
    	struct passwdd *tmp=getpwuid(getuid());
    	if (!tmp) {
    		fprintf(stderr,"You don't exist! Go away!\n");
    		exit(1);
    	}
    	return tmp->pw_dir;
    }

    如果你不是在写一个设置有suid位的程序。你不用担心用户会修改家目录。事实上你应该接受用户会修改家目录。修改家目录这不是一个错误,不能接受修改家目录才是一个错误。

    28. 我如何使用crypt生成和验证密码?

    请注意,这仅介绍使用crypt,要真正使这个在Linux下使用,您还需要了解PAM如何工作。

    crypt 接收两个字符串为参数,出口参数为一个指向字符串的指针。相同的函数使用两种不同的方式来生产密码和校验密码。第一个字符串参数是用户的密码类型。第二个字符串参数是salt。你可以传递一个字符串+一些其他东西给salt,crypt 直到salt有多长,如果太长它会取需要的那一部分。输出salt连接编码后的密码。输出的东西实际上被存放在密码文件里。

    要校验密码,需要提供用户的密码类型,和秘密文件作为参数提供给crypt

    Notice this only describes the use of crypt, to really make use of this under Linux you also need to understand how PAM works.
    crypt takes two strings as arguments and outputs a pointer to one string. The same function can be used in two different ways to generate and verify a password. The first argument string is the password typed by the user. The second argument string is the salt. You are allowed to pass a string with something appended to the salt, crypt knows how long the salt is, and will only use the start of the salt string if it is too long. The output is the salt concatenated with the "encoded" password. This output string is what is actually stored in the password file.
    To verify a password give the password typed by the user, and the entry from the password file as arguments to crypt. Compare the output against the entry from the password file. Because the salt is a prefix of the password file entry, crypt will find the salt in the string.

    	if (strcmp(crypt(typed_password,
    	                 passwd_file_entry),
    	           passwd_file_entry))
    	{
    		fprintf(stderr,"Invalid login\n");
    		exit(1);
    	}

    To generate an entry for a password file, your program must choose a random salt. Actually there are different formats for the salt depending on the type of encoding. Conventionally UNIX systems have used a variant of DES. That is not very secure, so Linux have another more secure version based on MD5, which is unfortunately less portable. Since crypt look on the salt to find out which type of password is being used, the above verification code works without modifications for both types of passwords. When generating the password you however have to make the decission as you generate a salt. The salt must contain some random chars. To generate random chars using /dev/random is the recomended approach. The random chars are taken from the set of upper and lower case letters, digits, period, and slash. The DES salt is just two random chars. The MD5 salt is dollar one dollar eight random chars dollar. Here is some example code.

    #define _XOPEN_SOURCE
    #include <stdlib.h>
    #include <string.h>
    #include <stdio.h>
    #include <stdint.h>
    #include <unistd.h>
    #include <fcntl.h>
    
    char *encode(char *password)
    {
    	int i=0;
    	uint8_t rand_buf[8];
    	/* Changed to $6$ to use the more secure SHA-512 hash instead of MD5 */
    	char salt[13]="$6$________$";
    	int fd=open("/dev/random",O_RDONLY);
    	if (fd==-1) {
    		perror("/dev/random");
    		exit(1);
    	}
    	while(i<8)
    		i+=read(fd,rand_buf,8-i);
    	close(fd);
    	for (i=0;i<8;++i)
    		salt[i+3]="./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[rand_buf[i]&63];
    	return crypt(password,salt);
    }

    Notice that crypt returns a pointer to a static buffer. That means you don't need to call free on the pointer returned by crypt. OTOH the string will be overwritten by the next crypt call. For that reason you should not expect crypt to be thread safe. A program using crypt need to be linked with –lcrypt

    29. 我怎么知道系统内存的总量

    在linux系统里,你可以使用函数sysconf(_SC_PHYS_PAGES)得到系统实际物理内存页数。该数字不包含保留的页数,但是它是你的应用程序实际可以使用的内存页数。你可以使用sysconf(_SC_PAGE_SIZE)查的每页的大小。注意你不能简单的将这两个数字相乘而得到系统的物理内存字节数,因为这个乘积有可能会溢出。空闲页的大小你可以调用函数sysconf(_SC_AVPHYS_PAGES)得到,使用这些数字的时候请当心(当心什么呢?);大多数程序不需要关系系统内存的大小,只需要想要多少就申请多少。系统会处理剩下的工作。不要忘记检查函数malloc的返回值。

    一些算法需要知道多大的物理内存可以使执行起来最优。在这种情况下,注意你的程序不是系统中唯一在运行的程序。多留一些空间是个好主意,如果你是这分配更多的空间,这时候多余一点的未使用的空间比摧毁交换分区强。设置一个申请内存页的上限,比如在32位体系下最多为4GB的物理内存。一个单独的进程不应该申请大于此数的内存,因为地址线宽的问题,你需要使用以段代码想这样:

     

       int allocpages=(sysconf(_SC_PHYS_PAGES)*3)>>2;
       if (allocpages>400000) allocpages=400000;
       allocation=malloc(allocpages*sysconf(_SC_PAGE_SIZE));
    如果你有一个良好的缓存处理算法,你可以尽可能多的使用物理内存以获得良好的性能。
    大多数的内核版本支持过量的内存使用,这意味这允许你使用大于可能的内存,当问题发生时会杀死进程。为了避免非预期的杀死进程,你要保证足够的交换空间。我的建议是交换分区是实际
    物理内存的三倍大小。
    30. 我怎样得到网络接口和它们的ip 物理地址的清单?
        下面是来自Floyd Davidson的例子。在这之下有更简短的例子。
    /* display info about network interfaces */
    
    #define _BSD_SOURCE
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <string.h>
    #include <errno.h>
    #include <sys/ioctl.h>
    #include <sys/types.h>
    #include <net/if.h>
    #include <net/if_arp.h>
    #include <arpa/inet.h>
    
    #define inaddrr(x) (*(struct in_addr *) &ifr->x[sizeof sa.sin_port])
    #define IFRSIZE   ((int)(size * sizeof (struct ifreq)))
    
    static int
    get_addr(int sock, char * ifname, struct sockaddr * ifaddr) {
    
      struct ifreq *ifr;
      struct ifreq ifrr;
      struct sockaddr_in sa;
    
      ifr = &ifrr;
      ifrr.ifr_addr.sa_family = AF_INET;
      strncpy(ifrr.ifr_name, ifname, sizeof(ifrr.ifr_name));
    
      if (ioctl(sock, SIOCGIFADDR, ifr) < 0) {
        printf("No %s interface.\n", ifname);
        return -1;
      }
    
      *ifaddr = ifrr.ifr_addr;
      printf("Address for %s: %s\n", ifname, inet_ntoa(inaddrr(ifr_addr.sa_data)));
      return 0;
    }
    
    int
    main(void)
    {
      unsigned char      *u;
      int                sockfd, size  = 1;
      struct ifreq       *ifr;
      struct ifconf      ifc;
      struct sockaddr_in sa;
    
      if (0 > (sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP))) {
              fprintf(stderr, "Cannot open socket.\n");
        exit(EXIT_FAILURE);
      }
    
      ifc.ifc_len = IFRSIZE;
      ifc.ifc_req = NULL;
    
      do {
        ++size;
        /* realloc buffer size until no overflow occurs  */
        if (NULL == (ifc.ifc_req = realloc(ifc.ifc_req, IFRSIZE))) {
          fprintf(stderr, "Out of memory.\n");
          exit(EXIT_FAILURE);
        }
        ifc.ifc_len = IFRSIZE;
        if (ioctl(sockfd, SIOCGIFCONF, &ifc)) {
          perror("ioctl SIOCFIFCONF");
          exit(EXIT_FAILURE);
        }
      } while  (IFRSIZE <= ifc.ifc_len);
    
      /* this is an alternate way to get info... */
      {
        struct sockaddr ifa;
        get_addr(sockfd, "ppp0", &ifa);
      }
    
      ifr = ifc.ifc_req;
      for (;(char *) ifr < (char *) ifc.ifc_req + ifc.ifc_len; ++ifr) {
    
        if (ifr->ifr_addr.sa_data == (ifr+1)->ifr_addr.sa_data) {
          continue;  /* duplicate, skip it */
        }
    
        if (ioctl(sockfd, SIOCGIFFLAGS, ifr)) {
          continue;  /* failed to get flags, skip it */
        }
    
        printf("Interface:  %s\n", ifr->ifr_name);
        printf("IP Address: %s\n", inet_ntoa(inaddrr(ifr_addr.sa_data)));
    
        /*
          This won't work on HP-UX 10.20 as there's no SIOCGIFHWADDR ioctl. You'll
          need to use DLPI or the NETSTAT ioctl on /dev/lan0, etc (and you'll need
          to be root to use the NETSTAT ioctl. Also this is deprecated and doesn't
          work on 11.00).
    
          On Digital Unix you can use the SIOCRPHYSADDR ioctl according to an old
          utility I have. Also on SGI I think you need to use a raw socket, e.g. s
          = socket(PF_RAW, SOCK_RAW, RAWPROTO_SNOOP)
    
          Dave
    
          From: David Peter <dave.peter@eu.citrix.com>
         */
    
        if (0 == ioctl(sockfd, SIOCGIFHWADDR, ifr)) {
    
          /* Select which  hardware types to process.
           *
           *    See list in system include file included from
           *    /usr/include/net/if_arp.h  (For example, on
           *    Linux see file /usr/include/linux/if_arp.h to
           *    get the list.)
           */
          switch (ifr->ifr_hwaddr.sa_family) {
          default:
            printf("\n");
            continue;
          case  ARPHRD_NETROM:  case  ARPHRD_ETHER:  case  ARPHRD_PPP:
          case  ARPHRD_EETHER:  case  ARPHRD_IEEE802: break;
          }
    
          u = (unsigned char *) &ifr->ifr_addr.sa_data;
    
          if (u[0] + u[1] + u[2] + u[3] + u[4] + u[5]) {
            printf("HW Address: %2.2x.%2.2x.%2.2x.%2.2x.%2.2x.%2.2x\n",
                 u[0], u[1], u[2], u[3], u[4], u[5]);
          }
        }
    
        if (0 == ioctl(sockfd, SIOCGIFNETMASK, ifr) &&
            strcmp("255.255.255.255", inet_ntoa(inaddrr(ifr_addr.sa_data)))) {
          printf("Netmask:    %s\n", inet_ntoa(inaddrr(ifr_addr.sa_data)));
        }
    
        if (ifr->ifr_flags & IFF_BROADCAST) {
          if (0 == ioctl(sockfd, SIOCGIFBRDADDR, ifr) &&
              strcmp("0.0.0.0", inet_ntoa(inaddrr(ifr_addr.sa_data)))) {
            printf("Broadcast:  %s\n", inet_ntoa(inaddrr(ifr_addr.sa_data)));
          }
        }
    
        if (0 == ioctl(sockfd, SIOCGIFMTU, ifr)) {
          printf("MTU:        %u\n",  ifr->ifr_mtu);
        }
    
        if (0 == ioctl(sockfd, SIOCGIFMETRIC, ifr)) {
          printf("Metric:     %u\n",  ifr->ifr_metric);
        }
        printf("\n");
      }
    
      close(sockfd);
      return EXIT_SUCCESS;
    }

    This program written by Frank Becker does part of the job:

    Frank Becker写的这个程序做了部分这样的工作:

    #include <net/if.h>
    #include <sys/ioctl.h>
    #include <stdio.h>
    #include <stdlib.h>
    
    int main( int argc, char *argv[])
    {
         char *ifname = "eth0";
         struct ifreq ifr;
         int fd;
         int i;
    
         if( argc==2 ) ifname = argv[1];
    
         fd = socket(AF_INET,SOCK_DGRAM, 0);
         if (fd >= 0) {
             strcpy(ifr.ifr_name, ifname);
             if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) {
                 printf( "%s : ", ifname);
                 for( i=2; i<6; i++)
                 {
                     unsigned char val =
                         (unsigned char)ifr.ifr_ifru.ifru_addr.sa_data[i];
                     printf( "%d%s", val, i==5?" ":".");
                 }
                 printf( "\n");
             }
         }
    
         return 0;
    }

    Another program written by Gary Desrosiers will print the MAC address of an interface:

    另外一个由Gary Desrosiers写的程序实现了打印物理地址的接口:

    #include <string.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <netinet/in.h>
    #include <net/if.h>
    #include <sys/types.h>
    #include <arpa/inet.h>
    #include <sys/ioctl.h>
    #include <sys/socket.h>
    #include <netdb.h>
    
    int main(int argc,char *argv[])
    {
      int r;
      struct protoent *proto;
      int sock;
      struct ifreq ifr;
    
      if(argc < 2)
      {
        printf("Usage: dumpmac ifname\n");
        exit(1);
      }
      proto = getprotobyname("tcp");
      sock = socket(PF_INET,SOCK_STREAM,proto->p_proto);
      memset(&ifr,0,sizeof(struct ifreq));
      strcpy(ifr.ifr_name,argv[1]);
      r = ioctl(sock,SIOCGIFHWADDR,&ifr);
      if(r != 0)
      {
        printf("Couldn't get mac address\n");
        exit(1);
      }
      printf("%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X\n",
      (unsigned char)ifr.ifr_hwaddr.sa_data[0],
      (unsigned char)ifr.ifr_hwaddr.sa_data[1],
      (unsigned char)ifr.ifr_hwaddr.sa_data[2],
      (unsigned char)ifr.ifr_hwaddr.sa_data[3],
      (unsigned char)ifr.ifr_hwaddr.sa_data[4],
      (unsigned char)ifr.ifr_hwaddr.sa_data[5]);
      return(0);
    }
    31.我怎样可以将我的调试输出到一个新的调试终端上
    一个例子可能会有所帮助:debugxterm.c. 更好的一个解决办法是使用xterm的-S选项,查看xterm的man page获得更多的信息。
    32.我打算写一个文件系统,我应该从哪里开始呢?
        写一个文件系统你学要学两件事情:你打算使用的数据结构,linux内核的API接口。
         首先你先去看一看目前存在的最简单的文件系统的源代码。linux下最简单的文件系统是ramfs.有两种文件系统,一种是使用块设备另一种是不使用块设备。Ramfs 是那种不
      使用块设备的,与之相同的还有大多数网络文件系统和像proc的虚拟的文件系统。
       通常你在磁盘上存储东西的文件系统是另种使用块设备的文件系统
    1. The filesystems you actually store on disks are those using blockdevices, they can be divided into two groups. The simplest are those that can be implemented using a get_block/bmap function, this includes ext2, minix, and fat. The simplest from this group and yet fully posix compliant is minix. If the data on disk is stored in some more compact way, the simple solution will not be possible. At this point it obviously start getting a little complicated, there does however still exist a quite simple readonly filesystem which has it's own readpage implementation, that is romfs.
      Before implementing the filesystem as a kernel module, you should get a feeling with the datastructures you will be using. If you are using a blockdevice, you should write usermode tools to manipulate the datastructures on the disk. You are going to need these pieces of code anyway, because you will eventually need three tools for your filesystem: mkfs, fsck, and debugfs. Once you have working usermode code for the basic tasks, you can start doing it in the kernel. If you are writing another kind of filesystem, there is still a few things to do before writing kernel code. If you are writing a networking filesystem, you want to know the protocols you are going to use, and you want to test them in usermode first.

    Does my kernel leak memory?
    If you didn't modify the kernel, it probably doesn't leak memory. Of course eventually kernels do get released with a bug that could cause a leak. Before you conclude that you have found a bug, you will need to know how to find and interpret informations about the memory usage. The kernel will attempt to use most of the otherwise free memory for caching disk conents. This means that there will normally be very litle memory, that is actually free. Take a look on this output from the free command:

                 total       used       free     shared    buffers     cached
    Mem:        448980     443196       5784          0      36604     303404
    -/+ buffers/cache:     103188     345792
    Swap:      2096440          0    2096440

    The first line tells me, that only 5784KB of my 448MB of memory are free. But in the second line where the 332MB of memory used for buffer and cache memory is substracted from the used memory I see, that only 100MB of the memory is used for other allocations. Some of those 100MB will be used for slabs. You can use slabtop to see information about this memory usage. Another possibility is to use my script which will list slab allocations(requires kernel version 2.4). Look on a few selected lines from the output:

    inode_cache         4863 pages  19452 KB
    dentry_cache        1231 pages   4924 KB
    buffer_head         1476 pages   5904 KB
    ----------------------------------------
    Total               8554 pages  34216 KB
    ----------------------------------------

    Here we see, that most of the 33MB used for slabs is actually also cached disk contents and management for the buffers. This is quite normal, and those slabs will get freed if memory gets tight. The rest of the memory in my system is mostly used by applications. Even if we sum up all the allocations I have talked about, there will still be a few KB of memory that is not accounted for. That is also normal, there are different types of allocations that use get_free_pages() directly. Those pages are only listed as used, and does not figure anywhere else, but that doesn't mean they have leaked. Also notice that there is a difference between the 448MB I have and the 438MB free shows. That is because the mem_map will use 1.7% of my physical memory, and the kernel image itself also use a few MB. Those are not part of the total memory as reported by the kernel.
    So now that you know a litle about the many different ways memory is allocated under Linux, how do you tell, if there is a leak? First of all if you suspect some action causes a leak, you should repeat it over and over again. If memory is allocated only the first time, it is probably not a leak. If there really is a leak, it will allocate more memory each time. Look on the slabs, if one type of slabs keep growing, you might have found a leak. Ignore the three slabs I told you about earlier. If the leaked memory is not allocated through slabs, it must be allocated at least one page at a time, in which case it will quickly grow large enough to be easilly noticed. Eventually the system will die when it really runs out of memory.
    In addition to just monitoring the memory usage, you can also try to force the system to free memory. Let a program allocate a lot of virtual memory and touch each page. That will force the kernel to free anything that can be freed. An easy way to do this is by letting tail read from /dev/zero.

    tail -c400m /dev/zero

    This will allocate 400MB and access it over and over again.

     

     

    英文原文:http://www.kasperd.net/~kasperd/comp.os.linux.development.faq#unresolved

    转载于:https://www.cnblogs.com/fly-fish/archive/2011/10/07/2200869.html

    展开全文
  • Awesome list of C++ GameDev project

    千次阅读 2021-01-12 11:06:11
    Awesome list of C++ GameDev project A curated list of awesome C++ (mainly) things for Game Development. Inspired by awesome-... stuff. ~2000 projects listed here! If you want to add projects here, ...

    A curated list of awesome C++ (mainly) things for Game Development. Inspired by awesome-... stuff.

    ~2000 projects listed here!

    If you want to add projects here, do a push request or open an issue!

    (Maybe some new categories should be added to sort everything a bit better) (Maybe some repositories could be removed from the list too)

    C++

    • rangeless : c++ LINQ -like library of higher-order functions for data manipulation
    • variant : C++17 std::variant for C++11/14/17
    • tweeny : A modern C++ tweening library
    • arrow : Apache Arrow is a cross-language development platform for in-memory data. It specifies a standardized language-independent columnar memory format for flat and hierarchical data, organized for effic…
    • EAMain : EAMain provides a multi-platform entry point used for platforms that don't support console output, return codes and command-line arguments.
    • cxx14-graph : A C++ 14 implementation of graph data structures
    • lex : C++14 fast and efficient tokenizer
    • lager : C++ library for value-oriented design using the unidirectional data-flow architecture (Redux for C++)
    • cpp-std-fwd : forward declarations for C++ std headers
    • hedley : A C/C++ header to help move #ifdefs out of your code
    • scnlib : scanf for modern C++
    • pipet : c++ library for building lightweight processing pipeline at compile-time
    • scope_guard : Scope Guard & Defer C++
    • pdbex : pdbex is a utility for reconstructing structures and unions from the PDB into compilable C headers
    • optional-lite : optional lite - A C++17-like optional, a nullable object for C++98, C++11 and later in a single-file header-only library
    • libinsanity : libc functions (and related) without bugs mandated by standard C or common OSes
    • kangaru : A dependency injection container for C++11, C++14 and later
    • CppCoreGuidelines : The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++
    • span-lite : span lite - A C++20-like span for C++98, C++11 and later in a single-file header-only library
    • replxx : A readline and libedit replacement that supports UTF-8, syntax highlighting, hints and Windows and is BSD licensed.
    • stateful_pointer : Use unused bits in your pointer
    • type_erasure_and_dispatch : Code related to ACCU meet up talk.
    • modern-cpp-features : A cheatsheet of modern C++ language and library features.
    • msgpack11 : A tiny MessagePack library for C++11 (msgpack.org[C++11])
    • trackable_ptr : Smart pointer for any movable objects. When trackable object moved/destroyed, trackers updated with new object's pointer.
    • reactive : Simple, non intrusive reactive programming library for C++. (Events + Observable Properties + Reactive Properties)
    • liberasure : A no-dependencies C++ extensible type erasure library
    • any : A simple variant type for C++
    • FastDynamicCast : Fast dynamic cast in C++ for MSVC, outperforming the regular dynamic cast by up to 25 times
    • 0xABAD1DEA : Static global objects with constructors and destructors made useful in C++
    • PubBus : A simple implementation of a MessageBus.
    • cppbestpractices : Collaborative Collection of C++ Best Practices
    • emscripten : Emscripten: An LLVM-to-Web Compiler
    • gcpp : Experimental deferred and unordered destruction library for C++
    • patterns : Pattern Matching in C++
    • cmcstl2 : An implementation of C++ Extensions for Ranges
    • invoke.hpp : std::invoke/std::apply analogs for C++14
    • cppbackport : A backport of C++11/14/17 features to earlier versions
    • libuv : Cross-platform asynchronous I/O
    • uvw : Header-only, event based, tiny and easy to use libuv wrapper in modern C++
    • opt : Class template designed to express optionality without having to sacrifice memory to store additional bool flag
    • shared_ptr_2.0 :
    • undo : C++ library to implement non-linear undo/redo functionality
    • Configuru : Experimental config library for C++
    • strong_typedef : A class template that creates a new type that is distinct from the underlying type, but convertible to and from it
    • dry-comparisons : C++17 Utility classes for comparing multiple values in one simple expression
    • determine_c_or_cpp : Determine programatically C from C++ as well as various versions
    • optional : C++11/14/17 std::optional with functional-style extensions and reference support
    • promise-cpp : C++ promise/A+ library in Javascript style.
    • mod : MASTERS of DATA, a course about videogames data processing and optimization
    • ring-span-lite : ring-span lite - A C++yy-like ring_span type for C++98, C++11 and later in a single-file header-only library
    • outcome : Provides very lightweight outcome and result (non-Boost edition)
    • semver : A C++ Library for Dealing with Semantic Versioning
    • cpp-cheatsheet : Modern C++ Cheatsheet
    • BareMetalLib : A C++ support library for bare-metal programming
    • Mastering-Cpp-Game-Development : Code files for Mastering C++ Game Development, published by Packt
    • std_function :
    • ska_sort :
    • strong_type : C++ implementation of strong types
    • type_safe : Zero overhead utilities for preventing bugs at compile time
    • Bits
      • BigInt : BigInt in C++ using bitset
      • huge-long-number : This is an implementation of arbitrary range of integers written in C++14
      • BigInteger : Be limited not by the size of your register but by the bulk of your RAM.
      • bitmask : A generic implementation of the BitmaskType C++ concept
      • BigInteger : An Implementation of BigInteger library in C++
      • bigint : A lightweight big integer library for c++
      • bitwise : Bitwise is an educational project where we create the software/hardware stack for a computer from scratch.
      • varint : Variable-length integer encodings.
      • mppp : Multiprecision for modern C++
      • enum-flags : Bit flags for C++11 scoped enums
    • MultiThreading
      • marl : A hybrid thread / fiber task scheduler written in C++ 11
      • EAThread : EAThread implements a unified cross-platform interface for multithreaded programming.
      • arcana.cpp : Arcana.cpp is a collection of helpers and utility code for low overhead, cross platform C++ implementation of task-based asynchrony.
      • relacy : Automatically exported from code.google.com/p/relacy
      • partr : Parallel Tasks Runtime
      • deadlockempire.github.io : The Deadlock Empire: Slay dragons, learn concurrency!
      • MAN : Man is Thread Pool in C++17
      • cpp-concurrency : cpp implementation of golang style concurrency
      • tbb : Official Threading Building Blocks (TBB) GitHub repository. For Commercial Intel® TBB distribution, please click here: https://software.intel.com/en-us/tbb
      • bikeshed : Lock free hierarchical work scheduler
      • lucy_job_system : Fiber-based job system with extremely simple API
      • libgo : Go-style concurrency in C++11
      • ThreadPool : A fastest, exception-safety and pure C++17 thread pool.
      • thread_pool : Thread pool using std::* primitives from C++17, with optional priority queue/greenthreading for POSIX.
      • concurrentqueue : A fast multi-producer, multi-consumer lock-free concurrent queue for C++11
      • ck : Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance conc…
      • GTS-GamesTaskScheduler : A task scheduling framework designed for the needs of game developers.
      • cpp-taskflow : Modern C++ Parallel Task Programming Library
      • cppcoro : A library of C++ coroutine abstractions for the coroutines TS
      • cpp-taskflow : A Modern C++ Parallel Task Programming Library
      • mx : C++ coroutine await, yield, channels, i/o events (single header + link to boost)
      • px : Single header C++ Libraries for Thread Scheduling, Rendering, and so on...
      • FiberTaskingLib : A library for enabling task-based multi-threading. It allows execution of task graphs with arbitrary dependencies.
      • elle : The Elle coroutine-based asynchronous C++ development framework.
      • thread-pool : Thread pool implementation using c++11 threads
      • thrust : Thrust is a C++ parallel programming library which resembles the C++ Standard Library.
      • enkiTS : C++ and C multithreading task scheduler
      • enkiTSExamples : Examples for enkiTS
      • fiber : Header only cross platform wrapper of fiber API.
      • px_sched : Single Header C++11 Task Scheduler
      • termite-jobs : Fast, multiplatform fiber based job dispatcher based on Naughty Dogs' GDC2015 talk.
      • jobxx : Lightweight C++ task system
      • thread-pool-cpp : High performance C++11 thread pool
      • ThreadPool : Lightweight, Generic, Pure C++11 ThreadPool
      • Scheduler : Modern C++ Scheduling Library
      • dwThreadPool : A simple, header-only, dependency-free, C++ 11 based ThreadPool library.
      • CTPL : Modern and efficient C++ Thread Pool Library
      • ThreadPool : A simple C++11 Thread Pool implementation
      • Awl : Awl (Asynchronous Work Library) is a C++ library that aims at making parallel programming as easy as possible.
      • asio : Asio C++ Library
      • MPMCQueue : A bounded multi-producer multi-consumer lock-free queue written in C++11
      • coroutine : C++11 single .h asymmetric coroutine implementation via ucontext / fiber
      • coroutines :
      • coro : Single-header library facilities for C++2a Coroutines
      • executors : C++ library for executors
      • parallel-util : Simple header-only implementation of "parallel_for" and "parallel_map" for C++11
      • parallel-hashmap : A family of header-only, very fast and memory-friendly hashmap and btree containers.
      • concurrent-deque : Lock-free concurrent work stealing deque in C++
      • ParallelComputingPlayground : Shows different programming techniques for parallel computing on CPU and GPU
      • awesome-lockfree : A collection of resources on wait-free and lock-free programming
    • Memory
      • dlmalloc : Doug Lea's malloc
      • deluxe68 : A simple register allocator frontend for 68k assembly
      • KernelReadWriteMemory : Simple code to manipulate the memory of a usermode process from kernel.
      • malloc_geiger :
      • mimalloc-bench : Suite for benchmarking malloc implementations.
      • allocator_bench : bench of various memory allocators
      • mio : Cross-platform C++11 header-only library for memory mapped file IO
      • snmalloc : Message passing based allocator
      • mimalloc : mimalloc is a compact general purpose allocator with excellent performance.
      • hardened_malloc : Hardened allocator designed for modern systems. It has integration into Android's Bionic libc and can be used externally with musl and glibc as a dynamic library for use on other Linux-based platfo…
      • objectpool : Object pool implementation in C++11
      • rampin : Try to make Windows preload file into RAM by memory mapping it
      • tgc : A Tiny Garbage Collector for C
      • Mesh : A memory allocator that automatically reduces the memory footprint of C/C++ applications.
      • memory-dumper : A tool for dumping files from processes memory
      • alloc-test : Cross-platform benchmarking for memory allocators, aiming to be as close to real world as it is practical
      • memory-allocators : Custom memory allocators in C++ to improve the performance of dynamic memory allocation
      • drmemory : Memory Debugger for Windows, Linux, Mac, and Android
      • rpmalloc : Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C
      • jemalloc :
      • cpp-mempool : C++ header-only mempool library
      • incppect : Inspect C++ memory in the browser
      • injection : Windows process injection methods
      • tiny : low-level library for minimizing the size of your types
      • memory : STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.
    • Strings
      • ryu : Converts floating point numbers to decimal strings
      • str : A SIMD optimized fixed-length string class along with an adaptive hash table for fast searching
      • inplace_string : mp::inplace_string<CharT, MaxSize, Traits> is a std::string-like class template that stores text content in-place inside the class
      • arabtype : a small and simple implementation that transform isolated arabic utf8 character strings into contextual forms.
      • unify : A C++11 function to normalize resource identificators
      • unicode : C++ UTF-8 Strings and Utilities
      • unicode : C++ UTF-8 Strings and Utilities
      • str : Simple C++ string type with an optional local buffer
      • SuperString : A fast and memory-optimized string library for C++
      • stdstring.h : C string utils library (STB style, header-only).
      • text_view : A C++ concepts and range based character encoding and code point enumeration library
      • rapidstring : Maybe the fastest string library ever.
      • utfz : Tiny C++ UTF-8 library - safe, no exceptions
      • utf8.h : single header utf8 string functions for C and C++
      • tiny-utf8 : Unicode (UTF-8) capable std::string
      • str_view : Null-termination-aware string-view class for C++
      • Obfuscate : Guaranteed compile-time string literal obfuscation header-only library for C++14
      • stringencoders : Fast c-string transformations
      • string-view-lite : string_view lite - A C++17-like string_view for C++98, C++11 and later in a single-file header-only library
      • cutf : utf-8 <> wchar_t conversion functions for C and C++
      • Apris : String processor using banks and alternatives
      • string_id : A small C++ library to handle hashed strings serving as identifiers.
    • Parsers
      • inih : Simple .INI file parser in C, good for embedded systems
      • simple-ini-reader : Fast, Simple, Public Domain INI Reader written in C
      • rapidjson : A fast JSON parser/generator for C++ with both SAX/DOM style API
      • json.h : json parser for C and C++
      • ezxml : ezxml - XML parser
      • jsmn : Jsmn is a world fastest JSON parser/tokenizer. This is the official repo replacing the old one at Bitbucket
      • fast_obj : Fast C OBJ parser
      • cpptoml : cpptoml is a header-only library for parsing TOML
      • nanocsv : Multithreaded header only C++11 CSV parser
      • picojson : a header-file-only, JSON parser serializer in C++
      • js0n : Flexible Zero-Footprint JSON Parser in C
      • CppCmb : A generic C++17 parser-combinator library with a natural grammar notation.
      • obj_lib : OBJ reader and writer library
      • ffmpeg-cpp : A clean, easy-to-use C++ wrapper around the ffmpeg libraries
      • Parser-Combinators : C++ parser combinator library
      • json5 : JSON5 — JSON for humans
      • tinyply : C++11 ply 3d mesh format importer & exporter
      • json : Single file in-place JSON/SJSON parser
      • simdjson : Parsing gigabytes of JSON per second
      • sajson : Lightweight, extremely high-performance JSON parser for C++11
      • tinyddsloader : Tiny DDS file loader
      • sjson-cpp : An Simplified JSON (SJSON) C++ reader and writer
      • xlnt : Cross-platform user-friendly xlsx library for C++14
      • assfile : C library for accessing assets (read-only data) from many different sources, with an fopen/fread-like API.
      • sjson : Fast and portable single-header C file Json encoder/decoder
      • melo : melo is mesh loader for OBJ, glTF2 and PLY
      • jo : JSON output from a shell
      • huffandpuff : Minimal Huffman coder/decoder
      • fbx : C++ Library for reading and writing FBX files
      • csv-parser : A modern C++ library for reading, writing, and analyzing CSV (and similar) files.
      • enkiMI : C and C++ Minecraft Importer library
      • sjson : sjson: no {} needed around the whole file; "=" is allowed instead of ":"; quotes around the key are optional; commas after values are optional; read access through compile time hashes much faster t…
      • OpenFBX : Lightweight open source FBX importer
      • fbx : Single-file binary FBX importer.
      • tinyobjloader : Tiny but powerful single file wavefront obj loader
      • DevIL : Developer's Image Library (DevIL) is a cross-platform image library utilizing a simple syntax to load, save, convert, manipulate, filter, and display a variety of images with ease. It is highly por…
      • json : C++ header-only JSON library
      • glw_json : Single-header fast and compact C++ library for JSON serialization, no memory allocation during parsing.
      • svgpp : C++ SVG library
      • Vili : A nice and readable data format !
      • SimpleJSON : Simple C++ JSON library
      • ini : A tiny ANSI C library for loading .ini config files
      • cfgpath : Cross platform C header for obtaining paths to user configuration files and directories
      • juson : lightweight json parser in c
      • simpleini : Cross-platform C++ library providing a simple API to read and write INI-style configuration files
      • jsonpack : JsonPack is a high-performance and extremely easy-to-use JSON serialization library
      • yaml-cpp : A YAML parser and emitter in C++
      • json : JSON for Modern C++
      • pugixml : Light-weight, simple and fast XML parser for C++ with XPath support
      • rapidcsv : C++ CSV parser library
      • fast-cpp-csv-parser : fast-cpp-csv-parser
      • csvstream : An easy-to-use CSV file parser for C++
      • Qxlnt : Use xlnt in Qt5. xlnt is cross-platform user-friendly xlsx library for C++14.
      • Qlibxlsxwriter : Use libxlsxwriter in Qt5. libxlsxwriter is a C library for creating Excel XLSX files.
      • QSimpleXlsxWriter : Use SimpleXlsxWriter in Qt5. SimpleXlsxWriter is C++ library for creating XLSX files for MS Excel 2007 and above.
      • QXlsx : Excel file(*.xlsx) reader/writer library using Qt5. Descendant of QtXlsx.
      • simdjson : Parsing gigabytes of JSON per second
      • DuckX : C++ library for creating and updating Microsoft Word (.docx) files.
      • inih : This is a header only C++ version of inih.
    • FileSystem
      • filesystem : An implementation of C++17 std::filesystem for C++11 /C++14/C++17 on Windows, macOS and Linux.
      • littlefs : A little fail-safe filesystem designed for microcontrollers
      • watchman : Watches files and records, or triggers actions, when they change.
      • edwork : Decentralized, distributed read-write filesystem
      • dr_fs : Single file libraries for file system related stuff
      • apathy : C++ Path Manipulation
      • filesystem : A tiny self-contained path manipulation library for C++
      • tinydir : Lightweight, portable and easy to integrate C directory and file reader
      • dirent : C/C++ library for retrieving information on files and directories
      • whereami : Locate the current executable and the current module/library on the file system
    • Reflection & Serialization
      • Vzor : Vzor is a reflection library for C++, with interface in Python and C++, macroless, intrusiveless, working on top modern C++ attributes
      • magic_enum : Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code
      • ArticleEnumClass-v2 :
      • tinyrefl : A work in progress minimal C++ static reflection API and codegen tool.
      • datalibrary : Open Source Data Library for data serialization.
      • enum_traits : Type traits for properties of C / C++ enum types
      • enum_reflect : A demo repo for enum_traits
      • cpgf : cpgf library
      • meta : Header-only, non-intrusive and macro-free runtime reflection system in C++
      • metareflect : Metareflect is a lightweight reflection system for C++, based on LLVM and Clangs libtooling.
      • zserio : zero sugar, zero fat, zero serialization overhead
      • rttr : C++ Reflection Library
      • cista : Simple C++ Serialization
      • ponder : C++ reflection library
      • tekari : A visualization and editing tool for reflectance data
      • bitsery : Your binary serialization library
      • tstype : Lightweight C++ RTTI library
      • capnproto : Cap'n Proto serialization/RPC system - core tools and C++ library
      • reflect : easy reflection and serialization for C++17
      • cpp-serializers : Benchmark comparing various data serialization libraries (thrift, protobuf etc.) for C++
      • cppexpose : C++ library for type introspection, reflection, and scripting interface
      • iguana : universal serialization engine
      • Reflex : C++14 Reflection Library
      • reflect : Reflection and serialization in C++
      • cpp-generic-serialize : C++11 Header-only generic binary-serialization for arbitrary types (and nested containers)
      • rpoco : (R)eflect (P)lain (O)ld (C)++ (O)bjects, is a small header based reflection system that supports JSON serialization,etc
      • CPP-Reflection : C++ Reflection Parser / Runtime Skeleton
      • cereal : A C++11 library for serialization
      • cmake-reflection-template : A template for simple C++ reflection done with CMake and Python (no other external tools)
      • MetaStuff : Code I use in my game for all serialization/deserialization/introspection stuff
      • type_name : C++ type_name template utilities for pretty-printing type names
      • smartenum : Macros for declaring enums in C++ that include to_string conversion and looping through all enum values
      • better-enums : C++ compile-time enum to string, iteration, in a single header file
      • magic_get : std::tuple like methods for user defined types without any macro or boilerplate code
      • ctti : Compile Time Type Information for C++
      • nameof : Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum
      • flatbuffers : FlatBuffers: Memory Efficient Serialization Library
      • protobuf : Protocol Buffers - Google's data interchange format
      • archive : Simple, compact, endian-safe and header-only serialization/deserialization for C++
      • reflect : C++ reflect library in less than 200 lines
      • data_desk : A data description language parser with introspection and custom code capabilities, intended for compile-time code generation in projects.
      • msgpack-c : MessagePack implementation for C and C++ / msgpack.org[C/C++]
      • wise_enum : A reflective enum implementation for C++
      • enum.hpp : C++17 compile-time enum reflection library
      • reflection :
    • Metaprogramming
      • monster : The Art of Template MetaProgramming in Modern C++
      • STT-C-Compile-Time-Snake : Snake/Nibbler implementation using C++ template metaprogamming
      • brigand : Instant compile time C++ 11 metaprogramming library
      • cxl : A C++17 metaprogramming library. Strings, Parsing, Typelists, Aggregate to Tuple conversions and Constant integral literals
      • hana : Your standard library for metaprogramming
    • Functionnal Programming
      • cpp_functional_programming : List of materials about functional programming in C++
      • hof : Higher-order functions for c++
      • easing-functions : Easing functions implemented in C++
      • luna-studio : An IDE for hybrid textual and visual functional programming.
      • ftl : C++ template library for fans of functional programming
      • Function : Heap allocation free version of C++11 std::function
      • fixed_size_function : Fixed size function wrapper like std::function
      • FastDelegate : C++11 version of Don Clugston's FastDelegate library, by Ceniza.
      • any_function : any_function is a functional counterpart to std::any
      • delegates : Fast delegates implementation
      • SLACC : Simple Lightweight Adaptable Command Console
      • function_ref : A lightweight, non-owning reference to a callable.
      • expected : C++11/14/17 std::expected with functional-style extensions
      • pluscallback : easy to use callback library for C++
      • asyncpp : C++ async operations
      • coro : Modern coroutine library for C++
      • libco : libco is a coroutine library which is widely used in wechat back-end service. It has been running on tens of thousands of machines since 2013.
      • eventpp : Minimal C++ Event Bus
      • FunctionalPlus : Functional Programming Library for C++. Write concise and readable C++ code.
      • function2 : Improved and configurable drop-in replacement to std::function that supports move only types, multiple overloads and more
      • eventbus : A simple, header only event bus library written in modern C++17.
    • Containers
      • mlib : Library of generic and type safe containers in pure C language (C99 or C11) for a wide collection of container (comparable to the C++ STL).
      • SmartIteratorCpp11 : Smart iterator like range-v3 in C++11
      • prio_queue : C++14 cache friendly B-heap priority queue
      • dep_sort : Generic topological sorting for sorting a list of dependencies in C++17
      • sort : Sorting routine implementations in "template" C
      • frozen : a header-only, constexpr alternative to gperf for C++14 users
      • scattered : C++ Scattered Containers
      • radixsort : Radix sort implementations in C and C++
      • judy : A "general purpose dynamic array library" in C. Project page: http://sourceforge.net/projects/judy/
      • judy-template : An implementation of the Judy array, wrapped in a c++ template. Uses Karl Malbrain's implementation, http://code.google.com/p/judyarray/ . Public domain.
      • EasyIterator : C++ iterators made easy! Zero cost abstractions for C++ iterators.
      • plf_colony : An unordered C++ data container providing fast iteration/insertion/erasure while maintaining pointer/iterator validity to non-erased elements regardless of insertions/erasures. Provides higher-perf…
      • flat.hpp : Library of flat vector-like based associative containers
      • skiplist.h : Single-header-file, public domain, type-generic C89 skip list implemementation
      • avl_tree : High performance C implementation of AVL trees
      • rsht : really simple hash table
      • array : contiguous container library - arrays with customizable allocation, small buffer optimization and more
      • sparse-map : C++ implementation of a memory efficient hash map and hash set
      • hopscotch-map : C++ implementation of a fast hash map and hash set using hopscotch hashing
      • flat_hash_map : A very fast hashtable
      • devector : Resizable contiguous sequence container with fast appends on either end.
      • hashMap : A concurrent thread-safe hash map implemented in C++
      • EASTL : EASTL stands for Electronic Arts Standard Template Library. It is an extensive and robust implementation that has an emphasis on high performance.
      • STL : MSVC's implementation of the C++ Standard Library.
      • plf_list : A drop-in replacement for std::list with 293% faster insertion, 57% faster erasure, 17% faster iteration and 77% faster sorting on average. 20-24% speed increase in use-case testing.
      • rax : A radix tree implementation in ANSI C
      • ga : Partitioned Global Address Space (PGAS) library for distributed arrays
      • xenium : A C++ library providing various concurrent data structures and reclamation schemes.
      • sparsehash-c11 : Experimental C++11 version of sparsehash
      • Sprout : C++11/14 constexpr based Containers, Algorithms, Random numbers, Parsing, Ray tracing, Synthesizer, and others.
      • immutable-cpp : Persistent immutable data structures for C++
      • HashMap : An open addressing linear probing hash table, tuned for delete heavy workloads
      • TinySTL : TinySTL is a subset of STL(cut some containers and algorithms) and also a superset of STL(add some other containers and algorithms)
      • ch_stl : Colby Hall's C++ Standard Library
      • pdqsort : Pattern-defeating quicksort.
      • urde : Data interchange, editor suite, and runtime re-implementations for games by Retro Studios | Mirror
    • Logging
      • DebugViewPP : DebugView++, collect, view and filter your application logs
      • NSLogger : A modern, flexible logging tool
      • pprint : Pretty Printer for Modern C++
      • glog : C++ implementation of the Google logging module
      • spdlog : Fast C++ logging library.
      • Frlog : A tiny, fast, thread safe, easy to use logging class.
      • loguru : A lightweight C++ logging library
      • static-print : A GCC 7.1 patch that adds a 'static_print' statement to C++.
      • nanoprintf : A tiny embeddable printf replacement written in C89/C99.
      • . : A simple streaming library
      • cpp-format : C#/Rust/Python style formatting in C++.
      • tsf : Type safe printf-compatible C++ library
      • fmt : A modern formatting library
      • tinyformat : Minimal, type safe printf replacement library for C++
      • plog : Portable, simple and extensible C++ logging library
      • reckless : Reckless logging. Low-latency, high-throughput, asynchronous logging library for C++.
      • FASTER : Fast persistent recoverable log and key-value store, in C# and C++, from Microsoft Research.
      • tabulate : Table Maker for Modern C++
      • leaf : Lightweight Error Augmentation Framework
      • logwizard : Log Wizard - a Log Viewer that is easy and fun to use!
      • tinge : a simple, fast, header-only library for C++ which enables pretty colours on the terminal.
      • spinnercpp : Simple header only library to add a spinner / progress indicator to any terminal application.
      • emojicpp : Emoji
      • pprintpp : Typesafe Python Style Printf Formatting for C++
      • elephant-logger : A flexible C++ logger with customisable categories, outputs, and filters
    • Signals and Slots
      • SISL : An other cross-platform/cross-compiler Signals and Slots library for C++11 and more...
      • SimpleSignal : Simple signal using templates
      • SimpleSignals : simple threadsafe C++ signal/slot implementation
      • SimpleSignal : High performance C++11 signals
      • signal11 : C++11 signal slot implementation
      • nano-signal-slot : Pure C++17 Signals and Slots
      • observable : Observer pattern and signals/slots for C++11 projects
    • Profilers
      • microprofile : microprofile - embeddable CPU/GPU profiler
      • NVMLQuery-Windows : Windows sample code demonstrating how to query GPU metrics using the NVIDIA NVML API
      • GpuProf : Realtime profiler for AMD / NVIDIA / Intel GPUs
      • gperftools : Main gperftools repository
      • monitoring : a lib to determine CPU /memory consumption.
      • GPUProfiler : GPUProfiler - Understand your application and workflow resource requirements
      • amdmemorytweak : Read and modify memory timings on the fly
      • nonius : A C++ micro-benchmarking framework
      • CapFrameX : Frametime capture and analysis tool
      • minitrace : Simple C/C++ library for producing JSON traces suitable for Chrome's built-in trace viewer (about:tracing).
      • CompareIntegerMaps : Generates benchmark data for two different data structures, then renders some graphs.
      • netdata : Real-time performance monitoring, done right! https://my-netdata.io/
      • gputop : A GPU profiling tool
      • libperflogger : Frametime logger for Linux Vulkan/OpenGL
      • perftest : GPU texture/buffer performance tester
      • PocketTrace : Intrusive Profiler for C++ (comes with viewer)
      • dmt : Dynamic memory tracker for C
      • LPGPU2-CodeXL : LPGPU2 CodeXL power performance analysis and feedback tool for GPUs
      • libProfiler : Profile your c++ code
      • verysleepy : Very Sleepy, a polling CPU profiler
      • renderdoc : RenderDoc is a stand-alone graphics debugging tool.
      • RenderDoc-Manager : An exemple on how to use RenderDoc inside your engine.
      • c_nanoprofiler :
      • apitrace : Tools for tracing OpenGL, Direct3D, and other graphics APIs
      • processhacker : A free, powerful, multi-purpose tool that helps you monitor system resources, debug software and detect malware.
      • orbitprofiler : C/C++ Performance Profiler
      • chobo-profiling : A multi-platform call-graph intrusive C++ performance profiling library
      • semile : Profile what you care, monitor how it goes (support C/C++)
      • LiveMemTracer : Live memory allocation tracing header only library using ImGui
      • Remotery : Single C file, Realtime CPU/GPU Profiler with Remote Web Viewer
      • Radeon-GPUProfiler : Radeon GPU Profiler (RGP) is a tool from AMD that allows for deep inspection of GPU workloads.
      • RCP : The Radeon Compute Profiler (RCP) is a performance analysis tool that gathers data from the API run-time and GPU for OpenCL™ and ROCm/HSA applications. This information can be used by developers to…
      • Compressonator : Tool suite for Texture and 3D Model Compression, Optimization and Analysis using CPUs, GPUs and APUs
      • CodeXL : CodeXL is a comprehensive tool suite that enables developers to harness the benefits of CPUs, GPUs and APUs.
      • gapid : Graphics API Debugger
      • glintercept : GLIntercept is a OpenGL function call interceptor for Windows that will intercept and log all OpenGL calls
      • ThreadTracer : Lightweight inline profiler that measures wall-time, cpu-time and premptive context switches for threads.
      • microprofile : microprofile is an embeddable profiler
      • gpuvis : GPU Trace Visualizer
      • MTuner : MTuner is a C/C++ memory profiler and memory leak finder for Windows, PlayStation 4 and 3, Android and other platforms
      • yardstick : C++ Instrumented Profiling
      • optick : C++ Profiler For Games
      • benchmark : A microbenchmark support library
      • easy_profiler : Lightweight profiler library for c++
      • profi : A light-weight C++ profiling library
      • SIMD-Visualiser : A tool to graphically visualize SIMD code
      • Caliper : Caliper is a flexible application introspection system
      • HWCPipe : Hardware counters interface
      • picobench : A micro microbenchmarking library for C++11 in a single header file
      • tracy : Mirror of https://bitbucket.org/wolfpld/tracy
      • nanobench : Simple, fast, accurate single-header microbenchmarking functionality for C++11/14/17/20
      • coz : Coz: Causal Profiling
      • access_profiler : a tool to count accesses to member variables in c++ programs
      • llvm-propeller : PROPELLER: Profile Guided Optimizing Large Scale LLVM-based Relinker
      • cupti_profiler : CUPTI GPU Profiler
    • Testing
      • doctest : The fastest feature-rich C++11/14/17/20 single-header testing framework for unit tests and TDD
      • EATest : EATest is a C++ unit testing framework. It's goal is to have a scalable architecture, have minimal dependencies, and simple usage.
      • gtest-adapter :
      • gtest-parallel : Run Google Test suites in parallel.
      • gtest-tap-listener : GoogleTest TAP Listener
      • gtest-gbar : Automatically exported from code.google.com/p/gtest-gbar
      • gtest-runner : A cross-platform, Qt5 based Graphical User Interface for Google Test unit tests
      • googletest : Googletest - Google Testing and Mocking Framework
      • mettle : A C++14 unit test framework
      • utest.h : single header unit testing framework for C and C++
      • greatest : A C testing library in 1 file. No dependencies, no dynamic allocation. ISC licensed.
      • mettle : A C++14 unit test framework
      • Catch2 : A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD - using C++11, C++14, C++17 and later (or C++03 on the Catch1.x branch)
      • mutate_cpp : C++ Mutation Test Environment
      • trompeloeil : Header only C++14 mocking framework
    • Platforms
      • cpuinfo : CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)
      • yue : A library for creating native cross-platform GUI apps
      • cpp-ipc : C++ IPC Library: A high-performance inter-process communication using shared memory on Linux/Windows.
      • portable-file-dialogs : Portable GUI dialogs library, C++11, single-header
      • platform_bionic : Hardened Android standard C library. Some of the past hardening has not yet been ported from Marshmallow, Nougat and Oreo to this Android Pie repository. Most is available via archived tags in http…
      • wil : Windows Implementation Library
      • ipc : Public domain single header inter process communication primitives
      • flow9 : Platform for safe, easy and productive programming of complex, multi-platform apps with a modern user interface
      • win-wallpaper : Manage the desktop wallpaper on Windows
      • cpu_features : A cross platform C99 library to get cpu features at runtime.
      • switch-portlibs-examples : Switch portlibs examples using devkitA64 and libnx.
      • libnx : Library for Switch Homebrew
      • Detours : Detours is a software package for monitoring and instrumenting API calls on Windows. It is distributed in source code form.
      • CrossWindow : A cross platform system abstraction library written in C++ for managing windows and performing OS tasks.
      • WindowsHModular : A modular Windows.h Header. Licensed under Public Domain & MIT.
      • clip : Cross-platform C++ library to copy/paste clipboard content
      • osdialog : A cross platform wrapper for OS dialogs like file save, open, message boxes, inputs, color picking, etc.
      • nloader : Native win32 executables loader
      • libusb : A cross-platform library to access USB devices
      • WinToast : WinToast is a lightly library written in C++ which brings a complete integration of the modern toast notifications of Windows 8 & Windows 10. Toast notifications allows your app to inform the users…
      • borderless-window : A minimal borderless window with the Windows API
      • nativefiledialog : A tiny, neat C library that portably invokes native file open and save dialogs.
      • process.h : A simple one header solution to launching processes and interacting with them for C and C++.
      • PlatformFolders : A C++ library to look for special directories like "My Documents" and "%APPDATA%" so that you do not need to write Linux, Windows or Mac OS X specific code
      • Skeleton : Skeleton: A Dead Simple, Responsive Boilerplate for Mobile-Friendly Development
      • sfd : A small C library for opening a file dialog
      • Boxer : Boxer is a simple library that allows for easy cross-platform creation of message boxes / alerts / what have you.
      • turf : Configurable C++ platform adapter
      • dynlib-loader : Cross-platform Runtime dynamic library loader (.dll / .so).
      • dynamicLinker : C++11 wrapper for Linux / OS X / Windows / BSD dynamic libraries ( .so .dylib .dll ).
      • systemd : The systemd System and Service Manager
      • not-enough-standards : A modern header-only C++ library that provides platform-independent utilities.
      • EasyWindow : Create window easily
      • gamemode : Optimise Linux system performance on demand
      • ArduinoJoystickLibrary : An Arduino library that adds one or more joysticks to the list of HID devices an Arduino Leonardo or Arduino Micro can support.
      • cppwinrt : C++/WinRT is a standard C++ language projection for the Windows Runtime
      • libenjoy : Simple & small C joystick library for Linux and Windows. See README
      • nxquake2 : Nintendo Switch port of the Yamagi Quake II client
      • compiler-warnings : A list of compiler warning flags for different GCC and clang versions
    • Command Line Arguments
      • getopt : C++ command line options parser for C++ Standard Library
      • args : A simple header-only C++ argument parser library. Supposed to be flexible and powerful, and attempts to be compatible with the functionality of the Python standard argparse library (though not nec…
      • argparse : Argument Parser for Modern C++
      • cli : A library for interactive command line interfaces in modern C++
      • radare2 : unix-like reverse engineering framework and commandline tools
      • Clara : A simple to use, composable, command line parser for C++ 11 and beyond
      • CmdLine2 : Command line argument parser (C++14)
      • clipp : easy to use, powerful & expressive command line argument parsing for modern C++ / single header / usage & doc generation
      • argh : Argh! A minimalist argument handler.
      • cxxopts : Lightweight C++ command line option parser
      • Arguments : Command line argument handling for C++
      • gflags : The gflags package contains a C++ library that implements commandline flags processing. It includes built-in support for standard types such as string and the ability to define flags in the source file in which they are used. Online documentation available at: https://gflags.github.io/gflags/
      • args : Simple and type-safe commandline argument parser for C++14
    • Regex
      • CppVerbalExpressions : C++ regular expressions made easy
      • tiny-regex-mod : Single file modification of tiny-regex-c by Kokke
      • BlingFire : A lightning fast Finite State machine and REgular expression manipulation library.
      • cparse : A C++ configurable Expression Parser. Useful as a Calculator or for helping you write your own Programming Language
    • Date
      • date : A date and time library based on the C++11/14/17 header
      • asap : A C++ header-only library for creating, displaying, iterating and manipulating dates
    • Clang
      • clang :
      • clang-reflect : A clean implementation of reflection and related proposals.
      • cftf : Clang from the Future: A C++17 to C++11 source-to-source compiler
      • clang-power-tools : Bringing clang-tidy magic to Visual Studio C++ developers.
      • clang-format-all : Run clang-format -i on all of the files in your C or C++ project
      • CppAst : CppAst is a .NET library providing a C/C++ parser for header files powered by Clang/libclang with access to the full AST, comments and macros
      • autotidy : Speedier handling of clang-tidy checking
      • cppinsights : C++ Insights - See your source code with the eyes of a compiler
      • cppast : Library to parse and work with the C++ AST
      • llvm-project : The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at…
    • HotReload
      • car : Compile and Run! Execute source files directly without worrying at all about compiling.
      • PolyHook_2_0 : C++17, x86/x64 Hooking Libary v2.0
      • Ratchet : A gameclient hooking framework to aid debuging
      • PolyHook : x86/x64 C++ Hooking Library
      • jet-live : c++ hot code reload for linux and macos
      • blink : A tool which allows you to edit source code of any MSVC C++ project live at runtime
      • CToy : Interactive C coding environment
      • C-Hotloading : Example of MSVC makefile project for hotloading C with intellisense/debugger compatability
      • RuntimeCompiledCPlusPlus : Change C++ code at runtime
      • live_reload_test : demonstration of live reloading
      • cr : cr.h: A Simple C Hot Reload Header-only Library
      • live_edit : A collection of single-header libraries to help with reloading, debugging and profiling C(++) code.
      • RCCpp_DX11_Example : Runtime Compiled C++ example based on the Dear ImGui DirectX11 Example
    • UID
      • uuid_h : Single file, STB-style, "lib" to generate uuid:s.
      • yauid : A decentralized unique ID generator (int64)
    • Debug
      • PPK_ASSERT : PPK_ASSERT is a cross platform drop-in & self-contained C++ assertion library
      • debugbreak : break into the debugger programmatically
      • crashpad : A crash-reporting system
      • in_constexpr : An approach for runtime detection inside a constexpr function
      • backward-cpp : A beautiful stack trace pretty printer for C++
      • debug_assert : Simple, flexible and modular assertion macro.
      • EAAssert : EAAssert is a simple and lightweight assert technology.
      • dbg-macro : A dbg(…) macro for C++
      • dbgtools : Small collection of debug-related drop-in c/c++-utils
      • x64dbg : An open-source x64/x32 debugger for windows.

    Libraries

    • HandyCpp : A large collection of header only utilities and convenience functions that make C++17 development happier.
    • single_file_libs : List of single-file C/C++ libraries.
    • bitsquid-foundation : A minimalistic foundation library with functions for memory allocation, basic collections, etc. The library has been written with a data-oriented philosophy: POD structures are preferred over class…
    • EABase : EABase is a small set of header files that define platform-independent data types and platform feature macros.
    • EAStdC : EAStdC is a package which implements basic library facilities that are similar to those in the standard C library.
    • acd : Single file utilities for C++.
    • single-file-libs : super permissive, drop-in, single file stuff
    • par : single-file C libraries from Philip Allan Rideout
    • paq : public domain single-file C/++ libraries for game devs
    • Core : Core libraries and utilities
    • dr_libs : A collection of public domain single-file libraries for C/C++.
    • limbus : A cross-platform game library in the public domain
    • RandomCode : Random projects that are ok to be public, like blog stuff
    • tinypile : Assorted small one-or-two-file libs. C/C++. Public domain. Cross-platform. No deps.
    • dm : Header-only base C++ library.
    • sokol : minimal cross-platform standalone C headers
    • gamedev_libraries : A collection of open source c/c++ libraries for gamedev
    • Flint : Public domain single-file header-only C libraries
    • sx : Portable base library for C programmers, designed for performance and simplicity.
    • cosmos : Algorithms that run our universe | Your personal library of every algorithm and data structure code that you will ever encounter | Ask us anything at our forum
    • mmx : single header libraries for C/C++
    • final_game_tech : Game related libraries written in C/C++
    • bss-util : Black Sphere Studios utility library for C/C++
    • kj : kj is a small collection of stb inspired libs.
    • sac : C/C++ helpers
    • ZHeaders : Public domain single-file libraries - stb style
    • miscsrc : My collection of miscellaneous source code
    • libs : Single-file public domain libraries for C/C++
    • stb : stb single-file public domain libraries for C/C++
    • tinybits : Tiny bits and useful snippets that I keep using everywhere (C, C++)
    • tacent : A collection of C++ modules implementing linear algebra, text and file IO, containers, image loading and saving, command-line parsing, etc. Useful for the foundation of a game engine or other inter…
    • libdhcore : Lightweight, performance oriented, Core library for 'C' programmers
    • slibs : Single file libraries for C/C++
    • foundation_lib : Cross-platform public domain foundation library in C providing basic support data types and functions to write applications and games in a platform-independent fashion.
    • cute_headers : Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
    • ZeroTolerance : Collection of single header file libraries for C/C++ development, with a focus on games.
    • chobo-shl : A collection of single-header C++11 libraries by Chobolabs
    • single_file_libs : List of single-file C/C++ libraries.
    • kit : C++11 libs: await, channels, reactive/signals, timelines, alarms, logging, args, etc.
    • msh : Maciej's Toolbox
    • abseil-cpp : Abseil Common Libraries (C++)
    • Nimble : Nimble is a header-only utility library.
    • rsm : Utility Library
    • bx : Base library used across multiple projects
    • utils : A collection of data structures and utilities (C++11)
    • loki : A C++ Template library, developed by Andrei Alexandrescu, the author of the book Modern C++ Design.
    • loki-lib : Loki is a C++ library of designs, containing flexible implementations of common design patterns and idioms.
    • GSL : Guidelines Support Library
    • vrm_core : Lightweight C++14 utility library. (Modernized, stripped and cleaned-up version of SSVUtils.)
    • Aurora : Header-only library with unconventional C++ features, like deep-copy smart pointers, dynamic dispatch, type-erased ranges
    • gsl-lite : gsl lite - A single-file header-only version of ISO C++ Guidelines Support Library (GSL) for C++98, C++11 and later
    • cpp-utilities : Miscellaneous C++11 utility classes and functions
    • Snippets : (Hopefully) useful code snippets and header-only libs
    • sts : My collection of public domain single file libraries
    • gb : gb single-file public domain libraries for C & C++
    • emilib : Loose collection of misc C++ libs
    • liboli : personal single-header c89 library with misc utilities (I actually made this just so that I can add -loli to ldflags)
    • commonItems : Common utilities used by various converters
    • zpl : Your C11 Powerkit
    • Plinth : Foundation library of helpful classes/functions
    • sftools : Bunch of tools for SFML application development
    • MISC : Miscellaneous small code snippets.

    Engines

    • game : The culmination of everything I'm passionate about
    • Enjon : Game engine created using OpenGL and C++
    • Shadow-Functions-Engine : A small ASCII graphical game engine for the windows console (and Linux since v2.0.2.) done in C++
    • cheat-engine : Cheat Engine. A development environment focused on modding
    • CORE : Game engine core playground
    • Cauldron : A simple framework for rapid prototyping on Vulkan or Direct3D 12
    • bigg : bgfx, imgui, glfw, glm
    • goxel : Goxel: Free and Open Source 3D Voxel Editor
    • lumixengine_shader_editor : Visual shader editor for Lumix Engine
    • Open7Days : A fast engine based on the technology behind 7 days to die.
    • NebulaRender : A powerful physically based renderer with a fully featured editor.
    • GameEngine : Little Game Engine that aims to be Physically Based for the lighting part
    • include-engine : #include
    • MAGE : 🧙 MAGE - Matthias Advanced Game Engine
    • TrinityCore : TrinityCore Open Source MMO Framework (master = 8.2.0.31478, 3.3.5 = 3.3.5a.12340)
    • boden : Purely native C++ cross-platform framework for Android and iOS development. https://www.boden.io
    • AtomicGameEngine : The Atomic Game Engine is a multi-platform 2D and 3D engine with a consistent API in C++, C#, JavaScript, and TypeScript
    • NoahGameFrame : A fast, scalable, distributed game server engine/framework for C++, include actor library, network library,can be used as a real time multiplayer game engine ( MMO RPG/MOBA ), which support C#/Lua …
    • Viry3D : Cross platform 2D and 3D game engine in C++.
    • aether3d : Aether3D Game Engine
    • kiyosGameEngine : KiyoGameEngine is a small header only C++17 library, that provides boilerplate code for a small to medium sized games
    • Wolf.Engine : The Wolf is a comprehensive set of C++ open source libraries for realtime rendering, realtime streaming and game developing
    • OpenXRay : Improved version of the X-Ray engine, used in world famous S.T.A.L.K.E.R. game series by GSC Game World.
    • mintaro : A small framework for making simple games.
    • DmitrysEngine : C99 cross-platform 3D game engine with absolute minimum of external dependencies
    • libavg :
    • zdog : Flat, round, designer-friendly pseudo-3D engine for canvas & SVG
    • Xbox-ATG-Samples : Game development samples published by the Xbox Advanced Technology Group.
    • shiva : Modern Cross-Platform C++ Engine with modularity (MIT). Maintains here: https://github.com/KomodoPlatform/antara-gaming-sdk
    • enduro2d : Yet another 2d game engine of dreams (work in progress)
    • FlexEngine : A personal game engine
    • rbfx : Game engine with extensive C# support and WYSIWYG editor.
    • qtbase : Qt Base (Core, Gui, Widgets, Network, ...)
    • Engine : C++ Game Engine (Under Construction!)
    • Acid : A high speed C++17 Vulkan game engine
    • quartz-engine : A New Game Engine, specializing in ease of content creation through a scripting language
    • Corange : Pure C Game Engine
    • Simpleton-Engine : What a stupid name for a library
    • BabylonCpp : A port of Babylon.js to C++
    • igneous : Igneous is an open source game engine written in C++.
    • godot : Godot Engine – Multi-platform 2D and 3D game engine
    • anki-3d-engine : AnKi 3D Engine - Vulkan backend, modern renderer, scripting, physics and more
    • raylib-cpp : C++ Object Oriented Wrapper for raylib
    • engine : Home of a voxel game engine and its tools (like a voxel editor)
    • PGE-Project : Platform Game Engine Project by Wohlstand
    • Daemon : The Dæmon game engine. With some bits of ioq3 and XreaL.
    • thunder : An open source game engine is written in C++ with a flexible architecture
    • vxr : General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
    • rex : rex engine and game
    • OpenGraphic : Graphic Engine & Game Engine lists
    • WickedEngine : C++ game engine focusing on modern rendering techniques and performance.
    • alimer : Cross-platform 2D and 3D game engine.
    • ignifuga : Ignifuga Game Engine
    • Rak : Real-time hybrid engine written in C++
    • CRYENGINE : CRYENGINE is a powerful real-time game development platform created by Crytek.
    • engine : Fast and lightweight WebGL game engine
    • fusion3d : A next gen 3D engine fusing modern techniques and apis.
    • Cinder : Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.
    • EtherealEngine : C++ Game Engine and Editor
    • mos : Lightweight game engine.
    • halley : A lightweight game engine written in modern C++
    • eight : Automatically exported from code.google.com/p/eight
    • RaZ : Modern & multiplatform 3D engine in C++17
    • unity-decompiled :
    • limonEngine : 3D FPS game engine with full dynamic lighting and shadows
    • DOOM : DOOM Open Source Release
    • OpenMiner : Scriptable Minecraft-like game engine written in C++14 using GameKit
    • openFrameworks : openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
    • Arcane-Engine : 3D C/C++ Game Engine - Created By Brady Jessup
    • permafrost-engine : An OpenGL 3.3 RTS game engine written in C
    • Cardinal-Engine : 3D Cross-Platform Game Engine programmed in C++ with OpenGL 3
    • eternity : The Eternity Engine
    • Quiver : A cross-platform pseudo-3D game engine written in C++
    • GibEngine : Cross-platform OpenGL 3D game engine
    • Inline-Engine : Game engine written in C++ with ease of use and next-gen parallel computing in focus.
    • DiligentEngine : A modern cross-platform low-level graphics library and rendering framework
    • yeti : A general-purpose data-driven game engine with tools. Attribution based licensing.
    • GameEngineResources :
    • openage : Free (as in freedom) open source clone of the Age of Empires II engine
    • Zmey : A game engine. That breathes fire and awesomeness
    • Game-Engine-Architecture : A repo contaning the learning materials for the course 'Game Engine architecture'
    • Worldstone : Diablo 2 tools and engine reimplementation in c++
    • catgl : a cross-platform 3D graphics engine
    • SpartanEngine : Game engine with an emphasis on architectual quality, targeting high end machines
    • ETEngine : A merge between my planet framework and open gl graphics framework that will develop into a space sim focused game engine
    • Falcor : Real-Time Rendering Framework
    • BlueshiftEngine : Blueshift is a cross-platform 3D game engine implemented in C++. it's free, open-source, and works on Windows, macOS, iOS, and Android. The project is currently in an early stage of development.
    • crogine : SDL2 Based Game Framework for mobile devices
    • lumberyard : Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
    • saiga :
    • gincu : Gincu -- a simple match three game, game engine, and game framework written in C++
    • AVA : A tiny unlicensed 3D game engine in C; with C++ and Lua interfaces. Written in 32 random ̷d̷a̷y̷s̷ m̷o̷n̷t̷h̷s̷ years.
    • darkhammer : darkHAMMER is a lightweight, open-source, multiplatform game engine. written in C (C99) language, supports python and C# bindings and lua scripts. Runs on windows and linux
    • FishEngine : Simple, Unity-like Game Engine.
    • ogre : Ogre1 - scene-oriented, flexible 3D engine written in C++
    • NazaraEngine : Nazara Engine is a fast, complete, cross-platform, object-oriented API which can help you in your daily developper life.
    • LumixEngine : 3D Game Engine
    • Serious-Engine : An open source version of a game engine developed by Croteam for the classic Serious Sam games.
    • BansheeEngine : Modern C++14 game engine with Vulkan support, fully featured editor and C# scripting
    • polymer : graphics + interaction engine
    • Urho3D : Cross-platform 2D and 3D game engine.
    • gebbdoom : Game Engine Black Book: Doom
    • ALX : C++11 Allegro 5 wrapper library.
    • bsf : Modern C++14 library for the development of real-time graphical applications
    • ClanLib : ClanLib is a cross platform C++ toolkit library.
    • raylib : A simple and easy-to-use library to enjoy videogames programming
    • smkflow : A C++ dataflow node editor -- Compatible with WebAssembly.
    • game-prototype : A simple 2D top-down game framework.
    • megaglest-source : MegaGlest real-time strategy game engine (cross-platform, 3-d)
    • freeaoe : A free engine capable of running Age of Kings.
    • Horde3D : Horde3D is a small 3D rendering and animation engine. It is written in an effort to create an engine being as lightweight and conceptually clean as possible.
    • neoGFX : Cross-platform GPU-oriented C++ application/game framework
    • KickJS : A WebGL game engine for modern web-browsers.
    • LittleOrionEngine : C++ 3D Engine developed during the Master's Degree in AAA Videogames Development.
    • GDevelop : GDevelop is an open-source, cross-platform game engine designed to be used by everyone.
    • Lumos : Cross-Platform C++ 2D/3D game engine
    • saddy-graphics-engine-2d : Saddy is an open-source crossplatform 2D graphic engine, based on OpenGL, which can be used for creating 2D games. like platformers or RPGs.
    • WildMagic : A for of a well-known WildMagic engine v5.9
    • khanat-opennel-code :
    • pmtech : Lightweight, multi-platform, data-oriented game engine.
    • SimpleRenderEngineProject : Small C++14 render engine with dependencies
    • SimpleRenderEngine : Small C++14 render engine
    • ezEngine : An open source game engine in active development
    • engge : Experimental game engine for Thimbleweed park
    • lovr : Virtual Reality Engine
    • crown : The flexible game engine.
    • OpenSiv3D : C++17/C++20 framework for creative coding
    • SFML based engines
      • SFML-Game-Development-Book : Full and up-to-date source code of the chapters of the "SFML Game Development" book
      • SFML-book : SFML Blueprint book, source code
      • nero-game-engine : Advanced SFML Game Engine, Designed to be Simple and Intuitive
      • SFBL : SFML Box2D Light
      • SchiffbruchEngine : SchiffbruchEngine
      • Swift2 : A SFML-backed game framework.
      • SFME : Simple and Fast Multimedia Engine
      • xygine : 2D engine / framework built around SFML
      • SFML-Game-Framework : Very, very simple and barebones framework for SFML games and that
      • SFML-DOOM : Original DOOM source code adapted to use c++ with SFML
      • Vigilante-Game-Framework : 2D/3D C++ game framework written for use with SFML.
      • ObEngine : 2D Game Engine with Lua Scripting made on top of SFML !
      • QSFML : SFML 2.x.x / Qt 5.x.x integration
      • is-Engine : Game Engine developed with the SFML library to create games on Android and PC
    • Unity
    • UnrealEngine
      • unrealcpp : Unreal Engine 4 C++ examples
      • RuntimeMeshComponent : Unreal Engine 4 plugin component for rendering runtime generated content.
      • ue4-docker : Windows and Linux containers for Unreal Engine 4
      • unreal.hx : Unreal.hx: Haxe Integration for Unreal
      • HoudiniEngineForUnreal : Houdini Engine Plugin for Unreal Engine 4
      • ImpostorBaker : UE4 Plugin for generating Impostors for static meshes
      • GA-SDK-UNREAL : A repository containing the GameAnalytics Unreal4 Plugin including documentation.
      • UE4-Cpp-Tutorials : This repository contains all the code I've written in my website tutorials regarding the implementation of Game Systems inside UE4
      • EpicSurvivalGameSeries : Third-person Survival Game for Unreal Engine 4.
      • UnrealImGui : Unreal plug-in that integrates Dear ImGui framework into Unreal Engine 4.
    • Emulators
      • chips : 8-bit chip and system emulators in standalone C headers
      • RetroArch : Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
      • agnes : Header-only NES emulation library with an easy to use API.
      • Gearboy : Game Boy / Gameboy Color emulator for iOS, Mac, Raspberry Pi, Windows, Linux and RetroArch.
      • ppsspp : A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or in #ppsspp on freenode (IRC) or just send pull requests /…
      • pcsx2 : PCSX2 - The Playstation 2 Emulator
      • binjgb : Gameboy emulator implemented in C
      • pcsx-redux :
      • gameboy-emulator : A simple gameboy emulator made in C++.
      • rpcs3 : PS3 emulator/debugger
      • libgba-cpp : C++ Library for Game Boy Advance Development
      • 3DNes_Engine : Engine to convert NES games into 3D

    Maths

    • enoki : Enoki: structured vectorization and differentiation on modern processor architectures
    • units : A Physical Units Library for C++ providing compile-time dimensional analysis and unit/quantity manipulation
    • Compile-Time-Equations-Handler :
    • version2 : Vector class library, latest version
    • simde : Implementations of SIMD instruction sets for systems which don't natively support them.
    • kissfft : a Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid
    • MarkovNameGenerator : Markov process-based procedural name and word generator
    • eigen-git-mirror : Git mirror of the official Eigen's repository -- PULL REQUEST MUST BE SENT TO: https://bitbucket.org/eigen/eigen
    • curves : A library of curves for estimation.
    • hexbvh : A hexagonal prism BVH: more efficient than AABB.
    • wavalyzer : Small C++ utility for Fourier analysis and visualization of an audio signal
    • dj_fft : Header only FFT library
    • essentialmath : Example code and libraries for the book "Essential Mathematics for Games and Interactive Applications."
    • fieldgen : Generates high-quality, optimally smooth tangent direction fields on triangle meshes.
    • simd : Branch of the spec repo scoped to discussion of SIMD in WebAssembly
    • spherical-harmonics : Spherical harmonics library
    • MathUtilities : A collection of some of the neat math and physics tricks that I've collected over the last few years.
    • GLFFT : A C++11/OpenGL library for the Fast Fourier Transform
    • aabo : Axis Aligned Bounding Octahedron
    • bhh : Bounding Halfspace Hierarchy
    • muFFT : A library for computing the Fast Fourier Transform (FFT) in one or two dimensions.
    • taichi_mpm : High-performance material point method (MPM) solver. (ACM Transactions on Graphics, SIGGRAPH 2018)
    • random : Random for modern C++ with convenient API
    • dlaf : Diffusion-limited aggregation, fast.
    • rtm : Realtime Math
    • pt_math : public domain fast scalar math routines
    • splines-lib : Library of cubic spline utilities
    • ArcLengthParameterisation : Accurately control the speed at which parameters interpolate over curves
    • SipHash : High-speed pseudorandom function (reference code)
    • bfp : Beyond Floating Point - Posit C/C++ implementation
    • ezSIFT : ezSIFT: An easy-to-use standalone SIFT library written in C/C++
    • fpot : Fast Point Overlap Test
    • linedetector : Efficient and Effective Line Segment Detector
    • matplotlib-cpp : Extremely simple yet powerful header-only C++ plotting library built on the popular matplotlib
    • lolremez : Polynomial Approximations using the Remez Algorithm
    • Flicks : A unit of time defined in C++.
    • lunar : Basic astronomical functions
    • math-as-code : a cheat-sheet for mathematical notation in code form
    • sr_graph : A simple, one-file, header-only, C++ utility for graphs, curves and histograms.
    • xo-math : Fast math for game developers. No headaches, no cruft.
    • understanding_floatingpoint :
    • normals_revisited : revisiting a known normal transformation in computer graphics
    • Cullminator9000 : The fastest culler ever
    • Simd : C++ image processing library with using of SIMD: SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX-512, VMX(Altivec) and VSX(Power7), NEON for ARM.
    • SSE-to-NEON : Header file to translate SSE instructions to ARM NEON instructions
    • flatbush : C++ port of https://github.com/mourner/flatbush
    • libsimdpp : Portable header-only zero-overhead C++ low level SIMD library
    • seamoptimizer : A C/C++ single-file library that minimizes the hard transition errors of disjoint edges in lightmaps.
    • tinyexpr : tiny recursive descent expression parser, compiler, and evaluation engine for math expressions
    • Summed-Area-Table : Summed-Area Table in a single file header-only C++11 library
    • fft : Public-domain single-header FFT library (power-of-2 size case only)
    • mathtoolbox : Mathematical tools (interpolation, dimensionality reduction, optimization, etc.) written in C++11 with Eigen
    • blaze : Mirror of Blaze library on Bitbucket
    • blaze_tensor : 3D Tensors for Blaze (https://bitbucket.org/blaze-lib/blaze)
    • controlled_random :
    • Cryptography and Hashing and Compression
      • openh264 : Open Source H.264 Codec
      • oldunzip : ZIP implode/explode and reduce/expand decompression libraries
      • lonesha256-ansi : Portable, endian-proof, single-file, single-function sha256 implementation in ANSI C
      • lonesha256 : Portable, endian-proof, single-file, single-function sha256 implementation in C
      • lzsa : Byte-aligned, efficient lossless packer that is optimized for fast decompression on 8-bit micros
      • zultra : Fast deflate implementation with zopfli-like ratios and a streaming API
      • lz4ultra : Optimal LZ4 compressor, that produces files that decompress faster while keeping the best compression ratio
      • em_inflate : Fast, small, in-memory inflate (zlib, deflate and gzip decompression)
      • FastLZ : Byte-aligned LZ77 compression
      • NvPipe : NVIDIA-accelerated zero latency video compression library for interactive remoting applications
      • SymCrypt : Cryptographic library
      • lz4 : Extremely Fast Compression algorithm
      • zip : A portable, simple zip library written in C
      • zlib : A massively spiffy yet delicately unobtrusive compression library.
      • libpng : LIBPNG: Portable Network Graphics support, official libpng repository
      • meow_hash : Official version of the Meow hash, an extremely fast non-cryptographic hash
      • ulz : An ultra-fast LZ77 compressor/data compression library
      • csoinfo : Small Windows specific C program to print compressed and original size of CSO/ZSO file (compressed ISO)
      • WjCryptLib : Public Domain C Library of Cryptographic functions. Including: MD5, SHA1, SHA256, SHA512, RC4, AES, AES-CTR, AES-OFB, AES-CBC
      • ooz : Open source Kraken / Mermaid / Selkie / Leviathan / LZNA / Bitknit decompressor
      • xxHash : Extremely fast non-cryptographic hash algorithm
      • robin-hood-hashing : Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20
      • minih264 : Minimalistic H264/SVC encoder single header library
      • density : Superfast compression library
      • hash-prospector : Automated integer hash function discovery
      • snappy : A fast compressor/decompressor
      • miniz-cpp : A cross-platform header-only C++14 library for reading and writing ZIP files
      • base-x : BaseX encoder / decoder for C++
      • ed25519 : Portable C implementation of Ed25519, a high-speed high-security public-key signature system.
      • smhasher : Automatically exported from code.google.com/p/smhasher
      • mbedcrypto : a portable, small, easy to use and fast c++14 library for cryptography.
      • hashcat : World's fastest and most advanced password recovery utility
      • nozip : Tiny C library for reading ZIP files
      • hashlibpp : Simple and very easy to use library to create a cryptographic checksum (hash) in plain C++
      • fast_zlib : Heavily optimized zlib compression algorithm
      • luazen : simple compression, encoding and cryptographic functions
      • lizard : Lizard (formerly LZ5) is an efficient compressor with very fast decompression. It achieves compression ratio that is comparable to zip/zlib and zstd/brotli (at low and medium compression levels) at…
      • andyzip : A fast and compact modern C++ (header only) zip, bzip2 and brotli library
      • miniz : miniz: Single C source file zlib-replacement library, originally from code.google.com/p/miniz
      • cryptopp : free C++ class library of cryptographic schemes
      • cocoa : Cocoa is an uniform hashing library with no dependencies that provides interface for CRC32, CRC64, GCRC, RS, JS, PJW, ELF, BKDR, SBDM, DJB, DJB2, BP, FNV, FNV1a, AP, BJ1, MH2, SHA1, SFH (C++11)
      • bundle : Bundle, an embeddable compression library: DEFLATE, LZMA, LZIP, BZIP2, ZPAQ, LZ4, ZSTD, BROTLI, BSC, CSC, BCM, MCM, ZMOLLY, ZLING, TANGELO, SHRINKER, CRUSH, LZJB and SHOCO streams in a ZIP file (C++03)(C++11)
      • deutex : WAD composer for Doom, Heretic, Hexen, and Strife
      • cxx14-hash : An object hashing facility.
      • nibrans : Simple, single-file, nibble-based, adaptive rANS library with SSE2-accelerated modeling
      • pithy : Fast compression / decompression library.
      • microtar : A lightweight tar library written in ANSI C
      • dmc_unrar : A dependency-free, single-file FLOSS unrar library
      • FastPFor : The FastPFOR C++ library: Fast integer compression
      • MetroHash : MetroHash v1: Exceptionally fast and statistically robust hash functions
      • Kuku : Kuku is a compact and convenient cuckoo hashing library written in C++.
      • lzma_sh : compact lzma decoder
      • zstd : Zstandard - Fast real-time compression algorithm
    • Linear Algebra
      • cglm : Highly Optimized Graphics Math (glm) for C
      • eigen : Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
      • vml : C++17 GLSL-like vector and matrix math lib
      • hlml : vectorized high-level math library
      • mathfu : C++ math library developed primarily for games focused on simplicity and efficiency.
      • xsimd : Modern, portable C++ wrappers for SIMD intrinsics and parallelized, optimized math implementations (SSE, AVX, NEON, AVX512)
      • vectorial : Vector math library with NEON/SSE support
      • dualquaternion :
      • AngryQuaternion : Dual Quaternion Skinning
      • MathGeoLib : A C++ library for linear algebra and geometry manipulation for computer graphics.
      • Handmade-Math : A simple math library for games and computer graphics. Compatible with both C and C++.
      • glm : OpenGL Mathematics (GLM)
      • MEPP : Mepp - 3D MEsh Processing Platform
      • gemmlowp : Low-precision matrix multiplication
      • linalg : linalg.h is a single header, public domain, short vector math library for C++
      • cmath3d : 3d math library for C. Vectors, 3x3 matrices, quaternions.
      • linmath.h : a lean linear math library, aimed at graphics programming. Supports vec3, vec4, mat4x4 and quaternions
      • xsimd : C++ wrappers for SIMD intrinsics and parallelized, optimized mathematical functions (SSE, AVX, NEON, AVX512)
      • ConeTightFitAABB :
      • MIPP : MIPP is a portable wrapper for SIMD instructions written in C++11. It supports NEON, SSE, AVX and AVX-512.
      • geomc : A c++ linear algebra template library
    • Meshes & Polygons
      • shaper : A C++ tool for 3D reconstruction from parallel 2D sections
      • libigl : Simple C++ geometry processing library.
      • cinolib : A generic programming header only C++ library for processing polygonal and polyhedral meshes
      • assimp : Official Open Asset Import Library Repository. Loads 40+ 3D file formats into one unified and clean data structure.
      • instant-meshes : Interactive field-aligned mesh generator
      • trimesh2 : C++ library and set of utilities for input, output, and basic manipulation of 3D triangle meshes
      • SeamAwareDecimater : Mesh simplification with UV's boundary preserved
      • hole_fixer : Demo implementation of smoothly filling holes in 3D meshes using surface fairing
      • bounding-mesh : Implementation of the bounding mesh and bounding convex decomposition algorithms for single-sided mesh approximation
      • boundary-first-flattening :
      • meshoptimizer : Mesh optimization library that makes meshes smaller and faster to render
      • meshgeometry : mesh geometry tools
      • draco : Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
      • xatlas : Mesh parameterization library
      • PolyFit : Polygonal Surface Reconstruction from Point Clouds
      • gDel3D : gDel3D is the fastest 3D Delaunay triangulation algorithm. It uses the GPU for massive parallelism.
      • quickhull : C++ implementation of the 3D QuickHull algorithm
      • voxels : Voxels Library - C++ library for voxel manipulation and polygonization
      • libmc : C/C++ Isosurface Extraction library
      • voxelizer : A simple mesh voxelizer, GPU accelerated with CUDA
      • Fast-Quadric-Mesh-Simplification : Mesh triangle reduction using quadrics
      • earcut.hpp : Fast, header-only polygon triangulation
      • delabella : 2D Delaunay triangulation (dela) - super stable (bella!)
      • MEPP2 : Mepp2 - 3D MEsh Processing Platform
      • xatlas : Mesh parameterization / UV unwrapping library
      • QuadriFlow : QuadriFlow: A Scalable and Robust Method for Quadrangulation
      • quantized-mesh : Specification for streaming massive terrain datasets for 3D visualization.
      • Easy3D : A lightweight, easy-to-use, and efficient C++ library for processing and rendering 3D data (i.e., meshes, point clouds).
      • pmp-library : The Polygon Mesh Processing Library
      • TriWild : TriWild: Robust Triangulation with Curve Constraints
      • NuoModelViewer : A simple Wavefront OBJ viewer.
      • MagicaVoxel-VOX-importer : Blender import script for MagicaVoxel .vox format as cube primitives.
      • polypartition : Tiny Polygon Partitioning and Triangulation Library
      • CDT : C++ library for constrained Delaunay triangulation (CDT)
      • rect-packer : A simple yet efficient box packing algorithm
    • Noise
      • LowDiscBlueNoise :
      • FastNoise : Fast C++ Noise Library
      • BlueNoiseDitherMaskTiles : Utility for producing blue-noise dither mask tiles on the GPU
      • BlueNoiseDitherPatternGeneration : Comparing some methods of generating blue noise dither patterns, to go with a blog post
      • VirtualPlanetBuilder : Tool for generateing paged databases from geospatial imagery and heightfields
      • TileableVolumeNoise : Collection of functions that can be used to generate tileable volume/3d noise. An exemple of volume noise functions that can be specifically used for clouds is also presented.
      • infnoise : The world's easiest TRNG to get right
      • oidn : Intel(R) Open Image Denoise library
      • open-simplex-noise-in-c : Port of Kurt Spencer's java implementation of open simplex noise to C -- Note: This is NOT Ken Perlin's Simplex noise algorithm.
      • heman : C99 heightmap utilities.
      • SimplexNoise : A Perlin's Simplex Noise C++ Implementation (1D, 2D, 3D)
      • NoiseGenerator : Node-based Noise and Pattern Editing Software
      • SimplexNoise : * This is a clean, fast, modern and free Perlin Simplex noise function.All Public Functions are BlueprintCallable so they can be used in every blueprint. From DevDad and Dedicated to you and Unreal…
      • VoronoiMapGen : Generation of random Island maps with Voronoi using C++
      • worley : worley noise
      • SimplexNoise : Cpp port for Simplex Noise library
      • FastNoiseSIMD : C++ SIMD Noise Library
      • SimplexNoise : Collection of Simplex Noise functions
      • hmm : Heightmap meshing utility.
      • forvor : Fortune's Voronoi Generator
      • perlin-noise : Various versions of Perlin noise (C and C++)
      • matchstick : toying with markov stuff

    Graphics

    • fun-with-graphics : Fun with graphics
    • abrash-black-book : Markdown source for Michael Abrash's Graphics Programming Black Book
    • GraphicsGems : Code for the "Graphics Gems" book series
    • gpu-monitoring-tools : Tools for monitoring NVIDIA GPUs on Linux
    • multi-gpu-programming-models : Examples demonstrating available options to program multiple GPUs in a single node or a cluster
    • mesa : Mesa 3D graphics library (mirror; no pull requests here please)
    • USD : Universal Scene Description
    • FidelityFX : A set of AMD provided GPU effects with provided source and sample implementations
    • Custom-Middleware : This repository holds custom and commercial middleware packages
    • MDL-SDK : NVIDIA Material Definition Language SDK
    • rendering-bib : My master bibliography file with publications mostly in computer graphics, rendering, transport theory, and statistics.
    • GPUZen2 : Example programs and source code for GPU Zen 2
    • GDC2019_Public : Public repository for my GDC 2019 presentation "Breaking Down Barriers"
    • azura : Repository for real time rendering engine and tools for C++
    • sun-sky : Various sun/sky models, convolution of theta/gamma-parameterised models
    • SDL2 :
    • NVFC : OpenSource tool for monitoring, configuring and overclocking NVIDIA GPUs
    • libtess2 : Game and tools oriented refactored version of GLU tesselator.
    • GraphicsSamples : GameWorks cross-platform graphics API samples
    • MetricsDiscoveryHelper : A wrapper for Intel(R) MetricsDiscovery API that simplifies some common tasks and provides a more unified interface across different graphics APIs.
    • glTF-Tutorials : glTF Tutorials
    • amdgpu_ihv_info :
    • NonEuclidean : A Non-Euclidean Rendering Engine for 3D scenes.
    • aobaker : ambient occlusion baking tool
    • mesa : Mesa 3D graphics library (mirror; pull requests are ignored)
    • piglit : Piglit 3D library test suite
    • DIWide : A featureful realtime 3D software render
    • yocto-gl : Yocto/GL: Tiny C++ Libraries for Data-Driven Physically-based Graphics
    • libgltf : glTF 2.0 parser for C++11
    • tinygltf : Header only C++11 tiny glTF 2.0 library
    • AGS_SDK : AMD GPU Services (AGS) library and samples
    • sse-avx-rasterization : Triangle rasterization routines accelerated by SSE and AVX
    • RGA : The Radeon GPU Analyzer (RGA) is an offline compiler and code analysis tool for Vulkan, DirectX, OpenGL, and OpenCL.
    • glTF : glTF – Runtime 3D Asset Delivery
    • forsyth : Linear-Speed Vertex Cache Optimization
    • GPA : GPU Performance API for AMD GPUs
    • color-theory :
    • moderngpu : Patterns and behaviors for GPU computing
    • water-resources : Resources for water rendering
    • cgltf : Single-file C glTF loader
    • sts : Single file library for vertex cache optimisation of triangles.
    • stdgpu : stdgpu: Efficient STL-like Data Structures on the GPU
    • Scape : Highly realistic landspace rendering engine.
    • bigger : bigg (bgfx + imgui + glfw + glm) + utils
    • tinycolormap : A header-only, single-file library for colormaps written in C++11
    • vacancy : Vacancy: A Voxel Carving implementation in C++
    • Rendu : A simple realtime graphics playground for experimentations.
    • GPU-Gems-Book-Source-Code : CD Content ( Source Code ) Collection of Book 1~ 3 | 《GPU精粹》 1~ 3 随书CD(源代码)珍藏
    • tinyrenderer : A brief computer graphics / rendering course
    • osre : An open source render engine
    • SSAO : A screen space ambient occlusion (SSAO) algorithm
    • Voxelator : Voxel stuff entirely on the GPU using lots of GPU stuff and very little CPU stuff. Requires GLFW, GLEW, OpenGL, and a computer with a fairly recent GPU.
    • precomputed_atmospheric_scattering : This project provides a new implementation of our EGSR 2008 paper "Precomputed Atmospheric Scattering".
    • OceanSurface : A real-time ocean surface simulated using Tessendorf's algorithm and OpenGL.
    • 3D-Terrain-Generator :
    • fx-gltf : A C++14/C++17 header-only library for simple, efficient, and robust serialization/deserialization of glTF 2.0
    • carbon : Zig + Sokol + ImGui
    • API Abstractions
      • nicegraf : An abstraction layer for low-level platform-specific graphics APIs.
      • swiftshader : SwiftShader is a high-performance CPU-based implementation of the OpenGL ES and Direct3D 9 graphics APIs. Its goal is to provide hardware independence for advanced 3D graphics.
      • bgfx.cmake : Independently maintained CMake build scripts for bgfx. Released under public domain.
      • bgfx-header-extension-library : Header-only helper library for Bgfx to help you hit the ground running. Also includes a bunch of post processing filters to complete common graphical tasks
      • FlyCube : Graphics API wrapper with support for Directx 11, Directx 12, OpenGL, Vulkan.
      • libSDL2pp : C++11 bindings/wrapper for SDL2
      • vg-renderer : A vector graphics renderer for bgfx, based on ideas from NanoVG and ImDrawList (Dear ImGUI)
      • particlasm : A modular, data-driven particle system with retargetable back-ends
      • Ashes : Rendering library written in C++17, matching closely Vulkan interfaces.
      • bgfx : Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
      • bfxr-api-example : An example program using the Bfxr API.
      • tinyrenderers : Single header implemenations of Vulkan and D3D12 renderers
      • LLGL : Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal
      • fg : Rendering abstraction which describes a frame as a directed acyclic graph of render tasks and resources.
      • magnum-integration : Integration libraries for the Magnum C++11/C++14 graphics engine
      • magnum : Lightweight and modular C++11/C++14 graphics middleware for games and data visualization
    • OpenGL
      • compute_rasterizer : Rendering Point Clouds with Compute Shaders
      • gl_vk_meshlet_cadscene : This OpenGL/Vulkan sample illustrates the use of "mesh shaders" for rendering CAD models.
      • Nimble : An OpenGL renderer with a modern and extensible rendering pipeline.
      • glxw : OpenGL loader and dynamic linker
      • TerrainEngine-OpenGL : An OpenGL 4 and C++ program which renders a procedural scene.
      • GLOVE : GLOVE (GL Over Vulkan) is a cross-platform software library that acts as an intermediate layer between an OpenGL application and Vulkan
      • opengles-book-samples : Automatically exported from code.google.com/p/opengles-book-samples
      • PhotonBox : A portable modern OpenGL Game-Engine with focus on PBR
      • opengl-es-sdk-for-android : OpenGL ES SDK for Android
      • Pangolin : Pangolin is a lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input.
      • 3DWorld : 3D Procedural Game Engine Using OpenGL
      • AtmosphericScattering : An OpenGL implementation of Eric Bruneton's Precomputed Atmospheric Scattering paper.
      • HybridRenderingEngine : Clustered Forward/Deferred renderer with Physically Based Shading, Image Based Lighting and a whole lot of OpenGL.
      • globjects : C++ library strictly wrapping OpenGL objects.
      • libepoxy : Epoxy is a library for handling OpenGL function pointer management for you
      • vaserenderer : VASE renderer is a polyline and curve renderer on OpenGL.
      • glXXw : OpenGL loader for GL3 Core and GLES2/3 - like gl3w, but written in CMake
      • gltut : Learning Modern 3D Graphics Programming
      • piglit : (Unofficial mirror for development) An open-source test suite for OpenGL implementations
      • GfxSampleFramework : OpenGL-based app framework for graphics samples/prototyping.
      • MentalGL : Single header OpenGL utility library in the public domain
      • OOGL : Object-oriented C++ wrapper for OpenGL.
      • glad : Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.
      • harfbuzz-example : Harfbuzz text-shaping example with OpenGL using Freetype
      • sparkle : A modern particle engine running on GPU, using c++14 and OpenGL 4.4.
      • Cell : OpenGL C++ Graphics Engine
      • glfw : A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input
      • Glitter : Dead Simple OpenGL
      • angle : A conformant OpenGL ES implementation for Windows, Mac and Linux.
      • gl-terrain-demo : OpenGL terrain rendering demo
      • antons_opengl_tutorials_book : Anton's OpenGL 4 Tutorials book - Demo Code
      • freetype-gl : OpenGL text using one vertex buffer, one texture and FreeType
      • Guide-to-Modern-OpenGL-Functions : A guide to using modern OpenGL functions.
      • lightmapper : A C/C++ single-file library for drop-in lightmap baking. Just use your existing OpenGL renderer to bounce light!
      • AGE : AGE - C++11 OpenGL4 Game Engine
      • GLS : GL Stuff - A library aimed at reducing the boilerplate OpenGL code you always have to write.
      • Header-Only-GL-Helpers : A collection of header files that can ease OpenGL programming
      • easy_font_gl45 :
      • gfw : Pure C Minimal Graphics Framework (OpenGL)
      • opengl-skydome : A fragment-shader skydome implementation
      • examples : Examples for the OpenGL Red Book
      • PlanetRenderer : A repo for my research on planet rendering in c++ | opengl Now runs on Linux
      • vogl : OpenGL capture / playback debugger.
      • gl : C++11 wrapper for OpenGL 4.6 Core Profile.
      • minimal_opengl :
      • gl-engine : Rendering Engine using C++ and OpenGL
      • oglplus : OGLplus is a collection of open-source, cross-platform libraries which implement an object-oriented facade over the OpenGL® (version 3 and higher) and also OpenAL® (version 1.1) and EGL (version 1.…
      • TinyWindow : a cross platform (Linux and Windows) OpenGL window library in a single header
      • glgen : Minimal OpenGL extension loader
      • glbinding : A C++ binding for the OpenGL API, generated using the gl.xml specification.
      • GLUL : OpenGL Utility Library.
      • ogl : http://www.opengl-tutorial.org
      • LearnOpenGL : Code repository of all OpenGL tutorials found at https://learnopengl.com
      • styleblit : StyleBlit is an efficient example-based style transfer algorithm that can deliver high-quality stylized renderings in real-time.
      • InstancedParticle : Instancing Basics
      • GIGL : Tiny Global Illumination OpenGL Renderer
      • webgl-seed : A starter repo for building WebGL applications.
      • VCTRenderer : A real time global illumination solution that achieves glossy surfaces, diffuse reflection, specular reflection, ambient occlusion, indirect shadows, soft shadows, emissive materials and 2-bounce G…
      • gl_ssao : optimized screen-space ambient occlusion, cache-aware hbao
      • deep-gbuffers : Implementation of "Fast Global Illumination Approximations on Deep G-Buffers" (Mara et. al, 2016) using C++, OpenGL, and GLSL
      • ogl-samples : The OpenGL Samples Pack
      • InitializingOpenGL : A book written in my own spare time, that has notes on how to begin an OpenGL project.
      • opengl_sky : Pure-shader sky and cloud rendering in OpenGL
      • gl_commandlist_basic : OpenGL sample for NV_command_list
      • SFML
        • SFMLight : Add lights to your SFML game
        • Thor : SFML Extension with various game programming features, like particles, animations, vector operations
        • SFGUI : Simple and Fast Graphical User Interface
        • Swoosh : SFML Activity and Segue Mini Library
        • SFML-Workshop : Example code for the SFML Workshop
        • sfml-vscode-boilerplate : A cross-platform SFML 2.5.1 & C++17 build environment for Visual Studio Code
        • ParticleEditor : Particle editor for SFML/Thor based applications
        • light_ungod : A reimplementation of the LTBL2-framwork.
        • RichText : Rich text class for SFML2. Allows the user to draw lines of text with different styles and colors.
        • SimplGUI : SimplGUI is simple GUI library for SFML. It provides simple widgets that can be used independently.
        • Motion : Complete video and audio player for SFML
        • LTBL2 : A 2D dynamic lighting system with accurate soft shadows.
        • sfeMovie : sfeMovie is a simple C++ library that lets you play movies in SFML based applications. It relies on FFmpeg to read medias and remains consistent with SFML's naming conventions. Forum at http://sfem…
        • imgui-sfml : ImGui binding for use with SFML
        • SFML : Simple and Fast Multimedia Library
        • TGUI : An easy to use cross-platform c++ GUI for SFML
        • STP : SFML TMX Parser -
        • Empire : A cellular automaton I made up myself, written in C++/ SFML
        • SpriteAnimator : Sprite animation editor for SFML/Thor based applications
        • SelbaWard : A collection of SFML drawables
        • sfTheora : sfTheora is a static library for playing Theora videos on SFML.
    • Vulkan
      • VulkanSceneGraph : Vulkan & C++17 based Scene Graph Project
      • vulkan-seed : A Vulkan starter repo that you could use to get the ball rolling.
      • Vulkan-Samples-Assets : Vulkan Samples Assets
      • clspv : Clspv is a prototype compiler for a subset of OpenCL C to Vulkan compute shaders
      • vulkan_wsi_layer :
      • VulkanCapsViewerGenerator : Extension header generator based on the official Vulkan registry xml
      • spirv-tools-custom-opt-passes : A few custom passes for the SPIRV-Tools optimizer.
      • FrameGraph : vulkan abstraction layer that represent frame as a task graph
      • shadertoy-utils : One-click utilities that turn images/sounds into shadertoy code! :)
      • Vulkan-Example : Some example of Vulkan with C++
      • VulkanRTX :
      • vkbind : Single file Vulkan API loader.
      • vulkan-base : Simple Vulkan application
      • VkBindingBenchmark : Sponza And Bistro tests to benchmark transform data handling in Vulkan
      • Yave : Yet Another Vulkan Engine
      • vsgXchange : Utility library for converting data+materials to/from VulkanSceneGraph
      • niagara : A Vulkan renderer written from scratch on stream
      • vkhr : Real-Time Hybrid Hair Rendering using Vulkan™
      • vuda : VUDA is a header-only library based on Vulkan that provides a CUDA Runtime API interface for writing GPU-accelerated applications.
      • Pluto : Pluto: an interactive Vulkan engine with Python bindings and Jupyter notebook support
      • Onyx : Rendering engine based on Vulkan and C++17.
      • vpp : Modern C++ vulkan utility library.
      • glsl_indexed_types_generator : GLSL code generator to aid use of Vulkan's descriptor set indexing
      • Fossilize : A serialization format for various persistent Vulkan object types.
      • VkHLF : Experimental High Level Framework for Vulkan
      • Vulkan-Portability :
      • volk : Meta loader for Vulkan API
      • vulkan_best_practice_for_mobile_developers : Vulkan best practice for mobile developers
      • vk_callback_swapchain :
      • vulkan-cpp-library :
      • vulkan-sdk : Github repository for the Vulkan SDK
      • rostkatze : C++ implementation of Vulkan sitting on D3D12
      • vulkan_ihv_promises :
      • Quartz : Physically based Vulkan RTX path tracer with a declarative ES7-like scene description language.
      • Vookoo : A set of utilities for taking the pain out of Vulkan in header only modern C++
      • AMDVLK : AMD Open Source Driver For Vulkan
      • GodOfFireAndGrass : A Vulkan Grass Renderer
      • VulkanTutorial : Tutorial for the Vulkan graphics and compute API
      • rvg : High level vulkan 2D vector-like graphics api (C++)
      • VKGL : Core OpenGL over Vulkan
      • simple_vulkan_synchronization : A single-header library with a simplified interface for Vulkan synchronization
      • Vulkan-glTF-PBR : Physical based rendering with Vulkan using glTF 2.0 models
      • Vulkan : Examples and demos for the new Vulkan API
      • Vulkan-WSIWindow : A multi-platform library to create a Vulkan window, and handle input events.
      • Vulkan-Cookbook : Code repository for Vulkan Cookbook by Packt
      • TLVulkanRenderer : A simple Vulkan-based renderer for my master thesis on real-time transparency
      • Vulkan-Hpp : Open-Source Vulkan C++ API
      • Vulkan-ValidationLayers : Vulkan Validation Layers
      • VulkanMemoryAllocator : Easy to integrate Vulkan memory allocation library
      • PracticalVulkan : Repository with code samples for "API without Secrets: The Practical Approach to Vulkan" series of articles.
      • vulkan_slim : Trying to trim down the size of my Vulkan repo...
      • vulkan_ihv_info :
      • lava : toy C++ Vulkan library
      • VulkanMemoryAllocator : Easy to integrate Vulkan memory allocation library
      • Vulkan : Examples and demos for the Vulkan C++ API
      • brokkr : Vulkan framework for Windows
      • LearnVulkan : All code samples learnvulkan.com
      • vkvg : Vulkan vector drawing, try to stay close to cairo api
      • MoltenVK : MoltenVK is an implementation of the high-performance, industry-standard Vulkan graphics and compute API, that runs on Apple's Metal graphics framework, bringing Vulkan to iOS and macOS.
      • V-EZ :
      • vkdf : A collection of Vulkan demos
      • Vulkan-Ecosystem : Public repository for Vulkan Ecosystem issues
      • Anvil : Anvil is a cross-platform framework for Vulkan
      • IntroductionToVulkan : Source code examples for "API without Secrets: Introduction to Vulkan" tutorial
      • VulkanTools : Tools to aid in Vulkan development including useful layers, trace and replay, and tests
      • xgl : Vulkan API Layer
      • pal : Platform Abstraction Library
      • vkDOOM3 : Vulkan DOOM 3 port based on DOOM 3 BFG Edition
      • vulkan_minimal_compute : Minimal Example of Using Vulkan for Compute Operations. Only ~400LOC.
      • VulkanSponza : Deferred Vulkan rendering playground using Crytek's Sponza scene
      • laugh_engine : A Vulkan implementation of real-time PBR renderer
      • Intrinsic : Intrinsic is a Vulkan based cross-platform game and rendering engine. The project is currently in an early stage of development.
      • Vulkan-Docs : The Vulkan API Specification and related tools
      • VulkanResources : A list of resources for learning Vulkan
      • VulkanTutorial : Tutorial for the Vulkan graphics and compute API
      • VK-GL-CTS : Khronos Vulkan, OpenGL, and OpenGL ES Conformance Tests
      • cpp-host-metal : Test if we can use Metal runtime in C++
      • VulkanWicked :
      • ScrapEngine : A very simple real-time Vulkan 3D game engine
      • VulkanLearn : Render lab built on top of vulkan
      • vk_denoise : Denoising a Vulkan ray traced image using OptiX denoiser
      • clouds :
      • VulkanCapsViewer : Vulkan hardware capability viewer
      • VulkanDemos : Vulkan Demos
      • MageFramework : Vulkan Framework for testing out and demoing shader techniques I've been intrigued by
      • Meteoros : Real-time Cloudscape Rendering in Vulkan based on the implementation of clouds in the Decima Engine.
      • perfdoc : A cross-platform Vulkan layer which checks Vulkan applications for best practices on Arm Mali devices.
      • perfdoc : A cross-platform Vulkan layer which checks Vulkan applications for best practices on PowerVR devices.
      • VulkanApp :
      • onyx : Rendering engine based on Vulkan and C++2x.
      • VulkanMemoryAllocator-Hpp : C++ bindings for VulkanMemoryAllocator
      • FlingEngine : A Vulkan game engine with a focus on data oriented design
    • DirectX
      • directx12-seed : A DirectX 12 starter repo that you could use to get the ball rolling
      • D3D12MemoryAllocator : Easy to integrate memory allocation library for Direct3D 12
      • d3d12book : Sample code for the book "Introduction to 3D Game Programming with DirectX 12"
      • DirectXTex : DirectXTex texture processing library
      • D3d12info : Simple console tool to get all the information from DXGI and Direct3D 12 on current system
      • DirectXShaderCompiler : This repo hosts the source for the DirectX Shader Compiler which is based on LLVM/Clang.
      • DirectX-Graphics-Samples : This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
      • reed-framework : Basic framework for D3D11 init, model/texture loading, shader compilation and camera movement.
      • dxwrapper : Fixes compatibility issues with older games running on Windows 10 by wrapping DirectX dlls. Also allows loading custom libraries with the file extension .asi into game processes.
      • Sophia : A real-time DirectX 11 renderer. The renderer is named by my girlfriend's english name.
      • DeferredTexturing : A rendering sample that demonstrates bindless deferred texturing using D3D12
      • Wave-Particles-with-Interactive-Vortices : A dx12 river renderer using wave particles with interactive vortices.
      • dxup : A d3d9 and d3d10 to d3d11 translation layer.
      • VK9 : Direct3D 9 compatibility layer using Vulkan.
      • D3D12RaytracingFallback : A fork of Microsoft's D3D12 Raytracing Fallback Layer
      • d9vk : A d3d9 to vk layer based off DXVK's codebase.
      • D3DSamples : Direct3D feature samples
      • ShadowFX : DirectX 11 and 12 library that provides a scalable and GCN-optimized solution for deferred shadow filtering
      • smaa : SMAA is a very efficient GPU-based MLAA implementation (DX9, DX10, DX11 and OpenGL), capable of handling subpixel features seamlessly, and featuring an improved and advanced pattern detection & han…
      • vkd3d :
      • D3D12QuickRef : Direct3D 12.0 quick reference guide
      • d3d12_ihv_info :
      • Dx11Base : A small dx11 base program I use to test shaders and techniques
      • GeometryFX : DirectX 11 library that provides convenient access to compute-based triangle filtering (CTF)
      • ToGL : Direct3D to OpenGL abstraction layer
      • Shadows : A sample app that demonstrates several techniques for rendering real-time shadow maps
      • graphicsdemoskeleton : Playground for DirectX 11 / 12 simple graphics demo examples ...
      • Dxbc2Dxil : DXBC to DXIL (HLSL Bytecode to LLVM IR) using internal APIs.
      • separable-sss : Separable Subsurface Scattering is a technique that allows to efficiently perform subsurface scattering calculations in screen space in just two passes.
      • DXRNvTutorial : Implementing Nvidia DXR tutorial with Microsoft DXR Fallback Layer
      • crunch : Advanced DXTc texture compression and transcoding library
    • Shaders
      • glslCanvas4AE : After Effects Plug-in to write GLSL with a format of glslCanvas
      • HLSLcc : DirectX shader bytecode cross compiler
      • SPIRV-Reflect : SPIRV-Reflect is a lightweight library that provides a C/C++ reflection API for SPIR-V shader bytecode in Vulkan applications.
      • deshade : dump and replace shaders of any OpenGL or Vulkan application
      • smol-v : SMOL-V: like Vulkan/Khronos SPIR-V, but smaller.
      • ShaderFastLibs :
      • slang : Making it easier to work with shaders
      • glsl-grapher : Visualize GLSL shader functions
      • thebookofshaders : Step-by-step guide through the abstract and complex universe of Fragment Shaders.
      • glsl-optimizer : GLSL optimizer based on Mesa's GLSL compiler. Used in Unity for mobile shader optimization.
      • glslang : Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
      • glsl-atmosphere : Renders sky colors with Rayleigh and Mie scattering.
      • glslSmartDeNoise : glsl deNoise filter
      • GLSL : GLSL Shading Language Issue Tracker
      • glsl_kappa : A shaderpack that aims towards a realistic, but also authentic look.
      • gpuc : A header-only C-like shading language compiler that writes Metal, HLSL, GLSL
      • SHADERed : Lightweight, cross-platform & full-featured desktop tool for creating and testing HLSL and GLSL shaders
      • Wombat : An efficient texture-free GLSL procedural noise library
      • GPU-Noise-Lib : Optimized GPU noise functions and utilities
      • osl-shaders : a repository of osl shaders for Blender
      • osl-shaders : A collection of osl shaders
      • Pyramid : Pyramid Shader Analyzer
      • reshade-shaders : A collection of post-processing shaders written for ReShade.
      • yari-v : Single header SPIR-V compressor for C and C++
      • XShaderCompiler : Shader cross compiler to translate HLSL (Shader Model 4 and 5) to GLSL
      • reshade : A generic post-processing injector for games and video software.
      • CrossShader : A tool for cross compiling shaders. Convert between GLSL, HLSL, Metal Shader Language, or older versions of GLSL.
      • 3d-game-shaders-for-beginners : A step-by-step guide on how to implement SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
      • glslViewer : Live GLSL coding render for MacOS and Linux
      • Shader_Minifier : Minify and obfuscate GLSL or HLSL code
      • ShaderConductor : ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages
      • SPIRV-Headers : SPIRV-Headers
      • LunarGLASS : LLVM IR and optimizer for shaders, including front-end adapters for GLSL and SPIR-V and back-end adapter for GLSL
      • shader-printf : Simple printf functionality for GLSL.
      • SPIRV-Cross : SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
      • standard-surface : White paper describing the Autodesk Standard Surface shader.
      • nicegraf-shaderc : A wrapper for shaderc and spriv-cross
      • glslcc : GLSL cross-compiler tool (GLSL->HLSL, MSL, GLES2, GLES3, GLSLv3), using SPIRV-cross and glslang
      • graphicsfuzz : A testing framework for automatically finding and simplifying bugs in graphics shader compilers.
      • colourblind : A C header file & shader for simulating colourblindness and checking contrast.
      • hsluv : Human-friendly HSL, reference implementation (revision 4)
      • hlslparser : HLSL Parser and Translator for HLSL, GLSL, and MSL.
      • hlsl2glslfork : HLSL to GLSL language translator based on ATI's HLSL2GLSL. Used in Unity.
      • shader-playground : Shader playground website for exploring HLSL, GLSL, SPIR-V compilers
      • hlslparser : HLSL Parser and Translator for HLSL, GLSL, and MSL.
      • hqx-shader : GPU shader version of HQx filter
      • pmfx-shader : Cross platform shader system targetting HLSL, GLSL, Metal and SPIR-V. Offline compilation, reflection, metadata +so much more.
      • ShaderDebugger : [DEPRECATED] C++ library for debugging HLSL & GLSL shaders
    • GUI
      • elements : Elements C++ GUI library
      • qt3d : Qt3D
      • LCUI : A small C library for building user interfaces with C, XML and CSS.
      • flatui : Efficient Immediate Mode UI for Games
      • turbobadger : Small footprint UI library for games & apps (branch)
      • horus_ui : HorusUI Immediate Mode Graphical User Interface
      • zep : Zep - An embeddable editor, with optional support for using vim keystrokes.
      • Ultralight : Ultralight— a lightweight, pure-GPU, HTML UI renderer for native apps.
      • skui : Skia-based C++ UI framework
      • raygui : A simple and easy-to-use immediate-mode gui library
      • ImHotKey : Single Header Hotkey editor for dear imgui
      • libui : Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.
      • IconFontCppHeaders : C, C++ headers and C# classes for icon fonts: Font Awesome, Fork Awesome, Material Design, Material Design icons, Kenney game icons and Ionicons
      • lvgl : Powerful and easy-to-use embedded GUI with many widgets, advanced visual effects (opacity, antialiasing, animations) and low memory requirements (16K RAM, 64K Flash).
      • GuiLite : Small-Fast-Injectable GUI library(5 KLOC) for all platforms
      • microui : Tiny immediate-mode UI library
      • GWork : Skinnable GUI with useful widget collection. Fork of GWEN.
      • layout : Single-file library for calculating 2D UI layouts using stacking boxes. Compiles as C99 or C++.
      • nanovg : Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
      • fastuidraw :
      • nanogui : Minimalistic GUI library for OpenGL
      • CEGUI : mirror of upstream hg repo so we can use it as a git submodule
      • glw_imgui : Code-driven, simple and bloat-free GUI system.
      • nuklear : A single-header ANSI C gui library
      • webview : Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and MSHTML (Windows)
      • laf : A C++ library to create desktop applications
      • Nuklear : A single-header ANSI C immediate mode cross-platform GUI library
      • RapidGUI : Unity OnGUI(IMGUI) extensions for Rapid prototyping/development
      • imtui : ImTui: Immediate Mode Text-based User Interface
      • nanogui : Minimalistic C++/Python UI library for OpenGL/GLES/DX11/DX12/Vulkan
      • nana : a modern C++ GUI library
      • nodegui : A library for building cross-platform native desktop applications with Node.js and CSS
      • imgui
      • DebugDraw
        • polyscope : A prototyping-oriented UI for geometric algorithms
        • im3d : Immediate mode rendering and 3d gizmos.
        • tinygizmo : An immediate mode 3D gimzo (translation, rotation, scale for scene editing) in ~1200 LoC
        • debug-draw : Immediate-mode, renderer agnostic, lightweight debug drawing API.
        • arcball_camera : Single-header single-function C/C++ immediate-mode camera for your graphics demos
        • flythrough_camera : Single-header single-function C/C++ immediate-mode camera for your graphics demos
        • LibGizmo : Gizmo control library for 3D object manipulation (4x4 matrix)
    • Animation
      • appleseed : A modern open source rendering engine for animation and visual effects
      • aer-engine : An OpenGL 4.3 / C++ 11 rendering engine oriented towards animation.
      • skellington : Implementation of Le, Hodgins 2016 paper "Real-time Skeletal Skinning with Optimized Centers of Rotation"
      • acl : Animation Compression Library
      • ozz-animation : Open source c++ skeletal animation library and toolset
      • aseprite_parser : parser of Aseprite files, used in duel6r
      • aseprite-rgba-converter : Tiny project to convert a .ase to a RGBA Byte array
      • aseprite : Animated sprite editor & pixel art tool (Windows, macOS, Linux)
      • aseprite : A parser for the aseprite sprite editor files
      • bvh11 : A tiny C++11 library for reading BVH motion capture data
      • HybridPose : HybridPose: 6D Object Pose Estimation under Hybrid Representation (CVPR 2020)
      • Choreograph : A simple, modern C++ animation and timing library.
    • Fonts & Texts
    • Images & Textures
      • astc_dec : Single source file ASTC texture decompression in C++ (derived from Google's open source Android project)
      • blurhash : A very compact representation of a placeholder for an image.
      • image-resampler : A flexible image resampling library
      • basis_universal : Basis Universal GPU Texture Codec
      • sproutline : A small single-file library for sprite outline extraction and simplification for C/C++
      • atlasc : Builds atlas texture from a bunch of input images.
      • squeezer : Texture Packer for Game Development Using MaxRects Algorithm
      • Imogen : GPU Texture Generator
      • Fornos : GPU Texture Baking Tool
      • crabby : A texture compression algorithm for sprite sheets that allows decompression on the GPU during rendering.
      • GPUImage : An open source iOS framework for GPU-based image and video processing
      • image_lib : Image loading library
      • knusperli : A deblocking JPEG decoder
      • bc7enc16 : Fast single source file BC7/BPTC texture encoder with perceptual metric support
      • img2ktx : Converts common image formats (PNG, JPG, etc.) to GPU-native compressed (BCn, ETC, ASTC) in KTX containers.
      • Zpng : Better lossless compression than PNG with a simpler algorithm
      • lodepng : PNG encoder and decoder in C and C++.
      • bimg : Image library.
      • topng : Convert image to png using stb_image and stb_image_write
      • gif_load : A slim, fast and header-only GIF loader written in C
      • mozjpeg : Improved JPEG encoder.
      • nanosvg : Simple stupid SVG parser
      • gif-h : Simple C++ one-header library for the creation of animated GIFs from image data.
      • TinyJPEG : Single header lib for JPEG encoding. Public domain. C99. stb style.
      • compressonator : Tool suite for Texture and 3D Model Compression, Optimization and Analysis using CPUs, GPUs and APUs
      • unity-texture-packer : Utility to combine color channels from different textures into a single output.
      • dds-ktx : Single header KTX/DDS reader
      • tacit-texview : A texture viewer for tga, png, exr, dds, gif, hdr, jpg, tif, ico, and bmp files. Uses Dear ImGui, OpenGL, and Tacent. Useful for game devs as it displays information like the presence of an alpha c…
      • tinyexr : Tiny OpenEXR image loader/saver library
      • crunch : Advanced DXTc texture compression and transcoding library
    • PBR & RT & PT
      • raytracer-gpupro4 :
      • VisRTX : Visualization framework powered by NVIDIA RTX technology
      • rdb : Ray-tracing visual debugger
      • nanort : NanoRT, single header only modern ray tracing kernel.
      • pbrt-v3 : Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
      • BRDFGenerator : BRDF LUT generation for PBR Pipelines
      • pbrt-parser : A simple parser for the PBRT file format
      • GettingStartedWithRTXRayTracing : Getting Started with RTX Ray Tracing
      • Fox2 : FoxRaycaster, optimized, fixed and with a CUDA option
      • mitsuba-im : Immediate-mode fork of the mitsuba renderer
      • mitsuba : Mitsuba renderer main repository
      • LGHDemo : Real-Time Rendering with Lighting Grid Hierarchy I3D 2019 Demo
      • gpu-pathtracer : physically based path tracer on gpu
      • sparse-voxel-octrees : CPU Sparse Voxel Octree Implementation
      • tungsten : High performance physically based renderer in C++11
      • MiyukiRenderer : High performance pbrt-style renderer
      • ray-tracing-gems : Source Code for "Ray Tracing Gems: High-Quality and Real-Time Rendering with DXR and Other APIs" by Eric Haines and Tomas Akenine-Möller
      • RayTracingInVulkan : Implementation of Peter Shirley's Ray Tracing In One Weekend book using Vulkan and NVIDIA's RTX extension.
      • RayTracingInVulkan : Implementation of Peter Shirley's Ray Tracing In One Weekend book using Vulkan and NVIDIA's RTX extension.
      • RadeonRays_SDK : Radeon Rays is ray intersection acceleration library for hardware and software multiplatforms using CPU and GPU
      • filament : Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS and WASM/WebGL
      • ToyPathTracer : Toy path tracer for my own learning purposes (CPU/GPU, C++/C#, Win/Mac/Wasm, DX11/Metal, also Unity)
      • PBR : An implementation of physically based shading model & image based lighting in various graphics APIs.
      • IBLBaker : Light probe generation and BRDF authoring for physically based shading.
      • The-Forge : The Forge Cross-Platform Rendering Framework PC, Linux, Ray Tracing, macOS / iOS, Android, XBOX, PS4
      • simple-spectral : A Simple Spectral Renderer
      • MaskedOcclusionCulling : Example code for the research paper "Masked Software Occlusion Culling"; implements an efficient alternative to the hierarchical depth buffer algorithm.

    Multimedia

    • Audio
      • soloud : Free, easy, portable audio engine for games
      • openal-soft : OpenAL Soft is a software implementation of the OpenAL 3D audio API.
      • libsnd : Digital Signal Processing Library and Audio Toolbox for the Modern Synthesist.
      • HISE : The open source framework for sample based instruments
      • miniaudio : Single file audio playback and capture library written in C.
      • helm : Helm - a free polyphonic synth with lots of modulation
      • sfMidi : Library for playing midi files with SFML
      • Cadence : Collection of tools useful for audio production
      • Carla : Audio plugin host
      • RenderMan : Command line C++ and Python VSTi Host library with MFCC, FFT, RMS and audio extraction and .wav writing.
      • PLEBTracker : Ncurses based audio tracker program inspired by goattracker and milkytracker
      • LabSound : modern C++ graph-based audio engine
      • MIDI_controller : This is a library for creating a MIDI controller using an Arduino or Teensy board.
      • oboe : Oboe is a C++ library that makes it easy to build high-performance audio apps on Android.
      • Twist : Twist - node-based audio synthesizer
      • blastmidi : A C library to read standard MIDI files.
      • ass : ASS: Audio Stupidly Simple
      • FAudio : FAudio - Accuracy-focused XAudio reimplementation for open platforms
      • libxm : A small XM (FastTracker II Extended Module) player library.
      • minimp3 : Minimalistic MP3 decoder single header library
      • libnyquist : Cross platform C++11 library for decoding audio (mp3, wav, ogg, opus, flac, etc)
      • cute_dsp : Utility library for cute_sound.
      • DSP-Cpp-filters : DSP C++ audio filters
      • DSPFIR : C++ to go with blog post https://blog.demofox.org/2020/01/05/fir-audio-data-filters/
      • iPlug2 : C++ Audio Plug-in Framework for desktop, mobile and web [PRE-RELEASE]
      • rfxgen : A simple and easy-to-use fx sounds generator
      • raudio : A simple and easy-to-use audio library based on miniaudio
      • Audio Synthesis and Speech recognition
        • flite : A small fast portable speech synthesis system
        • codespeak : A web-based speech-to-code editor for humans.
        • subsync : Subtitle Speech Synchronizer
        • GranularSynth :
        • speech_synth_series : Let’s Create a Speech Synthesizer
        • synthv1 : synthv1 - an old-school polyphonic synthesizer
        • DeepSpeech : A TensorFlow implementation of Baidu's DeepSpeech architecture
        • pocketsphinx : PocketSphinx is a lightweight speech recognition engine, specifically tuned for handheld and mobile devices, though it works equally well on the desktop
        • Tonic : Easy and efficient audio synthesis in C++
        • stk : The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language.
    • Video
      • videoInput : A video capture library for windows.
      • FFmpeg : Mirror of git://source.ffmpeg.org/ffmpeg.git
      • MiniVideo : A multimedia framework developed from scratch in C/C++, bundled with test programs and a neat media analyzer.
      • mpv : Video player based on MPlayer/mplayer2
      • minimp4 : Minimalistic MP4 mux/demux single header library
      • pl_mpeg : Single file C library for decoding MPEG1 Video and MP2 Audio
      • FFMpeg-decode-example : Example how to use ffmpeg to decode video file.

    Physics

    • GamePhysicsCookbook : Source code for Game Physics Cookbook
    • 2D Physics
      • Box2D : Box2D is a 2D physics engine for games
      • b2dJson : Utilities to load scenes created by the R.U.B.E Box2D editor
      • phyxed-2d : A 2d physics engine with fixed-point support.
      • Physac : 2D physics header-only library for videogames developed in C using raylib library.
      • box2d-lite : A small 2D physics engine
      • PlayRho : Real-time oriented physics engine and library that's currently best suited for 2D games.
      • liquidfun : 2D physics engine for games
    • 3D Physics
      • bullet3 : Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
      • PhysX-3.4 : NVIDIA PhysX SDK 3.4
      • ragdoll_simulator : ragdoll simulator based on PhysX-3.3
      • physics_playground : Improved version of real-time physics engine that couples FEM-based deformables and rigid body dynamics
      • reactphysics3d : Open source C++ physics engine library in 3D
      • BVH-based-Collision-Detection-Scheme : General broad-phase collision detection framework using BVH and BVTT front tracking.
      • cyclone-physics : The Physics engine that accompanies the book "Game Physics Engine Design"
      • glChAoS.P : Real time 3D strange attractors scout and hypercomplex fractals
      • bounce : Bounce is a 3D physics engine for games.
      • newton-dynamics : Newton Dynamics is an integrated solution for real time simulation of physics environments.
      • nudge : A small data-oriented and SIMD-optimized 3D rigid body physics library.
    • Water & Fluids
    • IK
      • invk : Invk - Inverse Kinematics Library with Quaternions
      • gear : A C++ library for kinematics and dynamics of articulated rigid body systems.
      • softIkSolver : Maya Soft IK Solver
    • Cloth
      • Yarn-cloth-sim : Implementation of ‘Yarn-Level Simulation of Woven Cloth’ on Siggraph Asia 2014.
      • libwetcloth : A Multi-Scale Model for Simulating Liquid-Fabric Interactions
      • GPU_cloth :
      • FastMassSpring : Interactive cloth simulator using the method described in the SIGGRAPH paper "Fast Simulation of Mass-Spring Systems" by Liu, T., Bargteil, A. W., Obrien, J. F., & Kavan, L.
      • ThunderLoom : A physically based shader for woven cloth

    Networking

    • LUrlParser : Lightweight URL & URI parser (RFC 1738, RFC 3986)
    • wangle : Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.
    • TCP/UDP/HTTP
      • netcode.io : A protocol for secure client/server connections over UDP
      • enet : ENet reliable UDP networking library
      • minihttp : A minimal 2-file (cpp+h) TCP & HTTP client implementation. Supports GET & simple POST. Optional SSL via PolarSSL/mbedTLS. Cross-platform, uses POSIX or Win32 API.
      • SFNUL : Simple and Fast Network Utility Library
      • uWebSockets : Simple, secure & standards compliant web I/O for the most demanding of applications
      • net11 : Simple embeddable C++11 async tcp,http and websocket serving.
      • libclub : Lightweight Peer-to-Peer networking engine for real time applications
      • cxxhttp : Asynchronous, Header-only C++ HTTP-over-(TCP|UNIX Socket|STDIO) Library
      • librg : Build simple and fast cross-platform multiplayer
      • utp-native : Native bindings for libutp
      • czspas : Minimalistic socket library inspired by Asio/Boost Asio, implemented in 1 single header file
      • netlibrary : A simple networking library for C++. Designed with games in mind, but can be used for other things. Tested to work on Android and Windows.
      • RakNet : RakNet is a cross platform, open source, C++ networking engine for game programmers.
      • frnetlib : Small and fast cross-platform networking library, with support for messaging, IPv6, HTTP, SSL and WebSocket.
      • GameNetworkingSockets : Reliable & unreliable messages over UDP. Robust message fragmentation & reassembly. Encryption.
      • QuantumGate : QuantumGate is a peer-to-peer (P2P) communications protocol, library and API written in C++.
      • rttp : RTTP - A Reliable Realtime Transport Protocol
      • clsocket : SimpleSockets is a lightweight set of classes that allow developers to implement IP based network programs.
      • https_client : HTTP/HTTPS REST Client C Library
      • libquicknet : Simple and small reliable UDP networking library for games
      • NetDynamics : Data-oriented networking playground for the reliable UDP transports
      • cpp-Socket : Some class to help to construct client/server with soket and serilized datas.
      • cpp-ORM : A project to create a simple ORM.
      • mbedtls : An open source, portable, easy to use, readable and flexible SSL library
      • cpp-httplib : A C++ header-only HTTP/HTTPS server and client library
      • rinetd : TCP/UDP port redirector
      • swrap : Portable, single-file, protocol-agnostic TCP and UDP socket wrapper, primarily for game networking
      • sdk : Network Next SDK
      • librg-cpp : C++ wrapper for librg network library
      • zed_net : Single file public domain networking library
      • http-parser : http request/response parser for c
      • botan : Cryptography Toolkit
      • reliable.io : A packet acknowledgement system for UDP protocols
      • PcapPlusPlus : PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use. It provides C++ wrappers for the most p…
    • SQL
      • scylla : NoSQL data store using the seastar framework, compatible with Apache Cassandra
      • NLDatabase : Lightweight C++ wrapper for SQLite
      • ndb : Neuroshok DataBase
      • unqlite : An Embedded NoSQL, Transactional Database Engine
      • sqlpp11 : A type safe SQL template library for C++
      • SQLiteCpp : SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.
      • hiberlite : C++ ORM for SQLite
      • sqlite_orm : SQLite ORM light header only library for modern C++
    • RPC
      • rpclib : rpclib is a modern C++ msgpack-RPC server and client library
      • libjson-rpc-cpp : C++ framework for json-rpc (json remote procedure call)
      • Game-NET : RPC Network Library for Multiplayer Games
      • grpc : The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
    • Server
      • nakama : Distributed server for social and realtime games and apps.
      • webby : A tiny webserver for game development
      • yojimbo : A network library for client/server games with dedicated servers
      • seasocks : Simple, small, C++ embeddable webserver with WebSockets support
      • libhttpserver : C++ library for creating an embedded Rest HTTP server (and more)
      • open-match : Flexible, extensible, and scalable video game matchmaking.
      • hifi : Open source client/server software for creating shared VR environments. Docs at http://docs.highfidelity.com We are hiring: http://highfidelity.com/jobs Also, PT work available at http://worklist.net
      • crow : Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
      • agones : Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes
      • civetweb : Embedded C/C++ web server
      • EmbeddableWebServer : Cross-platform, single .h file HTTP server (Windows, Linux, Mac OS X)
      • libcluon : libcluon is a small and efficient, single-file and header-only library written in modern C++ to power microservices.
      • mongoose : Mongoose Embedded Web Server Library - Mongoose is more than an embedded webserver. It is a multi-protocol embedded networking library with functions including TCP, HTTP client and server, WebSocke…
      • yhs : Embeddable HTTP server.
      • Server_Information_Panel : Information Panel for DayZ SA
      • moon : A cross-platform,lightweight,scalable game server framework written in C++, and support Lua Script
      • Game-Server-Configs : A repo of game server configuration files used by LinuxGSM

    AI

    • CppCompetitor : A program for dueling code bots.
    • Samodiva : A C++ library for AI stuff. Hopefully it won't be as unfinished as the majority of my other repos.
    • Neural Network & Deep Learning
      • neural : Some plays with neural network
      • CppDNN : Machine Learning for C++11
      • CubbyDNN : Deep learning framework using C++17 in a single header file
      • TinNet : A C++14 based deep learning library.
      • onnxruntime : ONNX Runtime: cross-platform, high performance scoring engine for ML models
      • RobotChess : Auto Chess simulator using C++ with some reinforcement learning
      • tesseract : Tesseract Open Source OCR Engine (main repository)
      • genann : simple neural network library in ANSI C
      • plaidml : PlaidML is a framework for making deep learning work everywhere.
      • ncnn : ncnn is a high-performance neural network inference framework optimized for the mobile platform
      • EOgmaNeo : Ogma - EOgmaNeo https://ogma.ai/
      • Dataset_Synthesizer : NVIDIA Deep learning Dataset Synthesizer (NDDS)
      • mace : MACE is a deep learning inference framework optimized for mobile heterogeneous computing platforms.
      • pose-tensorflow : Human Pose estimation with TensorFlow framework
      • nvvl : A library that uses hardware acceleration to load sequences of video frames to facilitate machine learning training
      • codi : CoDi is a cellular automaton model for spiking neural networks
      • Cranium : A portable, header-only, artificial neural network library written in C99
      • darknet : Convolutional Neural Networks
      • tiny-dnn : header only, dependency-free deep learning framework in C++14
      • TensorRT : TensorRT is a C++ library for high performance inference on NVIDIA GPUs and deep learning accelerators.
      • kann : A lightweight C library for artificial neural networks
      • cONNXr : Pure C ONNX runtime with zero dependancies for embedded devices
    • Path
      • recastnavigation : Navigation-mesh Toolset for Games
      • NavMeshComponents : High Level API Components for Runtime NavMesh Building
      • MicroPather : MicroPather is a path finder and A* solver (astar or a-star) written in platform independent C++ that can be easily integrated into existing code. MicroPather focuses on being a path finding engine…
      • rsmotion : RSMotion - C++ Library for Reeds-Shepp Cars
      • invariant-ekf : C++ library to implement invariant extended Kalman filtering for aided inertial navigation.
      • lib_2d : A c++ library for paths defined by points within the 2d space
      • cartographer : Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
      • Swarmz : A free, header-only C++ swarming (flocking) library for real-time applications
      • Dubins-Curves : Path generation for the Dubin's car

    Scripting

    • scriptorium : Game Scripting Languages benchmarked
    • craftinginterpreters : Repository for the book "Crafting Interpreters"
    • ChaiScript : Embedded Scripting Language Designed for C++
    • CppSharp : Tools and libraries to glue C/C++ APIs to high-level languages
    • Ark : Ark is a small, fast, functionnal and scripting language for video games
    • hhvm : A virtual machine for executing programs written in Hack.
    • cpp-embedding-mono : Small sample on how to embed the mono runtime into a C++ program.
    • wren : The Wren Programming Language
    • v : Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s. 1.0 release in December 2019. https://vlang.io
    • NativeJIT : A C++ expression -> x64 JIT
    • kit : Kit: a magical, high performance programming language, designed for game development. Pre-alpha!
    • pure-bash-bible : A collection of pure bash alternatives to external processes.
    • swig : SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.
    • smoll-vm : just a smoll vm in c++14
    • haxe : Haxe - The Cross-Platform Toolkit
    • c4 : C in four functions
    • oc : Macro magic for declaring/calling Objective-C APIs from C11 or C++. Preloads selectors, chooses the correct objc_msgSend to call per method/platform.
    • breadboard : C++ graph based event system
    • Cello : Higher level programming in C
    • HCode : A scripting language created mainly for game engines
    • Lua
      • luazdf : LuaZDF - Lua Zero Dependency Functions
      • luavela : Implementation of Lua 5.1, originally a fork of LuaJIT 2.0
      • raylib-lua-sol : A simple and easy-to-use Lua library to enjoy videogames programming
      • LuaTalk : Code examples used in my Lua talk
      • debugger.lua : A simple, embedabble CLI debugger for Lua.
      • lua-vec : highly efficent, caching, copy-on-write lua vector math library
      • lunatic : lunatic: a toy lua interpreter
      • kaun : Lua module for 3D graphics to be used with löve (http://love2d.org)
      • lua : The Lua repo, as seen by the Lua team. Mirrored irregularly. Please DO NOT send pull requests. Send issues/patches to the Lua mailing list https://www.lua.org/lua-l.html
      • LuaPlusPlus : Lua 5.3.4 re-written in C++ 17
      • kaguya : C++ binding to Lua
      • hsluv-lua : Lua implementation of HSLuv (revision 4)
      • Luna : Create simple visual sketches in Lua using SFML
      • lutok2 : Advanced version of lutok C++/Lua binding
      • sol2 : Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
      • lualite : a one header library for creating Lua bindings to C++
      • lua-intf : A binding between C++11 and Lua language
      • Selene : Simple C++11 friendly header-only bindings to Lua
      • TypeScriptToLua : Typescript to lua transpiler. https://typescripttolua.github.io/
      • Lua-Low-Level : Per function, Lua JIT using LLVM C++ toolchain
      • lua-languages : Languages that compile to Lua
      • luvit : Lua + libUV + jIT = pure awesomesauce
      • luamod : C++11 API for binding Lua and C++, targeted at scripting for games
    • Python
      • zippypy : A simple, lightweight Python 2.7 interpreter, with predictable memory management and without global locks.
      • pybind11 : Seamless operability between C++11 and Python
      • pystring : C++ functions matching the interface and behavior of python string methods with std::string
      • python-cheatsheet : Comprehensive Python Cheatsheet
      • zippypy : A simple, lightweight Python 2.7 interpreter, with predictable memory management and without global locks.
    • Javascript
      • jerryscript : Ultra-lightweight JavaScript engine for the Internet of Things. http://samsung.github.io/jerryscript
      • em-dosbox : An Emscripten port of DOSBox
      • duktape : Duktape - embeddable Javascript engine with a focus on portability and compact footprint
      • mjs : Embedded JavaScript engine for C/C++
      • v8 : The official mirror of the V8 Git repository

    GameProgramming

    • Nodable : a node-able bidirectionnal expression editor.
    • nodeeditor : Qt Node Editor. Dataflow programming framework
    • FSM : finite-state-machine demo
    • lasso : A generic game loop implementation in C++
    • aabbcc : Dynamic AABB trees in C++ with support for periodic systems.
    • distance-occlusion : A library of distance and occlusion generation routines
    • cppfsm : A simple, generic, header-only state machine implementation for C++.
    • Behavior-Tree : A lightweight library of Behavior Trees Library in C++.
    • Achieve : Library to manage and implement achievements in a game.
    • Discregrid : A static C++ library for the generation of discrete functions on a box-shaped domain. This is especially suited for the generation of signed distance fields.
    • DesignPattern :
    • game-programming-patterns : Source repo for the book
    • fsm-variant : Finite State Machine implementation using std::variant
    • camera_demo : demo for par_camera_control.h
    • godot_entt_net_example : A simple example on how to use entt (https://github.com/skypjack/entt) and GameNetworkingSockets (https://github.com/ValveSoftware/GameNetworkingSockets) within godot
    • EntityComponentSystem
      • ecs-example : An example of an ECS architecture in C++
      • Diana : Entity Component system like Artemis implemented in C
      • entt-reactive : An experimental sprite rendering setup utilizing SSBO's, Threading, EnTT reactive systems, and array-textures based sprite caching.
      • minECS : Minimal hackable C# ECS
      • lent : the Donald Trump of the ECS libraries
      • anax : An open source C++ entity system.
      • ecs : Thoughts about entity-component-system
      • flecs : A Multithreaded Entity Component System written for C89 & C99
      • entt : Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much more
      • entt : Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much more
      • kengine : The Koala engine is a type-safe and self-documenting implementation of an Entity-Component-System (ECS), with a focus on runtime extensibility and compile-time type safety and clarity.
      • corgi : C++ entity-component system
      • ECS : C++ single-header entity component system library
      • EntityPlus : A C++14 Entity Component System
      • ecst : [WIP] Experimental C++14 multithreaded compile-time entity-component-system library.
      • entityx : EntityX - A fast, type-safe C++ Entity-Component system
      • dynamix : A new take on polymorphism in C++
      • met-ecs : A simple ECS library made for learning purposes (header-only)
    • Inputs
      • XJoy : Use Nintendo Switch JoyCons as a virtual Xbox 360 controller in Windows
      • drishti : Real time eye tracking for embedded and mobile devices.
      • openpose : OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation
      • libgamepad : Cross-platform library for gamepad input. MIT licensed.
      • gainput : Cross-platform C++ input library supporting gamepads, keyboard, mouse, touch http://gainput.johanneskuhlmann.de/
      • gesture_recognition : UVIC ECE 499 Real-Time Gesture Recognition Project
      • OpenHMD : Free and Open Source API and drivers for immersive technology.
      • EasyTab : Single-header multi-platform tablet library
      • libue : A self-contained minimal library for interacting with Linux hot-plug events
    • Maps
      • tiled : A flexible level editor
      • tmxlite : lightweight C++14 parser for Tiled tmx files
    • Procedural
      • SpaceshipGenerator : A Blender script to procedurally generate 3D spaceships
      • Procedural-Cities : master thesis
      • termProject : Terrain generator with 5 visually distinct biomes, spread them in regions and smooth their borders
      • libseed : Procedural Content Generation Library for C++
      • proctree : Procedural tree mesh generator (and editor)
      • World-Generator : Procedural world generator. Generates a height map and then applies temperature, rainfall, and river simulations to it to form a world map.
      • FantasyMapGenerator : A fantasy map generator based on Martin O'Leary's "Generating fantasy map" notes
      • procgen : Procedural Generation Experiments
      • rant : Rant – The all-purpose procedural text library
      • SDS : Procedural generation of organic 3D geometry
      • fugu : Fugu/fg is a system for procedurally generating animated geometric forms in real-time. Fugu can be downloaded from http://bp.io/fugu, an online reference and gallery is also located there.
      • generator : A procedural geometry generation library for C++11
      • Procedural-Terrain-Estimator : Generate Height map with Generator (OpenGL and imgui) and Construct Splat Map with generated height map using Algorithm(DPS, BFS, Gradient Descent ... etc) . At Renderer, with height map and blend …
    • Integration
      • Playnite : Open source video game library manager with support for 3rd party libraries like Steam, GOG, Origin, Battle.net and Uplay. Including game emulation support, providing one unified interface for your…
      • game-jolt-api-cpp-library : C++ Library to connect games with Game Jolt (https://gamejolt.com)
      • CSteamworks : C bindings for Steamworks
      • enkiWS : Web Services for game developers on Google App Engine
      • steam-audio : Steam Audio
      • tiniest-analytics : VERY simple cross-platform C++ analytics for games (using Google Analytics)
      • BRINDIE-FREE : BRINDIE FREE - an .ai sourcefile with sizes for art assets needed to create Facebook page, Twitter profile, Steam Store page and Steam Developer page
      • Proton : Compatibility tool for Steam Play based on Wine and additional components
      • steam-runtime-helpers :
    • Games
      • endless-sky : Space exploration, trading, and combat game.
      • Cytopia : A city building simulation game
      • mudpp : C++17 exploration of a classic MUD like game
      • magarena : Magarena is a single-player fantasy card game played against a computer opponent.
      • robotligan : Multiplayer football game
      • VVVVVV : The source code to VVVVVV! http://thelettervsixtim.es/
      • DTL_RogueLike : : RogueLike (Dungeon Template Library)
      • UniformDieCast : C++11 provides chainable and iterable object for uniform die casts. Useful for statistics or table top RPG simulations.

    Rust

    • iced : A renderer-agnostic GUI library for Rust, inspired by Elm
    • tetra : A simple 2D game framework written in Rust
    • arewegameyet : The repository for arewegameyet.rs
    • rust-ecosystem : Rust wants & tracking for Embark
    • treeflection : A rust library that provides pseudo-reflection for structs and enums
    • wg : Coordination repository of the Game Development Working Group
    • reference : The Rust Reference
    • shipyard : Entity Component System written in Rust
    • physx-rs : Rust binding and wrapper over NVIDIA PhysX
    • ndarray : ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations
    • amethyst : Data-oriented and data-driven game engine written in Rust
    • cheats.rs : Rust Language Cheat Sheet - https://cheats.rs
    • mathbench-rs : Comparing performance of Rust math libraries for common 3D game and graphics tasks
    • vulkano : Safe and rich Rust wrapper around the Vulkan API
    • imgui-rs : Rust bindings for dear imgui
    • chip8 : Yet another chip8 interpreter in rust
    • gfx : A low-overhead Vulkan-like GPU API for Rust.
    • rustcxx : rustcxx: Using C++ from Rust made easy
    • ngx-rust : Rust binding for NGINX
    • diesel : A safe, extensible ORM and Query Builder for Rust
    • dynstack : A stack for rust trait objects that minimizes allocations
    • cc-rs : Rust library for build scripts to compile C/C++ code into a Rust library
    • rust : Empowering everyone to build reliable and efficient software.
    • unosolo : Work-in-progress Rust application that converts C++ header-only libraries to single self-contained headers.
    • r4cppp : Rust for C++ programmers
    • game-of-life :
    • rendy : State of the art "build your own engine" kit powered by gfx-hal
    • u2N : Fixed-size, zero-allocation arithmetic suitable for embedded systems
    • glam-rs : A simple and fast linear algebra library for games and graphics
    • wgpu : Native WebGPU implementation based on gfx-hal
    • rs-tiled : Reads files from the Tiled editor into Rust
    • awesome-rust : A curated list of Rust code and resources.
    • Nazarust : An experiment to rewrite NazaraEngine using Rust
    • ggez : Rust library to create a Good Game Easily
    • render-rs : Collection of rust crates providing rendering abstractions.

    Tools

    • build2 : build2 build system
    • rcrl : Read-Compile-Run-Loop: tiny and powerful interactive C++ compiler (REPL)
    • LibreSprite : Animated sprite editor & pixel art tool -- Fork of the last GPLv2 commit of Aseprite
    • smldbg : A small, dependency free debugger.
    • training-kit : Open source cheat sheets for Git and GitHub
    • SZZUnleashed : An implementation of the SZZ algorithm, i.e., an approach to identify bug-introducing commits.
    • ClangBuildAnalyzer : Clang build analysis tool using -ftime-trace
    • tev : High dynamic range (HDR) image comparison tool for graphics people with an emphasis on OpenEXR images.
    • exception_reporter : A tool to collect the exceptions that can reach a C++ function
    • ScreenToGif : ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video.
    • dxil-signing : Utility to sign DXIL code after compilation
    • nvtop : NVIDIA GPUs htop like monitoring tool
    • 3dtiles : The fastest tools for 3dtiles convert in the world!
    • greenshot : Greenshot for Windows - Report bugs & features go here: https://greenshot.atlassian.net or look for information on:
    • Dependencies : A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
    • butler : Command-line itch.io helper
    • gh-card :
    • FNode : Tool based in nodes to build GLSL shaders without any programming knowledge written in C using OpenGL and GLFW.
    • NormalmapGenerator : A simple program that converts images into normal maps
    • Laigter : A simple tool for automatic generation of normal/specular/parallax/occlussion maps for dynamic lights in games. Mainly focused for 2D sprites.
    • cppclean : Finds problems in C++ source that slow development of large code bases
    • veles : Binary data analysis and visualization tool
    • sanitizers : AddressSanitizer, ThreadSanitizer, MemorySanitizer
    • sprite-sheet-packer : Sprite sheet packer
    • CryLivePlusPlus :
    • HlslTools : A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files
    • include-what-you-use : A tool for use with clang to analyze #includes in C and C++ source files
    • dust3d : Dust3D is a cross-platform open-source 3D modeling software. Auto UV unwrapping, auto rigging with PBR Material support, pose and motion authoring all in one.
    • shaderc : A collection of tools, libraries, and tests for Vulkan shader compilation.
    • SPIRV-Tools :
    • opentoonz : OpenToonz - An open-source full-featured 2D animation creation software
    • waifu2x-ncnn-vulkan : waifu2x converter ncnn version, runs fast on intel / amd / nvidia GPU with vulkan
    • IntelShaderAnalyzer : Command line tool for offline shader ISA inspection.
    • polyedit : 2d lowpoly editor based on http://raincomplex.net/lowpolyeditor/
    • PlotJuggler : The timeseries visualization tool that you deserve
    • incbin : Include binary files in C/C++
    • ToolsOfTheTrade : Tools of The Trade, from Hacker News.
    • hexembed : A small utility to embed files into C or C++ programs.
    • NMS-Tools : Set of tools for No Man's Sky
    • fontforge : Free (libre) font editor for Windows, Mac OS X and GNU+Linux
    • TextureGenerator-Online : Procedural texture creator Online
    • NormalMap-Online : NormalMap Generator Online
    • travis_cpp_tutorial : Tutorial how to use Travis CI with C++
    • android-ndk : Android NDK samples with Android Studio
    • fips : High-level build system for distributed, multi-platform C/C++ projects.
    • reopt : A tool for analyzing x86-64 binaries.
    • cppcheck : static analysis of C/C++ code
    • cpp-forensics : C++ crash dump server
    • cpack : File-to-sourcecode packer.
    • templight : Templight is a Clang-based tool to profile the time and memory consumption of template instantiations and to perform interactive debugging sessions to gain introspection into the template instantia…
    • stack-on-a-budget : A collection of services with great free tiers for developers on a budget
    • mkvfx : Build scripts for libraries commonly used in games, film and vfx
    • masterplan : MasterPlan is a project management software / visual idea board software. It attempts to be easy to use, lightweight, and fun.
    • public-apis : A collective list of free APIs for use in software and web development.
    • docker : Lightweight containers for building C++
    • grafana : The tool for beautiful monitoring and metric analytics & dashboards for Graphite, InfluxDB & Prometheus & More
    • opengametools : A set of open c++ game development tools that are lightweight, easy-to-integrate and free to use. Currently hosting a magicavoxel .vox full scene loader.
    • cpp-dependencies : Tool to check C++ #include dependencies (dependency graphs created in .dot format)
    • pubgrub : Pubgrub dependency resolution algorithm for C++
    • pacm : C++ front-end package manager for embedding and redistributing with native applications
    • Arbiter : Dependency manager library that supports decentralization
    • oss-fuzz : OSS-Fuzz - continuous fuzzing of open source software.
    • Visual Studio Extensions
      • SPIRV-VSExtension : SPIR-V extension for Visual Studio
      • asm-dude : Visual Studio extension for assembly syntax highlighting and code completion in assembly files and the disassembly window
      • fastbuild : High performance build system for Windows, OSX and Linux. Supporting caching, network distribution and more.
      • LivePP : A UE4 plugin wrapper for Molecular Matter's Live++ Hot-Reloading Library
      • ue4-vs-extensions : Useful UE4 Visual Studio extensions.
      • GLSL : VSIX Project that provides GLSL language integration.
      • UnityMixedCallstack : Visual Studio native debugger extension to help debug native applications using Mono.
      • vs-chromium : A Visual Studio extension containing a collection of tools to help contributing code to the Chromium project.
      • VSDebugPro : Enhanced debugging for C/C++. Dump blocks of data, load data in memory and more.
      • CompileTimer : Set of tests to benchmark the compile time of c++ constructs
      • TestAdapter_Catch2 : Visual Studio Test Adapter for Catch2
      • vscode-shader : Shader languages support for VS Code
      • VS-ColorThemes : Visual Studio Extension that installs additional color themes
    • Git
      • git-flight-rules : Flight rules for git
      • gitsuggest : A tool to suggest github repositories based on the repositories you have shown interest in.
    • Projects
      • bscxx : BSCXX (for BootStrap CXX project) is a C++ package manager.
      • Sharpmake : Sharpmake is an open-source C#-based solution for generating project definition files, such as Visual Studio projects and solutions, GNU makefiles, Xcode projects, etc.
      • poac : Package manager for C++
      • ninja : a small build system with a focus on speed
      • conan-google-benchmark : Conan recipe for Google Benchmark library
      • conan-irrlicht : Conan recipe for Irrlicht library
      • cmake-scripts : CMake scripts shared among other repositories
      • conan : Conan - The open-source C/C++ package manager
      • premake-cmake : cmake output for premake5
      • vcpkg : C++ Library Manager for Windows, Linux, and MacOS
      • ucm : Useful cmake macros that help with: compiler/linker flags, collecting sources, PCHs, Unity builds and other stuff.
      • cotire : CMake module to speed up builds.
      • cmakepp : An Enhancement Suite for the CMake Build System
      • cmake_format : Source code formatter for cmake listfiles.
      • learning-cmake : learning cmake
      • cpp-project : Boiler plate template for C++ projects, with CMake, Doctest, Travis CI, Appveyor, Github Actions and coverage reports.
      • conan-center-index : Recipes for the ConanCenter repository
      • ios-cmake : A CMake toolchain file for iOS, watchOS and tvOS C/C++/Obj-C++ development
      • Box2D-cmake : CMake wrapper for Box2D, since it uses premake5
      • cpp-oss-template : C++ Open Source Software Template
      • cmake : A set of cmake modules to assist in building code
      • travis-gtest-cmake-example : Example of a gtest and cmake set up for C++ on Travis-CI.
      • gtest-cmake-example : Helpful example of a gtest and cmake set up for C++.
      • travis_gcc_cpp17 : Minimal C++17 project using the GCC compiler and is checked by Travis CI

    Awesome

    • awesome-cmake : A curated list of awesome CMake resources, scripts, modules, examples and others.
    • bookmarks : Collection of public dev bookmarks, shared with
    • cpp_youtube_channels : Listing of C++ Youtube channels for conferences and user groups
    • programming-talks : Awesome & interesting talks about programming
    • awesome-modern-cpp : A collection of resources on modern C++
    • Awesome-Game-Networking : A Curated List of Game Network Programming Resources
    • awesome-behavior-trees : A list of awesome Behavior Trees resources
    • GameDevelopmentLinks : This is a collection of useful game-development links including, but not restricted to, development with MonoGame.
    • awesome-entity-component-system : A curated list of Entity-Component-System (ECS) libraries and resources
    • awesome-casestudy : Curated list of technical case studies on WebGL and creative development
    • awesome-cg-vfx-pipeline : List of open-source technologies that help in the process of building a pipeline for CG and VFX productions
    • awesome-glsl : Compilation of the best resources to learn programming OpenGL Shaders
    • cpp_blogs : C++ Blogs (plus other stuff we should care about like undefined behavior)
    • awesome-rtx : Curated collection of projects leveraging NVIDIA RTX technology (OptiX, DXR, VKR)
    • zalo.github.io : A home for knowledge that is hard to find elsewhere
    • awesome-gamedev : A list of Game Development resources to make magic happen.
    • gamedev-resources : An updated collection of useful resources to resources to design, develop and market games.
    • build-your-own-x : Build your own (insert technology here)
    • awesome-ray-tracing : Curated list of ray tracing resources
    • awesome-vulkan : Awesome Vulkan ecosystem
    • awesome-opengl : A curated list of awesome OpenGL libraries, debuggers and resources.
    • hall-of-fame : Show some love to your contributors! A widget for your repo README. Visual and clean. Refreshes every hour.
    • awesome-collision-detection : A curated list of awesome collision detection libraries and resources
    • AwesomePerfCpp : A curated list of awesome C/C++ performance optimization resources: talks, articles, books, libraries, tools, sites, blogs. Inspired by awesome.
    • awesome-d3d12 : Awesome D3D12 ecosystem
    • awesome-cpp : A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.
    • awesome-bits : A curated list of awesome bitwise operations and tricks
    • cpplinks : A categorized list of C++ resources.
    • awesome-gametalks : A curated list of gaming talks (development, design, etc)
    • awesome-design : Best UI/UX Design Sources For Developer & Designer Ever :)
    • awesome-gamedev : A collection of free software and free culture resources for making amazing games. (mirror)
    • magictools : A list of Game Development resources to make magic happen.
    • awesome : Awesome lists about all kinds of interesting topics
    • awesome-c : A curated list of awesome C frameworks, libraries and software.
    • awesome-mental-health : A curated list of awesome articles, websites and resources about mental health in the software industry.
    • modern-cpp-tutorial : A curated list of Modern C++ articles, examples, tutorials, frameworks, libraries, and shiny things.
    • awesome-wgpu : A curated list of wgpu code and resources.
    • awesome-gametalks : A curated list of gaming talks (development, design, etc)
    • data-oriented-design : A curated list of data oriented design resources.
    • awesome-actions : A curated list of awesome actions to use on GitHub

    GameProgrammerPath

    GameDesign

    • gamebook : An unified game design document convention (CC0, Markdown)
    • trust : An interactive guide to the game theory of cooperation

    Website

    展开全文
  • Unofficial AirPlay Protocol Specification

    千次阅读 2014-09-30 11:31:37
    Unofficial AirPlay Protocol Specification 1. Introduction2. Service Discovery 2.1. AirTunes service2.2. AirPlay Service 3. Photos 3.1. HTTP requests3.2. Events3.3. Photo Caching3.4. Slidesho

    原文地址: http://nto.github.com/AirPlay.html


    Unofficial AirPlay Protocol Specification

    1. Introduction

    AirPlay is a family of protocols implemented by Apple to view various types of media content on the Apple TVfrom any iOS device or iTunes. In this documentation, “iOS device” refers to an iPhone, iPod touch or iPad. The following scenarios are supported by AirPlay:

    • Display photos and slideshows from an iOS device.

    • Stream audio from an iOS device or iTunes.

    • Display videos from an iOS device or iTunes.

    • Show the screen content from an iOS device or OS X Mountain Lion. This is called AirPlay Mirroring. It requires hardware capable of encoding live video without taking too much CPU, so it is only available on iPhone 4S, iPad 2, the new iPad, and Macs with Sandy Bridge CPUs.

    Audio streaming is also supported from an iOS device or iTunes to an AirPort Express base station or a 3rd party AirPlay-enabled audio device. Initially this was called AirTunes, but it was later renamed to AirPlay when Apple added video support for the Apple TV.

    This document describes these protocols, as implemented in Apple TV software version 5.0, iOS 5.1 and iTunes 10.6. They are based on well-known standard networking protocols such as Multicast DNSHTTPRTSPRTPor NTP, with custom extensions.

    All these information have been gathered by using various techniques of reverse engineering, so they might be somewhat inaccurate and incomplete. Moreover, this document does not explain how to circumvent any kind of security implemented by Apple:

    • It does not give any RSA keys.

    • It does not explain how to decode iTunes videos protected with the FairPlay DRM.

    • It does not explain the FairPlay authentication (SAPv2.5) used by iOS devices and OS X Mountain Lion to protect audio and screen content.

    Please don’t e-mail me about this, I won’t reply. In fact, none of this is actually required to be able to view media content on Apple TV.

    2. Service Discovery

    AirPlay does not require any configuration to be able to find compatible devices on the network, thanks to DNS-based service discovery, based on multicast DNS, aka Bonjour.

    An AirPlay device such as the Apple TV publishes two services. The first one is RAOP (Remote Audio Output Protocol), used for audio streaming, and the other one is the AirPlay service, for photo and video content.

    2.1. AirTunes service

    RAOP service from Apple TV

    name: 5855CA1AE288@Apple TV
    type: _raop._tcp
    port: 49152
    txt:
     txtvers=1
     ch=2
     cn=0,1,2,3
     da=true
     et=0,3,5
     md=0,1,2
     pw=false
     sv=false
     sr=44100
     ss=16
     tp=UDP
     vn=65537
     vs=130.14
     am=AppleTV2,1
     sf=0x4
    

    The name is formed using the MAC address of the device and the name of the remote speaker which will be shown by the clients.

    The following fields appear in the TXT record:

    namevaluedescription
    txtvers1TXT record version 1
    ch2audio channels: stereo
    cn0,1,2,3audio codecs
    et0,3,5supported encryption types
    md0,1,2supported metadata types
    pwfalsedoes the speaker require a password?
    sr44100audio sample rate: 44100 Hz
    ss16audio sample size: 16-bit
    tpUDPsupported transport: TCP or UDP
    vs130.14server version 130.14
    amAppleTV2,1device model

    Audio codecs

    cndescription
    0PCM
    1Apple Lossless (ALAC)
    2AAC
    3AAC ELD (Enhanced Low Delay)

    Encryption Types

    etdescription
    0no encryption
    1RSA (AirPort Express)
    3FairPlay
    4MFiSAP (3rd-party devices)
    5FairPlay SAPv2.5

    Metadata Types

    mddescription
    0text
    1artwork
    2progress

    2.2. AirPlay Service

    AirPlay service

    name: Apple TV
    type: _airplay._tcp
    port: 7000
    txt:
     deviceid=58:55:CA:1A:E2:88
     features=0x39f7
     model=AppleTV2,1
     srcvers=130.14
    

    The following fields are available in the TXT record:

    namevaluedescription
    modelAppleTV2,1device model
    deviceid58:55:CA:1A:E2:88MAC address of the device
    features0x39f7bitfield of supported features
    pw1server is password protected

    The pw field appears only if the AirPlay server is password protected. Otherwise it is not included in the TXT record.

    The features bitfield allows the following features to be defined:

    bitnamedescription
    0Videovideo supported
    1Photophoto supported
    2VideoFairPlayvideo protected with FairPlay DRM
    3VideoVolumeControlvolume control supported for videos
    4VideoHTTPLiveStreamshttp live streaming supported
    5Slideshowslideshow supported
    7Screenmirroring supported
    8ScreenRotatescreen rotation supported
    9Audioaudio supported
    11AudioRedundantaudio packet redundancy supported
    12FPSAPv2pt5_AES_GCMFairPlay secure auth supported
    13PhotoCachingphoto preloading supported

    Note that the Apple TV does not support VideoVolumeControl. It has probably been introduced for the upcoming Apple television.

    The AirPlay server is a HTTP server (RFC 2616). Two connections are made to this server, the second one being used as a reverse HTTP connection. This allows a client to receive asynchronous events, such as playback status changes, from a server.

    All HTTP requests share some common headers:

    namevaluedescription
    X-Apple-Session-ID1bd6ceeb…UUID for the session
    X-Apple-Device-ID0xdc2b61a0ce79MAC address

    The reverse connection looks like this:

    client → server

    POST /reverse
    Upgrade: PTTH/1.0
    Connection: Upgrade
    X-Apple-Purpose: event
    Content-Length: 0
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 1bd6ceeb-fffd-456c-a09c-996053a7a08c
    

    server → client

    HTTP/1.1 101 Switching Protocols
    Date: Thu, 23 Feb 2012 17:33:41 GMT
    Upgrade: PTTH/1.0
    Connection: Upgrade
    

    The X-Apple-Purpose header makes it clear that this connection is used for sending events to the client, whereas X-Apple-Session-ID is used to link this connection to the other (non-reverse) one. Events are delivered using a POST request for sending an XML property list to the /event location.

    3. Photos

    Photos are JPEG data transmitted using a PUT request to the AirPlay server. They can be displayed immediately, or cached for future use.

    3.1. HTTP requests

    GET /slideshow-features

    A client can fetch the list of available transitions for slideshows. Then it can let the user pick one, before starting a slideshow. The Accept-Language header is used to specify in which language the transition names should be.

    client → server

    GET /slideshow-features HTTP/1.1
    Accept-Language: English
    Content-Length: 0
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: cdda804c-33ae-4a0b-a5f2-f0e532fd5abd
    

    server → client

    HTTP/1.1 200 OK
    Date: Thu, 23 Feb 2012 17:33:41 GMT
    Content-Type: text/x-apple-plist+xml
    Content-Length: 6411
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>themes</key>
      <array>
       <dict>
        <key>key</key>
        <string>Reflections</string>
        <key>name</key>
        <string>Reflections</string>
       </dict>
       ...
      </array>
     </dict>
    </plist>
    

    PUT /photo

    Send a JPEG picture to the server. The following headers are supported:

    namedescription
    X-Apple-AssetKeyUUID for the picture
    X-Apple-Transitiontransition that should be used to show the picture
    X-Apple-AssetActionspecify a caching operation

    Example 1: show a picture without any transition (for the first time)

    client → server

    PUT /photo HTTP/1.1
    X-Apple-AssetKey: F92F9B91-954E-4D63-BB9A-EEC771ADE6E8
    Content-Length: 462848
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 1bd6ceeb-fffd-456c-a09c-996053a7a08c
    
    <JPEG DATA>
    

    server → client

    HTTP/1.1 200 OK
    Date: Thu, 23 Feb 2012 17:33:42 GMT
    Content-Length: 0
    

    Example 2: show a picture using the dissolve transition

    client → server

    PUT /photo HTTP/1.1
    X-Apple-AssetKey: F92F9B91-954E-4D63-BB9A-EEC771ADE6E8
    X-Apple-Transition: Dissolve
    Content-Length: 462848
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 1bd6ceeb-fffd-456c-a09c-996053a7a08c
    
    <JPEG DATA>
    

    server → client

    HTTP/1.1 200 OK
    Date: Thu, 23 Feb 2012 17:33:42 GMT
    Content-Length: 0
    

    PUT /slideshows/1

    Start or stop a slideshow session. When starting, slideshow settings such as the slide duration and selected transition theme are transmitted. The following parameters are sent in an XML property list:

    keytypedescription
    settings.slideDurationintegerslide duration in seconds
    settings.themestringselected transition theme
    statestringplaying or stopped

    Example: send slideshow settings

    client → server

    PUT /slideshows/1 HTTP/1.1
    Content-Type: text/x-apple-plist+xml
    Content-Length: 366
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 98a7b246-8e00-49a6-8765-db57165f5b67
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>settings</key>
      <dict>
       <key>slideDuration</key>
       <integer>3</integer>
       <key>theme</key>
       <string>Classic</string>
      </dict>
      <key>state</key>
      <string>playing</string>
     </dict>
    </plist>
    

    server → client

    HTTP/1.1 200 OK
    Date: Thu, 08 Mar 2012 16:30:01 GMT
    Content-Type: text/x-apple-plist+xml
    Content-Length: 181
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict/>
    </plist>
    

    POST /stop

    Stop a photo or slideshow session.

    client → server

    POST /stop HTTP/1.1
    Content-Length: 0
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 1bd6ceeb-fffd-456c-a09c-996053a7a08c
    

    server → client

    HTTP/1.1 200 OK
    Date: Thu, 23 Feb 2012 17:33:55 GMT
    Content-Length: 0
    

    3.2. Events

    Photo

    This event notifies a client that a photo session has ended. Then the server can safely disconnect.

    keytypedescription
    categorystringphoto
    sessionIDintegersession ID
    statestringstopped

    Example: stop photo session

    server → client

    POST /event HTTP/1.1
    Content-Type: text/x-apple-plist+xml
    Content-Length: 277
    X-Apple-Session-ID: 1bd6ceeb-fffd-456c-a09c-996053a7a08c
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>category</key>
      <string>photo</string>
      <key>sessionID</key>
      <integer>38</integer>
      <key>state</key>
      <string>stopped</string>
     </dict>
    </plist>
    

    client → server

    HTTP/1.1 200 OK
    Content-Length: 0
    

    Slideshow

    Slideshow events are used to notify the server about the playback state.

    keytypedescription
    categorystringslideshow
    lastAssetIDintegerlast asset ID
    sessionIDintegersession ID
    statestringloadingplaying or stopped

    Example: slideshow is currently playing

    server → client

    POST /event HTTP/1.1
    Content-Type: text/x-apple-plist+xml
    Content-Length: 371
    X-Apple-Session-ID: f1634b51-5cae-4384-ade5-54f4159a15f1
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>category</key>
      <string>slideshow</string>
      <key>lastAssetID</key>
      <integer>5</integer>
      <key>sessionID</key>
      <integer>4</integer>
      <key>state</key>
      <string>playing</string>
     </dict>
    </plist>
    

    client → server

    HTTP/1.1 200 OK
    Content-Length: 0
    

    3.3. Photo Caching

    AirPlay supports preloading picture data to improve transition latency. This works by preloading a few pictures (most likely the ones before and after the current picture) just after displaying one.

    Preloading is achieved using the cacheOnly asset action. Upon receiving this request, a server stores the picture in its cache. Later, a client can request the display of this picture using the displayCached asset action and the same asset key. This is much faster than a full picture upload because no additional data is transmitted.

    When asked for a picture which is no longer in the cache, a server replies with an HTTP 412 error code (Precondition Failed).

    Example 1: cache a picture for future display

    client → server

    PUT /photo HTTP/1.1
    X-Apple-AssetAction: cacheOnly
    X-Apple-AssetKey: B0DDE2C0-6FDD-48F8-9E5B-29CE0618DF5B
    Content-Length: 462848
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 1bd6ceeb-fffd-456c-a09c-996053a7a08c
    
    <JPEG DATA>
    

    server → client

    HTTP/1.1 200 OK
    Date: Thu, 23 Feb 2012 17:33:45 GMT
    Content-Length: 0
    

    Example 2: show a cached picture

    client → server

    PUT /photo HTTP/1.1
    X-Apple-AssetAction: displayCached
    X-Apple-AssetKey: B0DDE2C0-6FDD-48F8-9E5B-29CE0618DF5B
    X-Apple-Transition: Dissolve
    Content-Length: 0
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 1bd6ceeb-fffd-456c-a09c-996053a7a08c
    

    server → client

    HTTP/1.1 200 OK
    Date: Thu, 23 Feb 2012 17:33:45 GMT
    Content-Length: 0
    

    3.4. Slideshows

    Slideshows are using the reverse HTTP connection for asynchronous loading of pictures. Three connections are performed in parallel. The X-Apple-Purpose header is set to slideshow. A GET request to the/slideshows/1/assets/1 location is issued to fetch a new picture from the AirPlay client. A binary property list with the following parameters is expected as reply:

    keytypedescription
    datadataJPEG picture
    info.idintegerasset ID
    info.keyinteger1

    Example: fetch a new picture

    server → client

    GET /slideshows/1/assets/1 HTTP/1.1
    Content-Length: 0
    Accept: application/x-apple-binary-plist
    X-Apple-Session-ID: 98a7b246-8e00-49a6-8765-db57165f5b67
    

    client → server

    HTTP/1.1 200 OK
    Content-Type: application/x-apple-binary-plist
    Content-Length: 58932
    
    <BINARY PLIST DATA>
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>data</key>
      <data>
      ...
      </data>
      <key>info</key>
      <dict>
       <key>id</key>
       <integer>1</integer>
       <key>key</key>
       <string>1</string>
      </dict>
     </dict>
    </plist>
    

    4. Video

    In order to play a video on an AirPlay server, HTTP requests are used to send a video URL, perform scrubbing, change the playback rate and update the timeline.

    4.1. HTTP requests

    GET /server-info

    Fetch general informations about the AirPlay server. These informations are returned as an XML property list, with the following properties:

    keytypevaluedescription
    deviceidstring58:55:CA:1A:E2:88MAC address
    featuresinteger148390x39f7
    modelstringAppleTV2,1device model
    protoversstring1.0protocol version
    srcversstring120.2server version

    The modeldeviceidsrcvers and features properties are the same as broadcasted by the mDNS AirPlay service.

    Example: fetch server informations

    client → server

    GET /server-info HTTP/1.1
    X-Apple-Device-ID: 0xdc2b61a0ce79
    Content-Length: 0
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 1bd6ceeb-fffd-456c-a09c-996053a7a08c
    

    server → client

    HTTP/1.1 200 OK
    Date: Thu, 23 Feb 2012 17:33:41 GMT
    Content-Type: text/x-apple-plist+xml
    Content-Length: 427
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>deviceid</key>
      <string>58:55:CA:1A:E2:88</string>
      <key>features</key>
      <integer>14839</integer>
      <key>model</key>
      <string>AppleTV2,1</string>
      <key>protovers</key>
      <string>1.0</string>
      <key>srcvers</key>
      <string>120.2</string>
     </dict>
    </plist>
    

    POST /play

    Start video playback. The body contains the following parameters:

    nametypedescription
    Content-LocationURLURL for the video
    Start-Positionfloatstarting position between 0 and 1

    MP4 movies are supported using progressive download. HTTP Live Streaming might be supported as well, as indicated by the VideoHTTPLiveStreams feature flag. The relative starting position, a float value between 0 (beginning) and 1 (end) is used to start playing a video at the exact same position as it was on the client.

    A binary property list can also be used instead of text parameters, with content type application/x-apple-binary-plist.

    Example 1: video playback from iTunes

    client → server

    POST /play HTTP/1.1
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Content-Length: 163
    Content-Type: text/parameters
    
    Content-Location: http://192.168.1.18:3689/airplay.mp4?database-spec='dmap.persistentid:0x63b5e5c0c201542e'&item-spec='dmap.itemid:0x21d'
    Start-Position: 0.174051
    

    server → client

    HTTP/1.1 200 OK
    Date: Mon, 08 Mar 2012 18:08:25 GMT
    Content-Length: 0
    

    Example 2: video playback from iPhone

    client → server

    POST /play HTTP/1.1
    X-Transmit-Date: 2012-03-16T14:20:39.656533Z
    Content-Type: application/x-apple-binary-plist
    Content-Length: 491
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 368e90a4-5de6-4196-9e58-9917bdd4ffd7
    
    <BINARY PLIST DATA>
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>Content-Location</key>
      <string>http://redirector.c.youtube.com/videoplayback?...</string>
      <key>Start-Position</key>
      <real>0.024613151326775551</real>
     </dict>
    </plist>
    

    server → client

    HTTP/1.1 200 OK
    

    POST /scrub

    Seek at an arbitrary location in the video. The position argument is a float value representing the location in seconds.

    Example: seek to about 20 seconds

    client → server

    POST /scrub?position=20.097000 HTTP/1.1
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Content-Length: 0
    

    server → client

    HTTP/1.1 200 OK
    Date: Mon, 08 Mar 2012 18:08:42 GMT
    Content-Length: 0
    

    POST /rate

    Change the playback rate. The value argument is a float value representing the playback rate: 0 is paused, 1 is playing at the normal speed.

    Example: pause playback

    client → server

    POST /rate?value=0.000000 HTTP/1.1
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Content-Length: 0
    

    server → client

    HTTP/1.1 200 OK
    Date: Mon, 08 Mar 2012 18:08:37 GMT
    Content-Length: 0
    

    POST /stop

    Stop playback.

    Example: stop playback

    client → server

    POST /stop HTTP/1.1
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Content-Length: 0
    

    server → client

    HTTP/1.1 200 OK
    Date: Mon, 08 Mar 2012 18:09:06 GMT
    Content-Length: 0
    

    GET /scrub

    Retrieve the current playback position. This can be called repeatedly to update a timeline on the client. The following parameters are returned:

    nametypedescription
    durationfloatduration in seconds
    positionfloatposition in seconds

    Example: fetch current playback progress

    client → server

    GET /scrub HTTP/1.1
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Content-Length: 0
    

    server → client

    HTTP/1.1 200 OK
    Date: Mon, 08 Mar 2012 18:08:31 GMT
    Content-Type: text/parameters
    Content-Length: 40
    
    duration: 83.124794
    position: 14.467000
    

    GET /playback-info

    Retrieve playback informations such as position, duration, rate, buffering status and more. An XML property list is returned with the following parameters:

    keytypedescription
    durationrealplayback duration in seconds
    positionrealplayback position in seconds
    raterealplayback rate
    readyToPlaybooleanready to play
    playbackBufferEmptybooleanbuffer empty
    playbackBufferFullbooleanbuffer full
    playbackLikelyToKeepUpbooleanplayback likely to keep up
    loadedTimeRangesarrayarray of loaded time ranges
    seekableTimeRangesarrayarray of seekable time ranges

    Ranges are defined as dictionaries with the following keys:

    keytypedescription
    startrealrange start time in seconds
    durationrealrange duration in seconds

    Example: get playback info

    client → server

    GET /playback-info HTTP/1.1
    Content-Length: 0
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 24b3fd94-1b6d-42b1-89a3-47108bfbac89
    

    server → client

    HTTP/1.1 200 OK
    Date: Fri, 16 Mar 2012 15:31:42 GMT
    Content-Type: text/x-apple-plist+xml
    Content-Length: 801
    X-Transmit-Date: 2012-03-16T15:31:42.607066Z
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>duration</key> <real>1801</real>
      <key>loadedTimeRanges</key>
      <array>
       <dict>
        <key>duration</key> <real>51.541130402</real>
        <key>start</key> <real>18.118717650000001</real>
       </dict>
      </array>
      <key>playbackBufferEmpty</key> <true/>
      <key>playbackBufferFull</key> <false/>
      <key>playbackLikelyToKeepUp</key> <true/>
      <key>position</key> <real>18.043869775000001</real>
      <key>rate</key> <real>1</real>
      <key>readyToPlay</key> <true/>
      <key>seekableTimeRanges</key>
      <array>
       <dict>
        <key>duration</key>
        <real>1801</real>
        <key>start</key>
        <real>0.0</real>
       </dict>
      </array>
     </dict>
    </plist>
    

    PUT /setProperty

    Set playback property. The property name is sent as query argument. The following properties are defined:

    argumentdescription
    forwardEndTimeforward end time
    reverseEndTimereverse end time

    Example: set forward end time

    client → server

    PUT /setProperty?forwardEndTime HTTP/1.1
    Content-Type: application/x-apple-binary-plist
    Content-Length: 96
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 24b3fd94-1b6d-42b1-89a3-47108bfbac89
    
    <BINARY PLIST DATA>
    
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>value</key>
      <dict>
       <key>epoch</key> <integer>0</integer>
       <key>flags</key> <integer>0</integer>
       <key>timescale</key> <integer>0</integer>
       <key>value</key> <integer>0</integer>
      </dict>
     </dict>
    </plist>
    

    server → client

    HTTP/1.1 200 OK
    Date: Fri, 16 Mar 2012 15:23:11 GMT
    Content-Type: application/x-apple-binary-plist
    Content-Length: 58
    
    <BINARY PLIST DATA>
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>errorCode</key>
      <integer>0</integer>
     </dict>
    </plist>
    

    GET /getProperty

    Get playback property. The property name is sent as query argument. The following properties are defined:

    argumentdescription
    playbackAccessLogplayback access log
    playbackErrorLogplayback error log

    Example: get playback access log

    client → server

    POST /getProperty?playbackAccessLog HTTP/1.1
    Content-Type: application/x-apple-binary-plist
    Content-Length: 0
    User-Agent: MediaControl/1.0
    X-Apple-Session-ID: 24b3fd94-1b6d-42b1-89a3-47108bfbac89
    

    server → client

    HTTP/1.1 200 OK
    Date: Fri, 16 Mar 2012 15:31:42 GMT
    Content-Type: application/x-apple-binary-plist
    Content-Length: 530
    
    <BINARY PLIST DATA>
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>errorCode</key>
      <integer>0</integer>
      <key>value</key>
      <array>
       <dict>
        <key>bytes</key> <integer>1818336</integer>
        <key>c-duration-downloaded</key> <real>70</real>
        <key>c-duration-watched</key> <real>18.154102027416229</real>
        <key>c-frames-dropped</key> <integer>0</integer>
        <key>c-observed-bitrate</key> <real>14598047.302367469</real>
        <key>c-overdue</key> <integer>0</integer>
        <key>c-stalls</key> <integer>0</integer>
        <key>c-start-time</key> <real>0.0</real>
        <key>c-startup-time</key> <real>0.27732497453689575</real>
        <key>cs-guid</key> <string>B475F105-78FD-4200-96BC-148BAB6DAC11</string>
        <key>date</key> <date>2012-03-16T15:31:24Z</date>
        <key>s-ip</key> <string>213.152.6.89</string>
        <key>s-ip-changes</key> <integer>0</integer>
        <key>sc-count</key> <integer>7</integer>
        <key>uri</key> <string>http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8</string>
       </dict>
      </array>
     </dict>
    </plist>
    

    4.2. Events

    This event is used to send the playback state to the client:

    keytypedescription
    categorystringvideo
    sessionIDintegersession id
    statestringloadingplayingpaused or stopped

    Example: notify the client that video playback is paused

    server → client

    POST /event HTTP/1.1
    Content-Type: application/x-apple-plist
    Content-Length: 321
    X-Apple-Session-ID: 00000000-0000-0000-0000-000000000000
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
      "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>category</key>
      <string>video</string>
      <key>sessionID</key>
      <integer>13</integer>
      <key>state</key>
      <string>paused</string>
     </dict>
    </plist>
    

    client → server

    HTTP/1.1 200 OK
    Content-Length: 0
    Date: Mon, 08 Mar 2012 18:07:43 GMT
    

    5. Audio

    Audio streaming is supported using the RTSP protocol (RFC 2326).

    5.1. RTSP requests

    OPTIONS

    The OPTIONS request asks the RTSP server for its supported methods. Apple TV supports the following methods: ANNOUNCESETUPRECORDPAUSEFLUSHTEARDOWNOPTIONSGET_PARAMETER,SET_PARAMETERPOST and GET.

    client → server

    OPTIONS * RTSP/1.0
    CSeq: 3
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 1986535575
    

    server → client

    RTSP/1.0 200 OK
    Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS,
    GET_PARAMETER, SET_PARAMETER, POST, GET
    Server: AirTunes/130.14
    CSeq: 3
    

    ANNOUNCE

    The ANNOUNCE request tells the RTSP server about stream properties using SDP (RFC 4566). Codec informations and encryption keys are of particular interest.

    Example 1: ANNOUNCE for Apple Lossless audio from iTunes

    client → server

    ANNOUNCE rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
    CSeq: 3
    Content-Type: application/sdp
    Content-Length: 348
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 1986535575
    
    v=0
    o=iTunes 3413821438 0 IN IP4 fe80::217:f2ff:fe0f:e0f6
    s=iTunes
    c=IN IP4 fe80::5a55:caff:fe1a:e187
    t=0 0
    m=audio 0 RTP/AVP 96
    a=rtpmap:96 AppleLossless
    a=fmtp:96 352 0 16 40 10 14 2 255 0 0 44100
    a=fpaeskey:RlBMWQECAQAAAAA8AAAAAPFOnNe+zWb5/n4L5KZkE2AAAAAQlDx69reTdwHF9LaNmhiRURTAbcL4brYAceAkZ49YirXm62N4
    a=aesiv:5b+YZi9Ikb845BmNhaVo+Q
    

    server → client

    RTSP/1.0 200 OK
    Server: AirTunes/130.14
    CSeq: 3
    

    Example 2: ANNOUNCE for AAC audio from an iOS device

    client → server

    ANNOUNCE rtsp://192.168.1.45/2699324803567405959 RTSP/1.0
    X-Apple-Device-ID: 0xa4d1d2800b68
    CSeq: 16
    DACP-ID: 14413BE4996FEA4D
    Active-Remote: 2543110914
    Content-Type: application/sdp
    Content-Length: 331
    
    v=0
    o=AirTunes 2699324803567405959 0 IN IP4 192.168.1.5
    s=AirTunes
    c=IN IP4 192.168.1.5
    t=0 0
    m=audio 0 RTP/AVP 96
    a=rtpmap:96 mpeg4-generic/44100/2
    a=fmtp:96
    a=fpaeskey:RlBMWQECAQAAAAA8AAAAAOG6c4aMdLkXAX+lbjp7EhgAAAAQeX5uqGyYkBmJX+gd5ANEr+amI8urqFmvcNo87pR0BXGJ4eLf
    a=aesiv:VZTaHn4wSJ84Jjzlb94m0Q==
    a=min-latency:11025
    

    server → client

    RTSP/1.0 200 OK
    Server: AirTunes/130.14
    CSeq: 16
    

    Example 3: ANNOUNCE for AAC-ELD audio and H.264 video from an iOS device

    client → server

    ANNOUNCE rtsp://192.168.1.45/846700446248110360 RTSP/1.0
    X-Apple-Device-ID: 0xa4d1d2800b68
    CSeq: 27
    DACP-ID: 14413BE4996FEA4D
    Active-Remote: 2543110914
    Content-Type: application/sdp
    Content-Length: 415
    
    v=0
    o=AirTunes 846700446248110360 0 IN IP4 192.168.1.5
    s=AirTunes
    c=IN IP4 192.168.1.5
    t=0 0
    m=audio 0 RTP/AVP 96
    a=rtpmap:96 mpeg4-generic/44100/2
    a=fmtp:96 mode=AAC-eld; constantDuration=480
    a=fpaeskey:RlBMWQECAQAAAAA8AAAAAKKp+t27A+686xfviEphhw8AAAAQE/3LSqv9MHgnEKxkbKh1buE9+ylKg0YuqcyAC7fT0EqJNtdq
    a=aesiv:i/a3nUKYNDSIPP2fC+UKGQ==
    a=min-latency:4410
    m=video 0 RTP/AVP 97
    a=rtpmap:97 H264
    a=fmtp:97
    

    server → client

    RTSP/1.0 200 OK
    Server: AirTunes/130.14
    CSeq: 27
    

    SETUP

    The SETUP request initializes a record session. It sends all the necessary transport informations. Three UDP channels are setup:

    channeldescription
    serveraudio data
    controlsync and retransmit requests
    timingmaster clock sync

    Example: setup a record session

    client → server

    SETUP rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
    CSeq: 4
    Transport: RTP/AVP/UDP;unicast;interleaved=0-1;mode=record;control_port=6001;timing_port=6002
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 1986535575
    

    server → client

    RTSP/1.0 200 OK
    Transport: RTP/AVP/UDP;unicast;mode=record;server_port=53561;control_port=63379;timing_port=50607
    Session: 1
    Audio-Jack-Status: connected
    Server: AirTunes/130.14
    CSeq: 4
    

    RECORD

    The RECORD request starts the audio streaming. The RTP-Info header contains the following parameters:

    namesizedescription
    seq16-bitinitial RTP sequence number
    rtptime32-bitinitial RTP timestamp

    Example: start audio stream

    client → server

    RECORD rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
    CSeq: 5
    Session: 1
    Range: npt=0-
    RTP-Info: seq=20857;rtptime=1146549156
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 1986535575
    

    server → client

    RTSP/1.0 200 OK
    Audio-Latency: 2205
    Server: AirTunes/130.14
    CSeq: 5
    

    FLUSH

    The FLUSH request stops the streaming.

    Example: pause the audio stream

    client → server

    FLUSH rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
    CSeq: 31
    Session: 1
    RTP-Info: seq=25009;rtptime=1148010660
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 1986535575
    

    server → client

    RTSP/1.0 200 OK
    RTP-Info: rtptime=1147914212
    Server: AirTunes/130.14
    CSeq: 31
    

    TEARDOWN

    The TEARDOWN request ends the RTSP session.

    Example: close session 1

    client → server

    TEARDOWN rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
    CSeq: 32
    Session: 1
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 1986535575
    

    server → client

    RTSP/1.0 200 OK
    Server: AirTunes/130.14
    CSeq: 32
    

    5.2. RTP Streams

    Audio packets are fully RTP compliant. Control and timing packets, however, do not seem to be fully compliant with the RTP standard.

    The following payload types are defined:

    payload typeportdescription
    82timing_porttiming request
    83timing_porttiming reply
    84control_porttime sync
    85control_portretransmit request
    86control_portretransmit reply
    96server_portaudio data

    Audio packets

    Audio data is sent using the DynamicRTP-Type-96 payload type. The Marker bit is set on the first packet sent after RECORD or FLUSH requests. The RTP payload contains optionally encrypted audio data.

    Example: encrypted audio packet

    client → server

    0000   80 e0 b1 91 f7 79 16 c2 e8 bb 6b 2c bb 5c 8e 51
    0010   aa 7c d2 96 00 c3 fd 60 eb ae 6e 41 31 38 fe ae
    ....
    03e0   cb 1c 73 bf e7 05 93 30 fa 85 7f 32 77 8d a8 97
    03f0   a0 c7 c8 78 7b e5 81 a1 4f b4 3e a3 43 db 7c
    
    Real-Time Transport Protocol
        10.. .... = Version: RFC 1889 Version (2)
        ..0. .... = Padding: False
        ...0 .... = Extension: False
        .... 0000 = Contributing source identifiers count: 0
        1... .... = Marker: True
        Payload type: DynamicRTP-Type-96 (96)
        Sequence number: 45457
        Timestamp: 4151908034
        Synchronization Source identifier: 0xe8bb6b2c (3904596780)
        Payload: bb5c8e51aa7cd29600c3fd60ebae6e413138feae909b44f1...
    

    Sync packets

    Sync packets are sent once per second to the control port. They are used to correlate the RTP timestamps currently used in the audio stream to the NTP time used for clock synchronization. Payload type is 84, theMarker bit is always set and the Extension bit is set on the first packet after RECORD or FLUSH requests. TheSSRC field is not included in the RTP header.

    bytesdescription
    8RTP header without SSRC
    8current NTP time
    4RTP timestamp for the next audio packet

    Example: sync packet

    client → server

    0000   80 d4 00 04 c7 cd 11 a8 83 ab 1c 49 2f e4 22 e2
    0010   c7 ce 3f 1f
    
    Real-Time Transport Protocol
        10.. .... = Version: RFC 1889 Version (2)
        ..0. .... = Padding: False
        ...0 .... = Extension: False
        .... 0000 = Contributing source identifiers count: 0
        1... .... = Marker: True
        Payload type: Unassigned (84)
        Sequence number: 4
        Timestamp: 3352105384
        Synchronization Source identifier: 0x83ab1c49 (2209029193)
        Payload: 2fe422e2c7ce3f1f
    

    Retransmit packets

    AirTunes supports resending audio packets which have been lost. Payload type is 85 for retransmit queries, theMarker bit is always set and the SSRC field is not included in the RTP header.

    bytesdescription
    8RTP header without SSRC
    2sequence number for the first lost packet
    2number of lost packets

    Retransmit replies have payload type 86, with a full audio RTP packet after the sequence number.

    Timing packets

    Timing packets are used to synchronize a master clock for audio. This is useful for clock recovery and precise synchronization of several devices playing the same audio stream.

    Timing packets are sent at 3 second intervals. They always have the Marker bit set, and payload type 82 for queries and 83 for replies. The SSRC field is not included in the RTP header, so it takes only 8 bytes, followed by three NTP timestamps:

    bytesdescription
    8RTP header without SSRC
    8origin timestamp
    8receive timestamp
    8transmit timestamp

    Example: timing query/reply

    server → client

    0000   80 d2 00 07 00 00 00 00 00 00 00 00 00 00 00 00
    0010   00 00 00 00 00 00 00 00 83 c1 17 cc af ba 9b 32
    
    Real-Time Transport Protocol
        10.. .... = Version: RFC 1889 Version (2)
        ..0. .... = Padding: False
        ...0 .... = Extension: False
        .... 0000 = Contributing source identifiers count: 0
        1... .... = Marker: True
        Payload type: Unassigned (82)
        Sequence number: 7
        Timestamp: 0
        Synchronization Source identifier: 0x00000000 (0)
        Payload: 00000000000000000000000083c117ccafba9b32
    

    client → server

    0000   80 d3 00 07 00 00 00 00 83 c1 17 cc af ba 9b 32
    0010   83 c1 17 cc b0 12 ce b6 83 c1 17 cc b0 14 10 47
    
    Real-Time Transport Protocol
        10.. .... = Version: RFC 1889 Version (2)
        ..0. .... = Padding: False
        ...0 .... = Extension: False
        .... 0000 = Contributing source identifiers count: 0
        1... .... = Marker: True
        Payload type: Unassigned (83)
        Sequence number: 7
        Timestamp: 0
        Synchronization Source identifier: 0x83c117cc (2210469836)
        Payload: afba9b3283c117ccb012ceb683c117ccb0141047
    

    5.3. Volume Control

    Audio volume can be changed using a SET_PARAMETER request. The volume is a float value representing the audio attenuation in dB. A value of –144 means the audio is muted. Then it goes from –30 to 0.

    Example: set audio volume

    client → server

    SET_PARAMETER rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
    CSeq: 6
    Session: 1
    Content-Type: text/parameters
    Content-Length: 20
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 1986535575
    
    volume: -11.123877
    

    server → client

    RTSP/1.0 200 OK
    Server: AirTunes/130.14
    CSeq: 6
    

    5.4. Metadata

    Metadata for the current track are sent using SET_PARAMETER requests. This allows the Apple TV to show the track name, artist, album, cover artwork and timeline. The RTP-Info header contains a rtptime parameter with the RTP timestamp corresponding to the time from which the metadata is valid.

    Track Informations

    Informations about the current track are sent in the DAAP (Digital Audio Access Protocol) format, withapplication/x-dmap-tagged content type.

    The following DAAP attributes are displayed on Apple TV:

    attributedescription
    dmap.itemnametrack name
    daap.songartistartist
    daap.songalbumalbum

    Example: send track informations

    client → server

    SET_PARAMETER rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
    CSeq: 8
    Session: 1
    Content-Type: application/x-dmap-tagged
    Content-Length: 3242
    RTP-Info: rtptime=1146549156
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 1986535575
    
    <DMAP DATA>
    

    server → client

    RTSP/1.0 200 OK
    Server: AirTunes/130.14
    CSeq: 8
    

    Cover Artwork

    Artworks are sent as JPEG pictures, with image/jpeg content type.

    Example: send cover artwork

    client → server

    SET_PARAMETER rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
    CSeq: 9
    Session: 1
    Content-Type: image/jpeg
    Content-Length: 34616
    RTP-Info: rtptime=1146549156
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 1986535575
    
    <JPEG DATA>
    

    server → client

    RTSP/1.0 200 OK
    Server: AirTunes/130.14
    CSeq: 9
    

    Playback Progress

    Playback progress is sent as text/parameters, with a progress parameter representing three absolute RTP timestamps values: start/curr/end.

    timestampdescription
    startbeginning of the current track
    currcurrent playback position
    endend of the current track

    The relative position and track duration can be computed as follows:

    • position = rtptime_to_sec(curr - start)
    • duration = rtptime_to_sec(end - start)

    Example: send playback progress

    client → server

    SET_PARAMETER rtsp://fe80::217:f2ff:fe0f:e0f6/3413821438 RTSP/1.0
    CSeq: 10
    Session: 1
    Content-Type: text/parameters
    Content-Length: 44
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3)
    AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 1986535575
    
    progress: 1146221540/1146549156/1195701740
    

    server → client

    RTSP/1.0 200 OK
    Server: AirTunes/130.14
    CSeq: 10
    

    5.5. AirPort Express Authentication

    Sending audio data to the AirPort Express requires a RSA based authentication. All binary data are encoded using Base64 (RFC 4648) without padding.

    Client side

    • In the ANNOUNCE request, the client sends a 128-bit random number in the Apple-Challenge header.

    • A 128-bit AES key is generated, encrypted with the RSA public key using the OAEP encryption scheme, and sent along with an initialization vector in the rsaaeskey and aesiv SDP attributes.

    Server side

    • The AirPort Express decrypts the AES key with its RSA private key, it will be used to decrypt the audio payload.

    • The AirPort Express signs the Apple-Challenge number with its RSA private key using the PKCS#1signature scheme and send the result in the Apple-Response header.

    Client side

    • The client decrypts the Apple-Response value with the RSA public key, and checks that it is the same random number it has previously generated.

    Example: AirPort Express challenge/response

    client → server

    ANNOUNCE rtsp://10.0.1.101/3172942895 RTSP/1.0
    CSeq: 1
    Content-Type: application/sdp
    Content-Length: 567
    User-Agent: iTunes/4.6 (Windows; N)
    Client-Instance: 9FF35780A8BC8D2B
    Apple-Challenge: 09KF45soMYmvj6dpsUGiIg
    
    v=0
    o=iTunes 3172942895 0 IN IP4 10.0.1.101
    s=iTunes
    c=IN IP4 10.0.1.103
    t=0 0
    m=audio 0 RTP/AVP 96
    a=rtpmap:96 AppleLossless
    a=fmtp:96 4096 0 16 40 10 14 2 255 0 0 44100
    a=rsaaeskey:5QYIqmdZGTONY5SHjEJrqAhaa0W9wzDC5i6q221mdGZJ5ubO6Kg
                yhC6U83wpY87TFdPRdfPQl2kVC7+Uefmx1bXdIUo07ZcJsqMbgtje4w2JQw0b
                Uw2BlzNPmVGQOxfdpGc3LXZzNE0jI1D4conUEiW6rrzikXBhk7Y/i2naw13ayy
                xaSwtkiJ0ltBQGYGErbV2tx43QSNj7O0JIG9GrF2GZZ6/UHo4VH+ZXgQ4NZvP/
                QXPCsLutZsvusFDzIEq7TN1fveINOiwrzlN+bckEixvhXlvoQTWE2tjbmQYhMvO
                FIly5gNbZiXi0l5AdolX4jDC2vndFHqWDks/3sPikNg
    a=aesiv:zcZmAZtqh7uGcEwPXk0QeA
    

    server → client

    RTSP/1.0 200 OK
    CSeq: 1
    Apple-Response: u+msU8Cc7KBrVPjI/Ir8fOL8+C5D3Jsw1+acaW3MNTndrTQAeb/a
                    5m10UVBX6wb/DYQGY+b28ksSwBjN0nFOk4Y2cODEf83FAh7B
                    mkLpmpkpplp7zVXQ+Z9DcB6gC60ZsS3t98aoR7tSzVLKZNgi2X2sC+vGsz
                    utQxX03HK008VjcdngHv3g1p2knoETd07T6eVfZCmPqp6Ga7Dj8VIIj/GEP3
                    AjjDx3lJnQBXUDmxM484YXLXZjWFXCiY8GJt6whjf7/2c3rIoT3Z7PQpEvPmM
                    1MXU9cv4NL59Y/q0OAVQ38foOz7eGAhfvjOsCnHU25aik7/7ToIYt1tyVtap/kA
    Audio-Jack-Status: connected; type=analog
    

    5.6. Remote Control

    Audio speakers can send commands to the AirPlay client to change the current track, pause and resume playback, shuffle the playlist, and more. This uses a subset of DACP (Digital Audio Control Protocol). An AirPlay client advertises this capability by including a DACP-ID header in its RTSP requests, with a 64-bit ID for the DACP server. An Active-Remote header is included as well, serving as an authentication token.

    The AirPlay server needs to browse the mDNS _dacp._tcp services for a matching DACP server. Server names look like iTunes_Ctrl_$ID.

    DACP service from iTunes

    name: iTunes_Ctrl_56B29BB6CB904862
    type: _dacp._tcp
    port: 3689
    txt:
     txtvers=1
     Ver=131075
     DbId=63B5E5C0C201542E
     OSsi=0x1F5
    

    Once the DACP server has been identified, HTTP requests can be sent to the corresponding service port. TheActive-Remote header must be included in these requests, so no additional pairing is required. The location for remote control commands is /ctrl-int/1/$CMD. The following commands are available:

    commanddescription
    beginffbegin fast forward
    beginrewbegin rewind
    mutetoggletoggle mute status
    nextitemplay next item in playlist
    previtemplay previous item in playlist
    pausepause playback
    playpausetoggle between play and pause
    playstart playback
    stopstop playback
    playresumeplay after fast forward or rewind
    shuffle_songsshuffle playlist
    volumedownturn audio volume down
    volumeupturn audio volume up

    Example: send a pause command

    server → client

    GET /ctrl-int/1/pause HTTP/1.1
    Host: starlight.local.
    Active-Remote: 1986535575
    

    client → server

    HTTP/1.1 204 No Content
    Date: Tue, 06 Mar 2012 16:38:51 GMT
    DAAP-Server: iTunes/10.6 (Mac OS X)
    Content-Type: application/x-dmap-tagged
    Content-Length: 0
    

    6. Screen Mirroring

    Screen mirroring is achieved by transmitting an H.264 encoded video stream over a TCP connection. This stream is packetized with a 128-byte header. AAC-ELD audio is sent using the AirTunes protocol. As for the master clock, it is synchronized using NTP.

    Moreover, as soon as a client starts a video playback, a standard AirPlay connection is made to send the video URL, and mirroring is stopped. This avoids decoding and re-encoding the video, which would incur a quality loss.

    6.1. HTTP requests

    Screen mirroring does not use the standard AirPlay service. Instead it connects to an apparently hard-coded port 7100. This is a HTTP server which supports the following requests:

    GET /stream.xml

    Retrieve information about the server capabilities. The server sends an XML property list with the following properties:

    keytypevaluedescription
    heightinteger720vertical resolution
    widthinteger1280horizontal resolution
    overscannedbooleantrueis the display overscanned?
    refreshRatereal0.01666…refresh rate 60 Hz (1/60)
    versionstring130.14server version

    These properties tell us that the AirPlay server is connected to a 1280x720, 60 Hz, overscanned display.

    Example: fetch mirroring server informations

    client → server

    GET /stream.xml HTTP/1.1
    Content-Length: 0
    

    server → client

    HTTP/1.1 200 OK
    Date: Mon, 08 Mar 2012 15:30:27 GMT
    Content-Type: text/x-apple-plist+xml
    Content-Length: 411
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>height</key>
      <integer>720</integer>
      <key>overscanned</key>
      <true/>
      <key>refreshRate</key>
      <real>0.016666666666666666</real>
      <key>version</key>
      <string>130.14</string>
      <key>width</key>
      <integer>1280</integer>
     </dict>
    </plist>
    

    POST /stream

    Start the live video transmission. The client sends a binary property list with information about the stream, immediately followed by the stream itself. At this point, the connection is no longer a valid HTTP connection.

    The following parameters are sent:

    keytypevaluedescription
    deviceIDinteger181221086727016MAC address (A4:D1:D2:80:0B:68)
    sessionIDinteger–808788724session ID (0xcfcadd0c)
    versionstring130.16server version
    param1data(72 bytes)AES key, encrypted with FairPlay
    param2data(16 bytes)AES initialization vector
    latencyMsinteger90video latency in ms
    fpsInfoarray  
    timestampInfoarray  

    The param1 and param2 parameters are optional.

    As soon as the server receives a /stream request, it will send NTP requests to the client on port 7010, which seems hard-coded as well. The client needs to export its master clock there, which will be used for audio/video synchronization and clock recovery.

    Example: send stream information

    client → server

    POST /stream HTTP/1.1
    X-Apple-Device-ID: 0xa4d1d2800b68
    Content-Length: 503
    
    <BINARY PLIST DATA>
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
     <dict>
      <key>deviceID</key>
      <integer>181221086727016</integer>
      <key>fpsInfo</key>
      <array>
       <dict> <key>name</key> <string>SubS</string> </dict>
       <dict> <key>name</key> <string>B4En</string> </dict>
       <dict> <key>name</key> <string>EnDp</string> </dict>
       <dict> <key>name</key> <string>IdEn</string> </dict>
       <dict> <key>name</key> <string>IdDp</string> </dict>
       <dict> <key>name</key> <string>EQDp</string> </dict>
       <dict> <key>name</key> <string>QueF</string> </dict>
       <dict> <key>name</key> <string>Sent</string> </dict>
      </array>
      <key>latencyMs</key>
      <integer>90</integer>
      <key>param1</key>
      <data>
      RlBMWQECAQAAAAA8AAAAANvKuDizduszL1hG9IvIk+AAAAAQukdPJ5Jw/gGBAl22WZdF
      m9ujZEGIV7jm3ZByWm51HjpDwjYY
      </data>
      <key>param2</key>
      <data>
      3qpOHtYWbBPyEWPnGt1BuQ==
      </data>
      <key>sessionID</key>
      <integer>-808788724</integer>
      <key>timestampInfo</key>
      <array>
       <dict> <key>name</key> <string>SubSu</string> </dict>
       <dict> <key>name</key> <string>BePxT</string> </dict>
       <dict> <key>name</key> <string>AfPxT</string> </dict>
       <dict> <key>name</key> <string>BefEn</string> </dict>
       <dict> <key>name</key> <string>EmEnc</string> </dict>
       <dict> <key>name</key> <string>QueFr</string> </dict>
       <dict> <key>name</key> <string>SndFr</string> </dict>
      </array>
      <key>version</key>
      <string>130.16</string>
     </dict>
    </plist>
    

    6.2. Stream Packets

    The video stream is packetized using 128-byte headers, followed by an optional payload. Only the first 64 bytes of headers seem to be used. Headers start with the following little-endian fields:

    sizedescription
    4 bytespayload size
    2 bytespayload type
    2 bytes0x1e if type = 2, else 6
    8 bytesNTP timestamp

    There are 3 types of packets:

    typedescription
    0video bitstream
    1codec data
    2heartbeat

    Codec Data

    This packet contains the H.264 extra data in avcC format (ISO/IEC 14496:15). It is sent at the beginning of the stream, each time the video properties might change, when screen orientation changes, and when the screen is turned on or off.

    H.264 codec data from iPad

    0000   01 64 c0 28 ff e1 00 10 67 64 c0 28 ac 56 20 0d
    0010   81 4f e5 9b 81 01 01 01 01 00 04 28 ee 3c b0
    

    The H.264 codec data is interpreted as follows:

    sizevaluedescription
    1 byte1version
    1 byte100profile (high)
    1 byte0xc0compatibility
    1 byte40level (4.0)
    6 bits0x3freserved
    2 bits3NAL units length size - 1
    3 bits0x7reserved
    5 bits1number of SPS
    2 bytes16length of SPS
    16 bytesSequence parameter set
    1 byte1number of PPS
    2 bytes4length of PPS
    4 bytesPicture parameter set

    Codec data packet from iPad

    0000   1f 00 00 00 01 00 06 00 1d 9a 9f 59 ef de 00 00
    0010   00 00 58 44 00 00 22 44 00 00 00 00 00 00 00 00
    0020   00 00 00 00 00 00 00 00 00 00 58 44 00 00 22 44
    0030   00 00 50 43 00 00 10 42 00 c0 57 44 00 c0 21 44
    0040   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0050   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0060   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0070   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0080   01 64 c0 28 ff e1 00 10 67 64 c0 28 ac 56 20 0d
    0090   81 4f e5 9b 81 01 01 01 01 00 04 28 ee 3c b0
    

    Video Bitstream

    This packet contains the video bitstream to be decoded. The payload can be optionally AES encrypted. The NTP timestamp found in the header serves as presentation timestamp.

    Video bitstream packet from iPad

    0000   c8 08 00 00 00 00 06 00 e9 e6 f5 ac 60 e0 00 00
    0010   58 37 6e f9 40 01 00 00 00 00 00 00 00 00 00 00
    0020   00 00 00 00 00 00 00 00 00 00 58 44 00 00 22 44
    0030   00 00 50 43 00 00 10 42 00 c0 57 44 00 c0 21 44
    0040   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0050   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0060   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0070   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0080   ...
    

    Heartbeat

    Sent every second, this packet does not contain any payload.

    Heartbeat packet from iPad

    0000   00 00 00 00 02 00 1e 00 00 00 00 00 00 00 00 00
    0010   4d d8 1a 41 00 00 00 00 00 00 20 41 86 c9 e2 36
    0020   00 00 00 00 80 88 44 4b 00 00 00 00 00 00 00 00
    0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0040   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0050   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0060   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0070   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    

    6.3. Time Synchronization

    Time synchronization takes place on UDP ports 7010 (client) and 7011 (server), using the NTP protocol (RFC 5905). The AirPlay server runs an NTP client. Requests are sent to the AirPlay client at 3 second intervals. The reference date for the timestamps is the beginning of the mirroring session.

    server → client

    0000   23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0010   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0020   00 00 00 00 00 00 00 00 00 00 01 c4 c8 ac 5d b5
    
    Network Time Protocol
        Flags: 0x23
            00.. .... = Leap Indicator: no warning (0)
            ..10 0... = Version number: NTP Version 4 (4)
            .... .011 = Mode: client (3)
        Peer Clock Stratum: unspecified or invalid (0)
        Peer Polling Interval: invalid (0)
        Peer Clock Precision: 1.000000 sec
        Root Delay: 0.0000 sec
        Root Dispersion: 0.0000 sec
        Reference ID: NULL
        Reference Timestamp: Jan 1, 1970 00:00:00.000000000 UTC
        Origin Timestamp: Jan 1, 1970 00:00:00.000000000 UTC
        Receive Timestamp: Jan 1, 1970 00:00:00.000000000 UTC
        Transmit Timestamp: Jan 1, 1900 00:07:32.783880000 UTC
    

    client → server

    0000   24 01 02 e8 00 00 00 00 00 00 00 00 41 49 52 50
    0010   00 00 00 00 00 00 00 00 00 00 01 c4 c8 ac 5d b5
    0020   00 00 01 c4 c9 6a 0b a1 00 00 01 c4 c9 78 73 d2
    
    Network Time Protocol
        Flags: 0x24
            00.. .... = Leap Indicator: no warning (0)
            ..10 0... = Version number: NTP Version 4 (4)
            .... .100 = Mode: server (4)
        Peer Clock Stratum: primary reference (1)
        Peer Polling Interval: invalid (2)
        Peer Clock Precision: 0.000000 sec
        Root Delay: 0.0000 sec
        Root Dispersion: 0.0000 sec
        Reference ID: Unidentified reference source 'AIRP'
        Reference Timestamp: Jan 1, 1970 00:00:00.000000000 UTC
        Origin Timestamp: Jan 1, 1900 00:07:32.783880000 UTC
        Receive Timestamp: Jan 1, 1900 00:07:32.786774000 UTC
        Transmit Timestamp: Jan 1, 1900 00:07:32.786994000 UTC
    

    7. Password Protection

    An AirPlay server can require a password for displaying any content from the network. This is implemented using standard HTTP Digest Authentication (RFC 2617), over RTSP for AirTunes, and HTTP for everything else. The digest realms and usernames accepted by Apple TV are the following:

    servicerealmusername
    AirTunesraopiTunes
    AirPlayAirPlayAirPlay

    Example 1: AirTunes password request

    client → server

    ANNOUNCE rtsp://fe80::217:f2ff:fe0f:e0f6/3414156527 RTSP/1.0
    CSeq: 3
    Content-Type: application/sdp
    Content-Length: 348
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 448488758
    
    <SDP DATA>
    

    server → client

    RTSP/1.0 401 Unauthorized
    Server: AirTunes/130.14
    WWW-Authenticate: Digest realm="raop", nonce="ddfd59b4aea7bbbcbbb3b60d3b2768b7"
    CSeq: 3
    

    client → server

    ANNOUNCE rtsp://fe80::217:f2ff:fe0f:e0f6/3414156527 RTSP/1.0
    CSeq: 4
    Content-Type: application/sdp
    Content-Length: 348
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Client-Instance: 56B29BB6CB904862
    DACP-ID: 56B29BB6CB904862
    Active-Remote: 448488758
    Authorization: Digest username="iTunes", realm="raop", nonce="ddfd59b4aea7bbbcbbb3b60d3b2768b7", uri="rtsp://fe80::217:f2ff:fe0f:e0f6/3414156527", response="36f93a97c9038598290729ec0f141b03"
    
    <SDP DATA>
    

    server → client

    RTSP/1.0 200 OK
    Server: AirTunes/130.14
    CSeq: 4
    

    Example 2: AirPlay password request

    client → server

    POST /play HTTP/1.1
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Content-Length: 163
    Content-Type: text/parameters
    
    Content-Location: http://192.168.1.18:3689/airplay.mp4?database-spec='dmap.persistentid:0x63b5e5c0c201542e'&item-spec='dmap.itemid:0x21e'
    Start-Position: 0.317546
    

    server → client

    HTTP/1.1 401 Unauthorized
    Date: Fri, 09 Mar 2012 15:50:40 GMT
    Content-Length: 0
    WWW-Authenticate: Digest realm="AirPlay", nonce="MTMzMTMwODI0MCDEJP5Jo7HFo81rbAcKNKw2"
    

    client → server

    POST /play HTTP/1.1
    User-Agent: iTunes/10.6 (Macintosh; Intel Mac OS X 10.7.3) AppleWebKit/535.18.5
    Content-Length: 163
    Content-Type: text/parameters
    Authorization: Digest username="AirPlay", realm="AirPlay", nonce="MTMzMTMwODI0MCDEJP5Jo7HFo81rbAcKNKw2", uri="/play", response="aa085eea3e66a2e56125a4957e70894a"
    
    Content-Location: http://192.168.1.18:3689/airplay.mp4?database-spec='dmap.persistentid:0x63b5e5c0c201542e'&item-spec='dmap.itemid:0x21e'
    Start-Position: 0.317546
    

    server → client

    HTTP/1.1 200 OK
    Date: Fri, 09 Mar 2012 15:50:40 GMT
    Content-Length: 0
    

    8. History

    DateChanges
    2012–03–20Initial version.

    9. Resources

    9.1. IETF RFCs

    • RFC 2616: Hypertext Transfer Protocol – HTTP/1.1
    • RFC 2617: HTTP Authentication: Basic and Digest Access Authentication
    • RFC 2326: Real Time Streaming Protocol (RTSP)
    • RFC 4566: SDP: Session Description Protocol
    • RFC 3550: RTP: A Transport Protocol for Real-Time Applications
    • RFC 5905: Network Time Protocol Version 4
    • RFC 4648: The Base16, Base32, and Base64 Data Encodings

    9.2. IETF drafts

    9.3. Apple Protocols

    • DAAP: Digital Audio Access Protocol
    • DACP: Digital Audio Control Protocol
    • RAOP: Remote Audio Output Protocol
    展开全文
  • Chrome的启动参数

    千次阅读 2021-02-23 13:55:42
    List of Chromium Command Line Switches Condition Explanation --[1]⊗ Classic, non-material, mode for the |kTopChromeMD| switch.↪ --0⊗ ...
  • 【比特币】 Histories of bitcoin releases

    千次阅读 2017-10-13 20:00:56
    a backup of histories of bitcoin releases
  • npm list -g npm list -g --depth 0 如果要查看软件包在 npm 仓库上最新的可用版本,则运行 npm view [package_name] version: npm view vue version 3.6 安装 npm 包的旧版本 可以使用 @ 语法来安装 npm 软件包的...
  • boost::spirit::qi是一个简单的解释器开发库。可以用来解析文本,构建解释器等。 笔者花了两天时间看完了README文档,并且照着Demo...cmake_minimum_required(VERSION 2.6) if(APPLE) message(STATUS "This is Apple,
  • 转自:... C library for filtering touchscreen events tslib consists of the library libts and tools that help you calibrate and use it in your environment. contact If ...
  • Python 2.x 环境下卸载 OpenCV 2.x 安装 OpenCV 3...Unofficial pre-built OpenCV packages for Python. 2. Installation and Usage If you have previous/other manually installed (= not installed via pip) versi
  • 【SSD】pytorch版本的SSD测试

    千次阅读 2020-01-17 13:51:00
    A canonical path is built using the name from an imdb and a network (if not None). """ filedir = os.path.join(name, phase) if not os.path.exists(filedir): os.makedirs(filedir) return filedir ...
  • Error 502: Bad Gateway Error

    2020-12-26 05:36:32
    #### Uninstalling apt version of pip (if installed) Reading package lists... Building dependency tree... Reading state information... Package 'python-pip' is not installed, so not removed The ...
  • You can now force an update in the updater even if you are at the latest version. You can use this if you think something may have gone wrong during an update or you are troubleshooting and want to ...
  • 查了一下,std::coroutine库没有实现默认的generator,我在github上面找了一个三方实现的std::generator。没咋看代码。但是能用。...cmake_minimum_required(VERSION 2.6) if(APPLE) message(STATUS "Th
  • symfonySymfony Flex is a modern replacement for the Symfony Installer, and not the name of the next Symfony version. As the intro text says: Symfony Flex是Symfony Installer的现代替代品,而不是下一...
  • Ubuntu 意外死机 (Linux Crash/Hang)解决以Intel Bay Trail/J1900/N2940 为例,通常是由于linux kernel和硬件兼容性问题导致:查询网址:https://bugzilla.kernel.org/点开... Bug List: (5 of 5) First Last Prev Ne
  • tushare Successfully installed tushare-0.5.0 You are using pip version 8.1.1, however version 8.1.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. ...
  • Episode 49 of The SitePoint Podcast is now available! This week your hosts are Stephan Segraves (@ssegraves), Brad Williams (@williamsba), and Kevin Yank (@sentience). SitePoint Podcast的 第49集现已...
  • 找不到.jackIf you feel that the Web has lost its sparkle, that’s probably because you’re slogging across it in an old browser. I’m over here on the other side, and the grass is not only greener: ...
  • CM_VERSION=13.0-20161111-UNOFFICIAL-android_x86_64 TARGET_PRODUCT=cm_android_x86_64 TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=x86_64 TARGET_...
  • 37 [OK] thomseddon/traefik-forward-auth Minimal forward authentication that provides… 35 [OK] 2、下载 [root@k8s-master k8s]# docker pull traefik Using default tag: latest latest: Pulling from ...
  • Manual control of tqdm() updates using a with statement: with tqdm(total=100) as pbar: for i in range(10): sleep(0.1) pbar.update(10) If the optional variable total (or an iterable with len()) is ...
  • 位置: libavcodec/avcodec.h 描述:主要扩展API的结构体New fields can be added to the end with minor version bumps.
  •  // This will download the device specific configuration and kernel source for your device. [root@localhost cm-13-kiwi-4-honor5x]# breakfast kiwi // 编译错误 make: *** No rule to make target...
  • centos7编译openjdk记录

    千次阅读 2019-01-14 00:59:56
    ignoring configure: (Your Boot JDK version must be one of: 11 12 13) configure: error: The path given by --with-boot-jdk does not contain a valid Boot JDK configure exiting with result code 1 好麻,...
  •  Clang compiler version. Clang files are placed at version-dependent paths. compute_grit_inputs_for_analyze  Current value (from the default) = false  From //tools/grit/grit_rule.gni:108  When set...
  • Episode 121 of The SitePoint Podcast is now available! This week the panel is made up of regular host Patrick O’Keefe (@iFroggy) with guests Sarah Hawk (@ilovethehawk) and Matt Haughey (@mathowie). ...
  • BOOTSTRAP_VERSION_PATH="$VENV_PATH/certbot-auto-bootstrap-version.txt" LE_AUTO_VERSION="0.37.2" BASENAME=$(basename $0) USAGE="Usage: $BASENAME [OPTIONS] A self-updating wrapper script for the Certbot...

空空如也

空空如也

1 2 3 4 5 ... 13
收藏数 247
精华内容 98
关键字:

warning: your're using an unofficial version of tampermonkey.