I'm trying implement a video player using mmsvideo class. I created a MMSMainWindow instance and after I created a MMSVideo instance passing the MMSMainWindow by the constructor, but I got the follow exception:

MMSFBSurface::clear() failed

How can I resolve this problem? Is there any specifically type of window that I need use whit MMSVideo?

a video window should not be a MMSMainWindow, because a MainWindow has e.g. ARGB/AYUV pixelformat because it resides typically on the graphic layer.

You can create a MMSRootWindow with the MMSW_VIDEO flag. This has two effects:
- the pixelformat of the layer will be used (this is normally
no alphachannel pixelformat)
- if using separate graphics and video layers the RootWindow will be
displayed on the video layer

The following code creates a root window which includes two
child windows and plays two videos in parallel.

The root window is a full screen window.
The child windows are located at 0,0,199,199 and
200,200,399,399 within the root window.

Please note that the child windows MUST be created
WITHOUT own surfaces (own_surface=false). This means
that the child windows share its surfaces with the
parent window (the root window). They have no own
surface memory allocated.

Please note that the child windows will be visible
only if the root window will also be shown.