예제 #1
0
QString aboutFFmpeg_HTML()
{
    QString text = "<h3>FFmpeg/Libav</h3>\n";
    const Internal::ffmpeg_component_info* info = Internal::get_ffmpeg_component_info(0);
    while (info) {
        text += "<h4>" + QObject::tr("Build version")
                + QString(": lib%1-%2.%3.%4</h4>\n")
                .arg(info->lib)
                .arg(QTAV_VERSION_MAJOR(info->build_version))
                .arg(QTAV_VERSION_MINOR(info->build_version))
                .arg(QTAV_VERSION_PATCH(info->build_version))
                ;
        unsigned rt_version = info->rt_version;
        if (info->build_version != rt_version) {
            text += "<h4 style='color:#ff0000;'>" + QString(QObject::tr("Runtime version"))
                    + QString(": %1.%2.%3</h4>\n")
                    .arg(QTAV_VERSION_MAJOR(rt_version))
                    .arg(QTAV_VERSION_MINOR(rt_version))
                    .arg(QTAV_VERSION_PATCH(rt_version))
                    ;
        }
        text += "<p>" + QString(info->config) + "</p>\n"
                "<p>" + QString(info->license) + "</p>\n";
        info = Internal::get_ffmpeg_component_info(info);
    }
    return text;
}
예제 #2
0
QString aboutFFmpeg_HTML()
{
    QString text = "<h3>FFmpeg/Libav</h3>\n";
    struct ff_component {
        const char* lib;
        unsigned build_version;
        unsigned rt_version;
        const char *config;
        const char *license;
    } components[] = {
//TODO: auto check loaded libraries
#define FF_COMPONENT(name, NAME) #name, LIB##NAME##_VERSION_INT, name##_version(), name##_configuration(), name##_license()
        { FF_COMPONENT(avcodec, AVCODEC) },
        { FF_COMPONENT(avformat, AVFORMAT) },
        { FF_COMPONENT(avutil, AVUTIL) },
        { FF_COMPONENT(swscale, SWSCALE) },
    #if QTAV_HAVE(SWRESAMPLE)
        { FF_COMPONENT(swresample, SWRESAMPLE) },
    #endif //QTAV_HAVE(SWRESAMPLE)
    #if QTAV_HAVE(AVRESAMPLE)
        { FF_COMPONENT(avresample, AVRESAMPLE) },
    #endif //QTAV_HAVE(AVRESAMPLE)
    #if QTAV_HAVE(AVDEVICE)
        { FF_COMPONENT(avdevice, AVDEVICE) },
    #endif //QTAV_HAVE(AVDEVICE)
#undef FF_COMPONENT
        { 0, 0, 0, 0, 0 }
    };
    for (int i = 0; components[i].lib != 0; ++i) {
        text += "<h4>" + QObject::tr("Build version")
                + QString(": lib%1-%2.%3.%4</h4>\n")
                .arg(components[i].lib)
                .arg(QTAV_VERSION_MAJOR(components[i].build_version))
                .arg(QTAV_VERSION_MINOR(components[i].build_version))
                .arg(QTAV_VERSION_PATCH(components[i].build_version))
                ;
        unsigned rt_version = components[i].rt_version;
        if (components[i].build_version != rt_version) {
            text += "<h4 style='color:#ff0000;'>" + QString(QObject::tr("Runtime version"))
                    + QString(": %1.%2.%3</h4>\n")
                    .arg(QTAV_VERSION_MAJOR(rt_version))
                    .arg(QTAV_VERSION_MINOR(rt_version))
                    .arg(QTAV_VERSION_PATCH(rt_version))
                    ;
        }
        text += "<p>" + QString(components[i].config) + "</p>\n"
                "<p>" + QString(components[i].license) + "</p>\n";
    }
    return text;
}
예제 #3
0
void ffmpeg_version_print()
{
    struct _component {
        const char* lib;
        unsigned build_version;
        unsigned rt_version;
    } components[] = {
        { "avcodec", LIBAVCODEC_VERSION_INT, avcodec_version()},
        { "avformat", LIBAVFORMAT_VERSION_INT, avformat_version()},
        { "avutil", LIBAVUTIL_VERSION_INT, avutil_version()},
        { "swscale", LIBSWSCALE_VERSION_INT, swscale_version()},
#if QTAV_HAVE(SWRESAMPLE)
        { "swresample", LIBSWRESAMPLE_VERSION_INT, swresample_version()}, //swresample_version not declared in 0.9
#endif //QTAV_HAVE(SWRESAMPLE)
#if QTAV_HAVE(AVRESAMPLE)
        { "avresample", LIBAVRESAMPLE_VERSION_INT, avresample_version()},
#endif //QTAV_HAVE(AVRESAMPLE)
#if QTAV_HAVE(AVFILTER)
        { "avfilter", LIBAVFILTER_VERSION_INT, avfilter_version() },
#endif //QTAV_HAVE(AVFILTER)
        { 0, 0, 0}
    };
    for (int i = 0; components[i].lib != 0; ++i) {
        printf("Build with lib%s-%u.%u.%u\n"
               , components[i].lib
               , QTAV_VERSION_MAJOR(components[i].build_version)
               , QTAV_VERSION_MINOR(components[i].build_version)
               , QTAV_VERSION_PATCH(components[i].build_version)
               );
        unsigned rt_version = components[i].rt_version;
        if (components[i].build_version != rt_version) {
            fprintf(stderr, "Warning: %s runtime version %u.%u.%u mismatch!\n"
                    , components[i].lib
                    , QTAV_VERSION_MAJOR(rt_version)
                    , QTAV_VERSION_MINOR(rt_version)
                    , QTAV_VERSION_PATCH(rt_version)
                    );
        }
    }
    fflush(0);
}
예제 #4
0
QString AVDecoder::description() const
{
    return QString("FFmpeg/Libav avcodec %1.%2.%3").arg(QTAV_VERSION_MAJOR(avcodec_version())).arg(QTAV_VERSION_MINOR(avcodec_version())).arg(QTAV_VERSION_PATCH(avcodec_version()));
}