Ticket #4270: mingw-svn15128.2.patch
File mingw-svn15128.2.patch, 20.6 KB (added by , 16 years ago) |
---|
-
libs/libmythtv/videoout_d3d.cpp
10 10 #include "videoout_d3d.h" 11 11 #include "filtermanager.h" 12 12 #include "fourcc.h" 13 #include "videodisplayprofile.h" 13 14 14 15 #include "mmsystem.h" 15 16 #include "tv.h" -
libs/libmythtv/libmythtv.pro
499 499 500 500 mingw { 501 501 DEFINES -= USING_OPENGL_VSYNC 502 DEFINES += USING_D3D USING_MINGW502 DEFINES += USING_D3D 503 503 504 504 HEADERS -= util-opengl.h openglcontext.h 505 505 HEADERS += videoout_d3d.h 506 SOURCES -= util-opengl.cpp openglcontext.cpp 506 SOURCES -= util-opengl.cpp openglcontext.cpp NuppelVideoRecorder.cpp 507 507 SOURCES += videoout_d3d.cpp 508 508 509 509 LIBS += -lpthread -
libs/libmythtv/ThreadedFileWriter.cpp
92 92 */ 93 93 void *ThreadedFileWriter::boot_writer(void *wotsit) 94 94 { 95 #ifndef USING_MINGW 95 96 signal(SIGXFSZ, SIG_IGN); 97 #endif 96 98 ThreadedFileWriter *fw = (ThreadedFileWriter *)wotsit; 97 99 fw->DiskLoop(); 98 100 return NULL; -
libs/libmythtv/videodev_myth.h
3 3 4 4 #include "config.h" 5 5 6 #if defined(__FreeBSD__) || defined(CONFIG_DARWIN) 6 #if defined(__FreeBSD__) || defined(CONFIG_DARWIN) || defined(USING_MINGW) 7 7 #include <sys/types.h> 8 8 typedef uint32_t __u32; 9 9 typedef uint16_t __u16; 10 10 typedef int32_t __s32; 11 11 typedef uint8_t __u8; 12 typedef uint32_t __u64; 12 typedef uint32_t __u64; 13 13 typedef int32_t __s64; // HACK. Non 64bit FreeBSD kernels require this for ioctls 14 14 #else 15 15 #include <linux/types.h> -
libs/libmythtv/channelbase.cpp
27 27 #include "compat.h" 28 28 29 29 #define LOC QString("ChannelBase(%1): ").arg(GetCardID()) 30 #define LOC_WARN QString("ChannelBase(%1) Warning: ").arg(GetCardID()) 30 31 #define LOC_ERR QString("ChannelBase(%1) Error: ").arg(GetCardID()) 31 32 32 33 ChannelBase::ChannelBase(TVRec *parent) -
libs/libmythtv/RingBuffer.cpp
1207 1207 else 1208 1208 { 1209 1209 if (whence == SEEK_SET) 1210 #ifdef USING_MINGW 1211 ret = lseek64(fd2, pos, whence); 1212 #else 1210 1213 ret = lseek(fd2, pos, whence); 1214 #endif 1211 1215 else 1212 1216 { 1213 1217 long long realseek = readpos + pos; 1218 #ifdef USING_MINGW 1219 ret = lseek64(fd2, realseek, SEEK_SET); 1220 #else 1214 1221 ret = lseek(fd2, realseek, SEEK_SET); 1222 #endif 1215 1223 } 1216 1224 } 1217 1225 -
libs/libmythtv/vsync.cpp
75 75 { 76 76 VideoSync *trial = NULL; 77 77 tryingVideoSync = true; 78 #ifndef _WIN32 78 79 bool tryOpenGL = (gContext->GetNumSetting("UseOpenGLVSync", 1) && 79 80 (getenv("NO_OPENGL_VSYNC") == NULL)); 81 #endif 80 82 81 83 // m_forceskip allows for skipping one sync method 82 84 // due to crash on the previous run. … … 225 227 OffsetTimeval(m_nexttrigger, -2000); 226 228 } 227 229 230 #ifndef _WIN32 228 231 #define DRM_VBLANK_RELATIVE 0x1; 229 232 230 233 struct drm_wait_vblank_request { … … 245 248 struct drm_wait_vblank_reply reply; 246 249 } drm_wait_vblank_t; 247 250 248 #ifndef _WIN32249 251 #define DRM_IOCTL_BASE 'd' 250 252 #define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE,nr,type) 251 253 252 254 #define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, drm_wait_vblank_t) 253 #endif254 255 255 256 static int drmWaitVBlank(int fd, drm_wait_vblank_t *vbl) 256 257 { 257 258 int ret = -1; 258 259 259 #ifndef _WIN32260 260 do { 261 261 ret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl); 262 262 vbl->request.type &= ~DRM_VBLANK_RELATIVE; 263 263 } while (ret && errno == EINTR); 264 #endif265 264 266 265 return ret; 267 266 } … … 707 706 UpdateNexttrigger(); 708 707 #endif /* USING_OPENGL_VSYNC */ 709 708 } 709 #endif /* !_WIN32 */ 710 710 711 711 #ifdef __linux__ 712 712 #define RTCRATE 1024 … … 724 724 725 725 bool RTCVideoSync::TryInit(void) 726 726 { 727 #ifdef _WIN32728 return false;729 #else730 727 m_rtcfd = open("/dev/rtc", O_RDONLY); 731 728 if (m_rtcfd < 0) 732 729 { … … 751 748 } 752 749 753 750 return true; 754 #endif755 751 } 756 752 757 753 void RTCVideoSync::WaitForFrame(int sync_delay) -
libs/libmythtv/vsync.h
125 125 static int m_forceskip; 126 126 }; 127 127 128 #ifndef _WIN32 128 129 /** \brief Video synchronization class employing /dev/drm0 129 130 * 130 131 * Polls /dev/drm0 to wait for retrace. Phase-maintaining, meaning … … 197 198 * \sa http://www.ac3.edu.au/SGI_Developer/books/OpenGLonSGI/sgi_html/ch10.html#id37188 198 199 * \sa http://www.inb.mu-luebeck.de/~boehme/xvideo_sync.html 199 200 */ 200 #ifndef USING_MINGW201 201 class OpenGLVideoSync : public VideoSync 202 202 { 203 203 public: -
libs/libmythtv/videosource.cpp
36 36 #include "frequencies.h" 37 37 #include "diseqcsettings.h" 38 38 #include "firewiredevice.h" 39 #include "compat.h" 39 40 40 41 41 42 #ifdef USING_DVB -
libs/libmythtv/videoout_dx.cpp
8 8 #include "videoout_dx.h" 9 9 #include "filtermanager.h" 10 10 #include "fourcc.h" 11 #include "videodisplayprofile.h" 11 12 12 13 #include "mmsystem.h" 13 14 #include "tv.h" -
libs/libmythui/mythmainwindow.cpp
612 612 void MythMainWindow::attach(QWidget *child) 613 613 { 614 614 #ifdef USING_MINGW 615 #warning TODO FIXME MythMainWindow::attach() not implementedon MS Windows!615 #warning TODO FIXME MythMainWindow::attach() does not always work on MS Windows! 616 616 // if windows are created on different threads, 617 617 // or if setFocus() is called from a thread other than the main UI thread, 618 618 // setFocus() hangs the thread that called it … … 1519 1519 float desired = 100.0; 1520 1520 1521 1521 #ifdef USING_MINGW 1522 #warning TODO FIXME DPI needs to be calculated on MS Windows systems.. 1522 #warning TODO FIXME DPI needs to be calculated on MS Windows systems using QT.. 1523 // logicalDpiY not supported in QT3/win. 1523 1524 int logicalDpiY = 100; 1525 HDC hdc = GetDC(NULL); 1526 if (hdc) 1527 { 1528 logicalDpiY = GetDeviceCaps(hdc, LOGPIXELSY); 1529 ReleaseDC(NULL, hdc); 1530 } 1524 1531 #else 1525 1532 int logicalDpiY = pdm.logicalDpiY(); 1526 1533 #endif -
libs/libmythui/libmythui.def
1 LIBRARY 2 EXPORTS 3 ; GetMythMainWindow() 4 _Z17GetMythMainWindowv 5 ; DestroyMythMainWindow() 6 _Z21DestroyMythMainWindowv 7 ; MythMainWindow::Init() 8 _ZN14MythMainWindow4InitEv 9 ; MythMainWindow::NormalizeFontSize(int) 10 _ZN14MythMainWindow17NormalizeFontSizeEi 11 ; MythMainWindow::TranslateKeyPress(QString const&, QKeyEvent*, QStringList&, bool) 12 _ZN14MythMainWindow17TranslateKeyPressERK7QStringP9QKeyEventR11QStringListb 13 ; MythMainWindow::detach(QWidget*) 14 _ZN14MythMainWindow6detachEP7QWidget 15 ; MythMainWindow::attach(QWidget*) 16 _ZN14MythMainWindow6attachEP7QWidget 17 ; MythMainWindow::RegisterKey(QString const&, QString const&, QString const&, QString const&) 18 _ZN14MythMainWindow11RegisterKeyERK7QStringS2_S2_S2_ @ 737 19 ; MythMainWindow::GetKey(QString const&, QString const&) const 20 _ZNK14MythMainWindow6GetKeyERK7QStringS2_ 21 ; MythMainWindow::currentWidget() 22 _ZN14MythMainWindow13currentWidgetEv 23 ; MythMainWindow::getMainWindow(bool) 24 _ZN14MythMainWindow13getMainWindowEb -
libs/libmythui/libmythui.pro
Property changes on: libs/libmythui/libmythui.def ___________________________________________________________________ Name: svn:executable + *
74 74 cygwin:DEFINES += _WIN32 75 75 76 76 mingw { 77 DEFINES += USING_MINGW78 77 target.path = $${PREFIX}/bin 79 78 using_opengl { 80 79 LIBS += -lopengl32 -
libs/libavformat/mpegts.c
21 21 #include "avformat.h" 22 22 #include "crc.h" 23 23 #include <pthread.h> 24 #include "libmyth/compat.h" 24 25 #include "mpegts.h" 25 26 26 27 //#define DEBUG_SI -
libs/libavformat/os_support.c
24 24 #include <unistd.h> 25 25 #include <fcntl.h> 26 26 27 #ifdef CONFIG_NETWORK 27 28 #ifndef HAVE_SYS_POLL_H 28 29 #ifdef HAVE_WINSOCK2_H 29 30 #include <winsock2.h> … … 32 33 #endif 33 34 #endif 34 35 35 #ifdef CONFIG_NETWORK36 36 #include "network.h" 37 37 38 38 #if !defined(HAVE_INET_ATON) -
libs/libmyth/audiooutputwin.cpp
10 10 #include <mmsystem.h> 11 11 12 12 // even number, 42 ~= 1.008 sec @ 48000 with 1152 samples per packet 13 uint AudioOutputWin::kPacketCnt = 16;13 const uint AudioOutputWin::kPacketCnt = 16; 14 14 15 15 class AudioOutputWinPrivate 16 16 { … … 18 18 AudioOutputWinPrivate() : 19 19 m_WaveHdrs(NULL), m_hEvent(NULL) 20 20 { 21 m_WaveHdrs = new WAVEHDR[ kPacketCnt];22 memset(m_WaveHdrs, 0, sizeof(WAVEHDR) * kPacketCnt);21 m_WaveHdrs = new WAVEHDR[AudioOutputWin::kPacketCnt]; 22 memset(m_WaveHdrs, 0, sizeof(WAVEHDR) * AudioOutputWin::kPacketCnt); 23 23 m_hEvent = CreateEvent(NULL, FALSE, TRUE, NULL); 24 24 } 25 25 … … 57 57 HANDLE m_hEvent; 58 58 }; 59 59 60 void CALLBACK AudioOutputWinPriv ::waveOutProc(60 void CALLBACK AudioOutputWinPrivate::waveOutProc( 61 61 HWAVEOUT hwo, UINT uMsg, DWORD dwInstance, DWORD dwParam1, DWORD dwParam2) 62 62 { 63 63 if (uMsg == WOM_DONE) 64 64 { 65 65 InterlockedDecrement(&((AudioOutputWin*)dwInstance)->m_nPkts); 66 if (((AudioOutputWin*)dwInstance)->m_nPkts < kPacketCnt)66 if (((AudioOutputWin*)dwInstance)->m_nPkts < (int)AudioOutputWin::kPacketCnt) 67 67 { 68 SetEvent(((AudioOutputWin*)dwInstance)->m_ hEvent);68 SetEvent(((AudioOutputWin*)dwInstance)->m_priv->m_hEvent); 69 69 } 70 70 } 71 71 } … … 87 87 Reconfigure(laudio_bits, laudio_channels, 88 88 laudio_samplerate, laudio_passthru); 89 89 90 m_OutPkts = calloc(kPacketCnt *sizeof(unsigned char*));90 m_OutPkts = (unsigned char **)calloc(kPacketCnt, sizeof(unsigned char*)); 91 91 } 92 92 93 93 AudioOutputWin::~AudioOutputWin() … … 102 102 103 103 if (m_OutPkts) 104 104 { 105 for ( int i = 0; i < kPacketCnt; i++)105 for (uint i = 0; i < kPacketCnt; i++) 106 106 { 107 107 if (m_OutPkts[i]) 108 108 free(m_OutPkts[i]); … … 132 132 &m_priv->m_hWaveOut, 133 133 WAVE_MAPPER, 134 134 &wf, 135 (DWORD) waveOutProc,135 (DWORD) AudioOutputWinPrivate::waveOutProc, 136 136 (DWORD) this, 137 137 CALLBACK_FUNCTION); 138 138 -
libs/libmyth/util.cpp
856 856 857 857 QString createTempFile(QString name_template, bool dir) 858 858 { 859 int ret = -1; 860 859 861 #ifdef USING_MINGW 860 char *tmp = new char[MAX_PATH+1]; 861 QFileInfo fi(name_template); 862 ::GetTempFileNameA(fi.filePath(), fi.baseName(), 0, tmp); 863 return QString(tmp); 862 char temppath[MAX_PATH] = "."; 863 char tempfilename[MAX_PATH] = ""; 864 // if GetTempPath fails, use current dir 865 GetTempPathA(MAX_PATH, temppath); 866 if (GetTempFileNameA(temppath, "mth", 0, tempfilename)) 867 { 868 if (dir) 869 { 870 ret = mkdir(tempfilename); 871 } 872 else 873 { 874 ret = open(tempfilename, O_CREAT | O_RDWR, S_IREAD | S_IWRITE); 875 } 876 } 877 QString tmpFileName(tempfilename); 864 878 #else 865 879 const char *tmp = name_template.ascii(); 866 880 char *ctemplate = strdup(tmp); 867 int ret = -1;868 881 869 882 if (dir) 870 883 { … … 877 890 878 891 QString tmpFileName(ctemplate); 879 892 free(ctemplate); 893 #endif 880 894 881 895 if (ret == -1) 882 896 { … … 889 903 close(ret); 890 904 891 905 return tmpFileName; 892 #endif893 906 } 894 907 895 908 double MythGetPixelAspectRatio(void) -
libs/libmyth/compat.h
6 6 #define __COMPAT_H__ 7 7 8 8 // Turn off the visual studio warnings (identifier was truncated) 9 #ifdef _ WIN329 #ifdef _MSC_VER 10 10 #pragma warning(disable:4786) 11 11 #endif 12 12 … … 29 29 30 30 #ifdef _WIN32 31 31 #undef DialogBox 32 #undef LoadImage 33 #undef LoadIcon 34 #undef GetObject 32 35 #undef DrawText 36 #undef CreateFont 33 37 #endif 34 38 35 39 // Dealing with Microsoft min/max mess: … … 62 66 #endif 63 67 64 68 #ifdef USING_MINGW 65 #define gmtime_r(X, Y) (memcpy(Y, gmtime(X), sizeof(struct tm)), Y)66 #define localtime_r(X, Y) (memcpy(Y, localtime(X), sizeof(struct tm)), Y)67 #define lseek(X,Y,Z) lseek64(X,Y,Z)68 69 #define fsync(FD) 0 69 #define signal(X,Y) 070 70 //used in videodevice only - that code is not windows-compatible anyway 71 71 #define minor(X) 0 72 72 #endif … … 85 85 #endif 86 86 87 87 #if defined(__cplusplus) && defined(USING_MINGW) 88 #include <pthread.h>89 inline bool operator==(const pthread_t& pt, const int n)90 {91 return *((int*)(&pt)) == n;92 }93 inline bool operator!=(const pthread_t& pt, const int n)94 {95 return *((int*)(&pt)) != n;96 }97 #endif // defined(__cplusplus) && defined(USING_MINGW)98 99 #if defined(__cplusplus) && defined(USING_MINGW)100 88 /* TODO: most small usleep's in MythTV are just a quick way to perform 101 89 * a yield() call, those should just be replaced with an actual yield(). 102 90 * There is a known bug with Win32 yield(), it basically functions as -
libs/libmyth/audiooutputwin.h
11 11 12 12 class AudioOutputWin : public AudioOutputBase 13 13 { 14 friend class AudioOutputWinPrivate; 14 15 public: 15 16 AudioOutputWin(QString laudio_main_device, 16 17 QString laudio_passthru_device, … … 32 33 virtual inline int getBufferedOnSoundcard(void); 33 34 34 35 protected: 36 AudioOutputWinPrivate *m_priv; 35 37 static const uint kPacketCnt; 36 AudioOutputWinPrivate *m_priv;37 38 long m_nPkts; 38 39 int m_CurrentPkt; 39 40 unsigned char **m_OutPkts; -
libs/libmyth/libmyth.pro
82 82 } 83 83 84 84 mingw { 85 DEFINES += USING_WINAUDIO USING_MINGW86 85 SOURCES += mediamonitor-windows.cpp audiooutputwin.cpp 87 86 HEADERS += mediamonitor-windows.h audiooutputwin.h 88 87 -
libs/libmythfreemheg/libmythfreemheg.pro
24 24 25 25 LIBS += $$EXTRA_LIBS 26 26 27 mingw { 28 DEFINES += USING_MINGW 29 target.path = $${PREFIX}/bin 30 } 27 mingw: target.path = $${PREFIX}/bin -
libs/libmythupnp/libmythupnp.def
1 LIBRARY 2 EXPORTS 3 ; MythXMLClient::MythXMLClient(QUrl const&, bool) 4 _ZN13MythXMLClientC1ERK4QUrlb 5 ; MythXMLClient::GetConnectionInfo(QString const&, DatabaseParams*, QString&) 6 _ZN13MythXMLClient17GetConnectionInfoERK7QStringP14DatabaseParamsRS0_ 7 ; MythXMLClient::~MythXMLClient() 8 _ZN13MythXMLClientD0Ev 9 ; MythXMLClient::~MythXMLClient() 10 _ZN13MythXMLClientD1Ev 11 ; MythXMLClient::~MythXMLClient() 12 _ZN13MythXMLClientD2Ev 13 ; SSDPCache::Find(QString const&) 14 _ZN9SSDPCache4FindERK7QString 15 ; SSDPCache::Find(QString const&, QString const&) 16 _ZN9SSDPCache4FindERK7QStringS2_ 17 ; SSDP::PerformSearch(QString const&) 18 _ZN4SSDP13PerformSearchERK7QString 19 ; HttpServer::HttpServer(int) 20 _ZN10HttpServerC1Ei 21 ; XmlConfiguration::XmlConfiguration(QString const&) 22 _ZN16XmlConfigurationC1ERK7QString 23 ; UPnp::Initialize(int, HttpServer*) 24 _ZN4UPnp10InitializeEiP10HttpServer 25 ; UPnp::g_pSSDP 26 _ZN4UPnp7g_pSSDPE 27 ; UPnp::g_pConfig 28 _ZN4UPnp9g_pConfigE 29 ; UPnp::UPnp() 30 _ZN4UPnpC1Ev 31 ; UPnp::g_SSDPCache 32 _ZN4UPnp11g_SSDPCacheE 33 ; UPnp::SetConfiguration(Configuration*) 34 _ZN4UPnp16SetConfigurationEP13Configuration 35 ; UPnp::g_UPnpDeviceDesc 36 _ZN4UPnp16g_UPnpDeviceDescE 37 ; UPnpDeviceDesc::Retrieve(QString&, bool) 38 _ZN14UPnpDeviceDesc8RetrieveER7QStringb -
libs/libmythupnp/libmythupnp.pro
41 41 TARGETDEPS += ../libmyth/libmyth-$${MYTH_SHLIB_EXT} 42 42 43 43 mingw { 44 DEFINES += USING_MINGW45 44 HEADERS += darwin-sendfile.h 46 45 SOURCES += darwin-sendfile.c 47 46 target.path = $${PREFIX}/bin -
libs/libmythupnp/upnptasknotify.h
13 13 14 14 // POSIX headers 15 15 #include <sys/types.h> 16 #if def USING_MINGW16 #ifndef USING_MINGW 17 17 #include <netinet/in.h> 18 18 #include <arpa/inet.h> 19 19 #endif -
libs/libmythupnp/httpserver.h
14 14 15 15 // POSIX headers 16 16 #include <sys/types.h> 17 #if def USING_MINGW17 #ifndef USING_MINGW 18 18 #include <netinet/in.h> 19 19 #include <arpa/inet.h> 20 20 #endif -
programs/mythbackend/main.cpp
368 368 369 369 int main(int argc, char **argv) 370 370 { 371 #ifdef USING_MINGW 372 #warning TODO FIXME plugins leave open file descriptors on MS Windows 373 #else 371 #ifndef _WIN32 374 372 for (int i = 3; i < sysconf(_SC_OPEN_MAX) - 1; ++i) 375 373 close(i); 376 374 #endif -
programs/programs.pro
17 17 using_frontend:using_backend { 18 18 SUBDIRS += mythtranscode 19 19 } 20 21 mingw: SUBDIRS -= mythtranscode mythtranscode/replex -
settings.pro
9 9 10 10 isEmpty(TARGET_OS) : win32 { 11 11 CONFIG += mingw 12 DEFINES += USING_MINGW USING_WINAUDIO USING_D3D USING_DIRECTX 12 13 DEFINES -= UNICODE 13 14 QMAKE_EXTENSION_SHLIB = dll 14 15 VERSION = -
filters/postprocess/postprocess.pro
11 11 macx:LIBS += -undefined define_a_way 12 12 13 13 mingw { 14 SOURCES += ../../libs/libpostproc/postprocess.c14 SOURCES -= filter_postprocess.c 15 15 TARGET = postprocess 16 16 }