mcpp index

compat.ffmpeg

#include

FFmpeg 8.1.2 multimedia libraries, full source build (LGPL profile, multi-platform)

#include <libavformat/avformat.h>

Curated in .xpkgindex/interfaces.json.

mcpp add compat.ffmpeg@8.1.2

Usage

From this repository's own test project — built and run by CI, not written for the website.

// compat.ffmpeg end-to-end assertion: the full-profile source build must
// expose its major decoders and demuxers, and library versions must match the
// vendored 8.1.2 release. Linux-only (see mcpp.toml).
#if defined(__linux__) || defined(__APPLE__) || defined(_WIN32)
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
}

int main() {
    if ((avutil_version() >> 16) != 60) return 1;   // n8.1.x: libavutil major 60
    if ((avcodec_version() >> 16) != 62) return 2;
    if ((avformat_version() >> 16) != 62) return 3;

    const char* decoders[] { "h264", "hevc", "av1", "aac" };
    for (const char* name : decoders)
        if (!avcodec_find_decoder_by_name(name)) return 4;

    void* it { nullptr };
    int demuxers { 0 };
    while (av_demuxer_iterate(&it)) ++demuxers;
    if (demuxers <= 300) return 5;                  // full profile registers 358
// …

tests/examples/ffmpeg/tests/ffmpeg.cpp · project tests/examples/ffmpeg

Build

targets
ffmpeg (lib)
C standard
c17
include dirs
mcpp_generated, mcpp_generated/libavcodec, mcpp_generated/libavformat, mcpp_generated/libavfilter, mcpp_generated/libavdevice, */libavcodec

Generated files

  • mcpp_generated/config.base.h
  • mcpp_generated/libavfilter/filter_list.c
  • mcpp_generated/libavcodec/codec_list.c
  • mcpp_generated/libavformat/demuxer_list.c
  • mcpp_generated/libavutil/ffversion.h
  • mcpp_generated/config.base.asm
  • mcpp_generated/libavutil/avconfig.h
  • mcpp_generated/config_components.base.h
  • mcpp_generated/libavcodec/parser_list.c
  • mcpp_generated/libavformat/muxer_list.c
  • mcpp_generated/config_components.base.asm
  • mcpp_generated/libavcodec/bsf_list.c

Versions

VersionPlatforms Mirrorssha256
8.1.2 latest LinuxWindowsmacOS CN GLOBAL 32faba5ef673…