다음을 통해 공유


IOverlayNotify Interface

 
Microsoft DirectShow 9.0

IOverlayNotify Interface

The IOverlayNotify interface provides an upstream filter, such as a decoder, with notifications of changes to the rendering window. This includes notifications of changes to the palette, color key, and window position, and visible region (clipping) changes.

Most software video decoders let the video renderer draw the decompressed images they produce by passing the media samples to the IMemInputPin interface on the renderer's input pin.

However, some video decoding filters (typically hardware decompression boards) handle the drawing of the images themselves, perhaps by using a VGA connector. These filters do not need to use IMemInputPin, but can instead use the IOverlay interface provided by the renderer input pin. Through this interface, the decoder can be notified when the window position or size changes, or when the current system palette changes in order to install and change color keys and palettes.

Decoders that do their own drawing should implement the IOverlayNotify and IOverlayNotify2 interfaces.  The renderer uses this interface to notify the decoder whenever the window size or position changes, the system palette changes, or a different color key is used. The decoder should call the IOverlay::Advise method on the renderer's input pin, to set up the callback. Once the callback is established, the renderer calls the decoder's IOverlayNotify methods when the appropriate events occur. To cancel the callback, use the IOverlay::Unadvise method.

The video renderer is the only filter that calls the methods on this interface. This is done automatically by the default video renderer. If you are writing a replacement video renderer, you will need to use the methods on this interface if your filter supports IOverlay and this interface is passed to your filter in an IOverlay::Advise call.

In addition to the methods inherited from IUnknown, the IOverlayNotify interface exposes the following methods.

Method Description
OnPaletteChange Provides notification that the palette of the window has changed.
OnClipChange Provides notification that the window's visible region has changed.
OnColorKeyChange Provides notification that the chroma key has changed.
OnPositionChange Provides notification that the position has changed.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.