Repository: opencv
Issue: videoio compilation error in cap_msmf.cpp
Labels: bug,auto-transferred,priority: low,category: videoio,category: build/install,affected: 3.4

Transferred from http://code.opencv.org/issues/3907

```
|| Christoph Pacher on 2014-09-17 15:43
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: highgui-video
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: x86 / Windows
```
## videoio compilation error in cap_msmf.cpp

```
at line 780 MF_MT_FRAME_RATE_RANGE_MAX and line 788 MF_MT_FRAME_RATE_RANGE_MIN are undefined
```
## History
##### Christoph Pacher on 2014-09-17 15:49

```
the rest of the errors 
Error   5   error C2065: 'MF_MT_AAC_PAYLOAD_TYPE' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   839
Error   6   error C2065: 'MF_MT_AAC_AUDIO_PROFILE_LEVEL_INDICATION' : undeclared identifier \modules\videoio\src\cap_msmf.cpp   840
Error   7   error C2065: 'MF_MT_FRAME_RATE_RANGE_MAX' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   843
Error   8   error C2065: 'MF_MT_FRAME_RATE_RANGE_MIN' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   844
Error   9   error C2065: 'MF_MT_ARBITRARY_HEADER' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   879
Error   10  error C2065: 'MF_MT_ARBITRARY_FORMAT' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   880
Error   11  error C2065: 'MF_MT_IMAGE_LOSS_TOLERANT' : undeclared identifier    \modules\videoio\src\cap_msmf.cpp   881
Error   12  error C2065: 'MF_MT_MPEG4_SAMPLE_DESCRIPTION' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   882
Error   13  error C2065: 'MF_MT_MPEG4_CURRENT_SAMPLE_ENTRY' : undeclared identifier \modules\videoio\src\cap_msmf.cpp   883
Error   14  error C2065: 'MF_MT_ORIGINAL_4CC' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   884
Error   15  error C2065: 'MF_MT_ORIGINAL_WAVE_FORMAT_TAG' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   885
Error   16  error C2065: 'MF_SAMPLEGRABBERSINK_IGNORE_CLOCK' : undeclared identifier    \modules\videoio\src\cap_msmf.cpp   1257
Error   17  error C2065: 'MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   1729
Error   18  error C2065: 'MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   1731
Error   19  error C2065: 'MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME' : undeclared identifier \modules\videoio\src\cap_msmf.cpp   1954
Error   20  error C3861: 'MFEnumDeviceSources': identifier not found    \modules\videoio\src\cap_msmf.cpp   2037
Error   21  error C2065: 'MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME' : undeclared identifier \modules\videoio\src\cap_msmf.cpp   2045
Error   22  error C2065: 'MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   2146
Error   23  error C2065: 'MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_GUID' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   2148
Error   24  error C3861: 'MFEnumDeviceSources': identifier not found    \modules\videoio\src\cap_msmf.cpp   2681
Error   25  error C2065: 'MFVideoFormat_H263' : undeclared identifier   \modules\videoio\src\cap_msmf.cpp   3878
Error   26  error C2504: 'IMFSinkWriter' : base class undefined C:\Program Files (x86)\Windows Kits\8.1\Include\winrt\wrl\client.h  57
Error   27  error C2039: 'Finalize' : is not a member of 'Microsoft::WRL::Details::RemoveIUnknownBase<T>'   \modules\videoio\src\cap_msmf.cpp   3947
Error   28  error C2065: 'MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS' : undeclared identifier  \modules\videoio\src\cap_msmf.cpp   3994
Error   29  error C3861: 'MFCreateSinkWriterFromURL': identifier not found  \modules\videoio\src\cap_msmf.cpp   3999
Error   30  error C2039: 'AddStream' : is not a member of 'Microsoft::WRL::Details::RemoveIUnknownBase<T>'  \modules\videoio\src\cap_msmf.cpp   4039
Error   31  error C2039: 'SetInputMediaType' : is not a member of 'Microsoft::WRL::Details::RemoveIUnknownBase<T>'  \modules\videoio\src\cap_msmf.cpp   4074
Error   32  error C2039: 'BeginWriting' : is not a member of 'Microsoft::WRL::Details::RemoveIUnknownBase<T>'   \modules\videoio\src\cap_msmf.cpp   4080
Error   33  error C2039: 'WriteSample' : is not a member of 'Microsoft::WRL::Details::RemoveIUnknownBase<T>'    \modules\videoio\src\cap_msmf.cpp   4162
-   Assignee deleted (Vadim Pisarevsky)
```
##### Artur Wieczorek on 2014-09-30 07:31

```
Could you please tell what compiler/toolset did you use? Was it MinGW?
Under what OS did you compile the library and what was the target OS? Win RT? Win 8?
```
##### Vladislav Vinogradov on 2014-09-30 12:22

```
Hello Christoph,

Please provide more info about the issue (OS, compiler).
-   Assignee set to Christoph Pacher
-   Status changed from New to Incomplete
```
##### Christoph Rackwitz on 2014-10-31 10:54

```
I get the same error. win7 x64, opencv-2.4.9, cmade VS 2012 project.

in "c:\Program Files (x86)\Windows Kits\8.0\Include\um\mfapi.h" stuff like MF_MT_FRAME_SIZE is defined, but not stuff like MF_MT_FRAME_RATE_RANGE_MAX.

what windows kit do you recommend?
```
##### Artur Wieczorek on 2014-11-17 23:12

```
> in "c:\Program Files (x86)\Windows Kits\8.0\Include\um\mfapi.h" stuff like MF_MT_FRAME_SIZE is defined, but not stuff like MF_MT_FRAME_RATE_RANGE_MAX.
> 

This is strange. It seems that MF_MT_FRAME_RATE_RANGE_MAX is defined in mfapi.h taken from both SDK 7 and 8. Maybe you have some non-standard version of this header file? What is the size of your mfapi.h file? On my machine this is 78,019 bytes for SDK 7 and 107,631 bytes for SDK 8.
```
##### Vadim Pisarevsky on 2015-04-28 12:00

```
-   Category changed from imgproc, video to highgui-video
```