Exemple #1
0
        private void AddSubmenu(StreamDescriptionsList streamDescriptionsList, StreamType streamType)
        {
            fixed(byte *text = ResourceLoader.GetBytes(streamDescriptionsList.StreamType.ToString()))
            DllImports.AddOption(streamDescriptionsList.Id, text, streamDescriptionsList.StreamType.ToString().Length);

            for (int id = 0; id < streamDescriptionsList.Descriptions.Count; ++id)
            {
                var s = streamDescriptionsList.Descriptions[id];
                Logger?.Info($"stream.Description=\"{s.Description}\", stream.Id=\"{s.Id}\", stream.Type=\"{s.StreamType}\", stream.Default=\"{s.Default}\"");
                if (s.Default)
                {
                    streamDescriptionsList.Active = id;
                    if (streamType == StreamType.Subtitle)
                    {
                        SubtitlesOn = true;
                    }
                }
                fixed(byte *text = ResourceLoader.GetBytes(s.Description))
                DllImports.AddSubOption(streamDescriptionsList.Id, id, text, s.Description.Length);
            }
        }