Exemplo n.º 1
0
// Check VA status for success or print out an error
bool vaapi_check_status(VAStatus status, const char *msg)
{
    if (status != VA_STATUS_SUCCESS) {
        vaapi_dprintf("%s: %s\n", msg, vaErrorStr(status));
        return false;
    }
    return true;
}
Exemplo n.º 2
0
static inline bool gl_do_check_error(int report)
{
    GLenum error;
    bool is_error = false;
    while ((error = glGetError()) != GL_NO_ERROR) {
        if (report) {
            vaapi_dprintf("glError: %s caught\n", gl_get_error_string(error));
        }
        is_error = true;
    }
    return is_error;
}
Exemplo n.º 3
0
bool VaapiDisplay::init()
{
    GNASH_REPORT_FUNCTION;

    VAStatus status;
    int major_version, minor_version;

    if (!_display) {
        return false;
    }

    status = vaInitialize(_display, &major_version, &minor_version);

    if (!vaapi_check_status(status, "vaInitialize()")) {
        return false;
    }

    vaapi_dprintf("VA API version %d.%d\n", major_version, minor_version);

    return true;
}