/// <summary> /// Sets the media type to the filter config object. /// </summary> /// <param name="config">The filter config object.</param> public void SetMediaType(ITStreamSourceFilterConfig config) { this.CheckDisposed(); this.CheckNonConfigured(); var amt = new AMMediaType(); try { amt.majorType = MediaType.Stream; amt.subType = MediaSubType.Mpeg2Transport; amt.formatType = Guid.Empty; var hr = config.SetMediaType(amt, Constants.DShowNumberOfPacketsTS * Constants.TSPacketSize); DsError.ThrowExceptionForHR(hr); } finally { DsUtils.FreeAMMediaType(amt); } }