Ticket #735: mythtv-directfb0.9.24.diff

File mythtv-directfb0.9.24.diff, 2.4 KB (added by Anssi Hannula <anssi.hannula@…>, 15 years ago)

Fix directfb0.9.24 build on mythtv SVN 8300

  • libs/libmythtv/videoout_directfb.cpp

    diff -Nurp mythtv-trunk-8300/libs/libmythtv/videoout_directfb.cpp mythtv-trunk-8300-fix/libs/libmythtv/videoout_directfb.cpp
    old new using namespace std; 
    1717#include <sys/ioctl.h>
    1818#include <fcntl.h>
    1919#include <unistd.h>
     20#include <directfb_version.h>
    2021
    2122#define DFBCHECKFAIL(dfbcommand, returnstmt...)\
    2223{\
    bool VideoOutputDirectfb::Init(int width 
    343344    //determine output card capacities
    344345#if (DIRECTFB_MINOR_VERSION <= 9) && (DIRECTFB_MICRO_VERSION <= 22)
    345346    DFBCHECKFAIL(data->dfb->GetCardCapabilities(data->dfb, &(data->cardCapabilities)), false);
     347    VERBOSE(VB_GENERAL, QString("DirectFB output : card : %1")
     348            .arg((data->cardCapabilities.acceleration_mask & DFXL_BLIT) > 0 ?
     349                 "hardware blit support" : "NO hardware blit support"));
    346350#else
    347351    DFBCHECKFAIL(data->dfb->GetDeviceDescription(data->dfb, &(data->cardDescription)), false);
    348 #endif
    349352    VERBOSE(VB_GENERAL, QString("DirectFB output : card : %1")
    350             .arg((data->cardCapabilities.acceleration_mask & DFXL_BLIT) > 0 ?
     353            .arg((data->cardDescription.acceleration_mask & DFXL_BLIT) > 0 ?
    351354                 "hardware blit support" : "NO hardware blit support"));
     355#endif
    352356
    353357    //clear primary layer
    354358    desc.flags = DSDESC_CAPS;
    355359    desc.caps = DSCAPS_PRIMARY;
     360#if (DIRECTFB_MINOR_VERSION <= 9) && (DIRECTFB_MICRO_VERSION <= 22)
    356361    if (data->cardCapabilities.acceleration_mask & DFXL_BLIT)
     362#else
     363    if (data->cardDescription.acceleration_mask & DFXL_BLIT)
     364#endif
    357365        desc.caps = (DFBSurfaceCapabilities)(desc.caps | DSCAPS_DOUBLE);
    358366    DFBCHECKFAIL(data->dfb->CreateSurface(data->dfb, &desc, &(data->primarySurface)), false);
    359367    DFBCHECKFAIL(data->primarySurface->Clear(data->primarySurface, 0, 0, 0, 0xff), false);
    void VideoOutputDirectfb::PrepareFrame(V 
    530538    }
    531539    if (!bufferSurface)
    532540        return;
     541#if (DIRECTFB_MINOR_VERSION <= 9) && (DIRECTFB_MICRO_VERSION <= 22)
    533542    if ((data->cardCapabilities.acceleration_mask & DFXL_BLIT) > 0)
     543#else
     544    if ((data->cardDescription.acceleration_mask & DFXL_BLIT) > 0)
     545#endif
    534546    {
    535547        DFBCHECK(data->videoSurface->Blit(data->videoSurface, bufferSurface, NULL, 0, 0));
    536548    }