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

namespace skyscraper5.Dvb.Descriptors
{
	[SkyscraperPlugin]
	[DescriptorConversionNeeded(typeof(DvbExtensionDescriptorConverter))]
    [TsDescriptor(0x7f,"NIT","BAT","SDT","EIT","TOT","PMT")]
    class ExtensionDescriptor : TsDescriptor
    {
        public ExtensionDescriptor(byte[] buffer)
        {
            DescriptorTagExtension = buffer[0];

            SelectorBytes = new byte[buffer.Length - 1];
            Array.Copy(buffer, 1, SelectorBytes, 0, buffer.Length - 1);
        }

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