Re: [Ekiga-devel-list] fedora, mingw32, and ekiga



-------- Original Message --------
Subject: Re: [Ekiga-devel-list] fedora, mingw32, and ekiga
From: Thierry Simonnet <t simonnet esiee fr>
To: Ekiga development mailing list <ekiga-devel-list gnome org>
Date: 02/11/2009 01:34 AM

Hi Michael,

I'm interested by your offer. Patches first, package if possible and I think I can find some place to host all of them if you need it.

Thank you for your post.



Ptlib and ffmpeg patches attached.

The Opal configure script was edited directly. You will need to edit the m4 stuff as I'm not an expert at those macros.

I will send a link to the package via private mail.

P.S. Fedora should be getting a Win64 capable gcc package soon so I can build a native 64-bit Ekiga package.
--- ffmpeg.orig/libavdevice/vfwcap.c	2009-02-10 21:48:43.163695442 -0600
+++ ffmpeg/libavdevice/vfwcap.c	2009-02-10 22:17:52.199573264 -0600
@@ -28,57 +28,13 @@
 /* Defines for VFW missing from MinGW.
  * Remove this when MinGW incorporates them. */
 #define WM_CAP_START                (0x0400)
-#define WM_CAP_SET_CALLBACK_VIDEOSTREAM (WM_CAP_START + 6)
-#define WM_CAP_DRIVER_CONNECT       (WM_CAP_START + 10)
-#define WM_CAP_DRIVER_DISCONNECT    (WM_CAP_START + 11)
-#define WM_CAP_GET_VIDEOFORMAT      (WM_CAP_START + 44)
-#define WM_CAP_SET_VIDEOFORMAT      (WM_CAP_START + 45)
-#define WM_CAP_SET_PREVIEW          (WM_CAP_START + 50)
-#define WM_CAP_SET_OVERLAY          (WM_CAP_START + 51)
-#define WM_CAP_SEQUENCE_NOFILE      (WM_CAP_START + 63)
-#define WM_CAP_SET_SEQUENCE_SETUP   (WM_CAP_START + 64)
-#define WM_CAP_GET_SEQUENCE_SETUP   (WM_CAP_START + 65)
+#define WM_USER 1024
+#define WM_CAP_FIRSTA (WM_USER)
 
 #define HWND_MESSAGE                ((HWND)-3)
 
 #define BI_RGB                      0
 
-typedef struct videohdr_tag {
-    LPBYTE      lpData;
-    DWORD       dwBufferLength;
-    DWORD       dwBytesUsed;
-    DWORD       dwTimeCaptured;
-    DWORD       dwUser;
-    DWORD       dwFlags;
-    DWORD_PTR   dwReserved[4];
-} VIDEOHDR, NEAR *PVIDEOHDR, FAR * LPVIDEOHDR;
-
-typedef struct {
-    DWORD dwRequestMicroSecPerFrame;
-    BOOL  fMakeUserHitOKToCapture;
-    UINT  wPercentDropForError;
-    BOOL  fYield;
-    DWORD dwIndexSize;
-    UINT  wChunkGranularity;
-    BOOL  fUsingDOSMemory;
-    UINT  wNumVideoRequested;
-    BOOL  fCaptureAudio;
-    UINT  wNumAudioRequested;
-    UINT  vKeyAbort;
-    BOOL  fAbortLeftMouse;
-    BOOL  fAbortRightMouse;
-    BOOL  fLimitEnabled;
-    UINT  wTimeLimit;
-    BOOL  fMCIControl;
-    BOOL  fStepMCIDevice;
-    DWORD dwMCIStartTime;
-    DWORD dwMCIStopTime;
-    BOOL  fStepCaptureAt2x;
-    UINT  wStepCaptureAverageFrames;
-    DWORD dwAudioBufferSize;
-    BOOL  fDisableWriteCache;
-    UINT  AVStreamMaster;
-} CAPTUREPARMS;
 /* End of missing MinGW defines */
 
 struct vfw_ctx {
--- ptlib.orig/src/ptlib/common/ptime.cxx	2009-02-10 21:47:28.094695345 -0600
+++ ptlib/src/ptlib/common/ptime.cxx	2009-02-11 00:09:45.723594286 -0600
@@ -549,7 +549,10 @@
 #define STDAPICALLTYPE
 #endif
 
-time_t STDAPICALLTYPE PTimeParse(void *, struct tm *, int);
+time_t STDAPICALLTYPE PTimeParse(void *, struct tm *, int)
+{
+  return 0;
+}
 
 int STDAPICALLTYPE PTimeGetChar(void * stream)
 {
--- ptlib.orig/src/Makefile	2009-02-10 21:47:30.647570663 -0600
+++ ptlib/src/Makefile	2009-02-10 22:06:26.378570892 -0600
@@ -335,6 +335,7 @@
         $(PLATFORM_SRC_DIR)/win32.cxx \
         $(PLATFORM_SRC_DIR)/dllmain.cxx \
         $(PLATFORM_SRC_DIR)/ethsock.cxx \
+	$(PLATFORM_SRC_DIR)/svcproc.cxx \
         $(COMMON_SRC_DIR)/pchannel.cxx \
         $(COMMON_SRC_DIR)/pethsock.cxx \
         $(COMMON_SRC_DIR)/pconfig.cxx
--- ptlib.orig/src/ptlib/msos/vfw.cxx	2009-02-10 21:47:25.504713815 -0600
+++ ptlib/src/ptlib/msos/vfw.cxx	2009-02-10 23:29:36.844695815 -0600
@@ -49,98 +49,14 @@
    int loadVideoForWindowsStuff;
 };
     
+#include <vfw.h>
+
 #ifdef __MINGW32__
 
 #define VHDR_DONE       0x00000001
 #define VHDR_KEYFRAME   0x00000008
-
-typedef struct videohdr_tag {
-    LPBYTE      lpData;
-    DWORD       dwBufferLength;
-    DWORD       dwBytesUsed;
-    DWORD       dwTimeCaptured;
-    DWORD       dwUser;
-    DWORD       dwFlags;
-    DWORD       dwReserved[4];
-} *LPVIDEOHDR;
-
-typedef struct tagCapDriverCaps {
-    UINT        wDeviceIndex;
-    BOOL        fHasOverlay;
-    BOOL        fHasDlgVideoSource;
-    BOOL        fHasDlgVideoFormat;
-    BOOL        fHasDlgVideoDisplay;
-    BOOL        fCaptureInitialized;
-    BOOL        fDriverSuppliesPalettes;
-    HANDLE      hVideoIn;
-    HANDLE      hVideoOut;
-    HANDLE      hVideoExtIn;
-    HANDLE      hVideoExtOut;
-} CAPDRIVERCAPS, *LPCAPDRIVERCAPS;
-
-typedef struct tagCaptureParms {
-    DWORD       dwRequestMicroSecPerFrame;  // Requested capture rate
-    BOOL        fMakeUserHitOKToCapture;    // Show "Hit OK to cap" dlg?
-    WORD        wPercentDropForError;       // Give error msg if > (10%)
-    BOOL        fYield;                     // Capture via background task?
-    DWORD       dwIndexSize;                // Max index size in frames (32K)
-    WORD        wChunkGranularity;          // Junk chunk granularity (2K)
-    BOOL        fUsingDOSMemory;            // Use DOS buffers?
-    WORD        wNumVideoRequested;         // # video buffers, If 0, autocalc
-    BOOL        fCaptureAudio;              // Capture audio?
-    WORD        wNumAudioRequested;         // # audio buffers, If 0, autocalc
-    WORD        vKeyAbort;                  // Virtual key causing abort
-    BOOL        fAbortLeftMouse;            // Abort on left mouse?
-    BOOL        fAbortRightMouse;           // Abort on right mouse?
-    BOOL        fLimitEnabled;              // Use wTimeLimit?
-    WORD        wTimeLimit;                 // Seconds to capture
-    BOOL        fMCIControl;                // Use MCI video source?
-    BOOL        fStepMCIDevice;             // Step MCI device?
-    DWORD       dwMCIStartTime;             // Time to start in MS
-    DWORD       dwMCIStopTime;              // Time to stop in MS
-    BOOL        fStepCaptureAt2x;           // Perform spatial averaging 2x
-    WORD        wStepCaptureAverageFrames;  // Temporal average n Frames
-    DWORD       dwAudioBufferSize;          // Size of audio bufs (0 = default)
-    BOOL        fDisableWriteCache;         // Attempt to disable write cache
-} CAPTUREPARMS, FAR *LPCAPTUREPARMS;
-
-typedef struct tagCapStatus {
-    UINT        uiImageWidth;               // Width of the image
-    UINT        uiImageHeight;              // Height of the image
-    BOOL        fLiveWindow;                // Now Previewing video?
-    BOOL        fOverlayWindow;             // Now Overlaying video?
-    BOOL        fScale;                     // Scale image to client?
-    POINT       ptScroll;                   // Scroll position
-    BOOL        fUsingDefaultPalette;       // Using default driver palette?
-    BOOL        fAudioHardware;             // Audio hardware present?
-    BOOL        fCapFileExists;             // Does capture file exist?
-    DWORD       dwCurrentVideoFrame;        // # of video frames cap'td
-    DWORD       dwCurrentVideoFramesDropped;// # of video frames dropped
-    DWORD       dwCurrentWaveSamples;       // # of wave samples cap'td
-    DWORD       dwCurrentTimeElapsedMS;     // Elapsed capture duration
-    HPALETTE    hPalCurrent;                // Current palette in use
-    BOOL        fCapturingNow;              // Capture in progress?
-    DWORD       dwReturn;                   // Error value after any operation
-    WORD        wNumVideoAllocated;         // Actual number of video buffers
-    WORD        wNumAudioAllocated;         // Actual number of audio buffers
-} CAPSTATUS, FAR *LPCAPSTATUS;
-
-#define WM_CAP_START                    WM_USER
-#define WM_CAP_SET_CALLBACK_ERROR       (WM_CAP_START+  2)
-#define WM_CAP_SET_CALLBACK_FRAME       (WM_CAP_START+  5)
-#define WM_CAP_SET_CALLBACK_VIDEOSTREAM (WM_CAP_START+  6)
-#define WM_CAP_GET_USER_DATA            (WM_CAP_START+  8)
-#define WM_CAP_SET_USER_DATA            (WM_CAP_START+  9)
-#define WM_CAP_DRIVER_CONNECT           (WM_CAP_START+  10)
-#define WM_CAP_DRIVER_DISCONNECT        (WM_CAP_START+  11)
-#define WM_CAP_DRIVER_GET_CAPS          (WM_CAP_START+  14)
-#define WM_CAP_GET_VIDEOFORMAT          (WM_CAP_START+  44)
-#define WM_CAP_SET_VIDEOFORMAT          (WM_CAP_START+  45)
-#define WM_CAP_SET_PREVIEW              (WM_CAP_START+  50)
-#define WM_CAP_GET_STATUS               (WM_CAP_START+  54)
-#define WM_CAP_GRAB_FRAME_NOSTOP        (WM_CAP_START+  61)
-#define WM_CAP_SET_SEQUENCE_SETUP       (WM_CAP_START+  64)
-#define WM_CAP_GET_SEQUENCE_SETUP       (WM_CAP_START+  65)
+#define WM_USER 1024
+#define WM_CAP_FIRSTA (WM_USER)
 
 #define capSetCallbackOnError(hwnd, fpProc)        ((BOOL)::SendMessage(hwnd, WM_CAP_SET_CALLBACK_ERROR, 0, (LPARAM)(LPVOID)(fpProc)))
 #define capSetCallbackOnFrame(hwnd, fpProc)        ((BOOL)::SendMessage(hwnd, WM_CAP_SET_CALLBACK_FRAME, 0, (LPARAM)(LPVOID)(fpProc)))
@@ -160,24 +76,15 @@
 #define capCaptureGetSetup(hwnd, s, wSize)         ((BOOL)::SendMessage(hwnd, WM_CAP_GET_SEQUENCE_SETUP, (WPARAM)(wSize), (LPARAM)(LPVOID)(LPCAPTUREPARMS)(s)))
 
 extern "C" {
-HWND VFWAPI capCreateCaptureWindowA (LPCSTR lpszWindowName, DWORD dwStyle,
-             int x, int y, int nWidth, int nHeight,
-             HWND hwndParent, int nID);
 #ifdef _MSC_VER
 BOOL VFWAPI capGetDriverDescriptionA (WORD wDriverIndex, LPSTR lpszName,
               int cbName, LPSTR lpszVer, int cbVer);
 #endif
 }
 
-#define capGetDriverDescription capGetDriverDescriptionA
-#define capCreateCaptureWindow capCreateCaptureWindowA
-
-#else // __MINGW32
-
-  #include <vfw.h>
-
 #endif // __MINGW32
 
+
 #define STEP_GRAB_CAPTURE 1
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]