Пример #1
0
 private void Clear()
 {
     if (null != this._programAssociationTable)
     {
         this._programAssociationTable.Clear();
         this._programAssociationTable = (TsProgramAssociationTable)null;
     }
     this._packetHandlers.Clear();
     this._destinationLength = 0;
 }
Пример #2
0
 public void Initialize(Func <TsStreamType, uint, IMediaStreamMetadata, TsPacketizedElementaryStream> pesStreamFactory, Action <IProgramStreams> programStreamsHandler = null)
 {
     if (pesStreamFactory == null)
     {
         throw new ArgumentNullException("pesStreamFactory");
     }
     this._pesStreamFactory = pesStreamFactory;
     this.Clear();
     this._programAssociationTable = this._programAssociationTableFactory.Create((ITsDecoder)this, (Func <int, bool>)(program => true), programStreamsHandler);
     this._packetHandlers[0U]      = new Action <TsPacket>(((TsProgramSpecificInformation)this._programAssociationTable).Add);
     this._tsIndex = 0;
 }