public static TimeSpan?OriginalProgramClockReference(byte[] adaptationField) { int offset = 0; AdaptationFieldFlags adaptationFlags = (AdaptationFieldFlags)adaptationField[offset++]; if (adaptationFlags.HasFlag(AdaptationFieldFlags.ProgramClockReference)) { offset += ProgramClockReferenceSize; } return((adaptationFlags.HasFlag(AdaptationFieldFlags.OriginalProgramClockReference)) ? (TimeSpan?)ProgramClockReferenceToTimeSpan(adaptationField, offset) : null); }
public static int SpliceCountdown(byte[] adaptationField) { int offset = 0; AdaptationFieldFlags adaptationFlags = (AdaptationFieldFlags)adaptationField[offset++]; if (adaptationFlags.HasFlag(AdaptationFieldFlags.ProgramClockReference)) { offset += ProgramClockReferenceSize; } if (adaptationFlags.HasFlag(AdaptationFieldFlags.OriginalProgramClockReference)) { offset += ProgramClockReferenceSize; } return(adaptationFlags.HasFlag(AdaptationFieldFlags.SpliceCountdown) ? adaptationField[offset] : -1); }