示例#1
0
            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);
            }
示例#2
0
            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);
            }