예제 #1
0
bool VAAPIContext::CreateDisplay(QSize size, bool noreuse)
{
    m_size = size;
    if (!m_copy)
    {
        m_copy = new MythUSWCCopy(m_size.width());
    }
    else
    {
        m_copy->reset(m_size.width());
    }

    bool ok = true;
    m_display = VAAPIDisplay::GetDisplay(m_dispType, noreuse);
    CREATE_CHECK(!m_size.isEmpty(), "Invalid size");
    CREATE_CHECK(m_display != NULL, "Invalid display");
    CREATE_CHECK(InitDisplay(),     "Invalid VADisplay");
    CREATE_CHECK(InitProfiles(),    "No supported profiles");
    if (ok)
        LOG(VB_PLAYBACK, LOG_INFO, LOC +
            QString("Created context (%1x%2->%3x%4)")
            .arg(size.width()).arg(size.height())
            .arg(m_size.width()).arg(m_size.height()));
    // ATI hue adjustment
    if (m_display)
        m_hueBase = VideoOutput::CalcHueBase(m_display->GetDriver());

    return ok;
}
예제 #2
0
bool VAAPIContext::CreateBuffers(void)
{
    bool ok = true;
    CREATE_CHECK(!m_size.isEmpty(), "Invalid size");
    CREATE_CHECK(InitBuffers(),     "Failed to create buffers.");
    CREATE_CHECK(InitContext(),     "Failed to create context");
    if (ok)
        LOG(VB_PLAYBACK, LOG_INFO, LOC +
            QString("Created %1 buffers").arg(m_numSurfaces));
    return ok;
}
예제 #3
0
bool DXVA2Decoder::Init(MythRenderD3D9* render)
{
    bool ok = true;
    CREATE_CHECK(m_width > 0,  "Invalid width.")
    CREATE_CHECK(m_height > 0, "Invalid height.")
    CREATE_CHECK(CreateVideoService(render), "Failed to create video service.")
    CREATE_CHECK(GetInputOutput(), "Failed to find input/output combination.")
    InitFormat();
    CREATE_CHECK(GetDecoderConfig(), "Failed to find a raw input bitstream.")
    CREATE_CHECK(CreateSurfaces(), "Failed to create surfaces.")
    CREATE_CHECK(CreateDecoder(), "Failed to create decoder.")
    return ok;
}