Ticket #1972: 1972-v1.patch

File 1972-v1.patch, 1.7 KB (added by danielk, 19 years ago)

Possible fix

  • libs/libmythtv/videoout_xv.cpp

     
    6565static void SetFromEnv(bool &useXvVLD, bool &useXvIDCT, bool &useXvMC,
    6666                       bool &useXV, bool &useShm);
    6767static void SetFromHW(Display *d, bool &useXvMC, bool &useXV, bool& useShm);
     68static int calc_hue_base(const QString &adaptor_name);
    6869
    69 
    7070/** \class  VideoOutputXv
    7171 * Supports common video output methods used with %X11 Servers.
    7272 *
     
    751751        return false;
    752752    }
    753753
     754    VERBOSE(VB_IMPORTANT, LOC + QString("XvMC Adaptor Name: '%1'")
     755            .arg(adaptor_name));
     756
     757    xv_hue_base = calc_hue_base(adaptor_name);
     758
    754759    InstallXErrorHandler(XJ_disp);
    755760
    756761    // create XvMC buffers
     
    818823    VERBOSE(VB_IMPORTANT, LOC + QString("XVideo Adaptor Name: '%1'")
    819824            .arg(adaptor_name));
    820825
    821     xv_hue_base = 0; //< nVidia normal
    822     if ((adaptor_name == "ATI Radeon Video Overlay") ||
    823         (adaptor_name == "XV_SWOV" /* VIA 10K & 12K */) ||
    824         (adaptor_name == "Savage Streams Engine" /* S3 Prosavage DDR-K */))
    825     {
    826         xv_hue_base = 50;
    827     }
     826    xv_hue_base = calc_hue_base(adaptor_name);
    828827
    829828    InstallXErrorHandler(XJ_disp);
    830829
     
    34263425    } // switch(codec_id)
    34273426    return ret;
    34283427}
     3428
     3429static int calc_hue_base(const QString &adaptor_name)
     3430{
     3431    if ((adaptor_name == "ATI Radeon Video Overlay") ||
     3432        (adaptor_name == "XV_SWOV" /* VIA 10K & 12K */) ||
     3433        (adaptor_name == "Savage Streams Engine" /* S3 Prosavage DDR-K */))
     3434    {
     3435        return 50;
     3436    }
     3437
     3438    return 0; //< nVidia normal
     3439}