Ticket #1590: cygwin-may07.diff

File cygwin-may07.diff, 20.4 KB (added by anonymous, 13 years ago)
  • libs/libmythtv/eit.cpp

     
    142142        "      manualid = 0       AND "
    143143        "      ( ( starttime >= :STIME1 AND starttime <  :ETIME1 ) OR "
    144144        "        ( endtime   >  :STIME2 AND endtime   <= :ETIME2 ) )");
    145     query.bindValue(":CHANID", chanid);
     145    query.bindValue(":CHANID", (uint)chanid);
    146146    query.bindValue(":STIME1", starttime);
    147147    query.bindValue(":ETIME1", endtime);
    148148    query.bindValue(":STIME2", starttime);
     
    355355        "WHERE chanid    = :CHANID AND "
    356356        "      starttime = :OLDSTART ");
    357357
    358     query.bindValue(":CHANID",      chanid);
     358    query.bindValue(":CHANID",      (uint)chanid);
    359359    query.bindValue(":OLDSTART",    match.starttime);
    360360    query.bindValue(":TITLE",       ltitle.utf8());
    361361    query.bindValue(":SUBTITLE",    lsubtitle.utf8());
     
    515515
    516516    QString cattype = myth_category_type_to_string(category_type);
    517517
    518     query.bindValue(":CHANID",      chanid);
     518    query.bindValue(":CHANID",      (uint)chanid);
    519519    query.bindValue(":TITLE",       title.utf8());
    520520    query.bindValue(":SUBTITLE",    subtitle.utf8());
    521521    query.bindValue(":DESCRIPTION", description.utf8());
     
    561561        "FROM channel "
    562562        "WHERE chanid    = :CHANID");
    563563
    564     query.bindValue(":CHANID",      chanid);
     564    query.bindValue(":CHANID",      (uint)chanid);
    565565
    566566    if (!query.exec())
    567567    {
  • libs/libmythtv/NuppelVideoPlayer.cpp

     
    7373#undef GetFileSize
    7474#ifdef CONFIG_CYGWIN
    7575#undef DialogBox
     76#undef GetCurrentTime
    7677#endif
    7778#endif
    7879
     
    56085609    if (ringBuffer->isDVD())
    56095610    {
    56105611        if (!ringBuffer->DVD()->IsInMenu())
    5611 #ifndef CONFIG_CYGWIN
    56125612            secsplayed = ringBuffer->DVD()->GetCurrentTime();
    5613 #else
    5614             // DVD playing non-functional under windows for now
    5615             secsplayed = 0;
    5616 #endif
    56175613    }
    56185614    else
    56195615        secsplayed = ((float)framesPlayed / video_frame_rate);
  • libs/libmythtv/NuppelVideoRecorder.cpp

     
    735735 */
    736736bool NuppelVideoRecorder::MJPEGInit(void)
    737737{
     738#if defined(CONFIG_CYGWIN)
     739    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     740#else
    738741    bool we_opened_fd = false;
    739742    int init_fd = fd;
    740743    if (init_fd < 0)
     
    777780    }
    778781
    779782    VERBOSE(VB_IMPORTANT, LOC_ERR + "MJPEG not supported by device");
     783#endif
    780784    return false;
    781785}
    782786
     
    895899
    896900bool NuppelVideoRecorder::Open(void)
    897901{
     902#if defined(CONFIG_CYGWIN)
     903    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     904    errored = true;
     905    return false;
     906#else
    898907    if (channelfd>0)
    899908        return true;
    900909
     
    970979
    971980    channelfd = fd;
    972981    return true;
     982#endif
    973983}
    974984
    975985void NuppelVideoRecorder::StartRecording(void)
    976986{
     987#if defined(CONFIG_CYGWIN)
     988    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     989#else
    977990    if (lzo_init() != LZO_E_OK)
    978991    {
    979992        VERBOSE(VB_IMPORTANT, LOC_ERR + "lzo_init() failed, exiting");
     
    12141227
    12151228    recording = false;
    12161229    close(fd);
     1230#endif
    12171231}
    12181232
    12191233void NuppelVideoRecorder::DoV4L2(void)
    12201234{
     1235#if defined(CONFIG_CYGWIN)
     1236    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     1237#else
    12211238    struct v4l2_format     vfmt;
    12221239    struct v4l2_buffer     vbuf;
    12231240    struct v4l2_requestbuffers vrbuf;
     
    15421559    recording = false;
    15431560    close(fd);
    15441561    close(channelfd);
     1562#endif
    15451563}
    15461564
    15471565void NuppelVideoRecorder::DoMJPEG(void)
    15481566{
     1567#if defined(CONFIG_CYGWIN)
     1568    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     1569#else
    15491570    struct mjpeg_params bparm;
    15501571
    15511572    if (ioctl(fd, MJPIOC_G_PARAMS, &bparm) < 0)
     
    16731694           
    16741695    recording = false;
    16751696    close(fd);
     1697#endif
    16761698}
    16771699
    16781700int NuppelVideoRecorder::SpawnChildren(void)
     
    25902612
    25912613void NuppelVideoRecorder::doVbiThread(void)
    25922614{
     2615#if defined(CONFIG_CYGWIN)
     2616    VERBOSE(VB_IMPORTANT, LOC_ERR + "Not supported under Cygwin yet" + ENO);
     2617#else
    25932618    //VERBOSE(VB_IMPORTANT, LOC + "vbi begin");
    25942619    struct VBIData vbicallbackdata;
    25952620    struct vbi *pal_tt = NULL;
     
    27302755        cc_close(ntsc_cc);
    27312756
    27322757    //VERBOSE(VB_RECORD, LOC + "vbi end");
     2758#endif
    27332759}
    27342760
    27352761
  • libs/libmythtv/DVDRingBuffer.cpp

     
    13071307    VERBOSE(VB_PLAYBACK, LOC + "Limiting DVD Speed Successful");
    13081308#else
    13091309    (void)speed;
    1310     (void)device;
    13111310#endif
    13121311}
    13131312
  • libs/libmythtv/videoout_dx.h

     
    11#ifndef VIDEOOUT_DX_H_
    22#define VIDEOOUT_DX_H_
    33
    4 /* ACK! <windows.h> and <ddraw.h> should only be in cpp's compiled in
     4/* HACK! <windows.h> and <ddraw.h> should only be in cpp's compiled in
    55 * windows only. Some of the variables in VideoOutputDX need to be
    66 * moved to a private class before removing these includes though.
    77 */
  • libs/libmythtv/libmythtv.pro

     
    4242}
    4343
    4444cygwin {
    45   QMAKE_EXTENSION_SHLIB=$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     45  TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     46  TARGETDEPS += ../libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     47  TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     48  TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     49} else {
     50  TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     51  TARGETDEPS += ../libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     52  TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     53  TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    4654}
    4755
    48 TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    49 TARGETDEPS += ../libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    50 TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    51 TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    5256TARGETDEPS += ../libmythmpeg2/libmythmpeg2-$${LIBVERSION}.$${QMAKE_EXTENSION_LIB}
    5357TARGETDEPS += ../libmythdvdnav/libmythdvdnav-$${LIBVERSION}.$${QMAKE_EXTENSION_LIB}
    5458
    55 
    5659DEFINES += _LARGEFILE_SOURCE
    5760QMAKE_CXXFLAGS_RELEASE += $${FREETYPE_CFLAGS}
    5861QMAKE_CXXFLAGS_DEBUG += $${FREETYPE_CFLAGS}
  • libs/libmythtv/videodev_myth.h

     
    1111typedef uint8_t  __u8;
    1212typedef uint32_t __u64;
    1313typedef int32_t  __s64;  // HACK. Non 64bit FreeBSD kernels require this for ioctls
     14#elif defined(CONFIG_CYGWIN)
     15#include <sys/types.h>
     16typedef uint32_t __u32;
     17typedef uint16_t __u16;
     18typedef int32_t  __s32;
     19typedef uint8_t  __u8;
     20typedef uint64_t __u64;
     21typedef int64_t  __s64;
    1422#else
    1523#include <linux/types.h>
    1624#include <linux/version.h>
  • libs/libmythtv/videoout_dx.cpp

     
    1818#include "../libavcodec/avcodec.h"
    1919}
    2020
     21#define PRINT_FOURCC(c) ((char) (c & 0xFF)) << ((char) ((c >> 8) & 0xFF)) << ((char) ((c >> 16) & 0xFF)) << ((char) ((c >> 24) & 0xFF))
     22
    2123const int kNumBuffers = 31;
    2224const int kNeedFreeFrames = 1;
    2325const int kPrebufferFramesNormal = 12;
     
    159161    VideoOutput::Init(width, height, aspect, winid,
    160162                      winx, winy, winw, winh, embedid);
    161163
    162     wnd = winid;
     164    wnd = (HWND)winid;
    163165
    164166    XJ_width  = width;
    165167    XJ_height = height;
     
    13491351        int diff_x  = display_visible_rect.left();
    13501352        diff_x     -= display_video_rect.left();
    13511353        int diff_w  = display_video_rect.width();
    1352         diff_x     -= display_visible_rect.width()
     1354        diff_x     -= display_visible_rect.width();
    13531355
    13541356        rect_src.left  += (XJ_width * diff_x) / display_video_rect.width();
    13551357        rect_src.right -= ((XJ_width * (diff_w - diff_x)) /
     
    13671369        rect_dest.top    = display_visible_rect.top();
    13681370        rect_dest.bottom = display_visible_rect.bottom();
    13691371
     1372        int diff_x  = display_visible_rect.left();
     1373        diff_x     -= display_video_rect.left();
    13701374        int diff_y  = display_visible_rect.top();
    13711375        diff_y     -= display_video_rect.top();
    13721376        int diff_h  = display_video_rect.height();
  • libs/libmythui/libmythui.pro

     
    7171    DEFINES += USE_LIRC
    7272}
    7373
    74 cygwin:DEFINES += _WIN32
     74cygwin {
     75    DEFINES += _WIN32
     76    LIBS += $$LOCAL_LIBDIR_X11
     77}
     78 No newline at end of file
  • libs/libmyth/util-x11.cpp

     
    66#include "config.h" // for CONFIG_DARWIN
    77#include "mythcontext.h"
    88
     9#ifdef _WIN32
     10#undef Q_WS_X11 /* Even if we have an X server in WIN32, don't use X11... */
     11#endif // _WIN32
     12
    913QMutex x11_lock;
    1014
    1115#ifdef Q_WS_X11
  • libs/libmyth/libmyth.pro

     
    7777    DEFINES += _WIN32
    7878    #HEADERS += mediamonitor-windows.h
    7979    #SOURCES += mediamonitor-windows.cpp
     80    LIBS += $$LOCAL_LIBDIR_X11
    8081}
    8182
    8283macx {
  • libs/libmyth/mediamonitor-windows.h

     
    88        : MediaMonitor(par, interval, allowEject) {};
    99
    1010    QStringList GetCDROMBlockDevices(void);
     11    virtual bool AddDevice(MythMediaDevice* pDevice);
    1112};
    1213#endif // MYTH_MEDIA_MONITOR_WINDOWS_H
  • libs/libmyth/mediamonitor-windows.cpp

     
    5959
    6060    return list;
    6161}
     62
     63// Given a media deivce add it to our collection.
     64bool MediaMonitorUnix::AddDevice(MythMediaDevice* pDevice)
     65{
     66    if ( ! pDevice )
     67    {
     68        VERBOSE(VB_IMPORTANT, "Error - MediaMonitorUnix::AddDevice(null)");
     69        return false;
     70    }
     71
     72    dev_t new_rdev;
     73    struct stat sb;
     74
     75    if (stat(pDevice->getDevicePath(), &sb) < 0)
     76    {
     77        VERBOSE(VB_IMPORTANT, "MediaMonitorUnix::AddDevice() -- " +
     78                QString("Failed to stat '%1'")
     79                .arg(pDevice->getDevicePath()) + ENO);
     80
     81        return false;
     82    }
     83    new_rdev = sb.st_rdev;
     84
     85    //
     86    // Check if this is a duplicate of a device we have already added
     87    //
     88    QValueList<MythMediaDevice*>::const_iterator itr = m_Devices.begin();
     89    for (; itr != m_Devices.end(); ++itr)
     90    {
     91        if (stat((*itr)->getDevicePath(), &sb) < 0)
     92        {
     93            VERBOSE(VB_IMPORTANT, "MediaMonitorUnix::AddDevice() -- " +
     94                    QString("Failed to stat '%1'")
     95                    .arg(pDevice->getDevicePath()) + ENO);
     96
     97            return false;
     98        }
     99
     100        if (sb.st_rdev == new_rdev)
     101        {
     102            VERBOSE(VB_MEDIA, "MediamonitorUnix::AddDevice() -- " +
     103                    QString("Not adding '%1', it appears to be a duplicate.")
     104                    .arg(pDevice->getDevicePath()));
     105
     106            return false;
     107        }
     108    }
     109
     110    LookupModel(pDevice);
     111
     112    QMutexLocker locker(&m_DevicesLock);
     113
     114    connect(pDevice, SIGNAL(statusChanged(MediaStatus, MythMediaDevice*)),
     115            this, SLOT(mediaStatusChanged(MediaStatus, MythMediaDevice*)));
     116    m_Devices.push_back( pDevice );
     117    m_UseCount[pDevice] = 0;
     118
     119    return true;
     120}
  • libs/libmythupnp/ssdp.cpp

     
    5252
    5353    // Setup SearchSocket
    5454
    55     m_Sockets[ SocketIdx_Search ]->bind( INADDR_ANY, m_nSearchPort );
     55    m_Sockets[ SocketIdx_Search ]->bind( (uint)INADDR_ANY, m_nSearchPort );
    5656
    5757    m_pNotifyTask   = NULL;
    5858
  • libs/libmythupnp/libmythupnp.pro

     
    4949}
    5050
    5151cygwin {
    52   QMAKE_EXTENSION_SHLIB=$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     52  TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     53  TARGETDEPS += ../libmythtv/libmythtv-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     54  TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     55  TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     56} else {
     57  TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     58  TARGETDEPS += ../libmythtv/libmythtv-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     59  TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     60  TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    5361}
    5462
    55 TARGETDEPS += ../libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    56 TARGETDEPS += ../libmythtv/libmythtv-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    57 TARGETDEPS += ../libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    58 TARGETDEPS += ../libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    59 
    6063inc.path = $${PREFIX}/include/mythtv/upnp/
    6164
    6265inc.files  = httprequest.h upnp.h ssdp.h taskqueue.h bufferedsocketdevice.h
  • programs/mythuitest/mythuitest.pro

     
    1717isEmpty(QMAKE_EXTENSION_LIB) {
    1818  QMAKE_EXTENSION_LIB=a
    1919}
    20 TARGETDEPS += ../../libs/libmythui/libmythui-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    21 TARGETDEPS += ../../libs/libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     20cygwin {
     21  TARGETDEPS += ../../libs/libmythui/libmythui-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     22  TARGETDEPS += ../../libs/libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     23} else {
     24  TARGETDEPS += ../../libs/libmythui/libmythui-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     25  TARGETDEPS += ../../libs/libmyth/libmyth-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     26}
    2227
    2328macx {
    2429    # Duplication of source with libmyth (e.g. oldsettings.cpp)
  • programs/mythfrontend/statusbox.cpp

     
    13241324    // weighted average loads
    13251325    contentLines[count].append(".   " + QObject::tr("Load") + ": ");
    13261326
    1327 #ifdef _WIN32
     1327#if defined(CONFIG_CYGWIN)
    13281328    contentLines[count].append(
    13291329        QObject::tr("unknown") + " - getloadavg() " + QObject::tr("failed"));
    13301330#else // if !_WIN32
  • programs/mythtranscode/replex/replex.pro

     
    2727  QMAKE_EXTENSION_SHLIB=so
    2828}
    2929
    30 TARGETDEPS += ../../../libs/libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    31 TARGETDEPS += ../../../libs/libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    32 TARGETDEPS += ../../../libs/libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     30cygwin {
     31  TARGETDEPS += ../../../libs/libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     32  TARGETDEPS += ../../../libs/libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     33  TARGETDEPS += ../../../libs/libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     34} else {
     35  TARGETDEPS += ../../../libs/libavformat/libmythavformat-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     36  TARGETDEPS += ../../../libs/libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     37  TARGETDEPS += ../../../libs/libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
     38}
    3339
    3440DEPENDPATH += ../../../libs/libavutil ../../../libs/libavformat ../../../libs/libsavcodec
  • programs/mythbackend/mainserver.cpp

     
    21112111
    21122112    QStringList strlist;
    21132113
     2114#if !defined(CONFIG_CYGWIN)
    21142115    double loads[3];
    21152116    if (getloadavg(loads,3) == -1)
    21162117        strlist << "getloadavg() failed";
     
    21182119        strlist << QString::number(loads[0])
    21192120                << QString::number(loads[1])
    21202121                << QString::number(loads[2]);
     2122#else
     2123    strlist << "getloadavg() not supported";
     2124#endif
    21212125
    21222126    SendResponse(pbssock, strlist);
    21232127}
  • programs/mythbackend/httpstatus.cpp

     
    357357 
    358358    storage.setAttribute("fsids", ids);
    359359
     360#if !defined(CONFIG_CYGWIN)
    360361    // load average ---------------------
    361362
    362363    double rgdAverages[3];
     
    367368        load.setAttribute("avg2", rgdAverages[1]);
    368369        load.setAttribute("avg3", rgdAverages[2]);
    369370    }
    370 
     371#endif
    371372 
    372373    //temperature -----------------
    373374    // Try ACPI first, then lmsensor 2nd
  • programs/mythbackend/backendutil.cpp

     
    44#if defined(CONFIG_DARWIN) || defined(__FreeBSD__)
    55#include <sys/param.h>
    66#include <sys/mount.h>
    7 #elif __linux__
     7#elif __linux__ || defined(CONFIG_CYGWIN)
    88#include <sys/vfs.h>
    99#endif
    1010
  • filters/postprocess/postprocess.pro

     
    44INCLUDEPATH += ../../libs/libmythtv
    55DEPENDPATH  += ../../libs/libmythtv
    66
    7 SOURCES += filter_postprocess.c
     7SOURCES += filter_postprocess.c ../../libs/libavcodec/libpostproc/postprocess.c
    88
    99# Lots of symbols like pp_free_context, pp_free_mode, pp_get_context, pp_help
    1010# are used but not defined, which sometimes prevents linking on OS X.
  • filters/filter-avcodec.pro

     
    1313isEmpty(QMAKE_EXTENSION_SHLIB) {
    1414    QMAKE_EXTENSION_SHLIB=so
    1515}
     16cygwin {
     17  QMAKE_EXTENSION_SHLIB=$${QMAKE_EXTENSION_SHLIB}$${QMAKE_EXTENSION_CYGWIN}
     18}
    1619TARGETDEPS += ../../libs/libavutil/libmythavutil-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}
    1720TARGETDEPS += ../../libs/libavcodec/libmythavcodec-$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB}