On 05/23/12 08:29, Ozkan Sezer wrote:
> On Wed, May 23, 2012 at 6:02 AM, Phillip Hellewell <[email protected]> wrote:
>> Phillip Hellewell <sshock@...> writes:
>>> I'm not sure that's the whole story. I think there may be an issue with
>>> strmif.h.
>>>
>> FYI, I don't know if this was the right fix, but I moved the
>> VIDEO_STREAM_CONFIG_CAPS struct and AUDIO_STREAM_CONFIG_CAPS below it to just
>> above the #ifndef __IAMStreamConfig_INTERFACE_DEFINED__, and then I was able 
>> to
>> successfully build ffmpeg.
> I see.  The thing broke in the trunk: it is being generated by widl
> and relies on axextend.idl->IAMStreamConfig, but IAMStreamConfig
> doesn't have VIDEO_STREAM_CONFIG_CAPS and strmif.idl defines it by
> itself which results in the mess.
>
> Jacek: I think this needs your love'n'care.

The right patch is attached and patch to Wine is sent:

http://source.winehq.org/patches/data/86536

It's safe to assume that it will be in Wine today, so I will commit once
I have approval and my test build completes. Thanks for the report.


Cheers,
Jacek
commit f74c3fd3ceec3f970b7c99df4849833a7521e8a6
Author: Jacek Caban <[email protected]>
Date:   Wed May 23 14:32:47 2012 +0200

    Added VIDEO_STREAM_CONFIG_CAPS and AUDIO_STREAM_CONFIG_CAPS IDL declaration 
and removed duplicated IAMStreamConfig declaration

diff --git a/mingw-w64-headers/include/axextend.idl 
b/mingw-w64-headers/include/axextend.idl
index 662d6e5..acc66a5 100644
--- a/mingw-w64-headers/include/axextend.idl
+++ b/mingw-w64-headers/include/axextend.idl
@@ -791,6 +791,43 @@ interface IStreamBuilder : IUnknown
 ]
 interface IAMStreamConfig : IUnknown
 {
+    typedef struct _VIDEO_STREAM_CONFIG_CAPS {
+        GUID  guid;
+        ULONG VideoStandard;
+        SIZE  InputSize;
+        SIZE  MinCroppingSize;
+        SIZE  MaxCroppingSize;
+        int   CropGranularityX;
+        int   CropGranularityY;
+        int   CropAlignX;
+        int   CropAlignY;
+        SIZE  MinOutputSize;
+        SIZE  MaxOutputSize;
+        int   OutputGranularityX;
+        int   OutputGranularityY;
+        int   StretchTapsX;
+        int   StretchTapsY;
+        int   ShrinkTapsX;
+        int   ShrinkTapsY;
+        LONGLONG MinFrameInterval;
+        LONGLONG MaxFrameInterval;
+        LONG  MinBitsPerSecond;
+        LONG  MaxBitsPerSecond;
+    } VIDEO_STREAM_CONFIG_CAPS;
+
+    typedef struct _AUDIO_STREAM_CONFIG_CAPS {
+        GUID guid;
+        ULONG MinimumChannels;
+        ULONG MaximumChannels;
+        ULONG ChannelsGranularity;
+        ULONG MinimumBitsPerSample;
+        ULONG MaximumBitsPerSample;
+        ULONG BitsPerSampleGranularity;
+        ULONG MinimumSampleFrequency;
+        ULONG MaximumSampleFrequency;
+        ULONG SampleFrequencyGranularity;
+    } AUDIO_STREAM_CONFIG_CAPS;
+
     HRESULT SetFormat( [in] AM_MEDIA_TYPE *pmt);
     HRESULT GetFormat( [in] AM_MEDIA_TYPE **pmt);
     HRESULT GetNumberOfCapabilities( [out] int *piCount, [out] int *piSize);
diff --git a/mingw-w64-headers/include/strmif.idl 
b/mingw-w64-headers/include/strmif.idl
index 4e3fb27..8312085 100644
--- a/mingw-w64-headers/include/strmif.idl
+++ b/mingw-w64-headers/include/strmif.idl
@@ -621,89 +621,6 @@ cpp_quote("  HRESULT WINAPI 
IAMStreamControl_GetInfo_Proxy(IAMStreamControl *Thi
 cpp_quote("  void __RPC_STUB IAMStreamControl_GetInfo_Stub(IRpcStubBuffer 
*This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD 
*_pdwStubPhase);")
 cpp_quote("#endif")
 cpp_quote("")
-cpp_quote("#ifndef __IAMStreamConfig_INTERFACE_DEFINED__")
-cpp_quote("#define __IAMStreamConfig_INTERFACE_DEFINED__")
-cpp_quote("  typedef struct _VIDEO_STREAM_CONFIG_CAPS {")   // TODO!
-cpp_quote("    GUID guid;")
-cpp_quote("    ULONG VideoStandard;")
-cpp_quote("    SIZE InputSize;")
-cpp_quote("    SIZE MinCroppingSize;")
-cpp_quote("    SIZE MaxCroppingSize;")
-cpp_quote("    int CropGranularityX;")
-cpp_quote("    int CropGranularityY;")
-cpp_quote("    int CropAlignX;")
-cpp_quote("    int CropAlignY;")
-cpp_quote("    SIZE MinOutputSize;")
-cpp_quote("    SIZE MaxOutputSize;")
-cpp_quote("    int OutputGranularityX;")
-cpp_quote("    int OutputGranularityY;")
-cpp_quote("    int StretchTapsX;")
-cpp_quote("    int StretchTapsY;")
-cpp_quote("    int ShrinkTapsX;")
-cpp_quote("    int ShrinkTapsY;")
-cpp_quote("    LONGLONG MinFrameInterval;")
-cpp_quote("    LONGLONG MaxFrameInterval;")
-cpp_quote("    LONG MinBitsPerSecond;")
-cpp_quote("    LONG MaxBitsPerSecond;")
-cpp_quote("  } VIDEO_STREAM_CONFIG_CAPS;")
-cpp_quote("")
-cpp_quote("  typedef struct _AUDIO_STREAM_CONFIG_CAPS {")
-cpp_quote("    GUID guid;")
-cpp_quote("    ULONG MinimumChannels;")
-cpp_quote("    ULONG MaximumChannels;")
-cpp_quote("    ULONG ChannelsGranularity;")
-cpp_quote("    ULONG MinimumBitsPerSample;")
-cpp_quote("    ULONG MaximumBitsPerSample;")
-cpp_quote("    ULONG BitsPerSampleGranularity;")
-cpp_quote("    ULONG MinimumSampleFrequency;")
-cpp_quote("    ULONG MaximumSampleFrequency;")
-cpp_quote("    ULONG SampleFrequencyGranularity;")
-cpp_quote("  } AUDIO_STREAM_CONFIG_CAPS;")
-cpp_quote("")
-cpp_quote("  EXTERN_C const IID IID_IAMStreamConfig;")
-cpp_quote("#if defined(__cplusplus) && !defined(CINTERFACE)")
-cpp_quote("  struct IAMStreamConfig : public IUnknown {")
-cpp_quote("  public:")
-cpp_quote("    virtual HRESULT WINAPI SetFormat(AM_MEDIA_TYPE *pmt) = 0;")
-cpp_quote("    virtual HRESULT WINAPI GetFormat(AM_MEDIA_TYPE **ppmt) = 0;")
-cpp_quote("    virtual HRESULT WINAPI GetNumberOfCapabilities(int *piCount,int 
*piSize) = 0;")
-cpp_quote("    virtual HRESULT WINAPI GetStreamCaps(int iIndex,AM_MEDIA_TYPE 
**ppmt,BYTE *pSCC) = 0;")
-cpp_quote("  };")
-cpp_quote("#else")
-cpp_quote("  typedef struct IAMStreamConfigVtbl {")
-cpp_quote("    BEGIN_INTERFACE")
-cpp_quote("      HRESULT (WINAPI *QueryInterface)(IAMStreamConfig *This,REFIID 
riid,void **ppvObject);")
-cpp_quote("      ULONG (WINAPI *AddRef)(IAMStreamConfig *This);")
-cpp_quote("      ULONG (WINAPI *Release)(IAMStreamConfig *This);")
-cpp_quote("      HRESULT (WINAPI *SetFormat)(IAMStreamConfig 
*This,AM_MEDIA_TYPE *pmt);")
-cpp_quote("      HRESULT (WINAPI *GetFormat)(IAMStreamConfig 
*This,AM_MEDIA_TYPE **ppmt);")
-cpp_quote("      HRESULT (WINAPI *GetNumberOfCapabilities)(IAMStreamConfig 
*This,int *piCount,int *piSize);")
-cpp_quote("      HRESULT (WINAPI *GetStreamCaps)(IAMStreamConfig *This,int 
iIndex,AM_MEDIA_TYPE **ppmt,BYTE *pSCC);")
-cpp_quote("    END_INTERFACE")
-cpp_quote("  } IAMStreamConfigVtbl;")
-cpp_quote("  struct IAMStreamConfig {")
-cpp_quote("    CONST_VTBL struct IAMStreamConfigVtbl *lpVtbl;")
-cpp_quote("  };")
-cpp_quote("#ifdef COBJMACROS")
-cpp_quote("#define IAMStreamConfig_QueryInterface(This,riid,ppvObject) 
(This)->lpVtbl->QueryInterface(This,riid,ppvObject)")
-cpp_quote("#define IAMStreamConfig_AddRef(This) (This)->lpVtbl->AddRef(This)")
-cpp_quote("#define IAMStreamConfig_Release(This) 
(This)->lpVtbl->Release(This)")
-cpp_quote("#define IAMStreamConfig_SetFormat(This,pmt) 
(This)->lpVtbl->SetFormat(This,pmt)")
-cpp_quote("#define IAMStreamConfig_GetFormat(This,ppmt) 
(This)->lpVtbl->GetFormat(This,ppmt)")
-cpp_quote("#define 
IAMStreamConfig_GetNumberOfCapabilities(This,piCount,piSize) 
(This)->lpVtbl->GetNumberOfCapabilities(This,piCount,piSize)")
-cpp_quote("#define IAMStreamConfig_GetStreamCaps(This,iIndex,ppmt,pSCC) 
(This)->lpVtbl->GetStreamCaps(This,iIndex,ppmt,pSCC)")
-cpp_quote("#endif")
-cpp_quote("#endif")
-cpp_quote("  HRESULT WINAPI IAMStreamConfig_SetFormat_Proxy(IAMStreamConfig 
*This,AM_MEDIA_TYPE *pmt);")
-cpp_quote("  void __RPC_STUB IAMStreamConfig_SetFormat_Stub(IRpcStubBuffer 
*This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD 
*_pdwStubPhase);")
-cpp_quote("  HRESULT WINAPI IAMStreamConfig_GetFormat_Proxy(IAMStreamConfig 
*This,AM_MEDIA_TYPE **ppmt);")
-cpp_quote("  void __RPC_STUB IAMStreamConfig_GetFormat_Stub(IRpcStubBuffer 
*This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD 
*_pdwStubPhase);")
-cpp_quote("  HRESULT WINAPI 
IAMStreamConfig_GetNumberOfCapabilities_Proxy(IAMStreamConfig *This,int 
*piCount,int *piSize);")
-cpp_quote("  void __RPC_STUB 
IAMStreamConfig_GetNumberOfCapabilities_Stub(IRpcStubBuffer 
*This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD 
*_pdwStubPhase);")
-cpp_quote("  HRESULT WINAPI 
IAMStreamConfig_GetStreamCaps_Proxy(IAMStreamConfig *This,int 
iIndex,AM_MEDIA_TYPE **ppmt,BYTE *pSCC);")
-cpp_quote("  void __RPC_STUB IAMStreamConfig_GetStreamCaps_Stub(IRpcStubBuffer 
*This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD 
*_pdwStubPhase);")
-cpp_quote("#endif")
-cpp_quote("")
 cpp_quote("#ifndef __IConfigInterleaving_INTERFACE_DEFINED__")
 cpp_quote("#define __IConfigInterleaving_INTERFACE_DEFINED__")
 cpp_quote("  typedef enum __MIDL_IConfigInterleaving_0001 {")
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to