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

namespace skyscraper5.Mpeg2.Descriptors
{
	[SkyscraperPlugin]
	[TsDescriptor(0x3f,"PMT")]
    [DescriptorConversionNeeded(typeof(Mpeg2ExtensionDescriptorConverter))]
    class ExtensionDescriptor : TsDescriptor
    {
        public ExtensionDescriptor(byte[] buffer)
        {
            ExtensionDescriptorTag = buffer[0];
            SelectorBytes = new byte[buffer.Length - 1];
            Array.Copy(buffer, 1, SelectorBytes, 0, SelectorBytes.Length);
        }

        public byte[] SelectorBytes { get; private set; }

        public byte ExtensionDescriptorTag { get; private set; }
    }
}
