次の方法で共有


IWMWriterSink interface (wmsdkidl.h)

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The IWMWriterSink interface is the basic interface of all writer sinks, including the file, network, and push sinks defined in the Windows Media Format SDK, and custom sinks. If you are using one of the defined writer sinks, you never need to deal with the methods of this interface. If you are creating your own custom writer sink, you must implement these methods in your application.

This interface exists on the writer file sink object, the writer network sink object, and the writer push sink object. You should never obtain a pointer to this interface from one of these objects, however, as its methods are called internally by the writer sink objects and the writer object. You can create a class in your application that inherits from this interface to make your own sink.

Inheritance

The IWMWriterSink interface inherits from the IUnknown interface. IWMWriterSink also has these types of members:

Methods

The IWMWriterSink interface has these methods.

 
IWMWriterSink::AllocateDataUnit

The AllocateDataUnit method is called by the writer object when it needs a buffer to deliver a data unit.
IWMWriterSink::IsRealTime

The IsRealTime is called by the writer to determine whether the sink needs data units to be delivered in real time. It is up to you to decide whether your custom sink requires real-time delivery.
IWMWriterSink::OnDataUnit

The OnDataUnit method is called by the writer when a data unit is ready for the sink. How your application handles the data unit depends upon the destination of the content.
IWMWriterSink::OnEndWriting

The OnEndWriting method is called by the writer when writing is complete. This method should conclude operations for your sink. For example, the writer file sink closes and indexes the file.
IWMWriterSink::OnHeader

The OnHeader method is called by the writer when the ASF header is ready for the sink.

Requirements

Requirement Value
Target Platform Windows
Header wmsdkidl.h

See also

Interfaces

Writer File Sink Object

Writer Network Sink Object

Writer Push Sink Object