using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Mpeg2;
using skyscraper5.Skyscraper.IO;
using skyscraper5.Skyscraper.Plugins;

namespace skyscraper5.Mhp.Descriptors
{
    /// <summary>
    /// Found at https://www.tvwithoutborders.com/tutorials/an-introduction-to-ocap/ocap-application-signalling/
    /// </summary>
    [TsDescriptor(0x67,"AIT")]
    [SkyscraperPlugin]
	class OcapUnboundApplicationDescriptor : TsDescriptor
    {
        public OcapUnboundApplicationDescriptor(byte[] buffer)
        {
            MemoryStream ms = new MemoryStream(buffer);
            ServiceId = ms.ReadUInt24BE();
            VersionNumber = ms.ReadUInt32BE();
            Valid = true;
        }

        public uint VersionNumber { get; private set; }

        public uint ServiceId { get; private set; }
    }
}
