/* * private string GetAssemblerId(NetworkHost sourceHost, ushort sourcePort, NetworkHost destinationHost, ushort destinationPort, bool tcpTransfer) { * return GetAssemblerId(sourceHost, sourcePort, destinationHost, destinationPort, tcpTransfer, ""); * } * private string GetAssemblerId(NetworkHost sourceHost, ushort sourcePort, NetworkHost destinationHost, ushort destinationPort, bool tcpTransfer, string extendedFileId) { * return sourceHost.IPAddress.ToString()+sourcePort.ToString()+destinationHost.IPAddress.ToString()+destinationPort.ToString()+tcpTransfer.ToString()+extendedFileId; * } */ private string GetAssemblerId(FiveTuple fiveTuple, bool transferIsClientToServer, string extendedFileId = "") { return(fiveTuple.ToString(transferIsClientToServer) + extendedFileId); }
public AuFileAssembler(string auFilename, FileStreamAssemblerList fileStreamAssemblerList, FiveTuple fiveTuple, FileStreamTypes fileStreamType, long initialFrameNumber, DateTime startTime, Encoding auEncoding, uint sampleRate = 8000) : base(fileStreamAssemblerList, fiveTuple, true, fileStreamType, auFilename, "/", fileStreamType.ToString() + " " + fiveTuple.ToString(), initialFrameNumber, startTime) { this.sampleRate = sampleRate; this.AuEncoding = auEncoding; //unknown file size this.FileContentLength = -1; this.FileSegmentRemainingBytes = -1; }
public WavFileAssembler(string wavFilename, FileStreamAssemblerList fileStreamAssemblerList, FiveTuple fiveTuple, FileStreamTypes fileStreamType, long initialFrameNumber, DateTime startTime, uint sampleRate = 8000) : base(fileStreamAssemblerList, fiveTuple, true, fileStreamType, wavFilename, "/", fileStreamType.ToString() + " " + fiveTuple.ToString(), initialFrameNumber, startTime) { if (fileStreamType == FileStreamTypes.RTP) { this.FileContentLength = -1; this.FileSegmentRemainingBytes = -1; //this.fileStreamAssemblerList.Add(assembler); } this.sampleRate = sampleRate; }