Ticket #1590: cygwin_31-10-06.patch

File cygwin_31-10-06.patch, 12.2 KB (added by robthebob+myth_trac@…, 13 years ago)

Slightly altered/extended patch, gets up to videoout_dx.cpp

  • C:/MinGW/mythtv/mythtv/configure

     
    66# make sure we are running under a compatible shell
    77unset foo
    88(: ${foo%%bar}) 2>/dev/null && ! (: ${foo?}) 2>/dev/null
    9 if test "$?" != 0; then
    10     if test "x$FFMPEG_CONFIGURE_EXEC" = x; then
    11         FFMPEG_CONFIGURE_EXEC=1
    12         export FFMPEG_CONFIGURE_EXEC
    13         exec bash "$0" "$@"
    14         exec ksh "$0" "$@"
    15         exec /usr/xpg4/bin/sh "$0" "$@"
    16     fi
    17     echo "No compatible shell script interpreter found."
    18     exit 1
    19 fi
     9#if test "$?" != 0; then
     10#    if test "x$FFMPEG_CONFIGURE_EXEC" = x; then
     11#        FFMPEG_CONFIGURE_EXEC=1
     12#        export FFMPEG_CONFIGURE_EXEC
     13#        exec bash "$0" "$@"
     14#        exec ksh "$0" "$@"
     15#        exec /usr/xpg4/bin/sh "$0" "$@"
     16#    fi
     17#    echo "No compatible shell script interpreter found."
     18#    exit 1
     19#fi
    2020
    2121show_help(){
    2222  echo "Usage: configure [options]"
     
    27262726  echo "Mac accel.       $mac_accel"
    27272727  echo "OpenGL vsync     $opengl_vsync"
    27282728  echo "DirectFB         $direct_fb"
    2729   if test x"$mingw32" = x"yes" -o x"$cygwin" = x"yes" ; then
     2729  if test x"$mingw32" = x"yes" -o x"$targetos" = x"CYGWIN" ; then
    27302730  echo "DirectX          $direct_x"
    27312731fi
    27322732echo
     
    31743174  echo "CONFIG_X264=yes" >> $MYTH_CONFIG_MAK
    31753175fi
    31763176
     3177if test x"$targetos" = x"CYGWIN" ; then
     3178  echo "#define CONFIG_CYGWIN 1" >> $TMPH
     3179  echo "#ifndef llrint" >> $TMPH
     3180  echo "#define llrint llrint  // make sure not to define twice" >> $TMPH
     3181  echo "static inline long long int llrint (double x)" >> $TMPH
     3182  echo "{" >> $TMPH
     3183  echo "    long long int llrintres;" >> $TMPH
     3184  echo "    asm" >> $TMPH
     3185  echo "    (\"fistpll %0\"" >> $TMPH
     3186  echo "    : \"=m\" (llrintres) : \"t\" (x) : \"st\");" >> $TMPH
     3187  echo "    return llrintres;" >> $TMPH
     3188  echo "}" >> $TMPH
     3189  echo "#endif" >> $TMPH
     3190fi
     3191
     3192if test x"$targetos" = x"CYGWIN" ; then
     3193  echo "#define CONFIG_CYGWIN 1" >> $TMPH
     3194  echo "#ifndef llrint" >> $TMPH
     3195  echo "#define llrint llrint  // make sure not to define twice" >> $TMPH
     3196  echo "static inline long long int llrint (double x)" >> $TMPH
     3197  echo "{" >> $TMPH
     3198  echo "    long long int llrintres;" >> $TMPH
     3199  echo "    asm" >> $TMPH
     3200  echo "    (\"fistpll %0\"" >> $TMPH
     3201  echo "    : \"=m\" (llrintres) : \"t\" (x) : \"st\");" >> $TMPH
     3202  echo "    return llrintres;" >> $TMPH
     3203  echo "}" >> $TMPH
     3204  echo "#endif" >> $TMPH
     3205fi
     3206
    31773207if test "$mingw32" = "yes" ; then
    31783208  echo "#define CONFIG_MINGW 1" >> $TMPH
    31793209  echo "CONFIG_MINGW=yes" >> $MYTH_CONFIG_MAK
  • C:/MinGW/mythtv/mythtv/libs/libavcodec/libavcodec.pro

     
    1717    QMAKE_CFLAGS_SHLIB =
    1818}
    1919
     20contains (TARGET_OS, CYGWIN) {
     21    LIBS += -lz
     22}
     23
    2024QMAKE_CFLAGS_DEBUG += -O
    2125
    2226QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2)
  • C:/MinGW/mythtv/mythtv/libs/libavformat/libavformat.pro

     
    1313
    1414LIBS += $$LOCAL_LIBDIR_X11
    1515
     16contains (TARGET_OS, CYGWIN) {
     17    LIBS += -lz
     18}
     19
    1620QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2)
    1721
    1822# Input
  • C:/MinGW/mythtv/mythtv/libs/libmyth/libmyth.pro

     
    6161inc.files += mythevent.h mythobservable.h mythsocket.h
    6262inc.files += mythexp.h mythpluginapi.h
    6363
     64cygwin {
     65    DEFINES += CONFIG_CYGWIN
     66    QMAKE_LFLAGS_SHLIB += -Wl,--noinhibit-exec
     67}
     68
    6469using_oss {
    6570    DEFINES += USING_OSS
    6671    SOURCES += audiooutputoss.cpp
    6772    HEADERS += audiooutputoss.h
    6873}
    6974
    70 unix {
     75unix:!cygwin {
    7176    SOURCES += mythhdd.cpp mythcdrom.cpp mythmediamonitor.cpp
    7277    HEADERS += mythhdd.h mythcdrom.h   mythmediamonitor.h
    7378    inc.files += mythhdd.h mythcdrom.h mythmediamonitor.h
  • C:/MinGW/mythtv/mythtv/libs/libmyth/mythmediamonitor.cpp

     
    77#include <dirent.h>
    88#include <unistd.h>
    99#include <fcntl.h>
    10 #include <fstab.h>
     10//#include <fstab.h>
    1111
    1212// UNIX System headers
    1313#include <sys/file.h>
     
    229229// Loop through the file system table and add any supported devices.
    230230bool MediaMonitor::CheckFileSystemTable(void)
    231231{
    232     struct fstab * mep = NULL;
     232    /*struct fstab * mep = NULL;
    233233   
    234234    // Attempt to open the file system descriptor entry.
    235235    if (!setfsent())
     
    249249    }
    250250
    251251    if (m_Devices.isEmpty())
    252         return false;
     252        return false;*/
    253253   
    254254    return true;
    255255}
     
    424424// Given a fstab entry to a media device determine what type of device it is
    425425bool MediaMonitor::AddDevice(struct fstab * mep)
    426426{
    427     QString devicePath( mep->fs_spec );
     427/*    QString devicePath( mep->fs_spec );
    428428    //cout << "AddDevice - " << devicePath << endl;
    429429
    430430    MythMediaDevice* pDevice = NULL;
     
    506506         }
    507507         delete pDevice;
    508508      }
    509 
     509*/
    510510     return false;
    511511}
    512512
     
    514514// add it to our collection.
    515515bool MediaMonitor::AddDevice(const char* devPath )
    516516{
    517     QString devicePath( devPath );
     517  /*  QString devicePath( devPath );
    518518    //cout << "AddDevice - " << devicePath << endl;
    519519
    520520    struct fstab * mep = NULL;
     
    560560
    561561    if (mep)
    562562       return AddDevice(mep);
    563 
     563*/
    564564    return false;
    565565}
    566566
     
    582582 */
    583583bool MediaMonitor::FindPartitions(const QString &dev, bool checkPartitions)
    584584{
    585     MythMediaDevice* pDevice = NULL;
     585  /*  MythMediaDevice* pDevice = NULL;
    586586
    587587    if (checkPartitions)
    588588    {
     
    636636
    637637    if (pDevice)
    638638        delete pDevice;
    639 
     639*/
    640640    return false;
    641641}
    642642
     
    650650 */
    651651bool MediaMonitor::RemoveDevice(const QString &dev)
    652652{
    653     QMutexLocker locker(&m_DevicesLock);
     653/*    QMutexLocker locker(&m_DevicesLock);
    654654
    655655    QValueList<MythMediaDevice*>::iterator it;
    656656    for (it = m_Devices.begin(); it != m_Devices.end(); it++)
     
    674674
    675675            return true;
    676676        }
    677     }
     677    }*/
    678678    return false;
    679679}
    680680
     
    685685 */
    686686void MediaMonitor::CheckDeviceNotifications(void)
    687687{
    688     char buffer[256];
     688   /* char buffer[256];
    689689    QString qBuffer = "";
    690690
    691691    if (!m_fifo)
     
    724724        {
    725725            RemoveDevice((*it).section(' ', 2, 2));
    726726        }
    727     }
     727    }*/
    728728}
    729729
    730730/** \fn MediaMonitor::CheckDevices(void)
  • C:/MinGW/mythtv/mythtv/libs/libmyth/mythmediamonitor.h

     
    11#ifndef MYTH_MEDIA_MONITOR_H
    22#define MYTH_MEDIA_MONITOR_H
    33
    4 #include <fstab.h>
     4//#include <fstab.h>
    55
    66#include <qvaluelist.h>
    77#include <qguardedptr.h>
  • C:/MinGW/mythtv/mythtv/libs/libmyth/util.cpp

     
    1818#include <sys/sysinfo.h>
    1919#else
    2020#include <sys/param.h>
     21#ifdef CONFIG_CYGWIN
     22#include <sys/statfs.h>
     23#else
    2124#include <sys/sysctl.h>
     25#endif
    2226#include <sys/mount.h>
    2327#endif
    2428
  • C:/MinGW/mythtv/mythtv/libs/libmythsoundtouch/STTypes.h

     
    109109        #endif // FLOAT_SAMPLES
    110110
    111111        #ifdef ALLOW_OPTIMIZATIONS
    112             #if _WIN32 || __MMX__ || MMX
     112            #if CONFIG_CYGWIN || __MMX__ || MMX
    113113                // Allow MMX optimizations
    114114                #define ALLOW_MMX   1
    115115            #endif
  • C:/MinGW/mythtv/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp

     
    7171#include "videoout_dx.h"
    7272#undef GetFreeSpace
    7373#undef GetFileSize
     74#undef DialogBox
    7475#endif
    7576
    7677#ifndef HAVE_ROUND
     
    54605461    if (ringBuffer->isDVD())
    54615462    {
    54625463        if (!ringBuffer->DVD()->IsInMenu())
    5463             secsplayed = ringBuffer->DVD()->GetCurrentTime();
     5464            secsplayed = 0;//ringBuffer->DVD()->GetCurrentTime();
    54645465    }
    54655466    else
    54665467        secsplayed = ((float)framesPlayed / video_frame_rate);
  • C:/MinGW/mythtv/mythtv/libs/libmythtv/vbitext/vbi.c

     
    566566
    567567    memset(&v4l2_format, 0, sizeof(v4l2_format));
    568568    v4l2_format->type = V4L2_BUF_TYPE_VBI_CAPTURE;
     569#ifndef USING_DIRECTX
    569570    if (ioctl(vbi->fd, VIDIOC_G_FMT, v4l2_format) == -1)
     571#else
     572    if (0)
     573#endif
    570574    {
    571575       // not a v4l2 device.  assume bttv and create a standard fmt-struct.
    572576       int size;
     
    576580       vbifmt->sampling_rate = 35468950;
    577581       vbifmt->samples_per_line = 2048;
    578582       vbifmt->offset = 244;
     583#ifndef USING_DIRECTX
    579584       if ((size = ioctl(vbi->fd, BTTV_VBISIZE, 0)) == -1)
     585#else
     586       if (0)
     587#endif
    580588       {
     589
    581590           // BSD or older bttv driver.
    582591           vbifmt->count[0] = 16;
    583592           vbifmt->count[1] = 16;
  • C:/MinGW/mythtv/mythtv/libs/libmythtv/videoout_dx.cpp

     
    106106    DirectXCloseSurface();
    107107    MakeSurface();
    108108   
    109     vbuffers.CreateBuffers(XJ_width, XJ_height);
     109    vbuffers.CreateBuffers(width, height);
    110110
    111111    MoveResize();
    112112
  • C:/MinGW/mythtv/mythtv/libs/libmythtv/videoout_dx.h

     
    4141    void MoveResize(void);
    4242    int  SetPictureAttribute(int attribute, int newValue);
    4343 
    44     float GetDisplayAspect(void) const { return ((float) dispw)/disph; }
     44    float GetDisplayAspect(void) const { return 1.333; /*((float) dispw)/disph;*/ }
    4545   
    4646    void WaitForVSync(void);
    4747
  • C:/MinGW/mythtv/mythtv/libs/libmythtv/vsync.cpp

     
    252252{
    253253    int ret = -1;
    254254
    255 #ifndef _WIN32
     255#ifndef USING_DIRECTX
    256256    do {
    257257       ret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl);
    258258       vbl->request.type &= ~DRM_VBLANK_RELATIVE;
  • C:/MinGW/mythtv/mythtv/settings.pro

     
    77LIBVERSION = 0.20
    88VERSION = 0.20.0
    99
     10# if CYGWIN compile, set up flag in CONFIG
     11contains(TARGET_OS, CYGWIN) {
     12    CONFIG += cygwin
     13}
     14
    1015# Die on the (common) case where OS X users inadvertently use Fink's
    1116# Qt/X11 install instead of Qt/Mac. '
    1217contains(CONFIG_DARWIN, yes) {