protected void AddMPEG2DemuxFilter()
{
if (this.H264DecoderDevice != null && isH264ElecardSpecialMode)
this.mpeg2Demux = (IBaseFilter)new ElecardMPEGDemultiplexer();
else
this.mpeg2Demux = (IBaseFilter)new MPEG2Demultiplexer();
int hr = this.graphBuilder.AddFilter(this.mpeg2Demux, "MPEG2 Demultiplexer");
DsError.ThrowExceptionForHR(hr);
//IMpeg2Demultiplexer mpeg2Demultiplexer = this.mpeg2Demux as IMpeg2Demultiplexer;
////Log.WriteFile(Log.LogType.Log, false, "DVBGraphBDA: create mpg4 video pin");
//AMMediaType mediaMPG4 = new AMMediaType();
//mediaMPG4.majorType = MediaType.;
//mediaMPG4.subType = MediaSubType.; //new Guid(0x8d2d71cb, 0x243f, 0x45e3, 0xb2, 0xd8, 0x5f, 0xd7, 0x96, 0x7e, 0xc0, 0x9b);
//mediaMPG4.sampleSize = 0;
//mediaMPG4.temporalCompression = false;
//mediaMPG4.fixedSizeSamples = false;
//mediaMPG4.unkPtr = IntPtr.Zero;
//mediaMPG4.formatType = FormatType.Mpeg2Video;
//mediaMPG4.formatSize = Mpeg2ProgramVideo.GetLength(0);
////mediaMPG4.formatPtr = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(mediaMPG4.formatSize);
////System.Runtime.InteropServices.Marshal.Copy(Mpeg2ProgramVideo, 0, mediaMPG4.formatPtr, mediaMPG4.formatSize);
//IntPtr formatPtr = Marshal.AllocHGlobal(Mpeg2ProgramVideo.Length);
//Marshal.Copy(Mpeg2ProgramVideo, 0, formatPtr, Mpeg2ProgramVideo.Length);
//mediaMPG4.formatPtr = formatPtr;
//IPin pinDemuxerVideoMPEG4;
//int hr = mpeg2Demultiplexer.CreateOutputPin(mediaMPG4, "H264", out pinDemuxerVideoMPEG4);
//if (pinDemuxerVideoMPEG4 != null)
// Marshal.ReleaseComObject(pinDemuxerVideoMPEG4);
//Marshal.FreeHGlobal(formatPtr);
}