public static HResult SetObject(this IMFTopologyNode topologyNode, IMFStreamSink streamSink) { if (topologyNode == null) { throw new ArgumentNullException("topologyNode"); } return(topologyNode.SetObject(streamSink)); }
public static HResult GetObject(this IMFTopologyNode topologyNode, out IMFStreamSink streamSink) { if (topologyNode == null) { throw new ArgumentNullException("topologyNode"); } object tmp; HResult hr = topologyNode.GetObject(out tmp); streamSink = hr.Succeeded() ? tmp as IMFStreamSink : null; return(hr); }
/// <summary> /// Sets a media sink for the media item. A media sink is an object that consumes the data from one or more streams. /// </summary> /// <param name="mediaItem">A valid IMFPMediaItem instance.</param> /// <param name="streamIndex">Zero-based index of a streamIndex on the media source.</param> /// <param name="streamSink">An instance to a streamIndex sink.</param> /// <returns>If this function succeeds, it returns the S_OK member. Otherwise, it returns another HResult's member that describe the error.</returns> public static HResult SetStreamSink(this IMFPMediaItem mediaItem, int streamIndex, IMFStreamSink streamSink) { if (mediaItem == null) { throw new ArgumentNullException("mediaItem"); } return(mediaItem.SetStreamSink(streamIndex, streamSink)); }