[mythtv] Re: compiling mythtv frontend for cygwin

Mario L superm1 at gmail.com
Mon Sep 27 19:12:55 EDT 2004


Another change to add

I figure that the _IOWR function is used for what looks like backend
only ( I might be wrong ), so just undefine it like this

//mythCVS/libs/libmythtv/vsync.cpp

#define DRM_IOCTL_BASE                  'd'
#define DRM_IOWR(nr,type)               _IOWR(DRM_IOCTL_BASE,nr,type)
#define DRM_IOCTL_WAIT_VBLANK           DRM_IOWR(0x3a, drm_wait_vblank_t)
static int drmWaitVBlank(int fd, drm_wait_vblank_t *vbl)
{
    int ret;

    do {
       ret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl);
       vbl->request.type &= ~DRM_VBLANK_RELATIVE;
    } while (ret && errno == EINTR);

    return ret;
}

/* TO */

#if !defined(_WIN32)
#define DRM_IOCTL_BASE                  'd'
#define DRM_IOWR(nr,type)               _IOWR(DRM_IOCTL_BASE,nr,type)

#define DRM_IOCTL_WAIT_VBLANK           DRM_IOWR(0x3a, drm_wait_vblank_t)

static int drmWaitVBlank(int fd, drm_wait_vblank_t *vbl)
{
    int ret;

    do {
       ret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl);
       vbl->request.type &= ~DRM_VBLANK_RELATIVE;
    } while (ret && errno == EINTR);

    return ret;
}

char *DRMVideoSync::sm_dri_dev = "/dev/dri/card0";

#endif

#if defined(_WIN32)

static int drmWaitVBlank(int fd, drm_wait_vblank * vbl)
{
        return 0;
}
#endif

DirectX errors crop up,

Mario Limonciello at supermario /tmp/mythCVS/libs/libmythtv
$ make
g++ -c -pipe -fdata-sections -Wall -W -O3 -march=pentiumpro
-fomit-frame-pointer `freetype-config --cflags` -D_REENTRANT 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local\" -DMMX
-D_WIN32 -DUSING_DIRECTX -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-I/opt/qt/3.2/qt-x11-free-3.2.3/mkspecs/default -I.
-I/usr/local/include -I../libmyth -I.. -Idvbdev -I../libavcodec
-I/usr/include/directx -I/opt/qt/3.2/qt-x11-free-3.2.3/include -o
NuppelVideoPlayer.o NuppelVideoPlayer.cpp
g++ -c -pipe -fdata-sections -Wall -W -O3 -march=pentiumpro
-fomit-frame-pointer `freetype-config --cflags` -D_REENTRANT 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local\" -DMMX
-D_WIN32 -DUSING_DIRECTX -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-I/opt/qt/3.2/qt-x11-free-3.2.3/mkspecs/default -I.
-I/usr/local/include -I../libmyth -I.. -Idvbdev -I../libavcodec
-I/usr/include/directx -I/opt/qt/3.2/qt-x11-free-3.2.3/include -o
videooutbase.o videooutbase.cpp
g++ -c -pipe -fdata-sections -Wall -W -O3 -march=pentiumpro
-fomit-frame-pointer `freetype-config --cflags` -D_REENTRANT 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local\" -DMMX
-D_WIN32 -DUSING_DIRECTX -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-I/opt/qt/3.2/qt-x11-free-3.2.3/mkspecs/default -I.
-I/usr/local/include -I../libmyth -I.. -Idvbdev -I../libavcodec
-I/usr/include/directx -I/opt/qt/3.2/qt-x11-free-3.2.3/include -o
videoout_dx.o videoout_dx.cpp
videoout_dx.cpp: In member function `virtual bool VideoOutputDX::Init(int, int, 
   float, long unsigned int, int, int, int, int, long unsigned int)':
videoout_dx.cpp:159: error: invalid conversion from `WId' to `HWND__*'
videoout_dx.cpp: In member function `int VideoOutputDX::DirectXInitDDraw()':
videoout_dx.cpp:594: error: `MONITOR_DEFAULTTONEAREST' undeclared (first use 
   this function)
videoout_dx.cpp:594: error: (Each undeclared identifier is reported only once 
   for each function it appears in.)
videoout_dx.cpp: In member function `virtual void 
   VideoOutputDX::PrepareFrame(VideoFrame*, FrameScanType)':
videoout_dx.cpp:262: warning: unused parameter `FrameScanType t'
make: *** [videoout_dx.o] Error 1

Whats kind of odd is that MONITOR_DEFAULTTONEAREST is actually
declared in winuser.h:

$ grep -r "MONITOR_DEFAULT" /usr/include/w32api/*
/usr/include/w32api/winuser.h:#define MONITOR_DEFAULTTONULL 0 
/usr/include/w32api/winuser.h:#define MONITOR_DEFAULTTOPRIMARY 1 
/usr/include/w32api/winuser.h:#define MONITOR_DEFAULTTONEAREST 2 

which is included by windows.h

$ grep -r "winuser.h" /usr/include/w32api/*
/usr/include/w32api/afxres.h:/* IDC_STATIC is documented in winuser.h,
but not defined. */
/usr/include/w32api/dbt.h:/* Also defined in winuser.h */
/usr/include/w32api/windef.h:/* FIXME: How to handle these.
SM_CMONITORS etc in winuser.h also. */
/usr/include/w32api/windows.h:#include <winuser.h>
/usr/include/w32api/winresrc.h:#include <winuser.h>

Both of the errors seem really odd...


More information about the mythtv-dev mailing list