You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Cinegy.TsDecoder/TransportStream/TsPacketFactory.cs
+39Lines changed: 39 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,33 @@ public TsPacketFactory(byte TsPacketSize)
39
39
TsPacketFixedSize=TsPacketSize;
40
40
}
41
41
42
+
/// <summary>
43
+
/// Accepts a data array, and loads this data into the factory. When data is pushed, it will raise a TsPacketReady event for each TS packet that is generated.
/// Returns TsPackets for any input data. If data ends with incomplete packet, this is stored and prepended to next call.
44
65
/// If data stream is restarted, prior buffer will be skipped as sync will not be acknowledged - but any restarts should being with first byte as sync to avoid possible merging with prior data if lengths coincide.
45
66
/// </summary>
46
67
/// <param name="data">Aligned or unaligned data buffer containing TS packets. Aligned is more efficient if possible.</param>
68
+
/// <param name="dataSize">Optional length parameter to limit amount of data read from referenced array.</param>
47
69
/// <param name="retainPayload">Optional parameter to trigger any resulting TS payload to be copied into the returned structure</param>
48
70
/// <param name="preserveSourceData">Optional parameter to trigger complete copy of source data for TS packet to be held in array for quick access</param>
49
71
/// <returns>Complete TS packets from this data and any prior partial data rolled over.</returns>
@@ -301,5 +323,22 @@ public static int FindSync(IList<byte> tsData, int offset, int TsPacketSize)
0 commit comments